Documentation ¶
Index ¶
- func AdaptKlinePeriod(period KlinePeriod) string
- func AdaptOffsetDirectionToOrderSide(offset, direction string) OrderSide
- func AdaptSideToDirectionAndOffset(side OrderSide) (direction, offset string)
- func AdaptStatus(s int) OrderStatus
- func UnmarshalCancelOrderResponse(data []byte) error
- func UnmarshalCreateOrderResponse(data []byte) (*Order, error)
- func UnmarshalGetHistoryOrdersResponse(data []byte) ([]Order, error)
- func UnmarshalGetOrderInfoResponse(data []byte) (*Order, error)
- func UnmarshalGetPendingOrdersResponse(data []byte) ([]Order, error)
- func UnmarshalKline(data []byte) ([]Kline, error)
- func UnmarshalResponse(data []byte, i interface{}) error
- func UnmarshalTicker(data []byte) (*Ticker, error)
- type BaseResponse
- type Futures
- type TradeBaseResponse
- type USDTSwap
- func (f *USDTSwap) DoNoAuthRequest(method, reqUrl string, params *url.Values) ([]byte, error)
- func (f *USDTSwap) GetDepth(pair CurrencyPair, limit int, opt ...OptionParameter) (*Depth, []byte, error)
- func (f *USDTSwap) GetKline(pair CurrencyPair, period KlinePeriod, opts ...OptionParameter) ([]Kline, []byte, error)
- func (f *USDTSwap) GetName() string
- func (f *USDTSwap) GetTicker(pair CurrencyPair, opts ...OptionParameter) (*Ticker, []byte, error)
- func (f *USDTSwap) NewUSDTSwapPrvApi(apiOpts ...ApiOption) *USDTSwapPrvApi
- func (f *USDTSwap) WithUnmarshalerOptions(opts ...UnmarshalerOption) *USDTSwap
- func (f *USDTSwap) WithUriOptions(uriOpts ...UriOption) *USDTSwap
- type USDTSwapPrvApi
- func (f *USDTSwapPrvApi) CancelOrder(pair CurrencyPair, id string, opt ...OptionParameter) ([]byte, error)
- func (f *USDTSwapPrvApi) CancelOrders(pair *CurrencyPair, id []string, opt ...OptionParameter) error
- func (f *USDTSwapPrvApi) CreateOrder(pair CurrencyPair, qty, price float64, side OrderSide, orderTy OrderType, ...) (*Order, []byte, error)
- func (f *USDTSwapPrvApi) DoAuthRequest(method, reqUrl string, params *url.Values, header map[string]string) ([]byte, error)
- func (f *USDTSwapPrvApi) GetFuturesAccount(coin string) (acc map[string]FuturesAccount, responseBody []byte, err error)
- func (f *USDTSwapPrvApi) GetHistoryOrders(pair CurrencyPair, opts ...OptionParameter) ([]Order, []byte, error)
- func (f *USDTSwapPrvApi) GetOrderInfo(pair CurrencyPair, id string, opts ...OptionParameter) (*Order, []byte, error)
- func (f *USDTSwapPrvApi) GetPendingOrders(pair CurrencyPair, opt ...OptionParameter) ([]Order, []byte, error)
- func (f *USDTSwapPrvApi) GetPositions(pair CurrencyPair, opts ...OptionParameter) (positions []FuturesPosition, responseBody []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptKlinePeriod ¶
func AdaptKlinePeriod(period KlinePeriod) string
func AdaptOffsetDirectionToOrderSide ¶
func AdaptOffsetDirectionToOrderSide(offset, direction string) OrderSide
func AdaptSideToDirectionAndOffset ¶
func AdaptSideToDirectionAndOffset(side OrderSide) (direction, offset string)
func AdaptStatus ¶
func AdaptStatus(s int) OrderStatus
func UnmarshalKline ¶
func UnmarshalResponse ¶
func UnmarshalTicker ¶
Types ¶
type BaseResponse ¶
type TradeBaseResponse ¶
type TradeBaseResponse struct { *BaseResponse Data json.RawMessage `json:"data"` }
type USDTSwap ¶
type USDTSwap struct {
// contains filtered or unexported fields
}
func NewUSDTSwap ¶
func NewUSDTSwap() *USDTSwap
func (*USDTSwap) DoNoAuthRequest ¶
func (*USDTSwap) NewUSDTSwapPrvApi ¶
func (f *USDTSwap) NewUSDTSwapPrvApi(apiOpts ...ApiOption) *USDTSwapPrvApi
func (*USDTSwap) WithUnmarshalerOptions ¶
func (*USDTSwap) WithUriOptions ¶
type USDTSwapPrvApi ¶
type USDTSwapPrvApi struct { *USDTSwap // contains filtered or unexported fields }
func NewUSDTSwapPrvApi ¶
func NewUSDTSwapPrvApi(apiOpts ...options.ApiOption) *USDTSwapPrvApi
func (*USDTSwapPrvApi) CancelOrder ¶
func (f *USDTSwapPrvApi) CancelOrder(pair CurrencyPair, id string, opt ...OptionParameter) ([]byte, error)
func (*USDTSwapPrvApi) CancelOrders ¶
func (f *USDTSwapPrvApi) CancelOrders(pair *CurrencyPair, id []string, opt ...OptionParameter) error
func (*USDTSwapPrvApi) CreateOrder ¶
func (f *USDTSwapPrvApi) CreateOrder(pair CurrencyPair, qty, price float64, side OrderSide, orderTy OrderType, opts ...OptionParameter) (*Order, []byte, error)
func (*USDTSwapPrvApi) DoAuthRequest ¶
func (*USDTSwapPrvApi) GetFuturesAccount ¶
func (f *USDTSwapPrvApi) GetFuturesAccount(coin string) (acc map[string]FuturesAccount, responseBody []byte, err error)
func (*USDTSwapPrvApi) GetHistoryOrders ¶
func (f *USDTSwapPrvApi) GetHistoryOrders(pair CurrencyPair, opts ...OptionParameter) ([]Order, []byte, error)
func (*USDTSwapPrvApi) GetOrderInfo ¶
func (f *USDTSwapPrvApi) GetOrderInfo(pair CurrencyPair, id string, opts ...OptionParameter) (*Order, []byte, error)
func (*USDTSwapPrvApi) GetPendingOrders ¶
func (f *USDTSwapPrvApi) GetPendingOrders(pair CurrencyPair, opt ...OptionParameter) ([]Order, []byte, error)
func (*USDTSwapPrvApi) GetPositions ¶
func (f *USDTSwapPrvApi) GetPositions(pair CurrencyPair, opts ...OptionParameter) (positions []FuturesPosition, responseBody []byte, err error)
Click to show internal directories.
Click to hide internal directories.