Documentation ¶
Index ¶
Constants ¶
View Source
const (
TickerTable = "futures/ticker"
)
Variables ¶
This section is empty.
Functions ¶
func FetchSymbolByIndex ¶
func FetchSymbolByIndex(index string) []exchange.FuturesSymbol
func NewTickerChannel ¶
func NewTickerChannel(symbol exchange.FuturesSymbol) exchange.Channel
func ParseSymbol ¶
func ParseSymbol(symbol string) (exchange.FuturesSymbol, error)
Types ¶
type OkexSymbol ¶
type OkexSymbol struct { InstrumentID string `json:"instrument_id"` UnderlyingIndex string `json:"underlying_index"` QuoteCurrency string `json:"quote_currency"` TickSize decimal.Decimal `json:"tick_size"` ContractVal decimal.Decimal `json:"contract_val"` Listing string `json:"listing"` Delivery string `json:"delivery"` TradeIncrement decimal.Decimal `json:"trade_increment"` Alias string `json:"alias"` Underlying string `json:"underlying"` BaseCurrency string `json:"base_currency"` SettlementCurrency string `json:"settlement_currency"` IsInverse string `json:"is_inverse"` ContractValCurrency string `json:"contract_val_currency"` Category string `json:"category"` }
func (*OkexSymbol) Parse ¶
func (os *OkexSymbol) Parse() (*Symbol, error)
type RestClient ¶
type RestClient struct {
*okex.RestClient
}
func NewRestClient ¶
func NewRestClient(key, secret, password string) *RestClient
func (*RestClient) RawSymbols ¶
func (rc *RestClient) RawSymbols(ctx context.Context) ([]OkexSymbol, error)
RawSymbols return okex future symbols
func (*RestClient) Symbols ¶
func (rc *RestClient) Symbols(ctx context.Context) ([]exchange.FuturesSymbol, error)
type Symbol ¶
type Symbol struct {
*exchange.BaseFutureSymbol
}
type Ticker ¶
type Ticker struct { Symbol exchange.FuturesSymbol Last decimal.Decimal LastQty decimal.Decimal BestBid decimal.Decimal BestBidSize decimal.Decimal BestAsk decimal.Decimal BestAskSize decimal.Decimal Open24H decimal.Decimal High24H decimal.Decimal Low24H decimal.Decimal Volume24H decimal.Decimal VolumeToken24H decimal.Decimal OpenInterest decimal.Decimal Time time.Time }
Click to show internal directories.
Click to hide internal directories.