mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 15:10:19 +00:00
* GCTCLI param and linter fixes * Linter fixes * Add more basic validation and address codelingo nits * Add arg number support to cancelOrder and more validity checks
29 lines
926 B
Go
29 lines
926 B
Go
package okcoin
|
|
|
|
import (
|
|
"github.com/thrasher-corp/gocryptotrader/common"
|
|
"github.com/thrasher-corp/gocryptotrader/currency"
|
|
exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
|
|
"github.com/thrasher-corp/gocryptotrader/exchanges/okgroup"
|
|
)
|
|
|
|
const (
|
|
okCoinAuthRate = 600
|
|
okCoinUnauthRate = 600
|
|
okCoinAPIPath = "api/"
|
|
okCoinAPIURL = "https://www.okcoin.com/" + okCoinAPIPath
|
|
okCoinAPIVersion = "/v3/"
|
|
okCoinExchangeName = "OKCOIN International"
|
|
okCoinWebsocketURL = "wss://real.okcoin.com:10442/ws/v3"
|
|
)
|
|
|
|
// OKCoin bases all methods off okgroup implementation
|
|
type OKCoin struct {
|
|
okgroup.OKGroup
|
|
}
|
|
|
|
// GetHistoricCandles returns rangesize number of candles for the given granularity and pair starting from the latest available
|
|
func (o *OKCoin) GetHistoricCandles(pair currency.Pair, rangesize, granularity int64) ([]exchange.Candle, error) {
|
|
return nil, common.ErrFunctionNotSupported
|
|
}
|