Documentation ¶
Index ¶
- func AdaptKlinePeriodToSymbol(period model.KlinePeriod) string
- func AdaptOrderClientIDOptionParameter(params *url.Values)
- func AdaptQtyOrPricePrecision(sz string) int
- type BaseResp
- type ErrorResponseData
- type OKxV5
- func (okx *OKxV5) DoNoAuthRequest(httpMethod, reqUrl string, params *url.Values) ([]byte, []byte, error)
- func (okx *OKxV5) GetDepth(pair CurrencyPair, size int, opt ...OptionParameter) (*Depth, []byte, error)
- func (okx *OKxV5) GetExchangeInfo(instType string, opt ...OptionParameter) (map[string]CurrencyPair, []byte, error)
- func (okx *OKxV5) GetFundingRate(pair CurrencyPair, opts ...OptionParameter) (rate *FundingRate, responseBody []byte, err error)
- func (okx *OKxV5) GetFundingRateHistory(pair CurrencyPair, limit int, opts ...OptionParameter) (rates []FundingRate, responseBody []byte, err error)
- func (okx *OKxV5) GetKline(pair CurrencyPair, period KlinePeriod, opt ...OptionParameter) ([]Kline, []byte, error)
- func (okx *OKxV5) GetKlineHistoryCandles(pair CurrencyPair, period KlinePeriod, opt ...OptionParameter) ([]Kline, []byte, error)
- func (okx *OKxV5) GetName() string
- func (okx *OKxV5) GetTicker(pair CurrencyPair, opt ...OptionParameter) (*Ticker, []byte, error)
- func (okx *OKxV5) NewPrvApi(opts ...ApiOption) *Prv
- func (okx *OKxV5) WithUnmarshalOption(opts ...UnmarshalerOption) *OKxV5
- func (okx *OKxV5) WithUriOption(opts ...UriOption) *OKxV5
- type Prv
- func (prv *Prv) CancelOrder(pair model.CurrencyPair, id string, opt ...model.OptionParameter) ([]byte, error)
- func (prv *Prv) CreateOrder(pair model.CurrencyPair, qty, price float64, side model.OrderSide, ...) (*model.Order, []byte, error)
- func (prv *Prv) DoAuthRequest(httpMethod, reqUrl string, params *url.Values, headers map[string]string) ([]byte, []byte, error)
- func (prv *Prv) DoSignParam(httpMethod, apiUri, apiSecret, reqBody string) (signStr, timestamp string)
- func (prv *Prv) GetAccount(coin string) (map[string]model.Account, []byte, error)
- func (prv *Prv) GetHistoryOrders(pair model.CurrencyPair, opt ...model.OptionParameter) ([]model.Order, []byte, error)
- func (prv *Prv) GetOrderInfo(pair model.CurrencyPair, id string, opt ...model.OptionParameter) (*model.Order, []byte, error)
- func (prv *Prv) GetPendingOrders(pair model.CurrencyPair, opt ...model.OptionParameter) ([]model.Order, []byte, error)
- type RespUnmarshaler
- func (un *RespUnmarshaler) UnmarshalCancelOrderResponse(data []byte) error
- func (un *RespUnmarshaler) UnmarshalCreateOrderResponse(data []byte) (*Order, error)
- func (un *RespUnmarshaler) UnmarshalDepth(data []byte) (*Depth, error)
- func (un *RespUnmarshaler) UnmarshalGetAccountResponse(data []byte) (map[string]Account, error)
- func (un *RespUnmarshaler) UnmarshalGetExchangeInfoResponse(data []byte) (map[string]CurrencyPair, error)
- func (un *RespUnmarshaler) UnmarshalGetFundingRateHistoryResponse(data []byte) ([]FundingRate, error)
- func (un *RespUnmarshaler) UnmarshalGetFundingRateResponse(data []byte) (*FundingRate, error)
- func (un *RespUnmarshaler) UnmarshalGetFuturesAccountResponse(data []byte) (map[string]FuturesAccount, error)
- func (un *RespUnmarshaler) UnmarshalGetHistoryOrdersResponse(data []byte) ([]Order, error)
- func (un *RespUnmarshaler) UnmarshalGetKlineResponse(data []byte) ([]Kline, error)
- func (un *RespUnmarshaler) UnmarshalGetOrderInfoResponse(data []byte) (ord *Order, err error)
- func (un *RespUnmarshaler) UnmarshalGetPendingOrdersResponse(data []byte) ([]Order, error)
- func (un *RespUnmarshaler) UnmarshalGetPositionsResponse(data []byte) ([]FuturesPosition, error)
- func (un *RespUnmarshaler) UnmarshalResponse(data []byte, res interface{}) error
- func (un *RespUnmarshaler) UnmarshalTicker(data []byte) (*Ticker, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptKlinePeriodToSymbol ¶
func AdaptKlinePeriodToSymbol(period model.KlinePeriod) string
Types ¶
type BaseResp ¶
type BaseResp struct { Code int `json:"code,string"` Msg string `json:"msg"` Data json.RawMessage `json:"data"` }
type ErrorResponseData ¶
type OKxV5 ¶
func (*OKxV5) DoNoAuthRequest ¶
func (*OKxV5) GetExchangeInfo ¶
func (*OKxV5) GetFundingRate ¶
func (*OKxV5) GetFundingRateHistory ¶
func (*OKxV5) GetKlineHistoryCandles ¶
func (*OKxV5) WithUnmarshalOption ¶
func (*OKxV5) WithUriOption ¶
type Prv ¶
type Prv struct { *OKxV5 // contains filtered or unexported fields }
func (*Prv) CancelOrder ¶
func (prv *Prv) CancelOrder(pair model.CurrencyPair, id string, opt ...model.OptionParameter) ([]byte, error)
func (*Prv) CreateOrder ¶
func (*Prv) DoAuthRequest ¶
func (*Prv) DoSignParam ¶
func (*Prv) GetAccount ¶
func (*Prv) GetHistoryOrders ¶
func (prv *Prv) GetHistoryOrders(pair model.CurrencyPair, opt ...model.OptionParameter) ([]model.Order, []byte, error)
func (*Prv) GetOrderInfo ¶
func (prv *Prv) GetOrderInfo(pair model.CurrencyPair, id string, opt ...model.OptionParameter) (*model.Order, []byte, error)
func (*Prv) GetPendingOrders ¶
func (prv *Prv) GetPendingOrders(pair model.CurrencyPair, opt ...model.OptionParameter) ([]model.Order, []byte, error)
type RespUnmarshaler ¶
type RespUnmarshaler struct { }
func (*RespUnmarshaler) UnmarshalCancelOrderResponse ¶
func (un *RespUnmarshaler) UnmarshalCancelOrderResponse(data []byte) error
func (*RespUnmarshaler) UnmarshalCreateOrderResponse ¶
func (un *RespUnmarshaler) UnmarshalCreateOrderResponse(data []byte) (*Order, error)
func (*RespUnmarshaler) UnmarshalDepth ¶
func (un *RespUnmarshaler) UnmarshalDepth(data []byte) (*Depth, error)
func (*RespUnmarshaler) UnmarshalGetAccountResponse ¶
func (un *RespUnmarshaler) UnmarshalGetAccountResponse(data []byte) (map[string]Account, error)
func (*RespUnmarshaler) UnmarshalGetExchangeInfoResponse ¶
func (un *RespUnmarshaler) UnmarshalGetExchangeInfoResponse(data []byte) (map[string]CurrencyPair, error)
func (*RespUnmarshaler) UnmarshalGetFundingRateHistoryResponse ¶
func (un *RespUnmarshaler) UnmarshalGetFundingRateHistoryResponse(data []byte) ([]FundingRate, error)
func (*RespUnmarshaler) UnmarshalGetFundingRateResponse ¶
func (un *RespUnmarshaler) UnmarshalGetFundingRateResponse(data []byte) (*FundingRate, error)
func (*RespUnmarshaler) UnmarshalGetFuturesAccountResponse ¶
func (un *RespUnmarshaler) UnmarshalGetFuturesAccountResponse(data []byte) (map[string]FuturesAccount, error)
func (*RespUnmarshaler) UnmarshalGetHistoryOrdersResponse ¶
func (un *RespUnmarshaler) UnmarshalGetHistoryOrdersResponse(data []byte) ([]Order, error)
func (*RespUnmarshaler) UnmarshalGetKlineResponse ¶
func (un *RespUnmarshaler) UnmarshalGetKlineResponse(data []byte) ([]Kline, error)
func (*RespUnmarshaler) UnmarshalGetOrderInfoResponse ¶
func (un *RespUnmarshaler) UnmarshalGetOrderInfoResponse(data []byte) (ord *Order, err error)
func (*RespUnmarshaler) UnmarshalGetPendingOrdersResponse ¶
func (un *RespUnmarshaler) UnmarshalGetPendingOrdersResponse(data []byte) ([]Order, error)
func (*RespUnmarshaler) UnmarshalGetPositionsResponse ¶
func (un *RespUnmarshaler) UnmarshalGetPositionsResponse(data []byte) ([]FuturesPosition, error)
func (*RespUnmarshaler) UnmarshalResponse ¶
func (un *RespUnmarshaler) UnmarshalResponse(data []byte, res interface{}) error
func (*RespUnmarshaler) UnmarshalTicker ¶
func (un *RespUnmarshaler) UnmarshalTicker(data []byte) (*Ticker, error)
Click to show internal directories.
Click to hide internal directories.