Documentation ¶
Index ¶
- Constants
- type ApiClient
- func (apiClient *ApiClient) GetAllOHLCVMarketData(symbol models.Symbol, interval time.Duration, startTime time.Time, ...) ([]*models.OHLCVMarketData, error)
- func (apiClient *ApiClient) GetExchangeIdentifier() string
- func (apiClient *ApiClient) GetOHLCVMarketData(symbol models.Symbol, interval time.Duration, startTime time.Time, ...) ([]*models.OHLCVMarketData, error)
- func (apiClient *ApiClient) GetRawMarketData() ([]*models.RawMarketData, error)
- func (apiClient *ApiClient) GetSupportedPairs() ([]*models.Symbol, error)
- type CandleStickData
- type Instrument
- type Interval
Constants ¶
View Source
const (
OKEX = "OKEX"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
func NewOkexAPIClient ¶
func NewOkexAPIClient() *ApiClient
func (*ApiClient) GetAllOHLCVMarketData ¶
func (apiClient *ApiClient) GetAllOHLCVMarketData( symbol models.Symbol, interval time.Duration, startTime time.Time, endTime time.Time, ) ([]*models.OHLCVMarketData, error)
GetAllOHLCVMarketData get CandleStick data from [startTime, endTime] with pagination
func (*ApiClient) GetExchangeIdentifier ¶
func (*ApiClient) GetOHLCVMarketData ¶
func (apiClient *ApiClient) GetOHLCVMarketData( symbol models.Symbol, interval time.Duration, startTime time.Time, endTime time.Time, ) ([]*models.OHLCVMarketData, error)
GetOHLCVMarketData get CandleStick data from [startTime, endTime]
func (*ApiClient) GetRawMarketData ¶
func (apiClient *ApiClient) GetRawMarketData() ([]*models.RawMarketData, error)
type CandleStickData ¶
type CandleStickData struct { OpenTime float64 OpenPrice float64 HighPrice float64 LowPrice float64 ClosePrice float64 Volume float64 }
CandleStickData https://www.okex.com/docs/en/#spot-line
func (*CandleStickData) UnmarshalJSON ¶
func (candleStickResponse *CandleStickData) UnmarshalJSON( data []byte, ) (err error)
type Instrument ¶
type Instrument struct { BaseCurrency string `json:"base_currency"` Category string `json:"category"` InstrumentID string `json:"instrument_id"` MinSize string `json:"min_size"` QuoteCurrency string `json:"quote_currency"` SizeIncrement string `json:"size_increment"` TickSize string `json:"tick_size"` }
Instrument https://www.okex.com/docs/en/#spot-some
Click to show internal directories.
Click to hide internal directories.