Documentation
¶
Index ¶
- Constants
- Variables
- func IsErrWebsocketClosed(err error) bool
- func SetLogger(l *log.Logger)
- func V5WebsocketPublicPathFor(category CategoryV5) string
- type APIKeyInfoResponse
- type APIKeyInfoResult
- type AccountAssetService
- type AccountRatioParam
- type AccountRatioResponse
- type AccountRatioResult
- type AccountTypeV5
- type AdlRankIndicator
- type Balance
- type BalanceResponse
- type BalanceResult
- type BigDealParam
- type BigDealResponse
- type BigDealResult
- type CancelAllFuturesOrderParam
- type CancelAllFuturesOrderResponse
- type CancelAllFuturesOrderResult
- type CancelAllFuturesStopOrderParam
- type CancelAllFuturesStopOrderResponse
- type CancelAllFuturesStopOrderResult
- type CancelAllLinearStopOrderParam
- type CancelAllLinearStopOrderResponse
- type CancelAllLinearStopOrderResult
- type CancelAllOrderParam
- type CancelAllOrderResponse
- type CancelAllOrderResult
- type CancelAllStopOrderParam
- type CancelAllStopOrderResponse
- type CancelAllStopOrderResult
- type CancelFuturesOrderParam
- type CancelFuturesOrderResponse
- type CancelFuturesOrderResult
- type CancelFuturesStopOrderParam
- type CancelFuturesStopOrderResponse
- type CancelFuturesStopOrderResult
- type CancelLinearOrder
- type CancelLinearOrderParam
- type CancelLinearOrderResponse
- type CancelLinearOrderResult
- type CancelLinearStopOrderParam
- type CancelLinearStopOrderResponse
- type CancelLinearStopOrderResult
- type CancelOrder
- type CancelOrderParam
- type CancelOrderResponse
- type CancelOrderResult
- type CancelStopOrderParam
- type CancelStopOrderResponse
- type CancelStopOrderResult
- type CategoryDerivative
- type CategoryV5
- type Client
- func (c *Client) AccountAsset() *AccountAssetService
- func (c *Client) CopyTrading() *CopyTradingService
- func (c *Client) Derivative() DerivativeServiceI
- func (c *Client) Future() FutureServiceI
- func (c *Client) NewTimeService() TimeServiceI
- func (c *Client) Request(req *http.Request, dst interface{}) (err error)
- func (c *Client) Spot() SpotServiceI
- func (c *Client) SyncServerTime() error
- func (c *Client) USDCContract() USDCContractServiceI
- func (c *Client) V5() V5ServiceI
- func (c *Client) WithAuth(key string, secret string) *Client
- func (c *Client) WithBaseURL(url string) *Client
- func (c *Client) WithDebug(debug bool) *Client
- func (c *Client) WithHTTPClient(httpClient *http.Client) *Client
- func (c *Client) WithLogger(logger *log.Logger) *Client
- func (c *Client) WithReferer(referer string) *Client
- type Coin
- type CollateralSwitchV5
- type CommonResponse
- type CommonV3Response
- type CommonV5Response
- type ContractType
- type ContractTypeDerivative
- type ConvertAccountTypeV5
- type CopyTradingService
- type CreateFuturesOrderParam
- type CreateFuturesOrderResponse
- type CreateFuturesOrderResult
- type CreateFuturesStopOrderParam
- type CreateFuturesStopOrderResponse
- type CreateFuturesStopOrderResult
- type CreateLinearOrder
- type CreateLinearOrderParam
- type CreateLinearOrderResponse
- type CreateLinearOrderResult
- type CreateLinearStopOrderParam
- type CreateLinearStopOrderResponse
- type CreateLinearStopOrderResult
- type CreateOrder
- type CreateOrderParam
- type CreateOrderResponse
- type CreateOrderResult
- type CreateStopOrderParam
- type CreateStopOrderResponse
- type CreateStopOrderResult
- type DepositStatusV5
- type DerivativeCommonService
- func (s *DerivativeCommonService) DerivativesIndexPriceKline(param DerivativesIndexPriceKlineParam) (*DerivativesIndexPriceKlineResponse, error)
- func (s *DerivativeCommonService) DerivativesInstruments(param DerivativesInstrumentsParam) (*DerivativesInstrumentsResponse, error)
- func (s *DerivativeCommonService) DerivativesInstrumentsForOption(param DerivativesInstrumentsForOptionParam) (*DerivativesInstrumentsForOptionResponse, error)
- func (s *DerivativeCommonService) DerivativesKline(param DerivativesKlineParam) (*DerivativesKlineResponse, error)
- func (s *DerivativeCommonService) DerivativesMarkPriceKline(param DerivativesMarkPriceKlineParam) (*DerivativesMarkPriceKlineResponse, error)
- func (s *DerivativeCommonService) DerivativesOrderBook(param DerivativesOrderBookParam) (*DerivativesOrderBookResponse, error)
- func (s *DerivativeCommonService) DerivativesTickers(param DerivativesTickersParam) (*DerivativesTickersResponse, error)
- func (s *DerivativeCommonService) DerivativesTickersForOption(param DerivativesTickersForOptionParam) (*DerivativesTickersForOptionResponse, error)
- type DerivativeContractService
- type DerivativeContractServiceI
- type DerivativeService
- type DerivativeServiceI
- type DerivativeUnifiedMarginService
- type DerivativeUnifiedMarginServiceI
- type DerivativesIndexPriceKlineParam
- type DerivativesIndexPriceKlineResponse
- type DerivativesIndexPriceKlineResult
- type DerivativesIndexPriceKlineResultListItem
- type DerivativesInstrumentsForOptionParam
- type DerivativesInstrumentsForOptionResponse
- type DerivativesInstrumentsForOptionResult
- type DerivativesInstrumentsParam
- type DerivativesInstrumentsResponse
- type DerivativesInstrumentsResult
- type DerivativesKlineParam
- type DerivativesKlineResponse
- type DerivativesKlineResult
- type DerivativesKlineResultList
- type DerivativesMarkPriceKlineParam
- type DerivativesMarkPriceKlineResponse
- type DerivativesMarkPriceKlineResult
- type DerivativesMarkPriceKlineResultListItem
- type DerivativesOrderBookParam
- type DerivativesOrderBookResponse
- type DerivativesOrderBookResult
- type DerivativesOrderBookResultBuyer
- type DerivativesOrderBookResultBuyers
- type DerivativesOrderBookResultSeller
- type DerivativesOrderBookResultSellers
- type DerivativesTickersForOptionParam
- type DerivativesTickersForOptionResponse
- type DerivativesTickersForOptionResult
- type DerivativesTickersParam
- type DerivativesTickersResponse
- type DerivativesTickersResult
- type DerivativesTickersResultList
- type Direction
- type ErrHandler
- type ErrorResponse
- type ExecType
- type ExecTypeV5
- type FutureCommonService
- func (s *FutureCommonService) APIKeyInfo() (*APIKeyInfoResponse, error)
- func (s *FutureCommonService) AccountRatio(param AccountRatioParam) (*AccountRatioResponse, error)
- func (s *FutureCommonService) Balance(coin Coin) (*BalanceResponse, error)
- func (s *FutureCommonService) BigDeal(param BigDealParam) (*BigDealResponse, error)
- func (s *FutureCommonService) IndexPriceKline(param IndexPriceKlineParam) (*IndexPriceKlineResponse, error)
- func (s *FutureCommonService) ListKline(param ListKlineParam) (*ListKlineResponse, error)
- func (s *FutureCommonService) ListLinearKline(param ListLinearKlineParam) (*ListLinearKlineResponse, error)
- func (s *FutureCommonService) MarkPriceKline(param MarkPriceKlineParam) (*MarkPriceKlineResponse, error)
- func (s *FutureCommonService) OpenInterest(param OpenInterestParam) (*OpenInterestResponse, error)
- func (s *FutureCommonService) OrderBook(symbol SymbolFuture) (*OrderBookResponse, error)
- func (s *FutureCommonService) Symbols() (*SymbolsResponse, error)
- func (s *FutureCommonService) Tickers(symbol SymbolFuture) (*TickersResponse, error)
- func (s *FutureCommonService) TradingRecords(param TradingRecordsParam) (*TradingRecordsResponse, error)
- type FutureInverseFutureService
- func (s *FutureInverseFutureService) CancelAllFuturesOrder(param CancelAllFuturesOrderParam) (*CancelAllFuturesOrderResponse, error)
- func (s *FutureInverseFutureService) CancelAllFuturesStopOrder(param CancelAllFuturesStopOrderParam) (*CancelAllFuturesStopOrderResponse, error)
- func (s *FutureInverseFutureService) CancelFuturesOrder(param CancelFuturesOrderParam) (*CancelFuturesOrderResponse, error)
- func (s *FutureInverseFutureService) CancelFuturesStopOrder(param CancelFuturesStopOrderParam) (*CancelFuturesStopOrderResponse, error)
- func (s *FutureInverseFutureService) CreateFuturesOrder(param CreateFuturesOrderParam) (*CreateFuturesOrderResponse, error)
- func (s *FutureInverseFutureService) CreateFuturesStopOrder(param CreateFuturesStopOrderParam) (*CreateFuturesStopOrderResponse, error)
- func (s *FutureInverseFutureService) FuturesSaveLeverage(param FuturesSaveLeverageParam) (*FuturesSaveLeverageResponse, error)
- func (s *FutureInverseFutureService) FuturesTradingStop(param FuturesTradingStopParam) (*FuturesTradingStopResponse, error)
- func (s *FutureInverseFutureService) ListFuturesOrder(param ListFuturesOrderParam) (*ListFuturesOrderResponse, error)
- func (s *FutureInverseFutureService) ListFuturesPositions(symbol SymbolFuture) (*ListFuturesPositionsResponse, error)
- func (s *FutureInverseFutureService) ListFuturesStopOrder(param ListFuturesStopOrderParam) (*ListFuturesStopOrderResponse, error)
- func (s *FutureInverseFutureService) QueryFuturesOrder(param QueryFuturesOrderParam) (*QueryFuturesOrderResponse, error)
- func (s *FutureInverseFutureService) QueryFuturesStopOrder(param QueryFuturesStopOrderParam) (*QueryFuturesStopOrderResponse, error)
- type FutureInverseFutureServiceI
- type FutureInversePerpetualService
- func (s *FutureInversePerpetualService) CancelAllOrder(param CancelAllOrderParam) (*CancelAllOrderResponse, error)
- func (s *FutureInversePerpetualService) CancelAllStopOrder(param CancelAllStopOrderParam) (*CancelAllStopOrderResponse, error)
- func (s *FutureInversePerpetualService) CancelOrder(param CancelOrderParam) (*CancelOrderResponse, error)
- func (s *FutureInversePerpetualService) CancelStopOrder(param CancelStopOrderParam) (*CancelStopOrderResponse, error)
- func (s *FutureInversePerpetualService) CreateOrder(param CreateOrderParam) (*CreateOrderResponse, error)
- func (s *FutureInversePerpetualService) CreateStopOrder(param CreateStopOrderParam) (*CreateStopOrderResponse, error)
- func (s *FutureInversePerpetualService) ListOrder(param ListOrderParam) (*ListOrderResponse, error)
- func (s *FutureInversePerpetualService) ListPosition(symbol SymbolFuture) (*ListPositionResponse, error)
- func (s *FutureInversePerpetualService) ListPositions() (*ListPositionsResponse, error)
- func (s *FutureInversePerpetualService) ListStopOrder(param ListStopOrderParam) (*ListStopOrderResponse, error)
- func (s *FutureInversePerpetualService) PremiumIndexKline(param PremiumIndexKlineParam) (*PremiumIndexKlineResponse, error)
- func (s *FutureInversePerpetualService) QueryOrder(param QueryOrderParam) (*QueryOrderResponse, error)
- func (s *FutureInversePerpetualService) QueryStopOrder(param QueryStopOrderParam) (*QueryStopOrderResponse, error)
- func (s *FutureInversePerpetualService) SaveLeverage(param SaveLeverageParam) (*SaveLeverageResponse, error)
- func (s *FutureInversePerpetualService) TradingStop(param TradingStopParam) (*TradingStopResponse, error)
- type FutureInversePerpetualServiceI
- type FutureService
- type FutureServiceI
- type FutureUSDTPerpetualService
- func (s *FutureUSDTPerpetualService) CancelAllLinearStopOrder(param CancelAllLinearStopOrderParam) (*CancelAllLinearStopOrderResponse, error)
- func (s *FutureUSDTPerpetualService) CancelLinearOrder(param CancelLinearOrderParam) (*CancelLinearOrderResponse, error)
- func (s *FutureUSDTPerpetualService) CancelLinearStopOrder(param CancelLinearStopOrderParam) (*CancelLinearStopOrderResponse, error)
- func (s *FutureUSDTPerpetualService) CreateLinearOrder(param CreateLinearOrderParam) (*CreateLinearOrderResponse, error)
- func (s *FutureUSDTPerpetualService) CreateLinearStopOrder(param CreateLinearStopOrderParam) (*CreateLinearStopOrderResponse, error)
- func (s *FutureUSDTPerpetualService) LinearCancelAllOrder(param LinearCancelAllParam) (*LinearCancelAllResponse, error)
- func (s *FutureUSDTPerpetualService) LinearExecutionList(param LinearExecutionListParam) (*LinearExecutionListResponse, error)
- func (s *FutureUSDTPerpetualService) LinearTradingStop(param LinearTradingStopParam) (*LinearTradingStopResponse, error)
- func (s *FutureUSDTPerpetualService) ListLinearOrder(param ListLinearOrderParam) (*ListLinearOrderResponse, error)
- func (s *FutureUSDTPerpetualService) ListLinearPosition(symbol SymbolFuture) (*ListLinearPositionResponse, error)
- func (s *FutureUSDTPerpetualService) ListLinearPositions() (*ListLinearPositionsResponse, error)
- func (s *FutureUSDTPerpetualService) ListLinearStopOrder(param ListLinearStopOrderParam) (*ListLinearStopOrderResponse, error)
- func (s *FutureUSDTPerpetualService) QueryLinearOrder(param QueryLinearOrderParam) (*QueryLinearOrderResponse, error)
- func (s *FutureUSDTPerpetualService) QueryLinearStopOrder(param QueryLinearStopOrderParam) (*QueryLinearStopOrderResponse, error)
- func (s *FutureUSDTPerpetualService) ReplaceLinearOrder(param ReplaceLinearOrderParam) (*ReplaceLinearOrderResponse, error)
- func (s *FutureUSDTPerpetualService) SaveLinearLeverage(param SaveLinearLeverageParam) (*SaveLinearLeverageResponse, error)
- type FutureUSDTPerpetualServiceI
- type FuturesSaveLeverageParam
- type FuturesSaveLeverageResponse
- type FuturesTradingStopParam
- type FuturesTradingStopResponse
- type FuturesTradingStopResult
- type GetServerTimeResponse
- type GetServerTimeResult
- type IndexPriceKlineParam
- type IndexPriceKlineResponse
- type IndexPriceKlineResult
- type Innovation
- type InstrumentStatus
- type InternalDepositStatusV5
- type Interval
- type IsLeverage
- type IsLowestRisk
- type LeverageFilter
- type LinearCancelAllParam
- type LinearCancelAllResponse
- type LinearCancelAllResult
- type LinearExecutionList
- type LinearExecutionListParam
- type LinearExecutionListResponse
- type LinearExecutionListResult
- type LinearInverseLeverageFilterV5
- type LinearInverseLotSizeFilterV5
- type LinearInversePriceFilterV5
- type LinearTradingStopParam
- type LinearTradingStopResponse
- type ListFuturesOrder
- type ListFuturesOrderParam
- type ListFuturesOrderResponse
- type ListFuturesOrderResult
- type ListFuturesPositionsResponse
- type ListFuturesPositionsResult
- type ListFuturesPositionsResultData
- type ListFuturesStopOrder
- type ListFuturesStopOrderParam
- type ListFuturesStopOrderResponse
- type ListFuturesStopOrderResult
- type ListKlineParam
- type ListKlineResponse
- type ListKlineResult
- type ListLinearKlineParam
- type ListLinearKlineResponse
- type ListLinearKlineResult
- type ListLinearOrderParam
- type ListLinearOrderResponse
- type ListLinearOrderResult
- type ListLinearOrderResultContent
- type ListLinearPositionResponse
- type ListLinearPositionResult
- type ListLinearPositionsResponse
- type ListLinearPositionsResult
- type ListLinearStopOrderParam
- type ListLinearStopOrderResponse
- type ListLinearStopOrderResult
- type ListLinearStopOrderResultContent
- type ListOrder
- type ListOrderParam
- type ListOrderResponse
- type ListOrderResult
- type ListPositionResponse
- type ListPositionResult
- type ListPositionsResponse
- type ListPositionsResult
- type ListStopOrder
- type ListStopOrderParam
- type ListStopOrderResponse
- type ListStopOrderResult
- type LotSizeFilter
- type MarginMode
- type MarkPriceKlineParam
- type MarkPriceKlineResponse
- type MarkPriceKlineResult
- type MarketUnit
- type OpenInterestParam
- type OpenInterestResponse
- type OpenInterestResult
- type OptionLotSizeFilterV5
- type OptionPriceFilterV5
- type OptionsType
- type Order
- type OrderBookResponse
- type OrderBookResult
- type OrderFilter
- type OrderStatus
- type OrderStatusSpot
- type OrderType
- type OrderTypeSpot
- type Period
- type PositionIdx
- type PositionMarginMode
- type PositionMode
- type PremiumIndexKlineParam
- type PremiumIndexKlineResponse
- type PremiumIndexKlineResult
- type PriceFilter
- type QueryFuturesOrderParam
- type QueryFuturesOrderResponse
- type QueryFuturesOrderResult
- type QueryFuturesStopOrderParam
- type QueryFuturesStopOrderResponse
- type QueryFuturesStopOrderResult
- type QueryLinearOrderParam
- type QueryLinearOrderResponse
- type QueryLinearOrderResult
- type QueryLinearStopOrderParam
- type QueryLinearStopOrderResponse
- type QueryLinearStopOrderResult
- type QueryOrderParam
- type QueryOrderResponse
- type QueryOrderResult
- type QueryStopOrderParam
- type QueryStopOrderResponse
- type QueryStopOrderResult
- type RateLimitError
- type RateLimitV5Error
- type ReplaceLinearOrderParam
- type ReplaceLinearOrderResponse
- type ReplaceLinearOrderResult
- type SaveLeverageParam
- type SaveLeverageResponse
- type SaveLinearLeverageParam
- type SaveLinearLeverageResponse
- type Side
- type SpotDeleteOrderFastParam
- type SpotDeleteOrderFastResponse
- type SpotDeleteOrderFastResult
- type SpotDeleteOrderParam
- type SpotDeleteOrderResponse
- type SpotDeleteOrderResult
- type SpotGetOrderParam
- type SpotGetOrderResponse
- type SpotGetOrderResult
- type SpotGetWalletBalanceResponse
- type SpotGetWalletBalanceResult
- type SpotGetWalletBalanceResultBalance
- type SpotInterval
- type SpotLotSizeFilterV5
- type SpotOpenOrdersParam
- type SpotOpenOrdersResponse
- type SpotOpenOrdersResult
- type SpotOrderBatchCancelByIDsResponse
- type SpotOrderBatchCancelByIDsResult
- type SpotOrderBatchCancelParam
- type SpotOrderBatchCancelResponse
- type SpotOrderBatchCancelResult
- type SpotOrderBatchFastCancelParam
- type SpotOrderBatchFastCancelResponse
- type SpotOrderBatchFastCancelResult
- type SpotPostOrderParam
- type SpotPostOrderResponse
- type SpotPostOrderResult
- type SpotPriceFilterV5
- type SpotQuoteDepthBidAsk
- type SpotQuoteDepthBidsAsks
- type SpotQuoteDepthMergedParam
- type SpotQuoteDepthMergedResponse
- type SpotQuoteDepthMergedResult
- type SpotQuoteDepthParam
- type SpotQuoteDepthResponse
- type SpotQuoteDepthResult
- type SpotQuoteKline
- type SpotQuoteKlineParam
- type SpotQuoteKlineResponse
- type SpotQuoteKlineResult
- type SpotQuoteTicker24hrParam
- type SpotQuoteTicker24hrResponse
- type SpotQuoteTicker24hrResult
- type SpotQuoteTickerBookTickerParam
- type SpotQuoteTickerBookTickerResponse
- type SpotQuoteTickerBookTickerResult
- type SpotQuoteTickerPriceParam
- type SpotQuoteTickerPriceResponse
- type SpotQuoteTickerPriceResult
- type SpotQuoteTradesParam
- type SpotQuoteTradesResponse
- type SpotQuoteTradesResult
- type SpotService
- type SpotServiceI
- type SpotSymbolsResponse
- type SpotSymbolsResult
- type SpotV1Service
- func (s *SpotV1Service) SpotDeleteOrder(param SpotDeleteOrderParam) (*SpotDeleteOrderResponse, error)
- func (s *SpotV1Service) SpotDeleteOrderFast(param SpotDeleteOrderFastParam) (*SpotDeleteOrderFastResponse, error)
- func (s *SpotV1Service) SpotGetOrder(param SpotGetOrderParam) (*SpotGetOrderResponse, error)
- func (s *SpotV1Service) SpotGetWalletBalance() (*SpotGetWalletBalanceResponse, error)
- func (s *SpotV1Service) SpotOpenOrders(param SpotOpenOrdersParam) (*SpotOpenOrdersResponse, error)
- func (s *SpotV1Service) SpotOrderBatchCancel(param SpotOrderBatchCancelParam) (*SpotOrderBatchCancelResponse, error)
- func (s *SpotV1Service) SpotOrderBatchCancelByIDs(orderIDs []string) (*SpotOrderBatchCancelByIDsResponse, error)
- func (s *SpotV1Service) SpotOrderBatchFastCancel(param SpotOrderBatchFastCancelParam) (*SpotOrderBatchFastCancelResponse, error)
- func (s *SpotV1Service) SpotPostOrder(param SpotPostOrderParam) (*SpotPostOrderResponse, error)
- func (s *SpotV1Service) SpotQuoteDepth(param SpotQuoteDepthParam) (*SpotQuoteDepthResponse, error)
- func (s *SpotV1Service) SpotQuoteDepthMerged(param SpotQuoteDepthMergedParam) (*SpotQuoteDepthMergedResponse, error)
- func (s *SpotV1Service) SpotQuoteKline(param SpotQuoteKlineParam) (*SpotQuoteKlineResponse, error)
- func (s *SpotV1Service) SpotQuoteTicker24hr(param SpotQuoteTicker24hrParam) (*SpotQuoteTicker24hrResponse, error)
- func (s *SpotV1Service) SpotQuoteTickerBookTicker(param SpotQuoteTickerBookTickerParam) (*SpotQuoteTickerBookTickerResponse, error)
- func (s *SpotV1Service) SpotQuoteTickerPrice(param SpotQuoteTickerPriceParam) (*SpotQuoteTickerPriceResponse, error)
- func (s *SpotV1Service) SpotQuoteTrades(param SpotQuoteTradesParam) (*SpotQuoteTradesResponse, error)
- func (s *SpotV1Service) SpotSymbols() (*SpotSymbolsResponse, error)
- type SpotV1ServiceI
- type SpotV3Service
- type SpotWebsocketService
- type SpotWebsocketV1PrivateEventType
- type SpotWebsocketV1PrivateOutboundAccountInfoResponse
- type SpotWebsocketV1PrivateOutboundAccountInfoResponseContent
- type SpotWebsocketV1PrivateOutboundAccountInfoResponseWalletBalanceChange
- type SpotWebsocketV1PrivateParamKey
- type SpotWebsocketV1PrivateService
- func (s *SpotWebsocketV1PrivateService) Close() error
- func (s *SpotWebsocketV1PrivateService) Ping() error
- func (s *SpotWebsocketV1PrivateService) RegisterFuncOutboundAccountInfo(f func(SpotWebsocketV1PrivateOutboundAccountInfoResponse) error) error
- func (s *SpotWebsocketV1PrivateService) Run() error
- func (s *SpotWebsocketV1PrivateService) Start(ctx context.Context)
- func (s *SpotWebsocketV1PrivateService) Subscribe() error
- type SpotWebsocketV1PublicV1Event
- type SpotWebsocketV1PublicV1Service
- func (s *SpotWebsocketV1PublicV1Service) Close() error
- func (s *SpotWebsocketV1PublicV1Service) Ping() error
- func (s *SpotWebsocketV1PublicV1Service) Run() error
- func (s *SpotWebsocketV1PublicV1Service) Start(ctx context.Context)
- func (s *SpotWebsocketV1PublicV1Service) SubscribeTrade(symbol SymbolSpot, f func(response SpotWebsocketV1PublicV1TradeResponse) error) (func() error, error)
- type SpotWebsocketV1PublicV1Topic
- type SpotWebsocketV1PublicV1TradeContent
- type SpotWebsocketV1PublicV1TradeParam
- type SpotWebsocketV1PublicV1TradeParamChild
- type SpotWebsocketV1PublicV1TradeParamKey
- type SpotWebsocketV1PublicV1TradeResponse
- type SpotWebsocketV1PublicV1TradeResponseParams
- type SpotWebsocketV1PublicV2Event
- type SpotWebsocketV1PublicV2Service
- func (s *SpotWebsocketV1PublicV2Service) Close() error
- func (s *SpotWebsocketV1PublicV2Service) Ping() error
- func (s *SpotWebsocketV1PublicV2Service) Run() error
- func (s *SpotWebsocketV1PublicV2Service) Start(ctx context.Context)
- func (s *SpotWebsocketV1PublicV2Service) SubscribeTrade(symbol SymbolSpot, f func(response SpotWebsocketV1PublicV2TradeResponse) error) (func() error, error)
- type SpotWebsocketV1PublicV2Topic
- type SpotWebsocketV1PublicV2TradeContent
- type SpotWebsocketV1PublicV2TradeParam
- type SpotWebsocketV1PublicV2TradeParamChild
- type SpotWebsocketV1PublicV2TradeParamKey
- type SpotWebsocketV1PublicV2TradeResponse
- type SpotWebsocketV1PublicV2TradeResponseParams
- type SpotWebsocketV1Service
- type StatusDerivative
- type StopOrderTypeFuture
- type SymbolDerivative
- type SymbolFuture
- type SymbolSpot
- type SymbolV5
- type SymbolsResponse
- type SymbolsResult
- type TestClient
- type TestWebSocketClient
- type TickDirection
- type TickersResponse
- type TickersResult
- type TimeInForce
- type TimeInForceSpot
- type TimeService
- type TimeServiceI
- type TpSlMode
- type TradingRecordsParam
- type TradingRecordsResponse
- type TradingRecordsResult
- type TradingStopParam
- type TradingStopResponse
- type TradingStopResult
- type TransactionLogTypeV5
- type TransferStatusV5
- type TriggerBy
- type TriggerByFuture
- type TriggerDirection
- type USDCContractOptionService
- type USDCContractPerpetualService
- type USDCContractService
- type USDCContractServiceI
- type UnifiedMarginStatus
- type V5APIKeyResponse
- type V5AccountInfoResult
- type V5AccountService
- func (s *V5AccountService) GetAccountInfo() (*V5GetAccountInfoResponse, error)
- func (s *V5AccountService) GetCollateralInfo(param V5GetCollateralInfoParam) (*V5GetCollateralInfoResponse, error)
- func (s *V5AccountService) GetTransactionLog(param V5GetTransactionLogParam) (*V5GetTransactionLogResponse, error)
- func (s *V5AccountService) GetWalletBalance(at AccountTypeV5, coins []Coin) (*V5GetWalletBalanceResponse, error)
- func (s *V5AccountService) SetCollateralCoin(param V5SetCollateralCoinParam) (*V5SetCollateralCoinResponse, error)
- type V5AccountServiceI
- type V5AmendOrderParam
- type V5AmendOrderResponse
- type V5AmendOrderResult
- type V5ApiKeyResult
- type V5AssetService
- func (s *V5AssetService) CreateInternalTransfer(param V5CreateInternalTransferParam) (*V5CreateInternalTransferResponse, error)
- func (s *V5AssetService) CreateUniversalTransfer(param V5CreateUniversalTransferParam) (*V5CreateUniversalTransferResponse, error)
- func (s *V5AssetService) ExchangeConvertExecute(param V5ExchangeConvertExecuteParam) (*V5ExchangeConvertExecuteResponse, error)
- func (s *V5AssetService) ExchangeConvertResultQuery(param V5ExchangeConvertResultQueryParam) (*V5ExchangeConvertResultQueryResponse, error)
- func (s *V5AssetService) ExchangeQuoteApply(param V5ExchangeQuoteApplyParam) (*V5ExchangeQuoteApplyResponse, error)
- func (s *V5AssetService) GetAllCoinsBalance(param V5GetAllCoinsBalanceParam) (*V5GetAllCoinsBalanceResponse, error)
- func (s *V5AssetService) GetCoinInfo(param V5GetCoinInfoParam) (*V5GetCoinInfoResponse, error)
- func (s *V5AssetService) GetDepositRecords(param V5GetDepositRecordsParam) (*V5GetDepositRecordsResponse, error)
- func (s *V5AssetService) GetInternalDepositRecords(param V5GetInternalDepositRecordsParam) (*V5GetInternalDepositRecordsResponse, error)
- func (s *V5AssetService) GetInternalTransferRecords(param V5GetInternalTransferRecordsParam) (*V5GetInternalTransferRecordsResponse, error)
- func (s *V5AssetService) GetMasterDepositAddress(param V5GetMasterDepositAddressParam) (*V5GetMasterDepositAddressResponse, error)
- func (s *V5AssetService) GetSubDepositRecords(param V5GetSubDepositRecordsParam) (*V5GetSubDepositRecordsResponse, error)
- func (s *V5AssetService) GetUniversalTransferRecords(param V5GetUniversalTransferRecordsParam) (*V5GetUniversalTransferRecordsResponse, error)
- func (s *V5AssetService) GetWithdrawalRecords(param V5GetWithdrawalRecordsParam) (*V5GetWithdrawalRecordsResponse, error)
- func (s *V5AssetService) Withdraw(param V5WithdrawParam) (*V5WithdrawResponse, error)
- type V5AssetServiceI
- type V5CancelAllOrdersLinearInverseOptionResult
- type V5CancelAllOrdersParam
- type V5CancelAllOrdersResponse
- type V5CancelAllOrdersResult
- type V5CancelAllOrdersSpotResult
- type V5CancelOrderParam
- type V5CancelOrderResponse
- type V5CancelOrderResult
- type V5CreateInternalTransferParam
- type V5CreateInternalTransferResponse
- type V5CreateInternalTransferResult
- type V5CreateOrderParam
- type V5CreateOrderResponse
- type V5CreateOrderResult
- type V5CreateUniversalTransferParam
- type V5CreateUniversalTransferResponse
- type V5CreateUniversalTransferResult
- type V5ExchangeConvertExecuteParam
- type V5ExchangeConvertExecuteResponse
- type V5ExchangeConvertExecuteResult
- type V5ExchangeConvertResultQueryParam
- type V5ExchangeConvertResultQueryResponse
- type V5ExchangeConvertResultQueryResult
- type V5ExchangeQuoteApplyParam
- type V5ExchangeQuoteApplyResponse
- type V5ExchangeQuoteApplyResult
- type V5ExecutionService
- type V5ExecutionServiceI
- type V5GetAccountInfoResponse
- type V5GetAllCoinsBalanceBalance
- type V5GetAllCoinsBalanceParam
- type V5GetAllCoinsBalanceResponse
- type V5GetAllCoinsBalanceResult
- type V5GetClosedPnLItem
- type V5GetClosedPnLList
- type V5GetClosedPnLParam
- type V5GetClosedPnLResponse
- type V5GetClosedPnLResult
- type V5GetCoinInfoChain
- type V5GetCoinInfoChains
- type V5GetCoinInfoParam
- type V5GetCoinInfoResponse
- type V5GetCoinInfoResult
- type V5GetCoinInfoRow
- type V5GetCoinInfoRows
- type V5GetCollateralInfoList
- type V5GetCollateralInfoParam
- type V5GetCollateralInfoResponse
- type V5GetCollateralInfoResult
- type V5GetDepositRecordsParam
- type V5GetDepositRecordsResponse
- type V5GetDepositRecordsResult
- type V5GetDepositRecordsRow
- type V5GetDepositRecordsRows
- type V5GetExecutionListItem
- type V5GetExecutionListResponse
- type V5GetExecutionListResult
- type V5GetExecutionParam
- type V5GetFundingRateHistoryItem
- type V5GetFundingRateHistoryParam
- type V5GetFundingRateHistoryResponse
- type V5GetFundingRateHistoryResult
- type V5GetHistoricalVolatilityListItem
- type V5GetHistoricalVolatilityParam
- type V5GetHistoricalVolatilityResponse
- type V5GetHistoricalVolatilityResult
- type V5GetHistoryOrdersParam
- type V5GetIndexPriceKlineItem
- type V5GetIndexPriceKlineList
- type V5GetIndexPriceKlineParam
- type V5GetIndexPriceKlineResponse
- type V5GetIndexPriceKlineResult
- type V5GetInstrumentsInfoLinearInverseItem
- type V5GetInstrumentsInfoLinearInverseResult
- type V5GetInstrumentsInfoOptionItem
- type V5GetInstrumentsInfoOptionResult
- type V5GetInstrumentsInfoParam
- type V5GetInstrumentsInfoResponse
- type V5GetInstrumentsInfoResult
- type V5GetInstrumentsInfoSpotItem
- type V5GetInstrumentsInfoSpotResult
- type V5GetInsuranceItem
- type V5GetInsuranceParam
- type V5GetInsuranceResponse
- type V5GetInsuranceResult
- type V5GetInternalDepositRecordsParam
- type V5GetInternalDepositRecordsResponse
- type V5GetInternalDepositRecordsResult
- type V5GetInternalDepositRecordsRow
- type V5GetInternalDepositRecordsRows
- type V5GetInternalTransferRecordsItem
- type V5GetInternalTransferRecordsList
- type V5GetInternalTransferRecordsParam
- type V5GetInternalTransferRecordsResponse
- type V5GetInternalTransferRecordsResult
- type V5GetKlineItem
- type V5GetKlineList
- type V5GetKlineParam
- type V5GetKlineResponse
- type V5GetKlineResult
- type V5GetMarkPriceKlineItem
- type V5GetMarkPriceKlineList
- type V5GetMarkPriceKlineParam
- type V5GetMarkPriceKlineResponse
- type V5GetMarkPriceKlineResult
- type V5GetMasterDepositAddressChain
- type V5GetMasterDepositAddressParam
- type V5GetMasterDepositAddressResponse
- type V5GetMasterDepositAddressResult
- type V5GetOpenInterestItem
- type V5GetOpenInterestParam
- type V5GetOpenInterestResponse
- type V5GetOpenInterestResult
- type V5GetOpenOrdersParam
- type V5GetOrder
- type V5GetOrderbookBidAsk
- type V5GetOrderbookBidAsks
- type V5GetOrderbookParam
- type V5GetOrderbookResponse
- type V5GetOrderbookResult
- type V5GetOrdersResponse
- type V5GetOrdersResult
- type V5GetPositionInfoItem
- type V5GetPositionInfoList
- type V5GetPositionInfoParam
- type V5GetPositionInfoResponse
- type V5GetPositionInfoResult
- type V5GetPremiumIndexPriceKlineItem
- type V5GetPremiumIndexPriceKlineList
- type V5GetPremiumIndexPriceKlineParam
- type V5GetPremiumIndexPriceKlineResponse
- type V5GetPremiumIndexPriceKlineResult
- type V5GetPublicTradingHistoryItem
- type V5GetPublicTradingHistoryParam
- type V5GetPublicTradingHistoryResponse
- type V5GetPublicTradingHistoryResult
- type V5GetRiskLimitItem
- type V5GetRiskLimitParam
- type V5GetRiskLimitResponse
- type V5GetRiskLimitResult
- type V5GetSubDepositRecordsParam
- type V5GetSubDepositRecordsResponse
- type V5GetSubDepositRecordsResult
- type V5GetSubDepositRecordsRow
- type V5GetSubDepositRecordsRows
- type V5GetTickersLinearInverseItem
- type V5GetTickersLinearInverseResult
- type V5GetTickersOptionItem
- type V5GetTickersOptionResult
- type V5GetTickersParam
- type V5GetTickersResponse
- type V5GetTickersResult
- type V5GetTickersSpotItem
- type V5GetTickersSpotResult
- type V5GetTransactionLogItem
- type V5GetTransactionLogList
- type V5GetTransactionLogParam
- type V5GetTransactionLogResponse
- type V5GetTransactionLogResult
- type V5GetUniversalTransferRecordsItem
- type V5GetUniversalTransferRecordsList
- type V5GetUniversalTransferRecordsParam
- type V5GetUniversalTransferRecordsResponse
- type V5GetUniversalTransferRecordsResult
- type V5GetWalletBalanceResponse
- type V5GetWithdrawalRecordsParam
- type V5GetWithdrawalRecordsResponse
- type V5GetWithdrawalRecordsResult
- type V5GetWithdrawalRecordsRow
- type V5GetWithdrawalRecordsRows
- type V5MarketService
- func (s *V5MarketService) GetFundingRateHistory(param V5GetFundingRateHistoryParam) (*V5GetFundingRateHistoryResponse, error)
- func (s *V5MarketService) GetHistoricalVolatility(param V5GetHistoricalVolatilityParam) (*V5GetHistoricalVolatilityResponse, error)
- func (s *V5MarketService) GetIndexPriceKline(param V5GetIndexPriceKlineParam) (*V5GetIndexPriceKlineResponse, error)
- func (s *V5MarketService) GetInstrumentsInfo(param V5GetInstrumentsInfoParam) (*V5GetInstrumentsInfoResponse, error)
- func (s *V5MarketService) GetInsurance(param V5GetInsuranceParam) (*V5GetInsuranceResponse, error)
- func (s *V5MarketService) GetKline(param V5GetKlineParam) (*V5GetKlineResponse, error)
- func (s *V5MarketService) GetMarkPriceKline(param V5GetMarkPriceKlineParam) (*V5GetMarkPriceKlineResponse, error)
- func (s *V5MarketService) GetOpenInterest(param V5GetOpenInterestParam) (*V5GetOpenInterestResponse, error)
- func (s *V5MarketService) GetOrderbook(param V5GetOrderbookParam) (*V5GetOrderbookResponse, error)
- func (s *V5MarketService) GetPremiumIndexPriceKline(param V5GetPremiumIndexPriceKlineParam) (*V5GetPremiumIndexPriceKlineResponse, error)
- func (s *V5MarketService) GetPublicTradingHistory(param V5GetPublicTradingHistoryParam) (*V5GetPublicTradingHistoryResponse, error)
- func (s *V5MarketService) GetRiskLimit(param V5GetRiskLimitParam) (*V5GetRiskLimitResponse, error)
- func (s *V5MarketService) GetTickers(param V5GetTickersParam) (*V5GetTickersResponse, error)
- type V5MarketServiceI
- type V5OrderService
- func (s *V5OrderService) AmendOrder(param V5AmendOrderParam) (*V5AmendOrderResponse, error)
- func (s *V5OrderService) CancelAllOrders(param V5CancelAllOrdersParam) (*V5CancelAllOrdersResponse, error)
- func (s *V5OrderService) CancelOrder(param V5CancelOrderParam) (*V5CancelOrderResponse, error)
- func (s *V5OrderService) CreateOrder(param V5CreateOrderParam) (*V5CreateOrderResponse, error)
- func (s *V5OrderService) GetHistoryOrders(param V5GetHistoryOrdersParam) (*V5GetOrdersResponse, error)
- func (s *V5OrderService) GetOpenOrders(param V5GetOpenOrdersParam) (*V5GetOrdersResponse, error)
- type V5OrderServiceI
- type V5PositionService
- func (s *V5PositionService) GetClosedPnL(param V5GetClosedPnLParam) (*V5GetClosedPnLResponse, error)
- func (s *V5PositionService) GetPositionInfo(param V5GetPositionInfoParam) (*V5GetPositionInfoResponse, error)
- func (s *V5PositionService) SetLeverage(param V5SetLeverageParam) (*V5SetLeverageResponse, error)
- func (s *V5PositionService) SetRiskLimit(param V5SetRiskLimitParam) (*V5SetRiskLimitResponse, error)
- func (s *V5PositionService) SetTpSlMode(param V5SetTpSlModeParam) (*V5SetTpSlModeResponse, error)
- func (s *V5PositionService) SetTradingStop(param V5SetTradingStopParam) (*V5SetTradingStopResponse, error)
- func (s *V5PositionService) SwitchPositionMarginMode(param V5SwitchPositionMarginModeParam) (*V5SwitchPositionMarginModeResponse, error)
- func (s *V5PositionService) SwitchPositionMode(param V5SwitchPositionModeParam) (*V5SwitchPositionModeResponse, error)
- type V5PositionServiceI
- type V5Service
- func (s *V5Service) Account() V5AccountServiceI
- func (s *V5Service) Asset() V5AssetServiceI
- func (s *V5Service) Execution() V5ExecutionServiceI
- func (s *V5Service) Market() V5MarketServiceI
- func (s *V5Service) Order() V5OrderServiceI
- func (s *V5Service) Position() V5PositionServiceI
- func (s *V5Service) SpotLeverageToken() V5SpotLeverageTokenServiceI
- func (s *V5Service) SpotMarginTrade() V5SpotMarginTradeServiceI
- func (s *V5Service) User() V5UserServiceI
- type V5ServiceI
- type V5SetCollateralCoinParam
- type V5SetCollateralCoinResponse
- type V5SetLeverageParam
- type V5SetLeverageResponse
- type V5SetRiskLimitParam
- type V5SetRiskLimitResponse
- type V5SetRiskLimitResult
- type V5SetTpSlModeParam
- type V5SetTpSlModeResponse
- type V5SetTpSlModeResult
- type V5SetTradingStopParam
- type V5SetTradingStopResponse
- type V5SpotLeverageTokenService
- type V5SpotLeverageTokenServiceI
- type V5SpotMarginTradeService
- type V5SpotMarginTradeServiceI
- type V5SwitchPositionMarginModeParam
- type V5SwitchPositionMarginModeResponse
- type V5SwitchPositionModeParam
- type V5SwitchPositionModeResponse
- type V5UserService
- type V5UserServiceI
- type V5WalletBalanceCoin
- type V5WalletBalanceList
- type V5WalletBalanceResult
- type V5WebsocketPrivateExecutionData
- type V5WebsocketPrivateExecutionResponse
- type V5WebsocketPrivateOrderData
- type V5WebsocketPrivateOrderResponse
- type V5WebsocketPrivateParamKey
- type V5WebsocketPrivatePositionData
- type V5WebsocketPrivatePositionResponse
- type V5WebsocketPrivateService
- func (s *V5WebsocketPrivateService) Close() error
- func (s *V5WebsocketPrivateService) Ping() error
- func (s *V5WebsocketPrivateService) Run() error
- func (s *V5WebsocketPrivateService) Start(ctx context.Context, errHandler ErrHandler) error
- func (s *V5WebsocketPrivateService) Subscribe() error
- func (s *V5WebsocketPrivateService) SubscribeExecution(f func(V5WebsocketPrivateExecutionResponse) error) (func() error, error)
- func (s *V5WebsocketPrivateService) SubscribeOrder(f func(V5WebsocketPrivateOrderResponse) error) (func() error, error)
- func (s *V5WebsocketPrivateService) SubscribePosition(f func(V5WebsocketPrivatePositionResponse) error) (func() error, error)
- func (s *V5WebsocketPrivateService) SubscribeWallet(f func(V5WebsocketPrivateWalletResponse) error) (func() error, error)
- type V5WebsocketPrivateServiceI
- type V5WebsocketPrivateTopic
- type V5WebsocketPrivateWalletCoin
- type V5WebsocketPrivateWalletData
- type V5WebsocketPrivateWalletResponse
- type V5WebsocketPublicKlineData
- type V5WebsocketPublicKlineParamKey
- type V5WebsocketPublicKlineResponse
- type V5WebsocketPublicLiquidationData
- type V5WebsocketPublicLiquidationParamKey
- type V5WebsocketPublicLiquidationResponse
- type V5WebsocketPublicOrderBookAsks
- type V5WebsocketPublicOrderBookBids
- type V5WebsocketPublicOrderBookData
- type V5WebsocketPublicOrderBookParamKey
- type V5WebsocketPublicOrderBookResponse
- type V5WebsocketPublicService
- func (s *V5WebsocketPublicService) Close() error
- func (s *V5WebsocketPublicService) Ping() error
- func (s *V5WebsocketPublicService) Run() error
- func (s *V5WebsocketPublicService) Start(ctx context.Context, errHandler ErrHandler) error
- func (s *V5WebsocketPublicService) SubscribeKline(key V5WebsocketPublicKlineParamKey, ...) (func() error, error)
- func (s *V5WebsocketPublicService) SubscribeLiquidation(key V5WebsocketPublicLiquidationParamKey, ...) (func() error, error)
- func (s *V5WebsocketPublicService) SubscribeOrderBook(key V5WebsocketPublicOrderBookParamKey, ...) (func() error, error)
- func (s *V5WebsocketPublicService) SubscribeTicker(key V5WebsocketPublicTickerParamKey, ...) (func() error, error)
- func (s *V5WebsocketPublicService) SubscribeTrade(key V5WebsocketPublicTradeParamKey, ...) (func() error, error)
- type V5WebsocketPublicServiceI
- type V5WebsocketPublicTickerData
- type V5WebsocketPublicTickerLinearInverseResult
- type V5WebsocketPublicTickerOptionResult
- type V5WebsocketPublicTickerParamKey
- type V5WebsocketPublicTickerResponse
- type V5WebsocketPublicTickerSpotResult
- type V5WebsocketPublicTopic
- type V5WebsocketPublicTradeData
- type V5WebsocketPublicTradeParamKey
- type V5WebsocketPublicTradeResponse
- type V5WebsocketService
- type V5WebsocketServiceI
- type V5WithdrawParam
- type V5WithdrawResponse
- type V5WithdrawResult
- type WebSocketClient
- func (c *WebSocketClient) Spot() *SpotWebsocketService
- func (c *WebSocketClient) Start(ctx context.Context, executors []WebsocketExecutor)
- func (c *WebSocketClient) V5() *V5WebsocketService
- func (c *WebSocketClient) WithAuth(key string, secret string) *WebSocketClient
- func (c *WebSocketClient) WithBaseURL(url string) *WebSocketClient
- func (c *WebSocketClient) WithDebug(debug bool) *WebSocketClient
- func (c *WebSocketClient) WithLogger(logger *log.Logger) *WebSocketClient
- type WebsocketExecutor
- type WithdrawStatusV5
- type WithdrawTypeV5
Constants ¶
const ( // MainNetBaseURL : MainNetBaseURL = "https://api.bybit.com" // MainNetBaseURL2 : MainNetBaseURL2 = "https://api.bytick.com" )
const ( // WebsocketBaseURL : WebsocketBaseURL = "wss://stream.bybit.com" // WebsocketBaseURL2 : WebsocketBaseURL2 = "wss://stream.bytick.com" )
const ( // CoinBTC : CoinBTC = Coin("BTC") // CoinETH : CoinETH = Coin("ETH") // CoinEOS : CoinEOS = Coin("EOS") // CoinXRP : CoinXRP = Coin("XRP") // CoinUSDT : CoinUSDT = Coin("USDT") )
const ( // SideNone : not defined officially SideNone = Side("None") // SideBuy : SideBuy = Side("Buy") // SideSell : SideSell = Side("Sell") )
const ( // OrderTypeLimit : OrderTypeLimit = OrderType("Limit") // OrderTypeMarket : OrderTypeMarket = OrderType("Market") )
const ( // Buy BTCUSDT, then "qty" unit is BTC. MarketUnitBaseCoin = MarketUnit("baseCoin") // Sell BTCUSDT, then "qty" unit is USDT. MarketUnitQuoteCoin = MarketUnit("quoteCoin") )
const ( // OrderStatusCreated : OrderStatusCreated = OrderStatus("Created") // OrderStatusRejected : OrderStatusRejected = OrderStatus("Rejected") // OrderStatusNew : OrderStatusNew = OrderStatus("New") // OrderStatusPartiallyFilled : OrderStatusPartiallyFilled = OrderStatus("PartiallyFilled") // OrderStatusFilled : OrderStatusFilled = OrderStatus("Filled") // OrderStatusCancelled : OrderStatusCancelled = OrderStatus("Cancelled") // OrderStatusPendingCancel : OrderStatusPendingCancel = OrderStatus("PendingCancel") // OrderStatusUntriggered : Only for conditional orders OrderStatusUntriggered = OrderStatus("Untriggered") // OrderStatusDeactivated : Only for conditional orders OrderStatusDeactivated = OrderStatus("Deactivated") // OrderStatusTriggered : Only for conditional orders OrderStatusTriggered = OrderStatus("Triggered") // OrderStatusActive : Only for conditional orders OrderStatusActive = OrderStatus("Active") )
const ( // OrderDesc : OrderDesc = "desc" // OrderAsc : OrderAsc = "asc" )
const ( // TimeInForceGoodTillCancel : TimeInForceGoodTillCancel = TimeInForce("GoodTillCancel") // TimeInForceImmediateOrCancel : TimeInForceImmediateOrCancel = TimeInForce("ImmediateOrCancel") // TimeInForceFillOrKill : TimeInForceFillOrKill = TimeInForce("FillOrKill") // TimeInForcePostOnly : TimeInForcePostOnly = TimeInForce("PostOnly") )
const ( // Interval1 : Interval1 = Interval("1") // Interval3 : Interval3 = Interval("3") // Interval5 : Interval5 = Interval("5") // Interval15 : Interval15 = Interval("15") // Interval30 : Interval30 = Interval("30") // Interval60 : Interval60 = Interval("60") // Interval120 : Interval120 = Interval("120") // Interval240 : Interval240 = Interval("240") // Interval360 : Interval360 = Interval("360") // Interval720 : Interval720 = Interval("720") // IntervalD : IntervalD = Interval("D") // IntervalW : IntervalW = Interval("W") // IntervalM : IntervalM = Interval("M") )
const ( // TickDirectionPlusTick : TickDirectionPlusTick = TickDirection("PlusTick") // TickDirectionZeroPlusTick : TickDirectionZeroPlusTick = TickDirection("ZeroPlusTick") // TickDirectionMinusTick : TickDirectionMinusTick = TickDirection("MinusTick") // TickDirectionZeroMinusTick : TickDirectionZeroMinusTick = TickDirection("ZeroMinusTick") )
const ( // Period5min : Period5min = Period("5min") // Period15min : Period15min = Period("15min") // Period30min : Period30min = Period("30min") // Period1h : Period1h = Period("1h") // Period4h : Period4h = Period("4h") // Period1d : Period1d = Period("1d") )
const ( // TpSlModeFull : TpSlModeFull = TpSlMode("Full") // TpSlModePartial : TpSlModePartial = TpSlMode("Partial") )
const ( // ExecTypeTrade : ExecTypeTrade = ExecType("Trade") // ExecTypeAdlTrade : ExecTypeAdlTrade = ExecType("AdlTrade") // ExecTypeFunding : ExecTypeFunding = ExecType("Funding") // ExecTypeBustTrade : ExecTypeBustTrade = ExecType("BustTrade") )
const ( // DirectionPrev : DirectionPrev = Direction("prev") // DirectionNext : DirectionNext = Direction("next") )
const ( // SymbolDerivativeBTCUSDT : SymbolDerivativeBTCUSDT = SymbolDerivative("BTCUSDT") // SymbolDerivativeBTC31MAR23_40000C : SymbolDerivativeBTC31MAR23_40000C = SymbolDerivative("BTC-31MAR23-40000-C") )
const ( // CategoryDerivativeLinear : CategoryDerivativeLinear = CategoryDerivative("linear") // CategoryDerivativeInverse : CategoryDerivativeInverse = CategoryDerivative("inverse") // CategoryDerivativeOption : CategoryDerivativeOption = CategoryDerivative("option") )
const ( // ContractTypeDerivativeInversePerpetual : ContractTypeDerivativeInversePerpetual = ContractTypeDerivative("InversePerpetual") // ContractTypeDerivativeLinearPerpetual : ContractTypeDerivativeLinearPerpetual = ContractTypeDerivative("LinearPerpetual") // ContractTypeDerivativeInverseFutures : ContractTypeDerivativeInverseFutures = ContractTypeDerivative("InverseFutures") )
const ( // StatusDerivativePending : StatusDerivativePending = StatusDerivative("Pending") // StatusDerivativeTrading : StatusDerivativeTrading = StatusDerivative("Trading") // StatusDerivativeSettling : StatusDerivativeSettling = StatusDerivative("Settling") // StatusDerivativeClosed : StatusDerivativeClosed = StatusDerivative("Closed") )
const ( // SymbolFuture10000NFTUSDT : SymbolFuture10000NFTUSDT = SymbolFuture("10000NFTUSDT") // SymbolFuture1000BTTUSDT : SymbolFuture1000BTTUSDT = SymbolFuture("1000BTTUSDT") // SymbolFuture1000LUNCUSDT : SymbolFuture1000LUNCUSDT = SymbolFuture("1000LUNCUSDT") // SymbolFuture1000XECUSDT : SymbolFuture1000XECUSDT = SymbolFuture("1000XECUSDT") // SymbolFuture1INCHUSDT : SymbolFuture1INCHUSDT = SymbolFuture("1INCHUSDT") // SymbolFutureAAVEUSDT : SymbolFutureAAVEUSDT = SymbolFuture("AAVEUSDT") // SymbolFutureACHUSDT : SymbolFutureACHUSDT = SymbolFuture("ACHUSDT") // SymbolFutureADAUSD : SymbolFutureADAUSD = SymbolFuture("ADAUSD") // SymbolFutureADAUSDT : SymbolFutureADAUSDT = SymbolFuture("ADAUSDT") // SymbolFutureAGLDUSDT : SymbolFutureAGLDUSDT = SymbolFuture("AGLDUSDT") // SymbolFutureAKROUSDT : SymbolFutureAKROUSDT = SymbolFuture("AKROUSDT") // SymbolFutureALGOUSDT : SymbolFutureALGOUSDT = SymbolFuture("ALGOUSDT") // SymbolFutureALICEUSDT : SymbolFutureALICEUSDT = SymbolFuture("ALICEUSDT") // SymbolFutureALPHAUSDT : SymbolFutureALPHAUSDT = SymbolFuture("ALPHAUSDT") // SymbolFutureANKRUSDT : SymbolFutureANKRUSDT = SymbolFuture("ANKRUSDT") // SymbolFutureANTUSDT : SymbolFutureANTUSDT = SymbolFuture("ANTUSDT") // SymbolFutureAPEUSDT : SymbolFutureAPEUSDT = SymbolFuture("APEUSDT") // SymbolFutureAPI3USDT : SymbolFutureAPI3USDT = SymbolFuture("API3USDT") // SymbolFutureARPAUSDT : SymbolFutureARPAUSDT = SymbolFuture("ARPAUSDT") // SymbolFutureARUSDT : SymbolFutureARUSDT = SymbolFuture("ARUSDT") // SymbolFutureASTRUSDT : SymbolFutureASTRUSDT = SymbolFuture("ASTRUSDT") // SymbolFutureAUDIOUSDT : SymbolFutureAUDIOUSDT = SymbolFuture("AUDIOUSDT") // SymbolFutureAVAXUSDT : SymbolFutureAVAXUSDT = SymbolFuture("AVAXUSDT") // SymbolFutureAXSUSDT : SymbolFutureAXSUSDT = SymbolFuture("AXSUSDT") // SymbolFutureBAKEUSDT : SymbolFutureBAKEUSDT = SymbolFuture("BAKEUSDT") // SymbolFutureBALUSDT : SymbolFutureBALUSDT = SymbolFuture("BALUSDT") // SymbolFutureBANDUSDT : SymbolFutureBANDUSDT = SymbolFuture("BANDUSDT") // SymbolFutureBATUSDT : SymbolFutureBATUSDT = SymbolFuture("BATUSDT") // SymbolFutureBCHUSDT : SymbolFutureBCHUSDT = SymbolFuture("BCHUSDT") // SymbolFutureBELUSDT : SymbolFutureBELUSDT = SymbolFuture("BELUSDT") // SymbolFutureBICOUSDT : SymbolFutureBICOUSDT = SymbolFuture("BICOUSDT") // SymbolFutureBITUSD : SymbolFutureBITUSD = SymbolFuture("BITUSD") // SymbolFutureBITUSDT : SymbolFutureBITUSDT = SymbolFuture("BITUSDT") // SymbolFutureBLZUSDT : SymbolFutureBLZUSDT = SymbolFuture("BLZUSDT") // SymbolFutureBNBUSDT : SymbolFutureBNBUSDT = SymbolFuture("BNBUSDT") // SymbolFutureBNXUSDT : SymbolFutureBNXUSDT = SymbolFuture("BNXUSDT") // SymbolFutureBOBAUSDT : SymbolFutureBOBAUSDT = SymbolFuture("BOBAUSDT") // SymbolFutureBSVUSDT : SymbolFutureBSVUSDT = SymbolFuture("BSVUSDT") // SymbolFutureBSWUSDT : SymbolFutureBSWUSDT = SymbolFuture("BSWUSDT") // SymbolFutureBTCUSD : SymbolFutureBTCUSD = SymbolFuture("BTCUSD") // SymbolFutureBTCUSDH23 : SymbolFutureBTCUSDH23 = SymbolFuture("BTCUSDH23") // SymbolFutureBTCUSDT : SymbolFutureBTCUSDT = SymbolFuture("BTCUSDT") // SymbolFutureBTCUSDZ22 : SymbolFutureBTCUSDZ22 = SymbolFuture("BTCUSDZ22") // SymbolFutureC98USDT : SymbolFutureC98USDT = SymbolFuture("C98USDT") // SymbolFutureCEEKUSDT : SymbolFutureCEEKUSDT = SymbolFuture("CEEKUSDT") // SymbolFutureCELOUSDT : SymbolFutureCELOUSDT = SymbolFuture("CELOUSDT") // SymbolFutureCELRUSDT : SymbolFutureCELRUSDT = SymbolFuture("CELRUSDT") // SymbolFutureCELUSDT : SymbolFutureCELUSDT = SymbolFuture("CELUSDT") // SymbolFutureCHRUSDT : SymbolFutureCHRUSDT = SymbolFuture("CHRUSDT") // SymbolFutureCHZUSDT : SymbolFutureCHZUSDT = SymbolFuture("CHZUSDT") // SymbolFutureCKBUSDT : SymbolFutureCKBUSDT = SymbolFuture("CKBUSDT") // SymbolFutureCOMPUSDT : SymbolFutureCOMPUSDT = SymbolFuture("COMPUSDT") // SymbolFutureCOTIUSDT : SymbolFutureCOTIUSDT = SymbolFuture("COTIUSDT") // SymbolFutureCREAMUSDT : SymbolFutureCREAMUSDT = SymbolFuture("CREAMUSDT") // SymbolFutureCROUSDT : SymbolFutureCROUSDT = SymbolFuture("CROUSDT") // SymbolFutureCRVUSDT : SymbolFutureCRVUSDT = SymbolFuture("CRVUSDT") // SymbolFutureCTCUSDT : SymbolFutureCTCUSDT = SymbolFuture("CTCUSDT") // SymbolFutureCTKUSDT : SymbolFutureCTKUSDT = SymbolFuture("CTKUSDT") // SymbolFutureCTSIUSDT : SymbolFutureCTSIUSDT = SymbolFuture("CTSIUSDT") // SymbolFutureCVCUSDT : SymbolFutureCVCUSDT = SymbolFuture("CVCUSDT") // SymbolFutureCVXUSDT : SymbolFutureCVXUSDT = SymbolFuture("CVXUSDT") // SymbolFutureDARUSDT : SymbolFutureDARUSDT = SymbolFuture("DARUSDT") // SymbolFutureDASHUSDT : SymbolFutureDASHUSDT = SymbolFuture("DASHUSDT") // SymbolFutureDENTUSDT : SymbolFutureDENTUSDT = SymbolFuture("DENTUSDT") // SymbolFutureDGBUSDT : SymbolFutureDGBUSDT = SymbolFuture("DGBUSDT") // SymbolFutureDODOUSDT : SymbolFutureDODOUSDT = SymbolFuture("DODOUSDT") // SymbolFutureDOGEUSDT : SymbolFutureDOGEUSDT = SymbolFuture("DOGEUSDT") // SymbolFutureDOTUSD : SymbolFutureDOTUSD = SymbolFuture("DOTUSD") // SymbolFutureDOTUSDT : SymbolFutureDOTUSDT = SymbolFuture("DOTUSDT") // SymbolFutureDUSKUSDT : SymbolFutureDUSKUSDT = SymbolFuture("DUSKUSDT") // SymbolFutureDYDXUSDT : SymbolFutureDYDXUSDT = SymbolFuture("DYDXUSDT") // SymbolFutureEGLDUSDT : SymbolFutureEGLDUSDT = SymbolFuture("EGLDUSDT") // SymbolFutureENJUSDT : SymbolFutureENJUSDT = SymbolFuture("ENJUSDT") // SymbolFutureENSUSDT : SymbolFutureENSUSDT = SymbolFuture("ENSUSDT") // SymbolFutureEOSUSD : SymbolFutureEOSUSD = SymbolFuture("EOSUSD") // SymbolFutureEOSUSDT : SymbolFutureEOSUSDT = SymbolFuture("EOSUSDT") // SymbolFutureETCUSDT : SymbolFutureETCUSDT = SymbolFuture("ETCUSDT") // SymbolFutureETHUSD : SymbolFutureETHUSD = SymbolFuture("ETHUSD") // SymbolFutureETHUSDH23 : SymbolFutureETHUSDH23 = SymbolFuture("ETHUSDH23") // SymbolFutureETHUSDT : SymbolFutureETHUSDT = SymbolFuture("ETHUSDT") // SymbolFutureETHUSDZ22 : SymbolFutureETHUSDZ22 = SymbolFuture("ETHUSDZ22") // SymbolFutureETHWUSDT : SymbolFutureETHWUSDT = SymbolFuture("ETHWUSDT") // SymbolFutureFILUSDT : SymbolFutureFILUSDT = SymbolFuture("FILUSDT") // SymbolFutureFITFIUSDT : SymbolFutureFITFIUSDT = SymbolFuture("FITFIUSDT") // SymbolFutureFLMUSDT : SymbolFutureFLMUSDT = SymbolFuture("FLMUSDT") // SymbolFutureFLOWUSDT : SymbolFutureFLOWUSDT = SymbolFuture("FLOWUSDT") // SymbolFutureFTMUSDT : SymbolFutureFTMUSDT = SymbolFuture("FTMUSDT") // SymbolFutureFTTUSDT : SymbolFutureFTTUSDT = SymbolFuture("FTTUSDT") // SymbolFutureFXSUSDT : SymbolFutureFXSUSDT = SymbolFuture("FXSUSDT") // SymbolFutureGALAUSDT : SymbolFutureGALAUSDT = SymbolFuture("GALAUSDT") // SymbolFutureGALUSDT : SymbolFutureGALUSDT = SymbolFuture("GALUSDT") // SymbolFutureGLMRUSDT : SymbolFutureGLMRUSDT = SymbolFuture("GLMRUSDT") // SymbolFutureGMTUSDT : SymbolFutureGMTUSDT = SymbolFuture("GMTUSDT") // SymbolFutureGRTUSDT : SymbolFutureGRTUSDT = SymbolFuture("GRTUSDT") // SymbolFutureGTCUSDT : SymbolFutureGTCUSDT = SymbolFuture("GTCUSDT") // SymbolFutureHBARUSDT : SymbolFutureHBARUSDT = SymbolFuture("HBARUSDT") // SymbolFutureHNTUSDT : SymbolFutureHNTUSDT = SymbolFuture("HNTUSDT") // SymbolFutureHOTUSDT : SymbolFutureHOTUSDT = SymbolFuture("HOTUSDT") // SymbolFutureICPUSDT : SymbolFutureICPUSDT = SymbolFuture("ICPUSDT") // SymbolFutureICXUSDT : SymbolFutureICXUSDT = SymbolFuture("ICXUSDT") // SymbolFutureILVUSDT : SymbolFutureILVUSDT = SymbolFuture("ILVUSDT") // SymbolFutureIMXUSDT : SymbolFutureIMXUSDT = SymbolFuture("IMXUSDT") // SymbolFutureINJUSDT : SymbolFutureINJUSDT = SymbolFuture("INJUSDT") // SymbolFutureIOSTUSDT : SymbolFutureIOSTUSDT = SymbolFuture("IOSTUSDT") // SymbolFutureIOTAUSDT : SymbolFutureIOTAUSDT = SymbolFuture("IOTAUSDT") // SymbolFutureIOTXUSDT : SymbolFutureIOTXUSDT = SymbolFuture("IOTXUSDT") // SymbolFutureJASMYUSDT : SymbolFutureJASMYUSDT = SymbolFuture("JASMYUSDT") // SymbolFutureJSTUSDT : SymbolFutureJSTUSDT = SymbolFuture("JSTUSDT") // SymbolFutureKAVAUSDT : SymbolFutureKAVAUSDT = SymbolFuture("KAVAUSDT") // SymbolFutureKDAUSDT : SymbolFutureKDAUSDT = SymbolFuture("KDAUSDT") // SymbolFutureKLAYUSDT : SymbolFutureKLAYUSDT = SymbolFuture("KLAYUSDT") // SymbolFutureKNCUSDT : SymbolFutureKNCUSDT = SymbolFuture("KNCUSDT") // SymbolFutureKSMUSDT : SymbolFutureKSMUSDT = SymbolFuture("KSMUSDT") // SymbolFutureLDOUSDT : SymbolFutureLDOUSDT = SymbolFuture("LDOUSDT") // SymbolFutureLINAUSDT : SymbolFutureLINAUSDT = SymbolFuture("LINAUSDT") // SymbolFutureLINKUSDT : SymbolFutureLINKUSDT = SymbolFuture("LINKUSDT") // SymbolFutureLITUSDT : SymbolFutureLITUSDT = SymbolFuture("LITUSDT") // SymbolFutureLOOKSUSDT : SymbolFutureLOOKSUSDT = SymbolFuture("LOOKSUSDT") // SymbolFutureLPTUSDT : SymbolFutureLPTUSDT = SymbolFuture("LPTUSDT") // SymbolFutureLRCUSDT : SymbolFutureLRCUSDT = SymbolFuture("LRCUSDT") // SymbolFutureLTCUSD : SymbolFutureLTCUSD = SymbolFuture("LTCUSD") // SymbolFutureLTCUSDT : SymbolFutureLTCUSDT = SymbolFuture("LTCUSDT") // SymbolFutureLUNA2USDT : SymbolFutureLUNA2USDT = SymbolFuture("LUNA2USDT") // SymbolFutureMANAUSD : SymbolFutureMANAUSD = SymbolFuture("MANAUSD") // SymbolFutureMANAUSDT : SymbolFutureMANAUSDT = SymbolFuture("MANAUSDT") // SymbolFutureMASKUSDT : SymbolFutureMASKUSDT = SymbolFuture("MASKUSDT") // SymbolFutureMATICUSDT : SymbolFutureMATICUSDT = SymbolFuture("MATICUSDT") // SymbolFutureMINAUSDT : SymbolFutureMINAUSDT = SymbolFuture("MINAUSDT") // SymbolFutureMKRUSDT : SymbolFutureMKRUSDT = SymbolFuture("MKRUSDT") // SymbolFutureMTLUSDT : SymbolFutureMTLUSDT = SymbolFuture("MTLUSDT") // SymbolFutureNEARUSDT : SymbolFutureNEARUSDT = SymbolFuture("NEARUSDT") // SymbolFutureNEOUSDT : SymbolFutureNEOUSDT = SymbolFuture("NEOUSDT") // SymbolFutureOCEANUSDT : SymbolFutureOCEANUSDT = SymbolFuture("OCEANUSDT") // SymbolFutureOGNUSDT : SymbolFutureOGNUSDT = SymbolFuture("OGNUSDT") // SymbolFutureOMGUSDT : SymbolFutureOMGUSDT = SymbolFuture("OMGUSDT") // SymbolFutureONEUSDT : SymbolFutureONEUSDT = SymbolFuture("ONEUSDT") // SymbolFutureONTUSDT : SymbolFutureONTUSDT = SymbolFuture("ONTUSDT") // SymbolFutureOPUSDT : SymbolFutureOPUSDT = SymbolFuture("OPUSDT") // SymbolFuturePAXGUSDT : SymbolFuturePAXGUSDT = SymbolFuture("PAXGUSDT") // SymbolFuturePEOPLEUSDT : SymbolFuturePEOPLEUSDT = SymbolFuture("PEOPLEUSDT") // SymbolFutureQNTUSDT : SymbolFutureQNTUSDT = SymbolFuture("QNTUSDT") // SymbolFutureQTUMUSDT : SymbolFutureQTUMUSDT = SymbolFuture("QTUMUSDT") // SymbolFutureRAYUSDT : SymbolFutureRAYUSDT = SymbolFuture("RAYUSDT") // SymbolFutureREEFUSDT : SymbolFutureREEFUSDT = SymbolFuture("REEFUSDT") // SymbolFutureRENUSDT : SymbolFutureRENUSDT = SymbolFuture("RENUSDT") // SymbolFutureREQUSDT : SymbolFutureREQUSDT = SymbolFuture("REQUSDT") // SymbolFutureRNDRUSDT : SymbolFutureRNDRUSDT = SymbolFuture("RNDRUSDT") // SymbolFutureROSEUSDT : SymbolFutureROSEUSDT = SymbolFuture("ROSEUSDT") // SymbolFutureRSRUSDT : SymbolFutureRSRUSDT = SymbolFuture("RSRUSDT") // SymbolFutureRSS3USDT : SymbolFutureRSS3USDT = SymbolFuture("RSS3USDT") // SymbolFutureRUNEUSDT : SymbolFutureRUNEUSDT = SymbolFuture("RUNEUSDT") // SymbolFutureRVNUSDT : SymbolFutureRVNUSDT = SymbolFuture("RVNUSDT") // SymbolFutureSANDUSDT : SymbolFutureSANDUSDT = SymbolFuture("SANDUSDT") // SymbolFutureSCRTUSDT : SymbolFutureSCRTUSDT = SymbolFuture("SCRTUSDT") // SymbolFutureSCUSDT : SymbolFutureSCUSDT = SymbolFuture("SCUSDT") // SymbolFutureSFPUSDT : SymbolFutureSFPUSDT = SymbolFuture("SFPUSDT") // SymbolFutureSHIB1000USDT : SymbolFutureSHIB1000USDT = SymbolFuture("SHIB1000USDT") // SymbolFutureSKLUSDT : SymbolFutureSKLUSDT = SymbolFuture("SKLUSDT") // SymbolFutureSLPUSDT : SymbolFutureSLPUSDT = SymbolFuture("SLPUSDT") // SymbolFutureSNXUSDT : SymbolFutureSNXUSDT = SymbolFuture("SNXUSDT") // SymbolFutureSOLUSD : SymbolFutureSOLUSD = SymbolFuture("SOLUSD") // SymbolFutureSOLUSDT : SymbolFutureSOLUSDT = SymbolFuture("SOLUSDT") // SymbolFutureSRMUSDT : SymbolFutureSRMUSDT = SymbolFuture("SRMUSDT") // SymbolFutureSTGUSDT : SymbolFutureSTGUSDT = SymbolFuture("STGUSDT") // SymbolFutureSTMXUSDT : SymbolFutureSTMXUSDT = SymbolFuture("STMXUSDT") // SymbolFutureSTORJUSDT : SymbolFutureSTORJUSDT = SymbolFuture("STORJUSDT") // SymbolFutureSTXUSDT : SymbolFutureSTXUSDT = SymbolFuture("STXUSDT") // SymbolFutureSUNUSDT : SymbolFutureSUNUSDT = SymbolFuture("SUNUSDT") // SymbolFutureSUSHIUSDT : SymbolFutureSUSHIUSDT = SymbolFuture("SUSHIUSDT") // SymbolFutureSXPUSDT : SymbolFutureSXPUSDT = SymbolFuture("SXPUSDT") // SymbolFutureTHETAUSDT : SymbolFutureTHETAUSDT = SymbolFuture("THETAUSDT") // SymbolFutureTLMUSDT : SymbolFutureTLMUSDT = SymbolFuture("TLMUSDT") // SymbolFutureTOMOUSDT : SymbolFutureTOMOUSDT = SymbolFuture("TOMOUSDT") // SymbolFutureTRBUSDT : SymbolFutureTRBUSDT = SymbolFuture("TRBUSDT") // SymbolFutureTRXUSDT : SymbolFutureTRXUSDT = SymbolFuture("TRXUSDT") // SymbolFutureUNFIUSDT : SymbolFutureUNFIUSDT = SymbolFuture("UNFIUSDT") // SymbolFutureUNIUSDT : SymbolFutureUNIUSDT = SymbolFuture("UNIUSDT") // SymbolFutureUSDCUSDT : SymbolFutureUSDCUSDT = SymbolFuture("USDCUSDT") // SymbolFutureVETUSDT : SymbolFutureVETUSDT = SymbolFuture("VETUSDT") // SymbolFutureWAVESUSDT : SymbolFutureWAVESUSDT = SymbolFuture("WAVESUSDT") // SymbolFutureWOOUSDT : SymbolFutureWOOUSDT = SymbolFuture("WOOUSDT") // SymbolFutureXEMUSDT : SymbolFutureXEMUSDT = SymbolFuture("XEMUSDT") // SymbolFutureXLMUSDT : SymbolFutureXLMUSDT = SymbolFuture("XLMUSDT") // SymbolFutureXMRUSDT : SymbolFutureXMRUSDT = SymbolFuture("XMRUSDT") // SymbolFutureXNOUSDT : SymbolFutureXNOUSDT = SymbolFuture("XNOUSDT") // SymbolFutureXRPUSD : SymbolFutureXRPUSD = SymbolFuture("XRPUSD") // SymbolFutureXRPUSDT : SymbolFutureXRPUSDT = SymbolFuture("XRPUSDT") // SymbolFutureXTZUSDT : SymbolFutureXTZUSDT = SymbolFuture("XTZUSDT") // SymbolFutureYFIUSDT : SymbolFutureYFIUSDT = SymbolFuture("YFIUSDT") // SymbolFutureYGGUSDT : SymbolFutureYGGUSDT = SymbolFuture("YGGUSDT") // SymbolFutureZECUSDT : SymbolFutureZECUSDT = SymbolFuture("ZECUSDT") // SymbolFutureZENUSDT : SymbolFutureZENUSDT = SymbolFuture("ZENUSDT") // SymbolFutureZILUSDT : SymbolFutureZILUSDT = SymbolFuture("ZILUSDT") // SymbolFutureZRXUSDT : SymbolFutureZRXUSDT = SymbolFuture("ZRXUSDT") )
const ( // TriggerByFutureUNKNOWN : only for response TriggerByFutureUNKNOWN = TriggerByFuture("UNKNOWN") // TriggerByFutureLastPrice : TriggerByFutureLastPrice = TriggerByFuture("LastPrice") // TriggerByFutureIndexPrice : TriggerByFutureIndexPrice = TriggerByFuture("IndexPrice") // TriggerByFutureMarkPrice : TriggerByFutureMarkPrice = TriggerByFuture("MarkPrice") )
const ( // StopOrderTypeFutureTakeProfit : StopOrderTypeFutureTakeProfit = StopOrderTypeFuture("TakeProfit") // StopOrderTypeFutureStopLoss : StopOrderTypeFutureStopLoss = StopOrderTypeFuture("StopLoss") // StopOrderTypeFutureTrailingStop : StopOrderTypeFutureTrailingStop = StopOrderTypeFuture("TrailingStop") // StopOrderTypeFutureStop : StopOrderTypeFutureStop = StopOrderTypeFuture("Stop") )
const ( // TimeInForceSpotGTC : TimeInForceSpotGTC = TimeInForceSpot("GTC") // TimeInForceSpotFOK : TimeInForceSpotFOK = TimeInForceSpot("FOK") // TimeInForceSpotIOC : TimeInForceSpotIOC = TimeInForceSpot("IOC") )
const ( // SpotInterval1m : SpotInterval1m = Interval("1m") // SpotInterval3m : SpotInterval3m = Interval("3m") // SpotInterval5m : SpotInterval5m = Interval("5m") // SpotInterval15m : SpotInterval15m = Interval("15m") // SpotInterval30m : SpotInterval30m = Interval("30m") // SpotInterval1h : SpotInterval1h = Interval("1h") // SpotInterval2h : SpotInterval2h = Interval("2h") // SpotInterval4h : SpotInterval4h = Interval("4h") // SpotInterval6h : SpotInterval6h = Interval("6h") // SpotInterval12h : SpotInterval12h = Interval("12h") // SpotInterval1d : SpotInterval1d = Interval("1d") // SpotInterval1w : SpotInterval1w = Interval("1w") // SpotInterval1M : SpotInterval1M = Interval("1M") )
const ( // OrderTypeSpotLimit : OrderTypeSpotLimit = OrderTypeSpot("LIMIT") // OrderTypeSpotMarket : OrderTypeSpotMarket = OrderTypeSpot("MARKET") // OrderTypeSpotLimitMaker : OrderTypeSpotLimitMaker = OrderTypeSpot("LIMIT_MAKER") )
const ( // OrderStatusSpotNew : OrderStatusSpotNew = OrderStatusSpot("NEW") // OrderStatusSpotPartiallyFilled : OrderStatusSpotPartiallyFilled = OrderStatusSpot("PARTIALLY_FILLED") // OrderStatusSpotFilled : OrderStatusSpotFilled = OrderStatusSpot("FILLED") // OrderStatusSpotCanceled : OrderStatusSpotCanceled = OrderStatusSpot("CANCELED") // OrderStatusSpotPendingCancel : OrderStatusSpotPendingCancel = OrderStatusSpot("PENDING_CANCEL") // OrderStatusSpotPendingNew : OrderStatusSpotPendingNew = OrderStatusSpot("PENDING_NEW") // OrderStatusSpotRejected : OrderStatusSpotRejected = OrderStatusSpot("REJECTED") )
const ( // SymbolSpotBTCUSDT : SymbolSpotBTCUSDT = SymbolSpot("BTCUSDT") // SymbolSpotETHUSDT : SymbolSpotETHUSDT = SymbolSpot("ETHUSDT") // SymbolSpotEOSUSDT : SymbolSpotEOSUSDT = SymbolSpot("EOSUSDT") // SymbolSpotNEOBTC : SymbolSpotNEOBTC = SymbolSpot("NEOBTC") // SymbolSpotXRPUSDT : SymbolSpotXRPUSDT = SymbolSpot("XRPUSDT") // SymbolSpotUNIUSDT : SymbolSpotUNIUSDT = SymbolSpot("UNIUSDT") // SymbolSpotUNIBTC : SymbolSpotUNIBTC = SymbolSpot("UNIBTC") // SymbolSpotDOTUSDT : SymbolSpotDOTUSDT = SymbolSpot("DOTUSDT") // SymbolSpotETHBTC : SymbolSpotETHBTC = SymbolSpot("ETHBTC") // SymbolSpotEOSETH : SymbolSpotEOSETH = SymbolSpot("EOSETH") // SymbolSpotBTCETH : SymbolSpotBTCETH = SymbolSpot("BTCETH") // SymbolSpotBTTUSDT : SymbolSpotBTTUSDT = SymbolSpot("BTTUSDT") // SymbolSpotXLMUSDT : SymbolSpotXLMUSDT = SymbolSpot("XLMUSDT") // SymbolSpotLTCUSDT : SymbolSpotLTCUSDT = SymbolSpot("LTCUSDT") // SymbolSpotXRPBTC : SymbolSpotXRPBTC = SymbolSpot("XRPBTC") // SymbolSpotXRPEOS : SymbolSpotXRPEOS = SymbolSpot("XRPEOS") // SymbolSpotDOGEUSDT : SymbolSpotDOGEUSDT = SymbolSpot("DOGEUSDT") // SymbolSpotBITUSDT : SymbolSpotBITUSDT = SymbolSpot("BITUSDT") // SymbolSpotADAUSDT : SymbolSpotADAUSDT = SymbolSpot("ADAUSDT") // SymbolSpotXTZUSDT : SymbolSpotXTZUSDT = SymbolSpot("XTZUSDT") // SymbolSpotAXSUSDT : SymbolSpotAXSUSDT = SymbolSpot("AXSUSDT") // SymbolSpotDYDXUSDT : SymbolSpotDYDXUSDT = SymbolSpot("DYDXUSDT") // SymbolSpotPMTEST2USDT : SymbolSpotPMTEST2USDT = SymbolSpot("PMTEST2USDT") // SymbolSpotPERPUSDT : SymbolSpotPERPUSDT = SymbolSpot("PERPUSDT") // SymbolSpotGRTUSDT : SymbolSpotGRTUSDT = SymbolSpot("GRTUSDT") // SymbolSpotUSDCUSDT : SymbolSpotUSDCUSDT = SymbolSpot("USDCUSDT") // SymbolSpotSOLUSDT : SymbolSpotSOLUSDT = SymbolSpot("SOLUSDT") // SymbolSpotOMGUSDT : SymbolSpotOMGUSDT = SymbolSpot("OMGUSDT") // SymbolSpotLUNCUSDT : SymbolSpotLUNCUSDT = SymbolSpot("LUNCUSDT") // SymbolSpotPMTEST15USDT : SymbolSpotPMTEST15USDT = SymbolSpot("PMTEST15USDT") // SymbolSpotICPETH : SymbolSpotICPETH = SymbolSpot("ICPETH") // SymbolSpotPMTEST7ETH : SymbolSpotPMTEST7ETH = SymbolSpot("PMTEST7ETH") // SymbolSpotBTCUSDC : SymbolSpotBTCUSDC = SymbolSpot("BTCUSDC") // SymbolSpotETHUSDC : SymbolSpotETHUSDC = SymbolSpot("ETHUSDC") // SymbolSpotBITETH : SymbolSpotBITETH = SymbolSpot("BITETH") // SymbolSpotPMTEST8PMTEST7 : SymbolSpotPMTEST8PMTEST7 = SymbolSpot("PMTEST8PMTEST7") // SymbolSpotPMTEST7USDC : SymbolSpotPMTEST7USDC = SymbolSpot("PMTEST7USDC") // SymbolSpotPMTEST8USDC : SymbolSpotPMTEST8USDC = SymbolSpot("PMTEST8USDC") // SymbolSpotUSDTBIT : SymbolSpotUSDTBIT = SymbolSpot("USDTBIT") // SymbolSpotXRP3LUSDT : SymbolSpotXRP3LUSDT = SymbolSpot("XRP3LUSDT") // SymbolSpotXRP3SUSDT : SymbolSpotXRP3SUSDT = SymbolSpot("XRP3SUSDT") // SymbolSpotUNIBIT : SymbolSpotUNIBIT = SymbolSpot("UNIBIT") // SymbolSpotUSDTTESTNETCS1 : SymbolSpotUSDTTESTNETCS1 = SymbolSpot("USDTTESTNETCS1") // SymbolSpotDONNYTESTUSDT : SymbolSpotDONNYTESTUSDT = SymbolSpot("DONNYTESTUSDT") // SymbolSpotEOSBIT : SymbolSpotEOSBIT = SymbolSpot("EOSBIT") // SymbolSpotXLMQQT : SymbolSpotXLMQQT = SymbolSpot("XLMQQT") // SymbolSpotLTCXLM : SymbolSpotLTCXLM = SymbolSpot("LTCXLM") // SymbolSpotXLMEOS : SymbolSpotXLMEOS = SymbolSpot("XLMEOS") // SymbolSpotXLMXRP : SymbolSpotXLMXRP = SymbolSpot("XLMXRP") // SymbolSpotXLMSHIBI : SymbolSpotXLMSHIBI = SymbolSpot("XLMSHIBI") // SymbolSpotXLMTRX : SymbolSpotXLMTRX = SymbolSpot("XLMTRX") // SymbolSpotXLMMFT : SymbolSpotXLMMFT = SymbolSpot("XLMMFT") // SymbolSpotXLMQTHQ : SymbolSpotXLMQTHQ = SymbolSpot("XLMQTHQ") // SymbolSpotXLMNEO : SymbolSpotXLMNEO = SymbolSpot("XLMNEO") // SymbolSpotUNILTC : SymbolSpotUNILTC = SymbolSpot("UNILTC") // SymbolSpotUNINEO : SymbolSpotUNINEO = SymbolSpot("UNINEO") // SymbolSpotBTC3SUSDT : SymbolSpotBTC3SUSDT = SymbolSpot("BTC3SUSDT") // SymbolSpotBTC3LUSDT : SymbolSpotBTC3LUSDT = SymbolSpot("BTC3LUSDT") // SymbolSpotQTHQQQT : SymbolSpotQTHQQQT = SymbolSpot("QTHQQQT") // SymbolSpotETH3LUSDT : SymbolSpotETH3LUSDT = SymbolSpot("ETH3LUSDT") // SymbolSpotSPOTTEST3USDT : SymbolSpotSPOTTEST3USDT = SymbolSpot("SPOTTEST3USDT") // SymbolSpotPMTEST12ETH : SymbolSpotPMTEST12ETH = SymbolSpot("PMTEST12ETH") // SymbolSpotPMTEST12UST : SymbolSpotPMTEST12UST = SymbolSpot("PMTEST12UST") // SymbolSpotUSDTUST : SymbolSpotUSDTUST = SymbolSpot("USDTUST") // SymbolSpotPMTEST12DAI : SymbolSpotPMTEST12DAI = SymbolSpot("PMTEST12DAI") // SymbolSpotUSDTDAI : SymbolSpotUSDTDAI = SymbolSpot("USDTDAI") // SymbolSpotXXXXYFI : SymbolSpotXXXXYFI = SymbolSpot("XXXXYFI") // SymbolSpotUSTCUSDT : SymbolSpotUSTCUSDT = SymbolSpot("USTCUSDT") // SymbolSpotDONNYTEST02USDT : SymbolSpotDONNYTEST02USDT = SymbolSpot("DONNYTEST02USDT") // SymbolSpotPMTEST047USDT : SymbolSpotPMTEST047USDT = SymbolSpot("PMTEST047USDT") // SymbolSpotPMTESTAUSDT : SymbolSpotPMTESTAUSDT = SymbolSpot("PMTESTAUSDT") // SymbolSpotXRPBIT : SymbolSpotXRPBIT = SymbolSpot("XRPBIT") // SymbolSpotPMTESTCUSDT : SymbolSpotPMTESTCUSDT = SymbolSpot("PMTESTCUSDT") // SymbolSpotPMTESTZUSDT : SymbolSpotPMTESTZUSDT = SymbolSpot("PMTESTZUSDT") // SymbolSpotPMTESTBUSDT : SymbolSpotPMTESTBUSDT = SymbolSpot("PMTESTBUSDT") // SymbolSpotPMTESTDUSDT : SymbolSpotPMTESTDUSDT = SymbolSpot("PMTESTDUSDT") // SymbolSpotPMTESTABTC : SymbolSpotPMTESTABTC = SymbolSpot("PMTESTABTC") // SymbolSpotDYDXETH : SymbolSpotDYDXETH = SymbolSpot("DYDXETH") // SymbolSpotDYDXQQT : SymbolSpotDYDXQQT = SymbolSpot("DYDXQQT") // SymbolSpotNEODYDX : SymbolSpotNEODYDX = SymbolSpot("NEODYDX") // SymbolSpotDYDXXRP : SymbolSpotDYDXXRP = SymbolSpot("DYDXXRP") // SymbolSpotEOSDYDX : SymbolSpotEOSDYDX = SymbolSpot("EOSDYDX") // SymbolSpotDYDXNEO : SymbolSpotDYDXNEO = SymbolSpot("DYDXNEO") // SymbolSpotDYDXDOGE : SymbolSpotDYDXDOGE = SymbolSpot("DYDXDOGE") // SymbolSpotDOGEDYDX : SymbolSpotDOGEDYDX = SymbolSpot("DOGEDYDX") // SymbolSpotMFTDYDX : SymbolSpotMFTDYDX = SymbolSpot("MFTDYDX") // SymbolSpotXRPDYDX : SymbolSpotXRPDYDX = SymbolSpot("XRPDYDX") // SymbolSpotETHDYDX : SymbolSpotETHDYDX = SymbolSpot("ETHDYDX") // SymbolSpotQQTDYDX : SymbolSpotQQTDYDX = SymbolSpot("QQTDYDX") // SymbolSpotDYDXPIG : SymbolSpotDYDXPIG = SymbolSpot("DYDXPIG") // SymbolSpotQQTHT : SymbolSpotQQTHT = SymbolSpot("QQTHT") // SymbolSpotEOSHT : SymbolSpotEOSHT = SymbolSpot("EOSHT") // SymbolSpotHTQQT : SymbolSpotHTQQT = SymbolSpot("HTQQT") // SymbolSpotHTEOS : SymbolSpotHTEOS = SymbolSpot("HTEOS") // SymbolSpotMVUSDT : SymbolSpotMVUSDT = SymbolSpot("MVUSDT") // SymbolSpotBTCBIT : SymbolSpotBTCBIT = SymbolSpot("BTCBIT") // SymbolSpotPMTESTEUSDT : SymbolSpotPMTESTEUSDT = SymbolSpot("PMTESTEUSDT") // SymbolSpotPMTEST2USDC : SymbolSpotPMTEST2USDC = SymbolSpot("PMTEST2USDC") // SymbolSpotPMTEST6USDC : SymbolSpotPMTEST6USDC = SymbolSpot("PMTEST6USDC") // SymbolSpotADAUSDC : SymbolSpotADAUSDC = SymbolSpot("ADAUSDC") // SymbolSpotUSDTTEST : SymbolSpotUSDTTEST = SymbolSpot("USDTTEST") // SymbolSpotBTCTEST : SymbolSpotBTCTEST = SymbolSpot("BTCTEST") // SymbolSpotPMTEST12USDT : SymbolSpotPMTEST12USDT = SymbolSpot("PMTEST12USDT") // SymbolSpotPMTEST12BTC : SymbolSpotPMTEST12BTC = SymbolSpot("PMTEST12BTC") // SymbolSpotPORTUGALUSDT : SymbolSpotPORTUGALUSDT = SymbolSpot("PORTUGALUSDT") // SymbolSpotEOS3LUSDT : SymbolSpotEOS3LUSDT = SymbolSpot("EOS3LUSDT") // SymbolSpotGRPCUSDT : SymbolSpotGRPCUSDT = SymbolSpot("GRPCUSDT") // SymbolSpotGRPCBTC : SymbolSpotGRPCBTC = SymbolSpot("GRPCBTC") // SymbolSpotUSDTETH : SymbolSpotUSDTETH = SymbolSpot("USDTETH") // SymbolSpotGRPCETH : SymbolSpotGRPCETH = SymbolSpot("GRPCETH") // SymbolSpotPORTUGALEOS : SymbolSpotPORTUGALEOS = SymbolSpot("PORTUGALEOS") // SymbolSpotPMTEST03EOS : SymbolSpotPMTEST03EOS = SymbolSpot("PMTEST03EOS") // SymbolSpotPMTEST03ETH : SymbolSpotPMTEST03ETH = SymbolSpot("PMTEST03ETH") // SymbolSpotPMTEST03XRP : SymbolSpotPMTEST03XRP = SymbolSpot("PMTEST03XRP") // SymbolSpotDFGUSDT : SymbolSpotDFGUSDT = SymbolSpot("DFGUSDT") // SymbolSpotLANG1ETH : SymbolSpotLANG1ETH = SymbolSpot("LANG1ETH") // SymbolSpotSOLOETH : SymbolSpotSOLOETH = SymbolSpot("SOLOETH") // SymbolSpotSOLOUSDT : SymbolSpotSOLOUSDT = SymbolSpot("SOLOUSDT") // SymbolSpotWERUSDT : SymbolSpotWERUSDT = SymbolSpot("WERUSDT") // SymbolSpotTESTTUSDT : SymbolSpotTESTTUSDT = SymbolSpot("TESTTUSDT") // SymbolSpotSOL3SUSDT : SymbolSpotSOL3SUSDT = SymbolSpot("SOL3SUSDT") // SymbolSpotSOL3LUSDT : SymbolSpotSOL3LUSDT = SymbolSpot("SOL3LUSDT") // SymbolSpotAAVEBTC : SymbolSpotAAVEBTC = SymbolSpot("AAVEBTC") // SymbolSpotXLMBTC : SymbolSpotXLMBTC = SymbolSpot("XLMBTC") // SymbolSpotLTCBTC : SymbolSpotLTCBTC = SymbolSpot("LTCBTC") // SymbolSpotPMTEST16USDT : SymbolSpotPMTEST16USDT = SymbolSpot("PMTEST16USDT") // SymbolSpotFFFFUSDT : SymbolSpotFFFFUSDT = SymbolSpot("FFFFUSDT") // SymbolSpotPORTUGALETH : SymbolSpotPORTUGALETH = SymbolSpot("PORTUGALETH") // SymbolSpotZENUSDT : SymbolSpotZENUSDT = SymbolSpot("ZENUSDT") // SymbolSpotSOS3LBTC : SymbolSpotSOS3LBTC = SymbolSpot("SOS3LBTC") // SymbolSpotSOS3SUSDT : SymbolSpotSOS3SUSDT = SymbolSpot("SOS3SUSDT") // SymbolSpotSOS3LUSDT : SymbolSpotSOS3LUSDT = SymbolSpot("SOS3LUSDT") // SymbolSpotICXUSDT : SymbolSpotICXUSDT = SymbolSpot("ICXUSDT") // SymbolSpotSTXUSDT : SymbolSpotSTXUSDT = SymbolSpot("STXUSDT") // SymbolSpotSOLBIT : SymbolSpotSOLBIT = SymbolSpot("SOLBIT") // SymbolSpotPMTEST001USDT : SymbolSpotPMTEST001USDT = SymbolSpot("PMTEST001USDT") // SymbolSpotSOLEOS : SymbolSpotSOLEOS = SymbolSpot("SOLEOS") // SymbolSpotTRIBLUSDT : SymbolSpotTRIBLUSDT = SymbolSpot("TRIBLUSDT") // SymbolSpotBTGETH : SymbolSpotBTGETH = SymbolSpot("BTGETH") // SymbolSpotAVAXUSDT : SymbolSpotAVAXUSDT = SymbolSpot("AVAXUSDT") // SymbolSpotSANDUSDT : SymbolSpotSANDUSDT = SymbolSpot("SANDUSDT") // SymbolSpotBTGUSDC : SymbolSpotBTGUSDC = SymbolSpot("BTGUSDC") // SymbolSpotBTGBIT : SymbolSpotBTGBIT = SymbolSpot("BTGBIT") // SymbolSpotBTTETH : SymbolSpotBTTETH = SymbolSpot("BTTETH") // SymbolSpotBUSDUSDT : SymbolSpotBUSDUSDT = SymbolSpot("BUSDUSDT") // SymbolSpotNEOEOS : SymbolSpotNEOEOS = SymbolSpot("NEOEOS") // SymbolSpotHNTUSDT : SymbolSpotHNTUSDT = SymbolSpot("HNTUSDT") // SymbolSpotNEOETH : SymbolSpotNEOETH = SymbolSpot("NEOETH") // SymbolSpotUNIETH : SymbolSpotUNIETH = SymbolSpot("UNIETH") // SymbolSpotLUNCEOS : SymbolSpotLUNCEOS = SymbolSpot("LUNCEOS") // SymbolSpotLUNCXRP : SymbolSpotLUNCXRP = SymbolSpot("LUNCXRP") // SymbolSpotNEOBIT : SymbolSpotNEOBIT = SymbolSpot("NEOBIT") // SymbolSpotDOGEBRL : SymbolSpotDOGEBRL = SymbolSpot("DOGEBRL") // SymbolSpotBRLUSDT : SymbolSpotBRLUSDT = SymbolSpot("BRLUSDT") // SymbolSpotSOLUSD : SymbolSpotSOLUSD = SymbolSpot("SOLUSD") // SymbolSpotUSDEUR : SymbolSpotUSDEUR = SymbolSpot("USDEUR") // SymbolSpotUSDTEUR : SymbolSpotUSDTEUR = SymbolSpot("USDTEUR") // SymbolSpotUSDTUSD : SymbolSpotUSDTUSD = SymbolSpot("USDTUSD") // SymbolSpotSOLUSDC : SymbolSpotSOLUSDC = SymbolSpot("SOLUSDC") // SymbolSpotDOTUSDC : SymbolSpotDOTUSDC = SymbolSpot("DOTUSDC") // SymbolSpotXRPUSDC : SymbolSpotXRPUSDC = SymbolSpot("XRPUSDC") // SymbolSpotBITUSDC : SymbolSpotBITUSDC = SymbolSpot("BITUSDC") // SymbolSpotPMTEST15BTC : SymbolSpotPMTEST15BTC = SymbolSpot("PMTEST15BTC") // SymbolSpotDCRUSDT : SymbolSpotDCRUSDT = SymbolSpot("DCRUSDT") // SymbolSpotEOSDAI : SymbolSpotEOSDAI = SymbolSpot("EOSDAI") // SymbolSpotSHIBIDAI : SymbolSpotSHIBIDAI = SymbolSpot("SHIBIDAI") )
const ( // MarginModeRegular : MarginModeRegular = MarginMode("REGULAR_MARGIN") // MarginModePortfolio : MarginModePortfolio = MarginMode("PORTFOLIO_MARGIN") )
const ( // CategoryV5Spot : CategoryV5Spot = CategoryV5("spot") // CategoryV5Linear : CategoryV5Linear = CategoryV5("linear") // CategoryV5Inverse : CategoryV5Inverse = CategoryV5("inverse") // CategoryV5Option : CategoryV5Option = CategoryV5("option") )
const ( // USDT Perpetual: SymbolV5BTCUSDT = SymbolV5("BTCUSDT") SymbolV5ETHUSDT = SymbolV5("ETHUSDT") // USDC Perpetual SymbolV5BTCPERP = SymbolV5("BTCPERP") SymbolV5ETHPERP = SymbolV5("ETHPERP") // Inverse Perpetual SymbolV5BTCUSD = SymbolV5("BTCUSD") SymbolV5ETHUSD = SymbolV5("ETHUSD") // Inverse Futures SymbolV5BTCUSDH23 = SymbolV5("BTCUSDH23") SymbolV5BTCUSDM23 = SymbolV5("BTCUSDM23") SymbolV5BTCUSDU23 = SymbolV5("BTCUSDU23") SymbolV5BTCUSDZ23 = SymbolV5("BTCUSDZ23") // Spot SymbolV5ETHUSDC = SymbolV5("ETHUSDC") )
SymbolV5 :
const ( // TriggerDirectionRise : triggered when market price rises TriggerDirectionRise = TriggerDirection(1) // TriggerDirectionFall : triggered when market price falls TriggerDirectionFall = TriggerDirection(2) )
const ( // IsLeverageFalse : false then spot trading IsLeverageFalse = IsLeverage(0) // IsLeverageTrue : true then margin trading IsLeverageTrue = IsLeverage(1) )
const ( // OrderFilterOrder : OrderFilterOrder = OrderFilter("Order") // OrderFilterStopOrder : OrderFilterStopOrder = OrderFilter("StopOrder") // OrderFilterTpSlOrder : OrderFilterTpSlOrder = OrderFilter("tpslOrder") )
const ( // TriggerByLastPrice : TriggerByLastPrice = TriggerBy("LastPrice") // TriggerByIndexPrice : TriggerByIndexPrice = TriggerBy("IndexPrice") // TriggerByMarkPrice : TriggerByMarkPrice = TriggerBy("MarkPrice") )
const ( PositionIdxOneWay = PositionIdx(0) PositionIdxHedgeBuy = PositionIdx(1) PositionIdxHedgeSell = PositionIdx(2) )
PositionIdx :
const ( ContractTypeInversePerpetual = ContractType("InversePerpetual") ContractTypeLinearPerpetual = ContractType("LinearPerpetual") ContractTypeInverseFutures = ContractType("InverseFutures") )
ContractType :
const ( // linear & inverse: InstrumentStatusPending = InstrumentStatus("Pending") InstrumentStatusTrading = InstrumentStatus("Trading") InstrumentStatusSettling = InstrumentStatus("Settling") InstrumentStatusClosed = InstrumentStatus("Closed") // option InstrumentStatusWaitingOnline = InstrumentStatus("WAITING_ONLINE") InstrumentStatusOnline = InstrumentStatus("ONLINE") InstrumentStatusDelivering = InstrumentStatus("DELIVERING") InstrumentStatusOffline = InstrumentStatus("OFFLINE") // spot InstrumentStatusAvailable = InstrumentStatus("1") )
InstrumentStatus :
const ( OptionsTypeCall = OptionsType("Call") OptionsTypePut = OptionsType("Put") )
OptionsType :
const ( InnovationFalse = Innovation("0") InnovationTrue = Innovation("1") )
Innovation :
const ( // PositionModeMergedSingle : PositionModeMergedSingle = PositionMode(0) // PositionModeBothSides : PositionModeBothSides = PositionMode(3) )
const ( // PositionMarginCross : PositionMarginCross = PositionMarginMode(0) // PositionMarginIsolated : PositionMarginIsolated = PositionMarginMode(1) )
const ( // ExecTypeV5Trade : ExecTypeV5Trade = ExecTypeV5("Trade") // ExecTypeV5AdlTrade : Auto-Deleveraging // https://www.bybit.com/en/help-center/article/Auto-Deleveraging-ADL ExecTypeV5AdlTrade = ExecTypeV5("AdlTrade") // ExecTypeV5Funding : Funding Fee // https://www.bybit.com/en/help-center/article/Introduction-to-Funding-Rate ExecTypeV5Funding = ExecTypeV5("Funding") // ExecTypeV5BustTrade : Takeover liquidation ExecTypeV5BustTrade = ExecTypeV5("BustTrade") // ExecTypeV5Delivery : USDC futures delivery; Position closed by contract delisted ExecTypeV5Delivery = ExecTypeV5("Delivery") // ExecTypeV5SessionSettlePnL : ExecTypeV5SessionSettlePnL = ExecTypeV5("SessionSettlePnL") // ExecTypeV5Settle : ExecTypeV5Settle = ExecTypeV5("Settle") // ExecTypeV5BlockTrade : ExecTypeV5BlockTrade = ExecTypeV5("BlockTrade") // ExecTypeV5MovePosition : ExecTypeV5MovePosition = ExecTypeV5("MovePosition") // ExecTypeV5UNKNOWN : May be returned by a classic account. Cannot query by this type ExecTypeV5UNKNOWN = ExecTypeV5("UNKNOWN") )
const ( // TransferStatusV5SUCCESS : TransferStatusV5SUCCESS = TransferStatusV5("SUCCESS") // TransferStatusV5PENDING : TransferStatusV5PENDING = TransferStatusV5("PENDING") // TransferStatusV5FAILED : TransferStatusV5FAILED = TransferStatusV5("FAILED") )
const ( // AccountTypeV5CONTRACT // Classic: Derivatives Account // UTA: Inverse Derivatives Account AccountTypeV5CONTRACT = AccountTypeV5("CONTRACT") // AccountTypeV5SPOT // Classic: Spot Account AccountTypeV5SPOT = AccountTypeV5("SPOT") // AccountTypeV5INVESTMENT // Classic: ByFi Account // Deprecated: this service is now offline AccountTypeV5INVESTMENT = AccountTypeV5("INVESTMENT") // AccountTypeV5OPTION // Classic: USDC Derivatives AccountTypeV5OPTION = AccountTypeV5("OPTION") // AccountTypeV5UNIFIED // UTA: Unified Trading Account AccountTypeV5UNIFIED = AccountTypeV5("UNIFIED") // AccountTypeV5FUND // Classic: Funding Account // UTA: Funding Account AccountTypeV5FUND = AccountTypeV5("FUND") )
const ( ConvertAccountTypeV5INVERSE = ConvertAccountTypeV5("eb_convert_inverse") ConvertAccountTypeV5UTA = ConvertAccountTypeV5("eb_convert_uta") ConvertAccountTypeV5Funding = ConvertAccountTypeV5("eb_convert_funding") ConvertAccountTypeV5Spot = ConvertAccountTypeV5("eb_convert_spot") ConvertAccountTypeV5Contract = ConvertAccountTypeV5("eb_convert_contract") )
const ( // UnifiedMarginStatusRegular : Regular account UnifiedMarginStatusRegular = UnifiedMarginStatus(1) // UnifiedMarginStatusUnifiedMargin : Unified margin account, it only trades linear perpetual and options. // Deprecated: Is not used anymore - Please ignore UnifiedMarginStatusUnifiedMargin = UnifiedMarginStatus(2) // UnifiedMarginStatusUnifiedTrade : Unified trade account, it can trade linear perpetual, options and spot UnifiedMarginStatusUnifiedTrade = UnifiedMarginStatus(3) // UnifiedMarginStatusUTAPro : UTA Pro, the pro version of Unified trade account UnifiedMarginStatusUTAPro = UnifiedMarginStatus(4) )
const ( TransactionLogTypeV5TRANSFERIN = TransactionLogTypeV5("TRANSFER_IN") TransactionLogTypeV5TRANSFEROUT = TransactionLogTypeV5("TRANSFER_OUT") TransactionLogTypeV5TRADE = TransactionLogTypeV5("TRADE") TransactionLogTypeV5SETTLEMENT = TransactionLogTypeV5("SETTLEMENT") TransactionLogTypeV5DELIVERY = TransactionLogTypeV5("DELIVERY") TransactionLogTypeV5LIQUIDATION = TransactionLogTypeV5("LIQUIDATION") TransactionLogTypeV5BONUS = TransactionLogTypeV5("BONUS") TransactionLogTypeV5FEEREFUND = TransactionLogTypeV5("FEE_REFUND") TransactionLogTypeV5INTEREST = TransactionLogTypeV5("INTEREST") TransactionLogTypeV5CURRENCYBUY = TransactionLogTypeV5("CURRENCY_BUY") TransactionLogTypeV5CURRENCYSELL = TransactionLogTypeV5("CURRENCY_SELL") )
const ( InternalDepositStatusV5Processing = InternalDepositStatusV5(1) InternalDepositStatusV5Success = InternalDepositStatusV5(2) InternalDepositStatusV5Failed = InternalDepositStatusV5(3) )
const ( DepositStatusV5Unknown = DepositStatusV5(0) DepositStatusV5ToBeConfirmed = DepositStatusV5(1) DepositStatusV5Processing = DepositStatusV5(2) DepositStatusV5Success = DepositStatusV5(3) DepositStatusV5Failed = DepositStatusV5(4) )
const ( WithdrawTypeOnChain = WithdrawTypeV5(0) WithdrawTypeOffChain = WithdrawTypeV5(1) WithdrawTypeAll = WithdrawTypeV5(2) )
const ( WithdrawStatusV5SecurityCheck = WithdrawStatusV5("SecurityCheck") WithdrawStatusV5Pending = WithdrawStatusV5("Pending") WithdrawStatusV5Success = WithdrawStatusV5("success") WithdrawStatusV5CancelByUser = WithdrawStatusV5("CancelByUser") WithdrawStatusV5Reject = WithdrawStatusV5("Reject") WithdrawStatusV5Fail = WithdrawStatusV5("Fail") WithdrawStatusV5BlockchainConfirmed = WithdrawStatusV5("BlockchainConfirmed") )
const ( IsLowestRiskFalse = IsLowestRisk(0) IsLowestRiskTrue = IsLowestRisk(1) )
const ( CollateralSwitchV5On = CollateralSwitchV5("ON") CollateralSwitchV5Off = CollateralSwitchV5("OFF") )
const ( AdlRankIndicator0 = AdlRankIndicator(0) // default value of empty position AdlRankIndicator1 = AdlRankIndicator(1) AdlRankIndicator2 = AdlRankIndicator(2) AdlRankIndicator3 = AdlRankIndicator(3) AdlRankIndicator4 = AdlRankIndicator(4) AdlRankIndicator5 = AdlRankIndicator(5) )
const ( // V5WebsocketPublicTopicOrderBook : V5WebsocketPublicTopicOrderBook = V5WebsocketPublicTopic("orderbook") // V5WebsocketPublicTopicKline : V5WebsocketPublicTopicKline = V5WebsocketPublicTopic("kline") // V5WebsocketPublicTopicTicker : V5WebsocketPublicTopicTicker = V5WebsocketPublicTopic("tickers") // V5WebsocketPublicTopicTrade : V5WebsocketPublicTopicTrade = V5WebsocketPublicTopic("publicTrade") // V5WebsocketPublicTopicLiquidation : V5WebsocketPublicTopicLiquidation = V5WebsocketPublicTopic("liquidation") )
const ( // SpotWebsocketV1PublicV1EventSubscribe : SpotWebsocketV1PublicV1EventSubscribe = "sub" // SpotWebsocketV1PublicV1EventUnsubscribe : SpotWebsocketV1PublicV1EventUnsubscribe = "cancel" )
const ( // SpotWebsocketV1PublicV2EventSubscribe : SpotWebsocketV1PublicV2EventSubscribe = "sub" // SpotWebsocketV1PublicV2EventUnsubscribe : SpotWebsocketV1PublicV2EventUnsubscribe = "cancel" )
const (
// SpotWebsocketV1PrivateEventTypeOutboundAccountInfo :
SpotWebsocketV1PrivateEventTypeOutboundAccountInfo = "outboundAccountInfo"
)
const (
// SpotWebsocketV1PrivatePath :
SpotWebsocketV1PrivatePath = "/spot/ws"
)
const (
// SpotWebsocketV1PublicV1Path :
SpotWebsocketV1PublicV1Path = "/spot/quote/ws/v1"
)
const ( // SpotWebsocketV1PublicV1TopicTrade : SpotWebsocketV1PublicV1TopicTrade = SpotWebsocketV1PublicV1Topic("trade") )
const (
// SpotWebsocketV1PublicV2Path :
SpotWebsocketV1PublicV2Path = "/spot/quote/ws/v2"
)
const ( // SpotWebsocketV1PublicV2TopicTrade : SpotWebsocketV1PublicV2TopicTrade = SpotWebsocketV1PublicV2Topic("trade") )
const (
// TestNetBaseURL :
TestNetBaseURL = "https://api-testnet.bybit.com"
)
const (
// TestWebsocketBaseURL :
TestWebsocketBaseURL = "wss://stream-testnet.bybit.com"
)
const (
// V5WebsocketPrivatePath :
V5WebsocketPrivatePath = "/v5/private"
)
const (
// V5WebsocketPublicPath :
V5WebsocketPublicPath = "/v5/public"
)
Variables ¶
var ( // ErrBadRequest : // Need to send the request with GET / POST (must be capitalized) ErrBadRequest = errors.New("bad request") // ErrInvalidRequest : // 1. Need to use the correct key to access; // 2. Need to put authentication params in the request header ErrInvalidRequest = errors.New("authentication failed") // ErrForbiddenRequest : // Possible causes: // 1. IP rate limit breached; // 2. You send GET request with an empty json body; // 3. You are using U.S IP ErrForbiddenRequest = errors.New("access denied") // ErrPathNotFound : // Possible causes: // 1. Wrong path; // 2. Category value does not match account mode ErrPathNotFound = errors.New("path not found") )
var Intervals = []Interval{ Interval1, Interval3, Interval5, Interval15, Interval30, Interval60, Interval120, Interval240, Interval360, Interval720, IntervalD, IntervalW, IntervalM, }
Functions ¶
func V5WebsocketPublicPathFor ¶
func V5WebsocketPublicPathFor(category CategoryV5) string
V5WebsocketPublicPathFor :
Types ¶
type APIKeyInfoResponse ¶
type APIKeyInfoResponse struct {
CommonResponse `json:",inline"`
Result []APIKeyInfoResult `json:"result"`
}
APIKeyInfoResponse :
type APIKeyInfoResult ¶
type APIKeyInfoResult struct {
APIKey string `json:"api_key"`
Type string `json:"type"`
UserID int `json:"user_id"`
InviterID int `json:"inviter_id"`
Ips []string `json:"ips"`
Note string `json:"note"`
Permissions []string `json:"permissions"`
CreatedAt time.Time `json:"created_at"`
ExpiredAt time.Time `json:"expired_at"`
ReadOnly bool `json:"read_only"`
VipLevel string `json:"vip_level"`
MktMakerLevel string `json:"mkt_maker_level"`
AffiliateID int `json:"affiliate_id"`
}
APIKeyInfoResult :
type AccountAssetService ¶
type AccountAssetService struct {
// contains filtered or unexported fields
}
AccountAssetService :
type AccountRatioParam ¶
type AccountRatioParam struct {
Symbol SymbolFuture `url:"symbol"`
Period Period `url:"period"`
Limit *int `url:"limit,omitempty"`
}
AccountRatioParam :
type AccountRatioResponse ¶
type AccountRatioResponse struct {
CommonResponse `json:",inline"`
Result []AccountRatioResult `json:"result"`
}
AccountRatioResponse :
type AccountRatioResult ¶
type AccountRatioResult struct {
Symbol SymbolFuture `json:"symbol"`
BuyRatio float64 `json:"buy_ratio"`
SellRatio float64 `json:"sell_ratio"`
Timestamp int `json:"timestamp"`
}
AccountRatioResult :
type Balance ¶
type Balance struct {
Equity float64 `json:"equity"`
AvailableBalance float64 `json:"available_balance"`
UsedMargin float64 `json:"used_margin"`
OrderMargin float64 `json:"order_margin"`
PositionMargin float64 `json:"position_margin"`
OccClosingFee float64 `json:"occ_closing_fee"`
OccFundingFee float64 `json:"occ_funding_fee"`
WalletBalance float64 `json:"wallet_balance"`
RealisedPnl float64 `json:"realised_pnl"`
UnrealisedPnl float64 `json:"unrealised_pnl"`
CumRealisedPnl float64 `json:"cum_realised_pnl"`
GivenCash float64 `json:"given_cash"`
ServiceCash float64 `json:"service_cash"`
}
Balance :
type BalanceResponse ¶
type BalanceResponse struct {
CommonResponse `json:",inline"`
Result BalanceResult `json:"result"`
}
BalanceResponse :
type BalanceResult ¶
BalanceResult :
func (*BalanceResult) UnmarshalJSON ¶
func (r *BalanceResult) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type BigDealParam ¶
type BigDealParam struct {
Symbol SymbolFuture `url:"symbol"`
Limit *int `url:"limit,omitempty"`
}
BigDealParam :
type BigDealResponse ¶
type BigDealResponse struct {
CommonResponse `json:",inline"`
Result []BigDealResult `json:"result"`
}
BigDealResponse :
type BigDealResult ¶
type BigDealResult struct {
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Timestamp int `json:"timestamp"`
Value float64 `json:"value"`
}
BigDealResult :
type CancelAllFuturesOrderParam ¶
type CancelAllFuturesOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
}
CancelAllFuturesOrderParam :
type CancelAllFuturesOrderResponse ¶
type CancelAllFuturesOrderResponse struct {
CommonResponse `json:",inline"`
Result []CancelAllFuturesOrderResult `json:"result"`
}
CancelAllFuturesOrderResponse :
type CancelAllFuturesOrderResult ¶
type CancelAllFuturesOrderResult struct {
ClOrdID string `json:"clOrdID"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CrossStatus string `json:"cross_status"`
CrossSeq int `json:"cross_seq"`
}
CancelAllFuturesOrderResult :
type CancelAllFuturesStopOrderParam ¶
type CancelAllFuturesStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
}
CancelAllFuturesStopOrderParam :
type CancelAllFuturesStopOrderResponse ¶
type CancelAllFuturesStopOrderResponse struct {
CommonResponse `json:",inline"`
Result []CancelAllFuturesStopOrderResult `json:"result"`
}
CancelAllFuturesStopOrderResponse :
type CancelAllFuturesStopOrderResult ¶
type CancelAllFuturesStopOrderResult struct {
ClOrdID string `json:"clOrdID"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CrossStatus string `json:"cross_status"`
CrossSeq int `json:"cross_seq"`
StopOrderType StopOrderTypeFuture `json:"stop_order_type"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
ExpectedDirection string `json:"expected_direction"`
}
CancelAllFuturesStopOrderResult :
type CancelAllLinearStopOrderParam ¶
type CancelAllLinearStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
}
CancelAllLinearStopOrderParam :
type CancelAllLinearStopOrderResponse ¶
type CancelAllLinearStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelAllLinearStopOrderResult `json:"result"`
}
CancelAllLinearStopOrderResponse :
type CancelAllLinearStopOrderResult ¶
type CancelAllLinearStopOrderResult []string
CancelAllLinearStopOrderResult :
type CancelAllOrderParam ¶
type CancelAllOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
}
CancelAllOrderParam :
type CancelAllOrderResponse ¶
type CancelAllOrderResponse struct {
CommonResponse `json:",inline"`
Result []CancelAllOrderResult `json:"result"`
}
CancelAllOrderResponse :
type CancelAllOrderResult ¶
type CancelAllOrderResult struct {
ClOrdID string `json:"clOrdID"`
OrderLinkID string `json:"order_link_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CrossStatus string `json:"cross_status"`
CrossSeq int `json:"cross_seq"`
}
CancelAllOrderResult :
type CancelAllStopOrderParam ¶
type CancelAllStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
}
CancelAllStopOrderParam :
type CancelAllStopOrderResponse ¶
type CancelAllStopOrderResponse struct {
CommonResponse `json:",inline"`
Result []CancelAllStopOrderResult `json:"result"`
}
CancelAllStopOrderResponse :
type CancelAllStopOrderResult ¶
type CancelAllStopOrderResult struct {
ClOrdID string `json:"clOrdID"`
OrderLinkID string `json:"order_link_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CrossStatus string `json:"cross_status"`
CrossSeq int `json:"cross_seq"`
StopOrderType StopOrderTypeFuture `json:"stop_order_type"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
ExpectedDirection string `json:"expected_direction"`
}
CancelAllStopOrderResult :
type CancelFuturesOrderParam ¶
type CancelFuturesOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
OrderID *string `json:"order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelFuturesOrderParam :
type CancelFuturesOrderResponse ¶
type CancelFuturesOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelFuturesOrderResult `json:"result"`
}
CancelFuturesOrderResponse :
type CancelFuturesOrderResult ¶
type CancelFuturesOrderResult struct {
UserID int `json:"user_id"`
OrderID string `json:"order_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecTime float64 `json:"last_exec_time"`
LastExecPrice float64 `json:"last_exec_price"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
CancelFuturesOrderResult :
type CancelFuturesStopOrderParam ¶
type CancelFuturesStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
StopOrderID *string `json:"stop_order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelFuturesStopOrderParam :
type CancelFuturesStopOrderResponse ¶
type CancelFuturesStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelFuturesStopOrderResult `json:"result"`
}
CancelFuturesStopOrderResponse :
type CancelFuturesStopOrderResult ¶
type CancelFuturesStopOrderResult struct {
StopOrderID string `json:"stop_order_id"`
}
CancelFuturesStopOrderResult :
type CancelLinearOrder ¶
type CancelLinearOrder struct {
OrderID string `json:"order_id"`
}
CancelLinearOrder :
type CancelLinearOrderParam ¶
type CancelLinearOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
OrderID *string `json:"order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelLinearOrderParam :
type CancelLinearOrderResponse ¶
type CancelLinearOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelLinearOrderResult `json:"result"`
}
CancelLinearOrderResponse :
type CancelLinearOrderResult ¶
type CancelLinearOrderResult struct {
CancelLinearOrder `json:",inline"`
}
CancelLinearOrderResult :
type CancelLinearStopOrderParam ¶
type CancelLinearStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
StopOrderID *string `json:"stop_order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelLinearStopOrderParam :
type CancelLinearStopOrderResponse ¶
type CancelLinearStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelLinearStopOrderResult `json:"result"`
}
CancelLinearStopOrderResponse :
type CancelLinearStopOrderResult ¶
type CancelLinearStopOrderResult struct {
StopOrderID string `json:"stop_order_id"`
}
CancelLinearStopOrderResult :
type CancelOrder ¶
type CancelOrder struct {
UserID int `json:"user_id"`
OrderID string `json:"order_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecTime float64 `json:"last_exec_time"`
LastExecPrice float64 `json:"last_exec_price"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
CancelOrder : so far, same as CreateOrder
type CancelOrderParam ¶
type CancelOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
OrderID *string `json:"order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelOrderParam :
type CancelOrderResponse ¶
type CancelOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelOrderResult `json:"result"`
}
CancelOrderResponse :
type CancelOrderResult ¶
type CancelOrderResult struct {
CancelOrder `json:",inline"`
}
CancelOrderResult :
type CancelStopOrderParam ¶
type CancelStopOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
StopOrderID *string `json:"stop_order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CancelStopOrderParam :
type CancelStopOrderResponse ¶
type CancelStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CancelStopOrderResult `json:"result"`
}
CancelStopOrderResponse :
type CancelStopOrderResult ¶
type CancelStopOrderResult struct {
StopOrderID string `json:"stop_order_id"`
}
CancelStopOrderResult :
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client :
func (*Client) SyncServerTime ¶
func (*Client) WithHTTPClient ¶
WithHTTPClient :
func (*Client) WithReferer ¶
type CollateralSwitchV5 ¶
type CollateralSwitchV5 string
type CommonResponse ¶
type CommonResponse struct {
RetCode int `json:"ret_code"`
RetMsg string `json:"ret_msg"`
ExtCode string `json:"ext_code"`
ExtInfo string `json:"ext_info"`
TimeNow string `json:"time_now"`
RateLimitStatus int `json:"rate_limit_status"`
RateLimitResetMs int `json:"rate_limit_reset_ms"`
RateLimit int `json:"rate_limit"`
}
CommonResponse :
type CommonV3Response ¶
type CommonV3Response struct {
RetCode int `json:"retCode"`
RetMsg string `json:"retMsg"`
RetExtInfo interface{} `json:"retExtInfo"`
Time int `json:"time"`
}
CommonV3Response :
type CommonV5Response ¶
type CommonV5Response struct {
RetCode int `json:"retCode"`
RetMsg string `json:"retMsg"`
RetExtInfo interface{} `json:"retExtInfo"`
Time int `json:"time"`
}
CommonV5Response :
type CopyTradingService ¶
type CopyTradingService struct {
// contains filtered or unexported fields
}
CopyTradingService :
type CreateFuturesOrderParam ¶
type CreateFuturesOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty int `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
Price *float64 `json:"price,omitempty"`
PositionIdx *int `json:"position_idx,omitempty"`
ReduceOnly *bool `json:"reduce_only,omitempty"`
CloseOnTrigger *bool `json:"close_on_trigger,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
}
CreateFuturesOrderParam :
type CreateFuturesOrderResponse ¶
type CreateFuturesOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateFuturesOrderResult `json:"result"`
}
CreateFuturesOrderResponse :
type CreateFuturesOrderResult ¶
type CreateFuturesOrderResult struct {
UserID int `json:"user_id"`
OrderID string `json:"order_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecTime float64 `json:"last_exec_time"`
LastExecPrice float64 `json:"last_exec_price"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
CreateFuturesOrderResult :
type CreateFuturesStopOrderParam ¶
type CreateFuturesStopOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty float64 `json:"qty"`
BasePrice float64 `json:"base_price"`
StopPx float64 `json:"stop_px"`
TimeInForce TimeInForce `json:"time_in_force"`
PositionIdx *int `json:"position_idx,omitempty"`
Price *float64 `json:"price,omitempty"`
TriggerBy *TriggerByFuture `json:"trigger_by,omitempty"`
CloseOnTrigger *bool `json:"close_on_trigger,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
}
CreateFuturesStopOrderParam :
type CreateFuturesStopOrderResponse ¶
type CreateFuturesStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateFuturesStopOrderResult `json:"result"`
}
CreateFuturesStopOrderResponse :
type CreateFuturesStopOrderResult ¶
type CreateFuturesStopOrderResult struct {
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
Remark string `json:"remark"`
LeavesQty string `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
StopPx string `json:"stop_px"`
RejectReason string `json:"reject_reason"`
StopOrderID string `json:"stop_order_id"`
OrderLinkID string `json:"order_link_id"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
}
CreateFuturesStopOrderResult :
type CreateLinearOrder ¶
type CreateLinearOrder struct {
OrderID string `json:"order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecPrice float64 `json:"last_exec_price"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
CreateLinearOrder :
type CreateLinearOrderParam ¶
type CreateLinearOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
Price *float64 `json:"price,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
PositionIdx *int `json:"position_idx,omitempty"`
}
CreateLinearOrderParam :
type CreateLinearOrderResponse ¶
type CreateLinearOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateLinearOrderResult `json:"result"`
}
CreateLinearOrderResponse :
type CreateLinearOrderResult ¶
type CreateLinearOrderResult struct {
CreateLinearOrder `json:",inline"`
}
CreateLinearOrderResult :
type CreateLinearStopOrderParam ¶
type CreateLinearStopOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty float64 `json:"qty"`
BasePrice float64 `json:"base_price"`
StopPx float64 `json:"stop_px"`
TimeInForce TimeInForce `json:"time_in_force"`
TriggerBy TriggerByFuture `json:"trigger_by"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
Price *float64 `json:"price,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
PositionIdx *int `json:"position_idx,omitempty"`
}
CreateLinearStopOrderParam :
type CreateLinearStopOrderResponse ¶
type CreateLinearStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateLinearStopOrderResult `json:"result"`
}
CreateLinearStopOrderResponse :
type CreateLinearStopOrderResult ¶
type CreateLinearStopOrderResult struct {
StopOrderID string `json:"stop_order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
TriggerPrice float64 `json:"trigger_price"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
BasePrice string `json:"base_price"`
TriggerBy TriggerByFuture `json:"trigger_by"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
PositionIdx int `json:"position_idx"`
}
CreateLinearStopOrderResult :
type CreateOrder ¶
type CreateOrder struct {
UserID int `json:"user_id"`
OrderID string `json:"order_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecTime float64 `json:"last_exec_time"`
LastExecPrice float64 `json:"last_exec_price"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
CreateOrder :
type CreateOrderParam ¶
type CreateOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty int `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
Price *float64 `json:"price,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
ReduceOnly *bool `json:"reduce_only,omitempty"`
CloseOnTrigger *bool `json:"close_on_trigger,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
}
CreateOrderParam :
type CreateOrderResponse ¶
type CreateOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateOrderResult `json:"result"`
}
CreateOrderResponse :
type CreateOrderResult ¶
type CreateOrderResult struct {
CreateOrder `json:",inline"`
}
CreateOrderResult :
type CreateStopOrderParam ¶
type CreateStopOrderParam struct {
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderType OrderType `json:"order_type"`
Qty int `json:"qty"`
BasePrice float64 `json:"base_price"`
StopPx float64 `json:"stop_px"`
TimeInForce TimeInForce `json:"time_in_force"`
Price *float64 `json:"price,omitempty"`
TriggerBy *TriggerByFuture `json:"trigger_by,omitempty"`
CloseOnTrigger *bool `json:"close_on_trigger,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
}
CreateStopOrderParam :
type CreateStopOrderResponse ¶
type CreateStopOrderResponse struct {
CommonResponse `json:",inline"`
Result CreateStopOrderResult `json:"result"`
}
CreateStopOrderResponse :
type CreateStopOrderResult ¶
type CreateStopOrderResult struct {
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
Remark string `json:"remark"`
LeavesQty string `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
StopPx string `json:"stop_px"`
RejectReason string `json:"reject_reason"`
StopOrderID string `json:"stop_order_id"`
OrderLinkID string `json:"order_link_id"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
}
CreateStopOrderResult :
type DerivativeCommonService ¶
type DerivativeCommonService struct {
// contains filtered or unexported fields
}
DerivativeCommonService :
func (*DerivativeCommonService) DerivativesIndexPriceKline ¶
func (s *DerivativeCommonService) DerivativesIndexPriceKline(param DerivativesIndexPriceKlineParam) (*DerivativesIndexPriceKlineResponse, error)
DerivativesIndexPriceKline :
func (*DerivativeCommonService) DerivativesInstruments ¶
func (s *DerivativeCommonService) DerivativesInstruments(param DerivativesInstrumentsParam) (*DerivativesInstrumentsResponse, error)
DerivativesInstruments :
func (*DerivativeCommonService) DerivativesInstrumentsForOption ¶
func (s *DerivativeCommonService) DerivativesInstrumentsForOption(param DerivativesInstrumentsForOptionParam) (*DerivativesInstrumentsForOptionResponse, error)
DerivativesInstrumentsForOption :
func (*DerivativeCommonService) DerivativesKline ¶
func (s *DerivativeCommonService) DerivativesKline(param DerivativesKlineParam) (*DerivativesKlineResponse, error)
DerivativesKline :
func (*DerivativeCommonService) DerivativesMarkPriceKline ¶
func (s *DerivativeCommonService) DerivativesMarkPriceKline(param DerivativesMarkPriceKlineParam) (*DerivativesMarkPriceKlineResponse, error)
DerivativesMarkPriceKline :
func (*DerivativeCommonService) DerivativesOrderBook ¶
func (s *DerivativeCommonService) DerivativesOrderBook(param DerivativesOrderBookParam) (*DerivativesOrderBookResponse, error)
DerivativesOrderBook :
func (*DerivativeCommonService) DerivativesTickers ¶
func (s *DerivativeCommonService) DerivativesTickers(param DerivativesTickersParam) (*DerivativesTickersResponse, error)
DerivativesTickers :
func (*DerivativeCommonService) DerivativesTickersForOption ¶
func (s *DerivativeCommonService) DerivativesTickersForOption(param DerivativesTickersForOptionParam) (*DerivativesTickersForOptionResponse, error)
DerivativesTickersForOption :
type DerivativeContractService ¶
type DerivativeContractService struct {
*DerivativeCommonService
// contains filtered or unexported fields
}
DerivativeContractService :
type DerivativeContractServiceI ¶
type DerivativeContractServiceI interface {
// Market Data Endpoints
DerivativesOrderBook(DerivativesOrderBookParam) (*DerivativesOrderBookResponse, error)
DerivativesKline(DerivativesKlineParam) (*DerivativesKlineResponse, error)
DerivativesTickers(DerivativesTickersParam) (*DerivativesTickersResponse, error)
DerivativesTickersForOption(DerivativesTickersForOptionParam) (*DerivativesTickersForOptionResponse, error)
DerivativesInstruments(DerivativesInstrumentsParam) (*DerivativesInstrumentsResponse, error)
DerivativesInstrumentsForOption(DerivativesInstrumentsForOptionParam) (*DerivativesInstrumentsForOptionResponse, error)
DerivativesMarkPriceKline(DerivativesMarkPriceKlineParam) (*DerivativesMarkPriceKlineResponse, error)
DerivativesIndexPriceKline(DerivativesIndexPriceKlineParam) (*DerivativesIndexPriceKlineResponse, error)
}
DerivativeContractServiceI :
type DerivativeService ¶
type DerivativeService struct {
// contains filtered or unexported fields
}
DerivativeService :
func (*DerivativeService) Contract ¶
func (s *DerivativeService) Contract() DerivativeContractServiceI
Contract :
func (*DerivativeService) UnifiedMargin ¶
func (s *DerivativeService) UnifiedMargin() DerivativeUnifiedMarginServiceI
UnifiedMargin :
type DerivativeServiceI ¶
type DerivativeServiceI interface {
UnifiedMargin() DerivativeUnifiedMarginServiceI
Contract() DerivativeContractServiceI
}
DerivativeServiceI :
type DerivativeUnifiedMarginService ¶
type DerivativeUnifiedMarginService struct {
*DerivativeCommonService
// contains filtered or unexported fields
}
DerivativeUnifiedMarginService :
type DerivativeUnifiedMarginServiceI ¶
type DerivativeUnifiedMarginServiceI interface {
// Market Data Endpoints
DerivativesOrderBook(DerivativesOrderBookParam) (*DerivativesOrderBookResponse, error)
DerivativesKline(DerivativesKlineParam) (*DerivativesKlineResponse, error)
DerivativesTickers(DerivativesTickersParam) (*DerivativesTickersResponse, error)
DerivativesTickersForOption(DerivativesTickersForOptionParam) (*DerivativesTickersForOptionResponse, error)
DerivativesInstruments(DerivativesInstrumentsParam) (*DerivativesInstrumentsResponse, error)
DerivativesInstrumentsForOption(DerivativesInstrumentsForOptionParam) (*DerivativesInstrumentsForOptionResponse, error)
DerivativesMarkPriceKline(DerivativesMarkPriceKlineParam) (*DerivativesMarkPriceKlineResponse, error)
DerivativesIndexPriceKline(DerivativesIndexPriceKlineParam) (*DerivativesIndexPriceKlineResponse, error)
}
DerivativeUnifiedMarginServiceI :
type DerivativesIndexPriceKlineParam ¶
type DerivativesIndexPriceKlineParam struct {
Category CategoryDerivative `url:"category"`
Symbol SymbolDerivative `url:"symbol"`
Interval Interval `url:"interval"`
Start int64 `url:"start"` // timestamp point for result, in milliseconds
End int64 `url:"end"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"`
}
DerivativesIndexPriceKlineParam :
type DerivativesIndexPriceKlineResponse ¶
type DerivativesIndexPriceKlineResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesIndexPriceKlineResult `json:"result"`
}
DerivativesIndexPriceKlineResponse :
type DerivativesIndexPriceKlineResult ¶
type DerivativesIndexPriceKlineResult struct {
Category CategoryDerivative `json:"category"`
Symbol SymbolDerivative `json:"symbol"`
List []DerivativesIndexPriceKlineResultListItem `json:"list"`
}
DerivativesIndexPriceKlineResult :
type DerivativesIndexPriceKlineResultListItem ¶
type DerivativesIndexPriceKlineResultListItem struct {
Start string `json:"start"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
}
DerivativesIndexPriceKlineResultListItem :
func (*DerivativesIndexPriceKlineResultListItem) UnmarshalJSON ¶
func (r *DerivativesIndexPriceKlineResultListItem) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type DerivativesInstrumentsForOptionParam ¶
type DerivativesInstrumentsForOptionParam struct {
Symbol *SymbolDerivative `url:"symbol,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
DerivativesInstrumentsForOptionParam :
type DerivativesInstrumentsForOptionResponse ¶
type DerivativesInstrumentsForOptionResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesInstrumentsForOptionResult `json:"result"`
}
DerivativesInstrumentsForOptionResponse :
type DerivativesInstrumentsForOptionResult ¶
type DerivativesInstrumentsForOptionResult struct {
ResultTotalSize int `json:"resultTotalSize"`
Cursor string `json:"cursor"`
List []struct {
Category CategoryDerivative `json:"category"`
Symbol SymbolDerivative `json:"symbol"`
Status StatusDerivative `json:"status"`
BaseCoin string `json:"baseCoin"`
QuoteCoin string `json:"quoteCoin"`
SettleCoin string `json:"settleCoin"`
OptionsType string `json:"optionsType"`
LaunchTime string `json:"launchTime"`
DeliveryTime string `json:"deliveryTime"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
PriceFilter struct {
MinPrice string `json:"minPrice"`
MaxPrice string `json:"maxPrice"`
TickSize string `json:"tickSize"`
} `json:"priceFilter"`
LotSizeFilter struct {
MaxOrderQty string `json:"maxOrderQty"`
MinOrderQty string `json:"minOrderQty"`
QtyStep string `json:"qtyStep"`
} `json:"lotSizeFilter"`
} `json:"dataList"`
}
DerivativesInstrumentsForOptionResult :
type DerivativesInstrumentsParam ¶
type DerivativesInstrumentsParam struct {
Category CategoryDerivative `url:"category"`
Symbol *SymbolDerivative `url:"symbol,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
DerivativesInstrumentsParam :
type DerivativesInstrumentsResponse ¶
type DerivativesInstrumentsResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesInstrumentsResult `json:"result"`
}
DerivativesInstrumentsResponse :
type DerivativesInstrumentsResult ¶
type DerivativesInstrumentsResult struct {
Category CategoryDerivative `json:"category"`
List []struct {
Symbol SymbolDerivative `json:"symbol"`
ContractType ContractTypeDerivative `json:"contractType"`
Status StatusDerivative `json:"status"`
BaseCoin string `json:"baseCoin"`
QuoteCoin string `json:"quoteCoin"`
LaunchTime string `json:"launchTime"`
DeliveryTime string `json:"deliveryTime"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
PriceScale string `json:"priceScale"`
LeverageFilter struct {
MinLeverage string `json:"minLeverage"`
MaxLeverage string `json:"maxLeverage"`
LeverageStep string `json:"leverageStep"`
} `json:"leverageFilter"`
PriceFilter struct {
MinPrice string `json:"minPrice"`
MaxPrice string `json:"maxPrice"`
TickSize string `json:"tickSize"`
} `json:"priceFilter"`
LotSizeFilter struct {
MaxTradingQty string `json:"maxTradingQty"`
MinTradingQty string `json:"minTradingQty"`
QtyStep string `json:"qtyStep"`
} `json:"lotSizeFilter"`
} `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
DerivativesInstrumentsResult :
type DerivativesKlineParam ¶
type DerivativesKlineParam struct {
Symbol SymbolDerivative `url:"symbol"`
Category CategoryDerivative `url:"category"`
Interval Interval `url:"interval"`
Start int64 `url:"start"` // timestamp point for result, in milliseconds
End int64 `url:"end"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"`
}
DerivativesKlineParam :
type DerivativesKlineResponse ¶
type DerivativesKlineResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesKlineResult `json:"result"`
}
DerivativesKlineResponse :
type DerivativesKlineResult ¶
type DerivativesKlineResult struct {
Category CategoryDerivative `json:"category"`
Symbol SymbolDerivative `json:"symbol"`
Lists []DerivativesKlineResultList `json:"list"`
}
DerivativesKlineResult :
type DerivativesKlineResultList ¶
type DerivativesKlineResultList struct {
Start string
Open string
High string
Low string
Close string
Volume string
Turnover string
}
DerivativesKlineResultList :
func (*DerivativesKlineResultList) UnmarshalJSON ¶
func (r *DerivativesKlineResultList) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type DerivativesMarkPriceKlineParam ¶
type DerivativesMarkPriceKlineParam struct {
Category CategoryDerivative `url:"category"`
Symbol SymbolDerivative `url:"symbol"`
Interval Interval `url:"interval"`
Start int64 `url:"start"` // timestamp point for result, in milliseconds
End int64 `url:"end"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"`
}
DerivativesMarkPriceKlineParam :
type DerivativesMarkPriceKlineResponse ¶
type DerivativesMarkPriceKlineResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesMarkPriceKlineResult `json:"result"`
}
DerivativesMarkPriceKlineResponse :
type DerivativesMarkPriceKlineResult ¶
type DerivativesMarkPriceKlineResult struct {
Category CategoryDerivative `json:"category"`
Symbol SymbolDerivative `json:"symbol"`
List []DerivativesMarkPriceKlineResultListItem `json:"list"`
}
DerivativesMarkPriceKlineResult :
type DerivativesMarkPriceKlineResultListItem ¶
type DerivativesMarkPriceKlineResultListItem struct {
Start string `json:"start"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
}
DerivativesMarkPriceKlineResultListItem :
func (*DerivativesMarkPriceKlineResultListItem) UnmarshalJSON ¶
func (r *DerivativesMarkPriceKlineResultListItem) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type DerivativesOrderBookParam ¶
type DerivativesOrderBookParam struct {
Symbol SymbolDerivative `url:"symbol"`
Category CategoryDerivative `url:"category"`
Limit *int `url:"limit,omitempty"`
}
DerivativesOrderBookParam :
type DerivativesOrderBookResponse ¶
type DerivativesOrderBookResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesOrderBookResult `json:"result"`
}
DerivativesOrderBookResponse :
type DerivativesOrderBookResult ¶
type DerivativesOrderBookResult struct {
Symbol SymbolDerivative `json:"s"`
Buyers DerivativesOrderBookResultBuyers `json:"b"`
Sellers DerivativesOrderBookResultSellers `json:"a"`
Timestamp int `json:"ts"`
ID int `json:"u"`
}
DerivativesOrderBookResult :
type DerivativesOrderBookResultBuyer ¶
DerivativesOrderBookResultBuyer :
type DerivativesOrderBookResultBuyers ¶
type DerivativesOrderBookResultBuyers []DerivativesOrderBookResultBuyer
DerivativesOrderBookResultBuyers :
func (*DerivativesOrderBookResultBuyers) UnmarshalJSON ¶
func (r *DerivativesOrderBookResultBuyers) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type DerivativesOrderBookResultSeller ¶
DerivativesOrderBookResultSeller :
type DerivativesOrderBookResultSellers ¶
type DerivativesOrderBookResultSellers []DerivativesOrderBookResultSeller
DerivativesOrderBookResultSellers :
func (*DerivativesOrderBookResultSellers) UnmarshalJSON ¶
func (r *DerivativesOrderBookResultSellers) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type DerivativesTickersForOptionParam ¶
type DerivativesTickersForOptionParam struct {
Symbol SymbolDerivative `url:"symbol"`
}
DerivativesTickersForOptionParam :
type DerivativesTickersForOptionResponse ¶
type DerivativesTickersForOptionResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesTickersForOptionResult `json:"result"`
}
DerivativesTickersForOptionResponse :
type DerivativesTickersForOptionResult ¶
type DerivativesTickersForOptionResult struct {
Category CategoryDerivative `json:"category"`
Symbol SymbolDerivative `json:"symbol"`
BidPrice string `json:"bidPrice"`
BidSize string `json:"bidSize"`
BidIv string `json:"bidIv"`
AskPrice string `json:"askPrice"`
AskSize string `json:"askSize"`
AskIv string `json:"askIv"`
LastPrice string `json:"lastPrice"`
HighPrice24h string `json:"highPrice24h"`
LowPrice24h string `json:"lowPrice24h"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
MarkPriceIv string `json:"markPriceIv"`
UnderlyingPrice string `json:"underlyingPrice"`
OpenInterest string `json:"openInterest"`
Turnover24h string `json:"turnover24h"`
Volume24h string `json:"volume24h"`
TotalVolume string `json:"totalVolume"`
TotalTurnover string `json:"totalTurnover"`
Delta string `json:"delta"`
Gamma string `json:"gamma"`
Vega string `json:"vega"`
Theta string `json:"theta"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice"`
Change24h string `json:"change24h"`
}
DerivativesTickersForOptionResult :
type DerivativesTickersParam ¶
type DerivativesTickersParam struct {
Category CategoryDerivative `url:"category"`
Symbol *SymbolDerivative `url:"symbol,omitempty"`
}
DerivativesTickersParam :
type DerivativesTickersResponse ¶
type DerivativesTickersResponse struct {
CommonV3Response `json:",inline"`
Result DerivativesTickersResult `json:"result"`
}
DerivativesTickersResponse :
type DerivativesTickersResult ¶
type DerivativesTickersResult struct {
Category CategoryDerivative `json:"category"`
Lists []DerivativesTickersResultList `json:"list"`
}
DerivativesTickersResult :
type DerivativesTickersResultList ¶
type DerivativesTickersResultList struct {
Symbol SymbolDerivative `json:"symbol"`
BidPrice string `json:"bidPrice"`
AskPrice string `json:"askPrice"`
LastPrice string `json:"lastPrice"`
LastTickDirection string `json:"lastTickDirection"`
PrevPrice24h string `json:"prevPrice24h"`
Price24hPcnt string `json:"price24hPcnt"`
HighPrice24h string `json:"highPrice24h"`
LowPrice24h string `json:"lowPrice24h"`
PrevPrice1h string `json:"prevPrice1h"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
OpenInterest string `json:"openInterest"`
Turnover24h string `json:"turnover24h"`
Volume24h string `json:"volume24h"`
FundingRate string `json:"fundingRate"`
NextFundingTime string `json:"nextFundingTime"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice"` // Applicable to inverse future and option
BasisRate string `json:"basisRate"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
DeliveryTime string `json:"deliveryTime"`
}
DerivativesTickersResultList :
type ErrorResponse ¶
ErrorResponse :
type FutureCommonService ¶
type FutureCommonService struct {
// contains filtered or unexported fields
}
FutureCommonService :
func (*FutureCommonService) APIKeyInfo ¶
func (s *FutureCommonService) APIKeyInfo() (*APIKeyInfoResponse, error)
APIKeyInfo :
func (*FutureCommonService) AccountRatio ¶
func (s *FutureCommonService) AccountRatio(param AccountRatioParam) (*AccountRatioResponse, error)
AccountRatio :
func (*FutureCommonService) Balance ¶
func (s *FutureCommonService) Balance(coin Coin) (*BalanceResponse, error)
Balance :
func (*FutureCommonService) BigDeal ¶
func (s *FutureCommonService) BigDeal(param BigDealParam) (*BigDealResponse, error)
BigDeal :
func (*FutureCommonService) IndexPriceKline ¶
func (s *FutureCommonService) IndexPriceKline(param IndexPriceKlineParam) (*IndexPriceKlineResponse, error)
IndexPriceKline :
func (*FutureCommonService) ListKline ¶
func (s *FutureCommonService) ListKline(param ListKlineParam) (*ListKlineResponse, error)
ListKline :
func (*FutureCommonService) ListLinearKline ¶
func (s *FutureCommonService) ListLinearKline(param ListLinearKlineParam) (*ListLinearKlineResponse, error)
ListLinearKline :
func (*FutureCommonService) MarkPriceKline ¶
func (s *FutureCommonService) MarkPriceKline(param MarkPriceKlineParam) (*MarkPriceKlineResponse, error)
MarkPriceKline :
func (*FutureCommonService) OpenInterest ¶
func (s *FutureCommonService) OpenInterest(param OpenInterestParam) (*OpenInterestResponse, error)
OpenInterest :
func (*FutureCommonService) OrderBook ¶
func (s *FutureCommonService) OrderBook(symbol SymbolFuture) (*OrderBookResponse, error)
OrderBook :
func (*FutureCommonService) Symbols ¶
func (s *FutureCommonService) Symbols() (*SymbolsResponse, error)
Symbols :
func (*FutureCommonService) Tickers ¶
func (s *FutureCommonService) Tickers(symbol SymbolFuture) (*TickersResponse, error)
Tickers :
func (*FutureCommonService) TradingRecords ¶
func (s *FutureCommonService) TradingRecords(param TradingRecordsParam) (*TradingRecordsResponse, error)
TradingRecords :
type FutureInverseFutureService ¶
type FutureInverseFutureService struct {
*FutureCommonService
// contains filtered or unexported fields
}
FutureInverseFutureService :
func (*FutureInverseFutureService) CancelAllFuturesOrder ¶
func (s *FutureInverseFutureService) CancelAllFuturesOrder(param CancelAllFuturesOrderParam) (*CancelAllFuturesOrderResponse, error)
CancelAllFuturesOrder :
func (*FutureInverseFutureService) CancelAllFuturesStopOrder ¶
func (s *FutureInverseFutureService) CancelAllFuturesStopOrder(param CancelAllFuturesStopOrderParam) (*CancelAllFuturesStopOrderResponse, error)
CancelAllFuturesStopOrder :
func (*FutureInverseFutureService) CancelFuturesOrder ¶
func (s *FutureInverseFutureService) CancelFuturesOrder(param CancelFuturesOrderParam) (*CancelFuturesOrderResponse, error)
CancelFuturesOrder :
func (*FutureInverseFutureService) CancelFuturesStopOrder ¶
func (s *FutureInverseFutureService) CancelFuturesStopOrder(param CancelFuturesStopOrderParam) (*CancelFuturesStopOrderResponse, error)
CancelFuturesStopOrder :
func (*FutureInverseFutureService) CreateFuturesOrder ¶
func (s *FutureInverseFutureService) CreateFuturesOrder(param CreateFuturesOrderParam) (*CreateFuturesOrderResponse, error)
CreateFuturesOrder :
func (*FutureInverseFutureService) CreateFuturesStopOrder ¶
func (s *FutureInverseFutureService) CreateFuturesStopOrder(param CreateFuturesStopOrderParam) (*CreateFuturesStopOrderResponse, error)
CreateFuturesStopOrder :
func (*FutureInverseFutureService) FuturesSaveLeverage ¶
func (s *FutureInverseFutureService) FuturesSaveLeverage(param FuturesSaveLeverageParam) (*FuturesSaveLeverageResponse, error)
FuturesSaveLeverage :
func (*FutureInverseFutureService) FuturesTradingStop ¶
func (s *FutureInverseFutureService) FuturesTradingStop(param FuturesTradingStopParam) (*FuturesTradingStopResponse, error)
FuturesTradingStop :
func (*FutureInverseFutureService) ListFuturesOrder ¶
func (s *FutureInverseFutureService) ListFuturesOrder(param ListFuturesOrderParam) (*ListFuturesOrderResponse, error)
ListFuturesOrder :
func (*FutureInverseFutureService) ListFuturesPositions ¶
func (s *FutureInverseFutureService) ListFuturesPositions(symbol SymbolFuture) (*ListFuturesPositionsResponse, error)
ListFuturesPositions :
func (*FutureInverseFutureService) ListFuturesStopOrder ¶
func (s *FutureInverseFutureService) ListFuturesStopOrder(param ListFuturesStopOrderParam) (*ListFuturesStopOrderResponse, error)
ListFuturesStopOrder :
func (*FutureInverseFutureService) QueryFuturesOrder ¶
func (s *FutureInverseFutureService) QueryFuturesOrder(param QueryFuturesOrderParam) (*QueryFuturesOrderResponse, error)
QueryFuturesOrder :
func (*FutureInverseFutureService) QueryFuturesStopOrder ¶
func (s *FutureInverseFutureService) QueryFuturesStopOrder(param QueryFuturesStopOrderParam) (*QueryFuturesStopOrderResponse, error)
QueryFuturesStopOrder :
type FutureInverseFutureServiceI ¶
type FutureInverseFutureServiceI interface {
// Market Data Endpoints
OrderBook(SymbolFuture) (*OrderBookResponse, error)
ListKline(ListKlineParam) (*ListKlineResponse, error)
Tickers(SymbolFuture) (*TickersResponse, error)
TradingRecords(TradingRecordsParam) (*TradingRecordsResponse, error)
Symbols() (*SymbolsResponse, error)
MarkPriceKline(MarkPriceKlineParam) (*MarkPriceKlineResponse, error)
IndexPriceKline(IndexPriceKlineParam) (*IndexPriceKlineResponse, error)
OpenInterest(OpenInterestParam) (*OpenInterestResponse, error)
BigDeal(BigDealParam) (*BigDealResponse, error)
AccountRatio(AccountRatioParam) (*AccountRatioResponse, error)
// Account Data Endpoints
CreateFuturesOrder(CreateFuturesOrderParam) (*CreateFuturesOrderResponse, error)
ListFuturesOrder(ListFuturesOrderParam) (*ListFuturesOrderResponse, error)
CancelFuturesOrder(CancelFuturesOrderParam) (*CancelFuturesOrderResponse, error)
CancelAllFuturesOrder(CancelAllFuturesOrderParam) (*CancelAllFuturesOrderResponse, error)
QueryFuturesOrder(QueryFuturesOrderParam) (*QueryFuturesOrderResponse, error)
CreateFuturesStopOrder(CreateFuturesStopOrderParam) (*CreateFuturesStopOrderResponse, error)
ListFuturesStopOrder(ListFuturesStopOrderParam) (*ListFuturesStopOrderResponse, error)
CancelFuturesStopOrder(CancelFuturesStopOrderParam) (*CancelFuturesStopOrderResponse, error)
CancelAllFuturesStopOrder(CancelAllFuturesStopOrderParam) (*CancelAllFuturesStopOrderResponse, error)
QueryFuturesStopOrder(QueryFuturesStopOrderParam) (*QueryFuturesStopOrderResponse, error)
ListFuturesPositions(SymbolFuture) (*ListFuturesPositionsResponse, error)
FuturesTradingStop(FuturesTradingStopParam) (*FuturesTradingStopResponse, error)
FuturesSaveLeverage(FuturesSaveLeverageParam) (*FuturesSaveLeverageResponse, error)
APIKeyInfo() (*APIKeyInfoResponse, error)
// Wallet Data Endpoints
Balance(Coin) (*BalanceResponse, error)
}
FutureInverseFutureServiceI :
type FutureInversePerpetualService ¶
type FutureInversePerpetualService struct {
*FutureCommonService
// contains filtered or unexported fields
}
FutureInversePerpetualService :
func (*FutureInversePerpetualService) CancelAllOrder ¶
func (s *FutureInversePerpetualService) CancelAllOrder(param CancelAllOrderParam) (*CancelAllOrderResponse, error)
CancelAllOrder :
func (*FutureInversePerpetualService) CancelAllStopOrder ¶
func (s *FutureInversePerpetualService) CancelAllStopOrder(param CancelAllStopOrderParam) (*CancelAllStopOrderResponse, error)
CancelAllStopOrder :
func (*FutureInversePerpetualService) CancelOrder ¶
func (s *FutureInversePerpetualService) CancelOrder(param CancelOrderParam) (*CancelOrderResponse, error)
CancelOrder :
func (*FutureInversePerpetualService) CancelStopOrder ¶
func (s *FutureInversePerpetualService) CancelStopOrder(param CancelStopOrderParam) (*CancelStopOrderResponse, error)
CancelStopOrder :
func (*FutureInversePerpetualService) CreateOrder ¶
func (s *FutureInversePerpetualService) CreateOrder(param CreateOrderParam) (*CreateOrderResponse, error)
CreateOrder :
func (*FutureInversePerpetualService) CreateStopOrder ¶
func (s *FutureInversePerpetualService) CreateStopOrder(param CreateStopOrderParam) (*CreateStopOrderResponse, error)
CreateStopOrder :
func (*FutureInversePerpetualService) ListOrder ¶
func (s *FutureInversePerpetualService) ListOrder(param ListOrderParam) (*ListOrderResponse, error)
ListOrder :
func (*FutureInversePerpetualService) ListPosition ¶
func (s *FutureInversePerpetualService) ListPosition(symbol SymbolFuture) (*ListPositionResponse, error)
ListPosition :
func (*FutureInversePerpetualService) ListPositions ¶
func (s *FutureInversePerpetualService) ListPositions() (*ListPositionsResponse, error)
ListPositions :
func (*FutureInversePerpetualService) ListStopOrder ¶
func (s *FutureInversePerpetualService) ListStopOrder(param ListStopOrderParam) (*ListStopOrderResponse, error)
ListStopOrder :
func (*FutureInversePerpetualService) PremiumIndexKline ¶
func (s *FutureInversePerpetualService) PremiumIndexKline(param PremiumIndexKlineParam) (*PremiumIndexKlineResponse, error)
PremiumIndexKline :
func (*FutureInversePerpetualService) QueryOrder ¶
func (s *FutureInversePerpetualService) QueryOrder(param QueryOrderParam) (*QueryOrderResponse, error)
QueryOrder :
func (*FutureInversePerpetualService) QueryStopOrder ¶
func (s *FutureInversePerpetualService) QueryStopOrder(param QueryStopOrderParam) (*QueryStopOrderResponse, error)
QueryStopOrder :
func (*FutureInversePerpetualService) SaveLeverage ¶
func (s *FutureInversePerpetualService) SaveLeverage(param SaveLeverageParam) (*SaveLeverageResponse, error)
SaveLeverage :
func (*FutureInversePerpetualService) TradingStop ¶
func (s *FutureInversePerpetualService) TradingStop(param TradingStopParam) (*TradingStopResponse, error)
TradingStop :
type FutureInversePerpetualServiceI ¶
type FutureInversePerpetualServiceI interface {
// Market Data Endpoints
OrderBook(SymbolFuture) (*OrderBookResponse, error)
ListKline(ListKlineParam) (*ListKlineResponse, error)
Tickers(SymbolFuture) (*TickersResponse, error)
TradingRecords(TradingRecordsParam) (*TradingRecordsResponse, error)
Symbols() (*SymbolsResponse, error)
MarkPriceKline(MarkPriceKlineParam) (*MarkPriceKlineResponse, error)
IndexPriceKline(IndexPriceKlineParam) (*IndexPriceKlineResponse, error)
PremiumIndexKline(PremiumIndexKlineParam) (*PremiumIndexKlineResponse, error)
OpenInterest(OpenInterestParam) (*OpenInterestResponse, error)
BigDeal(BigDealParam) (*BigDealResponse, error)
AccountRatio(AccountRatioParam) (*AccountRatioResponse, error)
// Account Data Endpoints
CreateOrder(CreateOrderParam) (*CreateOrderResponse, error)
ListOrder(ListOrderParam) (*ListOrderResponse, error)
CancelOrder(CancelOrderParam) (*CancelOrderResponse, error)
CancelAllOrder(CancelAllOrderParam) (*CancelAllOrderResponse, error)
QueryOrder(QueryOrderParam) (*QueryOrderResponse, error)
CreateStopOrder(CreateStopOrderParam) (*CreateStopOrderResponse, error)
ListStopOrder(ListStopOrderParam) (*ListStopOrderResponse, error)
CancelStopOrder(CancelStopOrderParam) (*CancelStopOrderResponse, error)
CancelAllStopOrder(CancelAllStopOrderParam) (*CancelAllStopOrderResponse, error)
QueryStopOrder(QueryStopOrderParam) (*QueryStopOrderResponse, error)
ListPosition(SymbolFuture) (*ListPositionResponse, error)
ListPositions() (*ListPositionsResponse, error)
TradingStop(TradingStopParam) (*TradingStopResponse, error)
SaveLeverage(SaveLeverageParam) (*SaveLeverageResponse, error)
APIKeyInfo() (*APIKeyInfoResponse, error)
// Wallet Data Endpoints
Balance(Coin) (*BalanceResponse, error)
}
FutureInversePerpetualServiceI :
type FutureService ¶
type FutureService struct {
// contains filtered or unexported fields
}
FutureService :
func (*FutureService) InverseFuture ¶
func (s *FutureService) InverseFuture() FutureInverseFutureServiceI
InverseFuture :
func (*FutureService) InversePerpetual ¶
func (s *FutureService) InversePerpetual() FutureInversePerpetualServiceI
InversePerpetual :
func (*FutureService) USDTPerpetual ¶
func (s *FutureService) USDTPerpetual() FutureUSDTPerpetualServiceI
USDTPerpetual :
type FutureServiceI ¶
type FutureServiceI interface {
InversePerpetual() FutureInversePerpetualServiceI
USDTPerpetual() FutureUSDTPerpetualServiceI
InverseFuture() FutureInverseFutureServiceI
}
FutureServiceI :
type FutureUSDTPerpetualService ¶
type FutureUSDTPerpetualService struct {
*FutureCommonService
// contains filtered or unexported fields
}
FutureUSDTPerpetualService :
func (*FutureUSDTPerpetualService) CancelAllLinearStopOrder ¶
func (s *FutureUSDTPerpetualService) CancelAllLinearStopOrder(param CancelAllLinearStopOrderParam) (*CancelAllLinearStopOrderResponse, error)
CancelAllLinearStopOrder :
func (*FutureUSDTPerpetualService) CancelLinearOrder ¶
func (s *FutureUSDTPerpetualService) CancelLinearOrder(param CancelLinearOrderParam) (*CancelLinearOrderResponse, error)
CancelLinearOrder :
func (*FutureUSDTPerpetualService) CancelLinearStopOrder ¶
func (s *FutureUSDTPerpetualService) CancelLinearStopOrder(param CancelLinearStopOrderParam) (*CancelLinearStopOrderResponse, error)
CancelLinearStopOrder :
func (*FutureUSDTPerpetualService) CreateLinearOrder ¶
func (s *FutureUSDTPerpetualService) CreateLinearOrder(param CreateLinearOrderParam) (*CreateLinearOrderResponse, error)
CreateLinearOrder :
func (*FutureUSDTPerpetualService) CreateLinearStopOrder ¶
func (s *FutureUSDTPerpetualService) CreateLinearStopOrder(param CreateLinearStopOrderParam) (*CreateLinearStopOrderResponse, error)
CreateLinearStopOrder :
func (*FutureUSDTPerpetualService) LinearCancelAllOrder ¶
func (s *FutureUSDTPerpetualService) LinearCancelAllOrder(param LinearCancelAllParam) (*LinearCancelAllResponse, error)
LinearCancelAllOrder : Cancel all active orders that are unfilled or partially filled. Fully filled orders cannot be cancelled.
func (*FutureUSDTPerpetualService) LinearExecutionList ¶
func (s *FutureUSDTPerpetualService) LinearExecutionList(param LinearExecutionListParam) (*LinearExecutionListResponse, error)
LinearExecutionList :
func (*FutureUSDTPerpetualService) LinearTradingStop ¶
func (s *FutureUSDTPerpetualService) LinearTradingStop(param LinearTradingStopParam) (*LinearTradingStopResponse, error)
LinearTradingStop :
func (*FutureUSDTPerpetualService) ListLinearOrder ¶
func (s *FutureUSDTPerpetualService) ListLinearOrder(param ListLinearOrderParam) (*ListLinearOrderResponse, error)
ListLinearOrder :
func (*FutureUSDTPerpetualService) ListLinearPosition ¶
func (s *FutureUSDTPerpetualService) ListLinearPosition(symbol SymbolFuture) (*ListLinearPositionResponse, error)
ListLinearPosition :
func (*FutureUSDTPerpetualService) ListLinearPositions ¶
func (s *FutureUSDTPerpetualService) ListLinearPositions() (*ListLinearPositionsResponse, error)
ListLinearPositions :
func (*FutureUSDTPerpetualService) ListLinearStopOrder ¶
func (s *FutureUSDTPerpetualService) ListLinearStopOrder(param ListLinearStopOrderParam) (*ListLinearStopOrderResponse, error)
ListLinearStopOrder :
func (*FutureUSDTPerpetualService) QueryLinearOrder ¶
func (s *FutureUSDTPerpetualService) QueryLinearOrder(param QueryLinearOrderParam) (*QueryLinearOrderResponse, error)
QueryLinearOrder :
func (*FutureUSDTPerpetualService) QueryLinearStopOrder ¶
func (s *FutureUSDTPerpetualService) QueryLinearStopOrder(param QueryLinearStopOrderParam) (*QueryLinearStopOrderResponse, error)
QueryLinearStopOrder :
func (*FutureUSDTPerpetualService) ReplaceLinearOrder ¶
func (s *FutureUSDTPerpetualService) ReplaceLinearOrder(param ReplaceLinearOrderParam) (*ReplaceLinearOrderResponse, error)
ReplaceLinearOrder :
func (*FutureUSDTPerpetualService) SaveLinearLeverage ¶
func (s *FutureUSDTPerpetualService) SaveLinearLeverage(param SaveLinearLeverageParam) (*SaveLinearLeverageResponse, error)
SaveLinearLeverage :
type FutureUSDTPerpetualServiceI ¶
type FutureUSDTPerpetualServiceI interface {
// Market Data Endpoints
OrderBook(SymbolFuture) (*OrderBookResponse, error)
ListLinearKline(ListLinearKlineParam) (*ListLinearKlineResponse, error)
Tickers(SymbolFuture) (*TickersResponse, error)
Symbols() (*SymbolsResponse, error)
OpenInterest(OpenInterestParam) (*OpenInterestResponse, error)
BigDeal(BigDealParam) (*BigDealResponse, error)
AccountRatio(AccountRatioParam) (*AccountRatioResponse, error)
// Account Data Endpoints
CreateLinearOrder(CreateLinearOrderParam) (*CreateLinearOrderResponse, error)
ListLinearOrder(ListLinearOrderParam) (*ListLinearOrderResponse, error)
CancelLinearOrder(CancelLinearOrderParam) (*CancelLinearOrderResponse, error)
LinearCancelAllOrder(LinearCancelAllParam) (*LinearCancelAllResponse, error)
ReplaceLinearOrder(ReplaceLinearOrderParam) (*ReplaceLinearOrderResponse, error)
QueryLinearOrder(QueryLinearOrderParam) (*QueryLinearOrderResponse, error)
CreateLinearStopOrder(CreateLinearStopOrderParam) (*CreateLinearStopOrderResponse, error)
ListLinearStopOrder(ListLinearStopOrderParam) (*ListLinearStopOrderResponse, error)
CancelLinearStopOrder(CancelLinearStopOrderParam) (*CancelLinearStopOrderResponse, error)
CancelAllLinearStopOrder(CancelAllLinearStopOrderParam) (*CancelAllLinearStopOrderResponse, error)
QueryLinearStopOrder(QueryLinearStopOrderParam) (*QueryLinearStopOrderResponse, error)
ListLinearPosition(SymbolFuture) (*ListLinearPositionResponse, error)
ListLinearPositions() (*ListLinearPositionsResponse, error)
SaveLinearLeverage(SaveLinearLeverageParam) (*SaveLinearLeverageResponse, error)
LinearTradingStop(LinearTradingStopParam) (*LinearTradingStopResponse, error)
LinearExecutionList(LinearExecutionListParam) (*LinearExecutionListResponse, error)
APIKeyInfo() (*APIKeyInfoResponse, error)
// Wallet Data Endpoints
Balance(Coin) (*BalanceResponse, error)
}
FutureUSDTPerpetualServiceI :
type FuturesSaveLeverageParam ¶
type FuturesSaveLeverageParam struct {
Symbol SymbolFuture `json:"symbol"`
BuyLeverage float64 `json:"buy_leverage"`
SellLeverage float64 `json:"sell_leverage"`
}
FuturesSaveLeverageParam :
type FuturesSaveLeverageResponse ¶
type FuturesSaveLeverageResponse struct {
CommonResponse `json:",inline"`
Result float64 `json:"result"`
}
FuturesSaveLeverageResponse :
type FuturesTradingStopParam ¶
type FuturesTradingStopParam struct {
Symbol SymbolFuture `json:"symbol"`
PositionIdx *int `json:"position_idx,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TrailingStop *float64 `json:"trailing_stop,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
NewTrailingActive *float64 `json:"new_trailing_active,omitempty"`
SlSize *float64 `json:"sl_size,omitempty"`
TpSize *float64 `json:"tp_size,omitempty"`
}
FuturesTradingStopParam :
type FuturesTradingStopResponse ¶
type FuturesTradingStopResponse struct {
CommonResponse `json:",inline"`
Result FuturesTradingStopResult `json:"result"`
}
FuturesTradingStopResponse :
type FuturesTradingStopResult ¶
type FuturesTradingStopResult struct {
ID int `json:"id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Size float64 `json:"size"`
PositionValue float64 `json:"position_value"`
EntryPrice float64 `json:"entry_price"`
RiskID int `json:"risk_id"`
AutoAddMargin float64 `json:"auto_add_margin"`
Leverage float64 `json:"leverage"`
PositionMargin float64 `json:"position_margin"`
LiqPrice float64 `json:"liq_price"`
BustPrice float64 `json:"bust_price"`
OccClosingFee float64 `json:"occ_closing_fee"`
OccFundingFee float64 `json:"occ_funding_fee"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TrailingStop float64 `json:"trailing_stop"`
PositionStatus string `json:"position_status"`
DeleverageIndicator int `json:"deleverage_indicator"`
OcCalcData string `json:"oc_calc_data"`
OrderMargin float64 `json:"order_margin"`
WalletBalance float64 `json:"wallet_balance"`
RealisedPnl float64 `json:"realised_pnl"`
CumRealisedPnl float64 `json:"cum_realised_pnl"`
CumCommission float64 `json:"cum_commission"`
CrossSeq float64 `json:"cross_seq"`
PositionSeq float64 `json:"position_seq"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ExtFields map[string]interface{} `json:"ext_fields"`
}
FuturesTradingStopResult :
type GetServerTimeResponse ¶
type GetServerTimeResponse struct {
CommonResponse `json:",inline"`
Result GetServerTimeResult `json:"result"`
}
GetServerTimeResponse :
type GetServerTimeResult ¶
type IndexPriceKlineParam ¶
type IndexPriceKlineParam struct {
Symbol SymbolFuture `url:"symbol"`
Interval Interval `url:"interval"`
From int64 `url:"from"`
Limit *int `url:"limit,omitempty"`
}
IndexPriceKlineParam :
type IndexPriceKlineResponse ¶
type IndexPriceKlineResponse struct {
CommonResponse `json:",inline"`
Result []IndexPriceKlineResult `json:"result"`
}
IndexPriceKlineResponse :
type IndexPriceKlineResult ¶
type IndexPriceKlineResult struct {
Symbol SymbolFuture `json:"symbol"`
Period Period `json:"period"`
OpenTime int `json:"open_time"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
}
IndexPriceKlineResult :
type IsLowestRisk ¶
type IsLowestRisk int
type LeverageFilter ¶
type LeverageFilter struct {
MinLeverage float64 `json:"min_leverage"`
MaxLeverage float64 `json:"max_leverage"`
LeverageStep string `json:"leverage_step"`
}
LeverageFilter :
type LinearCancelAllParam ¶
type LinearCancelAllParam struct {
Symbol SymbolFuture `json:"symbol"`
}
LinearCancelAllParam : Parameters to be supplied to cancel all endpoint
type LinearCancelAllResponse ¶
type LinearCancelAllResponse struct {
CommonResponse `json:",inline"`
Result LinearCancelAllResult `json:"result"`
}
LinearCancelAllResponse : Response from cancel all endpoint
type LinearCancelAllResult ¶
type LinearCancelAllResult []string
type LinearExecutionList ¶
type LinearExecutionList struct {
OrderID string `json:"order_id"`
OrderLinkID string `json:"order_link_id"`
Side Side `json:"side"`
Symbol SymbolFuture `json:"symbol"`
OrderPrice float64 `json:"order_price"`
OrderQty float64 `json:"order_qty"`
OrderType OrderType `json:"order_type"`
FeeRate float64 `json:"fee_rate"`
ExecPrice float64 `json:"exec_price"`
ExecType ExecType `json:"exec_type"`
ExecQty float64 `json:"exec_qty"`
ExecFee float64 `json:"exec_fee"`
ExecValue float64 `json:"exec_value"`
LeavesQty float64 `json:"leaves_qty"`
ClosedSize float64 `json:"closed_size"`
LastLiquidityInd string `json:"last_liquidity_ind"`
TradeTimeMs float64 `json:"trade_time_ms"`
}
LinearExecutionList :
type LinearExecutionListParam ¶
type LinearExecutionListParam struct {
Symbol SymbolFuture `url:"symbol"`
StartTime *int `url:"start_time,omitempty"`
EndTime *int `url:"end_time,omitempty"`
ExecType *ExecType `url:"exec_type,omitempty"`
Page *int `url:"page,omitempty"`
Limit *int `url:"limit,omitempty"`
}
LinearExecutionListParam :
type LinearExecutionListResponse ¶
type LinearExecutionListResponse struct {
CommonResponse `json:",inline"`
Result LinearExecutionListResult `json:"result"`
}
LinearExecutionListResponse :
type LinearExecutionListResult ¶
type LinearExecutionListResult struct {
CurrentPage int `json:"current_page"`
LinearExecutionLists []LinearExecutionList `json:"data"`
}
LinearExecutionListResult :
type LinearInverseLotSizeFilterV5 ¶
type LinearInverseLotSizeFilterV5 struct {
MaxOrderQty string `json:"maxOrderQty"`
MinOrderQty string `json:"minOrderQty"`
QtyStep string `json:"qtyStep"`
PostOnlyMaxOrderQty string `json:"postOnlyMaxOrderQty"`
MaxMktOrderQty string `json:"maxMktOrderQty"`
MinNotionalValue string `json:"minNotionalValue"`
}
type LinearTradingStopParam ¶
type LinearTradingStopParam struct {
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TrailingStop *float64 `json:"trailing_stop,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
SlSize *float64 `json:"sl_size,omitempty"`
TpSize *float64 `json:"tp_size,omitempty"`
PositionIdx *int `json:"position_idx,omitempty"`
}
LinearTradingStopParam :
type LinearTradingStopResponse ¶
type LinearTradingStopResponse struct {
CommonResponse `json:",inline"`
}
LinearTradingStopResponse :
type ListFuturesOrder ¶
type ListFuturesOrder struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderLinkID string `json:"order_link_id"`
OrderID string `json:"order_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty string `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty string `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
Cursor string `json:"cursor"`
}
ListFuturesOrder :
type ListFuturesOrderParam ¶
type ListFuturesOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderStatus *OrderStatus `url:"order_status,omitempty"`
Direction *Direction `url:"direction,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
ListFuturesOrderParam :
type ListFuturesOrderResponse ¶
type ListFuturesOrderResponse struct {
CommonResponse `json:",inline"`
Result ListFuturesOrderResult `json:"result"`
}
ListFuturesOrderResponse :
type ListFuturesOrderResult ¶
type ListFuturesOrderResult struct {
ListFuturesOrders []ListFuturesOrder `json:"data"`
}
ListFuturesOrderResult :
type ListFuturesPositionsResponse ¶
type ListFuturesPositionsResponse struct {
CommonResponse `json:",inline"`
Result []ListFuturesPositionsResult `json:"result"`
}
ListFuturesPositionsResponse :
type ListFuturesPositionsResult ¶
type ListFuturesPositionsResult struct {
Data ListFuturesPositionsResultData `json:"data"`
}
ListFuturesPositionsResult :
type ListFuturesPositionsResultData ¶
type ListFuturesPositionsResultData struct {
ID int `json:"id"`
PositionIdx int `json:"position_idx"`
Mode int `json:"mode"`
UserID int `json:"user_id"`
RiskID int `json:"risk_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Size float64 `json:"size"`
PositionValue string `json:"position_value"`
EntryPrice string `json:"entry_price"`
IsIsolated bool `json:"is_isolated"`
AutoAddMargin float64 `json:"auto_add_margin"`
Leverage string `json:"leverage"`
EffectiveLeverage string `json:"effective_leverage"`
PositionMargin string `json:"position_margin"`
LiqPrice string `json:"liq_price"`
BustPrice string `json:"bust_price"`
OccClosingFee string `json:"occ_closing_fee"`
OccFundingFee string `json:"occ_funding_fee"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TrailingStop string `json:"trailing_stop"`
PositionStatus string `json:"position_status"`
DeleverageIndicator int `json:"deleverage_indicator"`
OcCalcData string `json:"oc_calc_data"`
OrderMargin string `json:"order_margin"`
WalletBalance string `json:"wallet_balance"`
RealisedPnl string `json:"realised_pnl"`
UnrealisedPnl float64 `json:"unrealised_pnl"`
CumRealisedPnl string `json:"cum_realised_pnl"`
CrossSeq float64 `json:"cross_seq"`
PositionSeq float64 `json:"position_seq"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
TpSlMode TpSlMode `json:"tp_sl_mode"`
}
ListFuturesPositionsResultData :
type ListFuturesStopOrder ¶
type ListFuturesStopOrder struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
StopOrderStatus OrderStatus `json:"stop_order_status"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
StopOrderType StopOrderTypeFuture `json:"stop_order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
BasePrice string `json:"base_price"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
StopPx string `json:"stop_px"`
StopOrderID string `json:"stop_order_id"`
TriggerBy TriggerByFuture `json:"trigger_by"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
Cursor string `json:"cursor"`
}
ListFuturesStopOrder :
type ListFuturesStopOrderParam ¶
type ListFuturesStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderStatus *OrderStatus `url:"stop_order_status,omitempty"`
Direction *Direction `url:"direction,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
ListFuturesStopOrderParam :
type ListFuturesStopOrderResponse ¶
type ListFuturesStopOrderResponse struct {
CommonResponse `json:",inline"`
Result ListFuturesStopOrderResult `json:"result"`
}
ListFuturesStopOrderResponse :
type ListFuturesStopOrderResult ¶
type ListFuturesStopOrderResult struct {
ListFuturesStopOrders []ListFuturesStopOrder `json:"data"`
}
ListFuturesStopOrderResult :
type ListKlineParam ¶
type ListKlineParam struct {
Symbol SymbolFuture `url:"symbol"`
Interval Interval `url:"interval"`
From int64 `url:"from"`
Limit *int `url:"limit,omitempty"`
}
ListKlineParam :
type ListKlineResponse ¶
type ListKlineResponse struct {
CommonResponse `json:",inline"`
Result []ListKlineResult `json:"result"`
}
ListKlineResponse :
type ListKlineResult ¶
type ListKlineResult struct {
Symbol SymbolFuture `json:"symbol"`
Interval string `json:"interval"`
OpenTime int `json:"open_time"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
Volume string `json:"volume"`
Turnover string `json:"turnover"`
}
ListKlineResult :
type ListLinearKlineParam ¶
type ListLinearKlineParam struct {
Symbol SymbolFuture `url:"symbol"`
Interval Interval `url:"interval"`
From int64 `url:"from"`
Limit *int `url:"limit,omitempty"`
}
ListLinearKlineParam :
type ListLinearKlineResponse ¶
type ListLinearKlineResponse struct {
CommonResponse `json:",inline"`
Result []ListLinearKlineResult `json:"result"`
}
ListLinearKlineResponse :
type ListLinearKlineResult ¶
type ListLinearKlineResult struct {
Symbol SymbolFuture `json:"symbol"`
Period Period `json:"period"`
Interval string `json:"interval"`
StartAt int `json:"start_at"`
OpenTime int `json:"open_time"`
Volume float64 `json:"volume"`
Open float64 `json:"open"`
High float64 `json:"high"`
Low float64 `json:"low"`
Close float64 `json:"close"`
Turnover float64 `json:"turnover"`
}
ListLinearKlineResult :
type ListLinearOrderParam ¶
type ListLinearOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderID *string `url:"order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
Order *Order `url:"order,omitempty"`
Page *int `url:"page,omitempty"`
Limit *int `url:"limit,omitempty"`
OrderStatus *OrderStatus `url:"order_status,omitempty"`
}
ListLinearOrderParam :
type ListLinearOrderResponse ¶
type ListLinearOrderResponse struct {
CommonResponse `json:",inline"`
Result ListLinearOrderResult `json:"result"`
}
ListLinearOrderResponse :
type ListLinearOrderResult ¶
type ListLinearOrderResult struct {
CurrentPage int `json:"current_page"`
Content []ListLinearOrderResultContent `json:"data"`
}
ListLinearOrderResult :
type ListLinearOrderResultContent ¶
type ListLinearOrderResultContent struct {
OrderID string `json:"order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecPrice float64 `json:"last_exec_price"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
ListLinearOrderResultContent :
type ListLinearPositionResponse ¶
type ListLinearPositionResponse struct {
CommonResponse `json:",inline"`
Result []ListLinearPositionResult `json:"result"`
}
ListLinearPositionResponse :
type ListLinearPositionResult ¶
type ListLinearPositionResult struct {
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Size float64 `json:"size"`
PositionValue float64 `json:"position_value"`
EntryPrice float64 `json:"entry_price"`
LiqPrice float64 `json:"liq_price"`
BustPrice float64 `json:"bust_price"`
Leverage float64 `json:"leverage"`
AutoAddMargin float64 `json:"auto_add_margin"`
IsIsolated bool `json:"is_isolated"`
PositionMargin float64 `json:"position_margin"`
OccClosingFee float64 `json:"occ_closing_fee"`
RealisedPnl float64 `json:"realised_pnl"`
CumRealisedPnl float64 `json:"cum_realised_pnl"`
FreeQty float64 `json:"free_qty"`
TpSlMode TpSlMode `json:"tp_sl_mode"`
DeleverageIndicator int `json:"deleverage_indicator"`
UnrealisedPnl float64 `json:"unrealised_pnl"`
RiskID int `json:"risk_id"`
}
ListLinearPositionResult :
type ListLinearPositionsResponse ¶
type ListLinearPositionsResponse struct {
CommonResponse `json:",inline"`
Result []ListLinearPositionsResult `json:"result"`
}
ListLinearPositionsResponse :
type ListLinearPositionsResult ¶
type ListLinearPositionsResult struct {
IsValid bool `json:"is_valid"`
ListLinearPositionResult `json:"data,inline"`
}
ListLinearPositionsResult :
type ListLinearStopOrderParam ¶
type ListLinearStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderID *string `url:"stop_order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
StopOrderStatus *OrderStatus `url:"stop_order_status,omitempty"`
Order *Order `url:"order,omitempty"`
Page *int `url:"page,omitempty"`
Limit *int `url:"limit,omitempty"`
}
ListLinearStopOrderParam :
type ListLinearStopOrderResponse ¶
type ListLinearStopOrderResponse struct {
CommonResponse `json:",inline"`
Result ListLinearStopOrderResult `json:"result"`
}
ListLinearStopOrderResponse :
type ListLinearStopOrderResult ¶
type ListLinearStopOrderResult struct {
CurrentPage int `json:"current_page"`
LastPage int `json:"last_page"`
Content []ListLinearStopOrderResultContent `json:"data"`
}
ListLinearStopOrderResult :
type ListLinearStopOrderResultContent ¶
type ListLinearStopOrderResultContent struct {
StopOrderID string `json:"stop_order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
TriggerPrice float64 `json:"trigger_price"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
}
ListLinearStopOrderResultContent :
type ListOrder ¶
type ListOrder struct {
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LeavesQty string `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty string `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
OrderID string `json:"order_id"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
ListOrder :
type ListOrderParam ¶
type ListOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderStatus *OrderStatus `url:"order_status,omitempty"`
Direction *Direction `url:"direction,omitempty"`
Size *int `url:"size,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
ListOrderParam :
type ListOrderResponse ¶
type ListOrderResponse struct {
CommonResponse `json:",inline"`
Result ListOrderResult `json:"result"`
}
ListOrderResponse :
type ListOrderResult ¶
type ListOrderResult struct {
ListOrders []ListOrder `json:"data"`
}
ListOrderResult :
type ListPositionResponse ¶
type ListPositionResponse struct {
CommonResponse `json:",inline"`
Result ListPositionResult `json:"result"`
}
ListPositionResponse :
type ListPositionResult ¶
type ListPositionResult struct {
ID int `json:"id"`
UserID int `json:"user_id"`
RiskID int `json:"risk_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Size float64 `json:"size"`
PositionValue string `json:"position_value"`
EntryPrice string `json:"entry_price"`
IsIsolated bool `json:"is_isolated"`
AutoAddMargin float64 `json:"auto_add_margin"`
Leverage string `json:"leverage"`
EffectiveLeverage string `json:"effective_leverage"`
PositionMargin string `json:"position_margin"`
LiqPrice string `json:"liq_price"`
BustPrice string `json:"bust_price"`
OccClosingFee string `json:"occ_closing_fee"`
OccFundingFee string `json:"occ_funding_fee"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TrailingStop string `json:"trailing_stop"`
PositionStatus string `json:"position_status"`
DeleverageIndicator int `json:"deleverage_indicator"`
OcCalcData string `json:"oc_calc_data"`
OrderMargin string `json:"order_margin"`
WalletBalance string `json:"wallet_balance"`
RealisedPnl string `json:"realised_pnl"`
UnrealisedPnl float64 `json:"unrealised_pnl"`
CumRealisedPnl string `json:"cum_realised_pnl"`
CrossSeq float64 `json:"cross_seq"`
PositionSeq float64 `json:"position_seq"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
ListPositionResult :
type ListPositionsResponse ¶
type ListPositionsResponse struct {
CommonResponse `json:",inline"`
Result []ListPositionsResult `json:"result"`
}
ListPositionsResponse :
type ListPositionsResult ¶
type ListPositionsResult struct {
IsValid bool `json:"is_valid"`
ListPositionResult `json:"data,inline"`
}
ListPositionsResult :
type ListStopOrder ¶
type ListStopOrder struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
StopOrderStatus OrderStatus `json:"stop_order_status"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty string `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
StopOrderType StopOrderTypeFuture `json:"stop_order_type"`
TriggerBy TriggerByFuture `json:"trigger_by"`
BasePrice string `json:"base_price"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
StopPx string `json:"stop_px"`
StopOrderID string `json:"stop_order_id"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
Cursor string `json:"cursor"`
}
ListStopOrder :
type ListStopOrderParam ¶
type ListStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderStatus *OrderStatus `url:"stop_order_status,omitempty"`
Direction *Direction `url:"direction,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
ListStopOrderParam :
type ListStopOrderResponse ¶
type ListStopOrderResponse struct {
CommonResponse `json:",inline"`
Result ListStopOrderResult `json:"result"`
}
ListStopOrderResponse :
type ListStopOrderResult ¶
type ListStopOrderResult struct {
ListStopOrders []ListStopOrder `json:"data"`
}
ListStopOrderResult :
type LotSizeFilter ¶
type LotSizeFilter struct {
MaxTradingQty float64 `json:"max_trading_qty"`
MinTradingQty float64 `json:"min_trading_qty"`
QtyStep float64 `json:"qty_step"`
}
LotSizeFilter :
type MarkPriceKlineParam ¶
type MarkPriceKlineParam struct {
Symbol SymbolFuture `url:"symbol"`
Interval Interval `url:"interval"`
From int64 `url:"from"`
Limit *int `url:"limit,omitempty"`
}
MarkPriceKlineParam :
type MarkPriceKlineResponse ¶
type MarkPriceKlineResponse struct {
CommonResponse `json:",inline"`
Result []MarkPriceKlineResult `json:"result"`
}
MarkPriceKlineResponse :
type MarkPriceKlineResult ¶
type MarkPriceKlineResult struct {
Symbol SymbolFuture `json:"symbol"`
Period Period `json:"period"`
StartAt int `json:"start_at"`
Open float64 `json:"open"`
High float64 `json:"high"`
Low float64 `json:"low"`
Close float64 `json:"close"`
}
MarkPriceKlineResult :
type MarketUnit ¶
type MarketUnit string
The unit for qty when create Spot market orders for UTA account.
type OpenInterestParam ¶
type OpenInterestParam struct {
Symbol SymbolFuture `url:"symbol"`
Period Period `url:"period"`
Limit *int `url:"limit,omitempty"`
}
OpenInterestParam :
type OpenInterestResponse ¶
type OpenInterestResponse struct {
CommonResponse `json:",inline"`
Result []OpenInterestResult `json:"result"`
}
OpenInterestResponse :
type OpenInterestResult ¶
type OpenInterestResult struct {
OpenInterest float64 `json:"open_interest"`
Timestamp int `json:"timestamp"`
Symbol SymbolFuture `json:"symbol"`
}
OpenInterestResult :
type OptionLotSizeFilterV5 ¶
type OptionPriceFilterV5 ¶
type OrderBookResponse ¶
type OrderBookResponse struct {
CommonResponse `json:",inline"`
Result []OrderBookResult `json:"result"`
}
OrderBookResponse :
type OrderBookResult ¶
type OrderBookResult struct {
Symbol SymbolFuture `json:"symbol"`
Price string `json:"price"`
Size float64 `json:"size"`
Side Side `json:"side"`
}
OrderBookResult :
type PremiumIndexKlineParam ¶
type PremiumIndexKlineParam struct {
Symbol SymbolFuture `url:"symbol"`
Interval Interval `url:"interval"`
From int64 `url:"from"`
Limit *int `url:"limit,omitempty"`
}
PremiumIndexKlineParam :
type PremiumIndexKlineResponse ¶
type PremiumIndexKlineResponse struct {
CommonResponse `json:",inline"`
Result []PremiumIndexKlineResult `json:"result"`
}
PremiumIndexKlineResponse :
type PremiumIndexKlineResult ¶
type PremiumIndexKlineResult struct {
Symbol SymbolFuture `json:"symbol"`
Period Period `json:"period"`
OpenTime int `json:"open_time"`
Open string `json:"open"`
High string `json:"high"`
Low string `json:"low"`
Close string `json:"close"`
}
PremiumIndexKlineResult :
type PriceFilter ¶
type PriceFilter struct {
MinPrice string `json:"min_price"`
MaxPrice string `json:"max_price"`
TickSize string `json:"tick_size"`
}
PriceFilter :
type QueryFuturesOrderParam ¶
type QueryFuturesOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderID *string `url:"order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryFuturesOrderParam :
type QueryFuturesOrderResponse ¶
type QueryFuturesOrderResponse struct {
CommonResponse `json:",inline"`
Result QueryFuturesOrderResult `json:"result"`
}
QueryFuturesOrderResponse :
type QueryFuturesOrderResult ¶
type QueryFuturesOrderResult struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
ExtFields map[string]interface{} `json:"ext_fields"`
LastExecTime string `json:"last_exec_time"`
LeavesQty int `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty int `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
CancelType string `json:"cancel_type"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
OrderID string `json:"order_id"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
QueryFuturesOrderResult :
type QueryFuturesStopOrderParam ¶
type QueryFuturesStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderID *string `url:"stop_order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryFuturesStopOrderParam :
type QueryFuturesStopOrderResponse ¶
type QueryFuturesStopOrderResponse struct {
CommonResponse `json:",inline"`
Result QueryFuturesStopOrderResult `json:"result"`
}
QueryFuturesStopOrderResponse :
type QueryFuturesStopOrderResult ¶
type QueryFuturesStopOrderResult struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
StopPx string `json:"stop_px"`
BasePrice string `json:"base_price"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
ExtFields map[string]interface{} `json:"ext_fields"`
LeavesQty int `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty int `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
OrderID string `json:"order_id"`
TriggerBy TriggerByFuture `json:"trigger_by"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
QueryFuturesStopOrderResult :
type QueryLinearOrderParam ¶
type QueryLinearOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderID *string `url:"order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryLinearOrderParam :
type QueryLinearOrderResponse ¶
type QueryLinearOrderResponse struct {
CommonResponse `json:",inline"`
Result []QueryLinearOrderResult `json:"result"`
}
QueryLinearOrderResponse :
type QueryLinearOrderResult ¶
type QueryLinearOrderResult struct {
OrderID string `json:"order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
LastExecPrice float64 `json:"last_exec_price"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value"`
CumExecFee float64 `json:"cum_exec_fee"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
QueryLinearOrderResult :
type QueryLinearStopOrderParam ¶
type QueryLinearStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderID *string `url:"stop_order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryLinearStopOrderParam :
type QueryLinearStopOrderResponse ¶
type QueryLinearStopOrderResponse struct {
CommonResponse `json:",inline"`
Result []QueryLinearStopOrderResult `json:"result"`
}
QueryLinearStopOrderResponse :
type QueryLinearStopOrderResult ¶
type QueryLinearStopOrderResult struct {
StopOrderID string `json:"stop_order_id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
TriggerPrice float64 `json:"trigger_price"`
BasePrice string `json:"base_price"`
OrderLinkID string `json:"order_link_id"`
CreatedTime string `json:"created_time"`
UpdatedTime string `json:"updated_time"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
TriggerBy TriggerByFuture `json:"trigger_by"`
ReduceOnly bool `json:"reduce_only"`
CloseOnTrigger bool `json:"close_on_trigger"`
}
QueryLinearStopOrderResult :
type QueryOrderParam ¶
type QueryOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
OrderID *string `url:"order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryOrderParam :
type QueryOrderResponse ¶
type QueryOrderResponse struct {
CommonResponse `json:",inline"`
Result []QueryOrderResult `json:"result"`
}
QueryOrderResponse :
type QueryOrderResult ¶
type QueryOrderResult struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
TimeInForce TimeInForce `json:"time_in_force"`
OrderStatus OrderStatus `json:"order_status"`
ExtFields map[string]interface{} `json:"ext_fields"`
LastExecTime string `json:"last_exec_time"`
LeavesQty int `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty int `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
CancelType string `json:"cancel_type"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
OrderID string `json:"order_id"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
QueryOrderResult :
type QueryStopOrderParam ¶
type QueryStopOrderParam struct {
Symbol SymbolFuture `url:"symbol"`
StopOrderID *string `url:"stop_order_id,omitempty"`
OrderLinkID *string `url:"order_link_id,omitempty"`
}
QueryStopOrderParam :
type QueryStopOrderResponse ¶
type QueryStopOrderResponse struct {
CommonResponse `json:",inline"`
Result []QueryStopOrderResult `json:"result"`
}
QueryStopOrderResponse :
type QueryStopOrderResult ¶
type QueryStopOrderResult struct {
UserID int `json:"user_id"`
PositionIdx int `json:"position_idx"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"order_type"`
Price string `json:"price"`
Qty float64 `json:"qty"`
StopPx string `json:"stop_px"`
BasePrice string `json:"base_price"`
TimeInForce TimeInForce `json:"time_in_force"`
StopOrderStatus OrderStatus `json:"stop_order_status"`
ExtFields map[string]interface{} `json:"ext_fields"`
LeavesQty int `json:"leaves_qty"`
LeavesValue string `json:"leaves_value"`
CumExecQty int `json:"cum_exec_qty"`
CumExecValue string `json:"cum_exec_value"`
CumExecFee string `json:"cum_exec_fee"`
RejectReason string `json:"reject_reason"`
OrderLinkID string `json:"order_link_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
OrderID string `json:"order_id"`
TriggerBy TriggerByFuture `json:"trigger_by"`
TakeProfit string `json:"take_profit"`
StopLoss string `json:"stop_loss"`
TpTriggerBy TriggerByFuture `json:"tp_trigger_by"`
SlTriggerBy TriggerByFuture `json:"sl_trigger_by"`
}
QueryStopOrderResult :
type RateLimitError ¶
type RateLimitError struct {
*CommonResponse `json:",inline"`
}
RateLimitError :
func (*RateLimitError) Error ¶
func (r *RateLimitError) Error() string
type RateLimitV5Error ¶
type RateLimitV5Error struct {
*CommonV5Response `json:",inline"`
}
func (*RateLimitV5Error) Error ¶
func (r *RateLimitV5Error) Error() string
type ReplaceLinearOrderParam ¶
type ReplaceLinearOrderParam struct {
Symbol SymbolFuture `json:"symbol"`
OrderID *string `json:"order_id,omitempty"`
OrderLinkID *string `json:"order_link_id,omitempty"`
NewQuantity *float64 `json:"p_r_qty,omitempty"`
NewPrice *float64 `json:"p_r_price,omitempty"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
}
ReplaceLinearOrderParam :
type ReplaceLinearOrderResponse ¶
type ReplaceLinearOrderResponse struct {
CommonResponse `json:",inline"`
Result ReplaceLinearOrderResult `json:"result"`
}
ReplaceLinearOrderResponse :
type ReplaceLinearOrderResult ¶
type ReplaceLinearOrderResult struct {
OrderID string `json:"order_id"`
}
ReplaceLinearOrderResult :
type SaveLeverageParam ¶
type SaveLeverageParam struct {
Symbol SymbolFuture `json:"symbol"`
Leverage float64 `json:"leverage"`
}
SaveLeverageParam :
type SaveLeverageResponse ¶
type SaveLeverageResponse struct {
CommonResponse `json:",inline"`
Result float64 `json:"result"`
}
SaveLeverageResponse :
type SaveLinearLeverageParam ¶
type SaveLinearLeverageParam struct {
Symbol SymbolFuture `json:"symbol"`
BuyLeverage float64 `json:"buy_leverage"`
SellLeverage float64 `json:"sell_leverage"`
}
SaveLinearLeverageParam :
type SaveLinearLeverageResponse ¶
type SaveLinearLeverageResponse struct {
CommonResponse `json:",inline"`
}
SaveLinearLeverageResponse :
type SpotDeleteOrderFastParam ¶
type SpotDeleteOrderFastParam struct {
Symbol SymbolSpot `url:"symbolId"`
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
}
type SpotDeleteOrderFastResponse ¶
type SpotDeleteOrderFastResponse struct {
CommonResponse `json:",inline"`
Result SpotDeleteOrderFastResult `json:"result"`
}
type SpotDeleteOrderFastResult ¶
type SpotDeleteOrderFastResult struct {
IsCancelled bool `json:"isCancelled"`
}
type SpotDeleteOrderParam ¶
type SpotDeleteOrderParam struct {
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
}
SpotDeleteOrderParam :
type SpotDeleteOrderResponse ¶
type SpotDeleteOrderResponse struct {
CommonResponse `json:",inline"`
Result SpotDeleteOrderResult `json:"result"`
}
SpotDeleteOrderResponse :
type SpotDeleteOrderResult ¶
type SpotDeleteOrderResult struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
Symbol string `json:"symbol"`
Status string `json:"status"`
AccountID string `json:"accountId"`
TransactTime string `json:"transactTime"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
}
SpotDeleteOrderResult :
type SpotGetOrderParam ¶
type SpotGetOrderParam struct {
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
}
SpotGetOrderParam :
type SpotGetOrderResponse ¶
type SpotGetOrderResponse struct {
CommonResponse `json:",inline"`
Result SpotGetOrderResult `json:"result"`
}
SpotGetOrderResponse :
type SpotGetOrderResult ¶
type SpotGetOrderResult struct {
AccountID string `json:"accountId"`
ExchangeID string `json:"exchangeId"`
Symbol string `json:"symbol"`
SymbolName string `json:"symbolName"`
OrderLinkID string `json:"orderLinkId"`
OrderID string `json:"orderId"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
AvgPrice string `json:"avgPrice"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
StopPrice string `json:"stopPrice"`
IcebergQty string `json:"icebergQty"`
Time string `json:"time"`
UpdateTime string `json:"updateTime"`
IsWorking bool `json:"isWorking"`
}
SpotGetOrderResult :
type SpotGetWalletBalanceResponse ¶
type SpotGetWalletBalanceResponse struct {
CommonResponse `json:",inline"`
Result SpotGetWalletBalanceResult `json:"result"`
}
SpotGetWalletBalanceResponse :
type SpotGetWalletBalanceResult ¶
type SpotGetWalletBalanceResult struct {
Balances []SpotGetWalletBalanceResultBalance `json:"balances"`
}
SpotGetWalletBalanceResult :
type SpotGetWalletBalanceResultBalance ¶
type SpotGetWalletBalanceResultBalance struct {
Coin string `json:"coin"`
CoinID string `json:"coinId"`
CoinName string `json:"coinName"`
Total string `json:"total"`
Free string `json:"free"`
Locked string `json:"locked"`
}
SpotGetWalletBalanceResultBalance :
type SpotLotSizeFilterV5 ¶
type SpotOpenOrdersParam ¶
type SpotOpenOrdersParam struct {
Symbol *SymbolSpot `url:"symbol,omitempty"`
OrderID *string `url:"orderId,omitempty"`
Limit *int `url:"limit,omitempty"`
}
SpotOpenOrdersParam :
type SpotOpenOrdersResponse ¶
type SpotOpenOrdersResponse struct {
CommonResponse `json:",inline"`
Result []SpotOpenOrdersResult `json:"result"`
}
SpotOpenOrdersResponse :
type SpotOpenOrdersResult ¶
type SpotOpenOrdersResult struct {
AccountID string `json:"accountId"`
ExchangeID string `json:"exchangeId"`
Symbol string `json:"symbol"`
SymbolName string `json:"symbolName"`
OrderLinkID string `json:"orderLinkId"`
OrderID string `json:"orderId"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
AvgPrice string `json:"avgPrice"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
StopPrice string `json:"stopPrice"`
IcebergQty string `json:"icebergQty"`
Time string `json:"time"`
UpdateTime string `json:"updateTime"`
IsWorking bool `json:"isWorking"`
}
SpotOpenOrdersResult :
type SpotOrderBatchCancelByIDsResponse ¶
type SpotOrderBatchCancelByIDsResponse struct {
CommonResponse `json:",inline"`
Result []SpotOrderBatchCancelByIDsResult `json:"result"`
}
type SpotOrderBatchCancelParam ¶
type SpotOrderBatchCancelParam struct {
Symbol SymbolSpot `url:"symbolId"`
Side *Side `url:"side,omitempty"`
Types []OrderTypeSpot `url:"orderTypes,omitempty" del:","`
}
type SpotOrderBatchCancelResponse ¶
type SpotOrderBatchCancelResponse struct {
CommonResponse `json:",inline"`
Result SpotOrderBatchCancelResult `json:"result"`
}
type SpotOrderBatchCancelResult ¶
type SpotOrderBatchCancelResult struct {
Success bool `json:"success"`
}
type SpotOrderBatchFastCancelParam ¶
type SpotOrderBatchFastCancelParam struct {
Symbol SymbolSpot `url:"symbolId"`
Side *Side `url:"side,omitempty"`
Types []OrderTypeSpot `url:"orderTypes,omitempty" del:","`
}
type SpotOrderBatchFastCancelResponse ¶
type SpotOrderBatchFastCancelResponse struct {
CommonResponse `json:",inline"`
Result SpotOrderBatchFastCancelResult `json:"result"`
}
type SpotOrderBatchFastCancelResult ¶
type SpotOrderBatchFastCancelResult struct {
Success bool `json:"success"`
}
type SpotPostOrderParam ¶
type SpotPostOrderParam struct {
Symbol SymbolSpot `url:"symbol"`
Qty float64 `url:"qty"`
Side Side `url:"side"`
Type OrderTypeSpot `url:"type"`
TimeInForce *TimeInForceSpot `url:"timeInForce,omitempty"`
Price *float64 `url:"price,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
}
SpotPostOrderParam :
type SpotPostOrderResponse ¶
type SpotPostOrderResponse struct {
CommonResponse `json:",inline"`
Result SpotPostOrderResult `json:"result"`
}
SpotPostOrderResponse :
type SpotPostOrderResult ¶
type SpotPostOrderResult struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
Symbol string `json:"symbol"`
TransactTime string `json:"transactTime"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
Type OrderTypeSpot `json:"type"`
Side string `json:"side"`
Status OrderStatusSpot `json:"status"`
TimeInForce TimeInForceSpot `json:"timeInForce"`
AccountID string `json:"accountId"`
SymbolName string `json:"symbolName"`
ExecutedQty string `json:"executedQty"`
}
SpotPostOrderResult :
type SpotPriceFilterV5 ¶
type SpotPriceFilterV5 struct {
TickSize string `json:"tickSize"`
}
type SpotQuoteDepthBidAsk ¶
SpotQuoteDepthBidAsk :
type SpotQuoteDepthBidsAsks ¶
type SpotQuoteDepthBidsAsks []SpotQuoteDepthBidAsk
SpotQuoteDepthBidsAsks :
func (*SpotQuoteDepthBidsAsks) UnmarshalJSON ¶
func (r *SpotQuoteDepthBidsAsks) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type SpotQuoteDepthMergedParam ¶
type SpotQuoteDepthMergedParam struct {
Symbol SymbolSpot `url:"symbol"`
Scale *int `url:"scale,omitempty"`
Limit *int `url:"limit,omitempty"`
}
SpotQuoteDepthMergedParam :
type SpotQuoteDepthMergedResponse ¶
type SpotQuoteDepthMergedResponse struct {
CommonResponse `json:",inline"`
Result SpotQuoteDepthMergedResult `json:"result"`
}
SpotQuoteDepthMergedResponse :
type SpotQuoteDepthMergedResult ¶
type SpotQuoteDepthMergedResult struct {
Time int `json:"time"`
Bids SpotQuoteDepthBidsAsks `json:"bids"`
Asks SpotQuoteDepthBidsAsks `json:"asks"`
}
SpotQuoteDepthMergedResult :
type SpotQuoteDepthParam ¶
type SpotQuoteDepthParam struct {
Symbol SymbolSpot `url:"symbol"`
Limit *int `url:"limit,omitempty"`
}
SpotQuoteDepthParam :
type SpotQuoteDepthResponse ¶
type SpotQuoteDepthResponse struct {
CommonResponse `json:",inline"`
Result SpotQuoteDepthResult `json:"result"`
}
SpotQuoteDepthResponse :
type SpotQuoteDepthResult ¶
type SpotQuoteDepthResult struct {
Time int `json:"time"`
Bids SpotQuoteDepthBidsAsks `json:"bids"`
Asks SpotQuoteDepthBidsAsks `json:"asks"`
}
SpotQuoteDepthResult :
type SpotQuoteKline ¶
type SpotQuoteKline struct {
StartTime int
Open string
High string
Low string
Close string
Volume string
EndTime int
QuoteAssetVolume string
Trades int
TakerBaseVolume float64
TakerQuoteVolume float64
}
SpotQuoteKline :
type SpotQuoteKlineParam ¶
type SpotQuoteKlineParam struct {
Symbol SymbolSpot `url:"symbol"`
Interval Interval `url:"interval"`
Limit *int `url:"limit,omitempty"`
StartTime *int `url:"startTime,omitempty"`
EndTime *int `url:"endTime,omitempty"`
}
SpotQuoteKlineParam :
type SpotQuoteKlineResponse ¶
type SpotQuoteKlineResponse struct {
CommonResponse `json:",inline"`
Result []SpotQuoteKlineResult `json:"result"`
}
SpotQuoteKlineResponse :
type SpotQuoteKlineResult ¶
type SpotQuoteKlineResult struct {
SpotQuoteKline SpotQuoteKline
}
SpotQuoteKlineResult :
func (*SpotQuoteKlineResult) UnmarshalJSON ¶
func (r *SpotQuoteKlineResult) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type SpotQuoteTicker24hrParam ¶
type SpotQuoteTicker24hrParam struct {
Symbol *SymbolSpot `url:"symbol,omitempty"`
}
SpotQuoteTicker24hrParam :
type SpotQuoteTicker24hrResponse ¶
type SpotQuoteTicker24hrResponse struct {
CommonResponse `json:",inline"`
Result SpotQuoteTicker24hrResult `json:"result"`
}
SpotQuoteTicker24hrResponse :
type SpotQuoteTicker24hrResult ¶
type SpotQuoteTicker24hrResult struct {
Time int `json:"time"`
Symbol string `json:"symbol"`
BestBidPrice string `json:"bestBidPrice"`
BestAskPrice string `json:"bestAskPrice"`
LastPrice string `json:"lastPrice"`
OpenPrice string `json:"openPrice"`
HighPrice string `json:"highPrice"`
LowPrice string `json:"lowPrice"`
Volume string `json:"volume"`
QuoteVolume string `json:"quoteVolume"`
}
SpotQuoteTicker24hrResult :
type SpotQuoteTickerBookTickerParam ¶
type SpotQuoteTickerBookTickerParam struct {
Symbol *SymbolSpot `url:"symbol,omitempty"`
}
SpotQuoteTickerBookTickerParam :
type SpotQuoteTickerBookTickerResponse ¶
type SpotQuoteTickerBookTickerResponse struct {
CommonResponse `json:",inline"`
Result SpotQuoteTickerBookTickerResult `json:"result"`
}
SpotQuoteTickerBookTickerResponse :
type SpotQuoteTickerBookTickerResult ¶
type SpotQuoteTickerBookTickerResult struct {
Symbol string `json:"symbol"`
BidPrice string `json:"bidPrice"`
BidQty string `json:"bidQty"`
AskPrice string `json:"askPrice"`
AskQty string `json:"askQty"`
Time int `json:"time"`
}
SpotQuoteTickerBookTickerResult :
type SpotQuoteTickerPriceParam ¶
type SpotQuoteTickerPriceParam struct {
Symbol *SymbolSpot `url:"symbol,omitempty"`
}
SpotQuoteTickerPriceParam :
type SpotQuoteTickerPriceResponse ¶
type SpotQuoteTickerPriceResponse struct {
CommonResponse `json:",inline"`
Result SpotQuoteTickerPriceResult `json:"result"`
}
SpotQuoteTickerPriceResponse :
type SpotQuoteTickerPriceResult ¶
type SpotQuoteTickerPriceResult struct {
Symbol string `json:"symbol"`
Price string `json:"price"`
}
SpotQuoteTickerPriceResult :
type SpotQuoteTradesParam ¶
type SpotQuoteTradesParam struct {
Symbol SymbolSpot `url:"symbol"`
Limit *int `url:"limit,omitempty"`
}
SpotQuoteTradesParam :
type SpotQuoteTradesResponse ¶
type SpotQuoteTradesResponse struct {
CommonResponse `json:",inline"`
Result []SpotQuoteTradesResult `json:"result"`
}
SpotQuoteTradesResponse :
type SpotQuoteTradesResult ¶
type SpotQuoteTradesResult struct {
Price string `json:"price"`
Time int `json:"time"`
Qty string `json:"qty"`
IsBuyerMaker bool `json:"isBuyerMaker"`
}
SpotQuoteTradesResult :
type SpotService ¶
type SpotService struct {
// contains filtered or unexported fields
}
SpotService :
type SpotServiceI ¶
type SpotServiceI interface {
V1() SpotV1ServiceI
V3() *SpotV3Service
}
SpotServiceI :
type SpotSymbolsResponse ¶
type SpotSymbolsResponse struct {
CommonResponse `json:",inline"`
Result []SpotSymbolsResult `json:"result"`
}
SpotSymbolsResponse :
type SpotSymbolsResult ¶
type SpotSymbolsResult struct {
Name string `json:"name"`
Alias string `json:"alias"`
BaseCurrency string `json:"baseCurrency"`
QuoteCurrency string `json:"quoteCurrency"`
BasePrecision string `json:"basePrecision"`
QuotePrecision string `json:"quotePrecision"`
MinTradeQuantity string `json:"minTradeQuantity"`
MinTradeAmount string `json:"minTradeAmount"`
MinPricePrecision string `json:"minPricePrecision"`
MaxTradeQuantity string `json:"maxTradeQuantity"`
MaxTradeAmount string `json:"maxTradeAmount"`
Category int `json:"category"`
}
SpotSymbolsResult :
type SpotV1Service ¶
type SpotV1Service struct {
// contains filtered or unexported fields
}
SpotV1Service :
func (*SpotV1Service) SpotDeleteOrder ¶
func (s *SpotV1Service) SpotDeleteOrder(param SpotDeleteOrderParam) (*SpotDeleteOrderResponse, error)
SpotDeleteOrder :
func (*SpotV1Service) SpotDeleteOrderFast ¶
func (s *SpotV1Service) SpotDeleteOrderFast(param SpotDeleteOrderFastParam) (*SpotDeleteOrderFastResponse, error)
SpotDeleteOrderFast :
func (*SpotV1Service) SpotGetOrder ¶
func (s *SpotV1Service) SpotGetOrder(param SpotGetOrderParam) (*SpotGetOrderResponse, error)
SpotGetOrder :
func (*SpotV1Service) SpotGetWalletBalance ¶
func (s *SpotV1Service) SpotGetWalletBalance() (*SpotGetWalletBalanceResponse, error)
SpotGetWalletBalance :
func (*SpotV1Service) SpotOpenOrders ¶
func (s *SpotV1Service) SpotOpenOrders(param SpotOpenOrdersParam) (*SpotOpenOrdersResponse, error)
SpotOpenOrders :
func (*SpotV1Service) SpotOrderBatchCancel ¶
func (s *SpotV1Service) SpotOrderBatchCancel(param SpotOrderBatchCancelParam) (*SpotOrderBatchCancelResponse, error)
func (*SpotV1Service) SpotOrderBatchCancelByIDs ¶
func (s *SpotV1Service) SpotOrderBatchCancelByIDs(orderIDs []string) (*SpotOrderBatchCancelByIDsResponse, error)
TODO : have bug multiple orderIds
func (*SpotV1Service) SpotOrderBatchFastCancel ¶
func (s *SpotV1Service) SpotOrderBatchFastCancel(param SpotOrderBatchFastCancelParam) (*SpotOrderBatchFastCancelResponse, error)
func (*SpotV1Service) SpotPostOrder ¶
func (s *SpotV1Service) SpotPostOrder(param SpotPostOrderParam) (*SpotPostOrderResponse, error)
SpotPostOrder :
func (*SpotV1Service) SpotQuoteDepth ¶
func (s *SpotV1Service) SpotQuoteDepth(param SpotQuoteDepthParam) (*SpotQuoteDepthResponse, error)
SpotQuoteDepth :
func (*SpotV1Service) SpotQuoteDepthMerged ¶
func (s *SpotV1Service) SpotQuoteDepthMerged(param SpotQuoteDepthMergedParam) (*SpotQuoteDepthMergedResponse, error)
SpotQuoteDepthMerged :
func (*SpotV1Service) SpotQuoteKline ¶
func (s *SpotV1Service) SpotQuoteKline(param SpotQuoteKlineParam) (*SpotQuoteKlineResponse, error)
SpotQuoteKline :
func (*SpotV1Service) SpotQuoteTicker24hr ¶
func (s *SpotV1Service) SpotQuoteTicker24hr(param SpotQuoteTicker24hrParam) (*SpotQuoteTicker24hrResponse, error)
SpotQuoteTicker24hr :
func (*SpotV1Service) SpotQuoteTickerBookTicker ¶
func (s *SpotV1Service) SpotQuoteTickerBookTicker(param SpotQuoteTickerBookTickerParam) (*SpotQuoteTickerBookTickerResponse, error)
SpotQuoteTickerBookTicker :
func (*SpotV1Service) SpotQuoteTickerPrice ¶
func (s *SpotV1Service) SpotQuoteTickerPrice(param SpotQuoteTickerPriceParam) (*SpotQuoteTickerPriceResponse, error)
SpotQuoteTickerPrice :
func (*SpotV1Service) SpotQuoteTrades ¶
func (s *SpotV1Service) SpotQuoteTrades(param SpotQuoteTradesParam) (*SpotQuoteTradesResponse, error)
SpotQuoteTrades :
func (*SpotV1Service) SpotSymbols ¶
func (s *SpotV1Service) SpotSymbols() (*SpotSymbolsResponse, error)
SpotSymbols :
type SpotV1ServiceI ¶
type SpotV1ServiceI interface {
// Market Data Endpoints
SpotSymbols() (*SpotSymbolsResponse, error)
SpotQuoteDepth(SpotQuoteDepthParam) (*SpotQuoteDepthResponse, error)
SpotQuoteDepthMerged(SpotQuoteDepthMergedParam) (*SpotQuoteDepthMergedResponse, error)
SpotQuoteTrades(SpotQuoteTradesParam) (*SpotQuoteTradesResponse, error)
SpotQuoteKline(SpotQuoteKlineParam) (*SpotQuoteKlineResponse, error)
SpotQuoteTicker24hr(SpotQuoteTicker24hrParam) (*SpotQuoteTicker24hrResponse, error)
SpotQuoteTickerPrice(SpotQuoteTickerPriceParam) (*SpotQuoteTickerPriceResponse, error)
SpotQuoteTickerBookTicker(SpotQuoteTickerBookTickerParam) (*SpotQuoteTickerBookTickerResponse, error)
// Account Data Endpoints
SpotPostOrder(SpotPostOrderParam) (*SpotPostOrderResponse, error)
SpotGetOrder(SpotGetOrderParam) (*SpotGetOrderResponse, error)
SpotDeleteOrder(SpotDeleteOrderParam) (*SpotDeleteOrderResponse, error)
SpotDeleteOrderFast(SpotDeleteOrderFastParam) (*SpotDeleteOrderFastResponse, error)
SpotOrderBatchCancel(SpotOrderBatchCancelParam) (*SpotOrderBatchCancelResponse, error)
SpotOrderBatchFastCancel(SpotOrderBatchFastCancelParam) (*SpotOrderBatchFastCancelResponse, error)
SpotOrderBatchCancelByIDs(orderIDs []string) (*SpotOrderBatchCancelByIDsResponse, error)
SpotOpenOrders(SpotOpenOrdersParam) (*SpotOpenOrdersResponse, error)
// Wallet Data Endpoints
SpotGetWalletBalance() (*SpotGetWalletBalanceResponse, error)
}
SpotV1ServiceI :
type SpotV3Service ¶
type SpotV3Service struct {
// contains filtered or unexported fields
}
SpotV3Service :
type SpotWebsocketService ¶
type SpotWebsocketService struct {
// contains filtered or unexported fields
}
SpotWebsocketService :
type SpotWebsocketV1PrivateEventType ¶
type SpotWebsocketV1PrivateEventType string
SpotWebsocketV1PrivateEventType :
type SpotWebsocketV1PrivateOutboundAccountInfoResponse ¶
type SpotWebsocketV1PrivateOutboundAccountInfoResponse struct {
Content SpotWebsocketV1PrivateOutboundAccountInfoResponseContent
}
SpotWebsocketV1PrivateOutboundAccountInfoResponse :
func (*SpotWebsocketV1PrivateOutboundAccountInfoResponse) MarshalJSON ¶
func (r *SpotWebsocketV1PrivateOutboundAccountInfoResponse) MarshalJSON() ([]byte, error)
MarshalJSON :
func (*SpotWebsocketV1PrivateOutboundAccountInfoResponse) UnmarshalJSON ¶
func (r *SpotWebsocketV1PrivateOutboundAccountInfoResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type SpotWebsocketV1PrivateOutboundAccountInfoResponseContent ¶
type SpotWebsocketV1PrivateOutboundAccountInfoResponseContent struct {
EventType SpotWebsocketV1PrivateEventType `json:"e"`
Timestamp string `json:"E"`
AllowTrade bool `json:"T"`
AllowWithdraw bool `json:"W"`
AllowWDeposit bool `json:"D"`
WalletBalanceChanges []SpotWebsocketV1PrivateOutboundAccountInfoResponseWalletBalanceChange `json:"B"`
}
SpotWebsocketV1PrivateOutboundAccountInfoResponseContent :
type SpotWebsocketV1PrivateOutboundAccountInfoResponseWalletBalanceChange ¶
type SpotWebsocketV1PrivateOutboundAccountInfoResponseWalletBalanceChange struct {
SymbolName string `json:"a"`
AvailableBalance string `json:"f"`
ReservedBalance string `json:"l"`
}
SpotWebsocketV1PrivateOutboundAccountInfoResponseWalletBalanceChange :
type SpotWebsocketV1PrivateParamKey ¶
type SpotWebsocketV1PrivateParamKey struct {
EventType SpotWebsocketV1PrivateEventType
}
SpotWebsocketV1PrivateParamKey :
type SpotWebsocketV1PrivateService ¶
type SpotWebsocketV1PrivateService struct {
// contains filtered or unexported fields
}
SpotWebsocketV1PrivateService :
func (*SpotWebsocketV1PrivateService) Close ¶
func (s *SpotWebsocketV1PrivateService) Close() error
Close :
func (*SpotWebsocketV1PrivateService) Ping ¶
func (s *SpotWebsocketV1PrivateService) Ping() error
Ping :
func (*SpotWebsocketV1PrivateService) RegisterFuncOutboundAccountInfo ¶
func (s *SpotWebsocketV1PrivateService) RegisterFuncOutboundAccountInfo(f func(SpotWebsocketV1PrivateOutboundAccountInfoResponse) error) error
RegisterFuncOutboundAccountInfo :
func (*SpotWebsocketV1PrivateService) Run ¶
func (s *SpotWebsocketV1PrivateService) Run() error
Run :
func (*SpotWebsocketV1PrivateService) Start ¶
func (s *SpotWebsocketV1PrivateService) Start(ctx context.Context)
Start :
func (*SpotWebsocketV1PrivateService) Subscribe ¶
func (s *SpotWebsocketV1PrivateService) Subscribe() error
Subscribe :
type SpotWebsocketV1PublicV1Event ¶
type SpotWebsocketV1PublicV1Event string
SpotWebsocketV1PublicV1Event :
type SpotWebsocketV1PublicV1Service ¶
type SpotWebsocketV1PublicV1Service struct {
// contains filtered or unexported fields
}
SpotWebsocketV1PublicV1Service :
func (*SpotWebsocketV1PublicV1Service) Close ¶
func (s *SpotWebsocketV1PublicV1Service) Close() error
Close :
func (*SpotWebsocketV1PublicV1Service) Ping ¶
func (s *SpotWebsocketV1PublicV1Service) Ping() error
Ping :
func (*SpotWebsocketV1PublicV1Service) Run ¶
func (s *SpotWebsocketV1PublicV1Service) Run() error
Run :
func (*SpotWebsocketV1PublicV1Service) Start ¶
func (s *SpotWebsocketV1PublicV1Service) Start(ctx context.Context)
Start :
func (*SpotWebsocketV1PublicV1Service) SubscribeTrade ¶
func (s *SpotWebsocketV1PublicV1Service) SubscribeTrade(symbol SymbolSpot, f func(response SpotWebsocketV1PublicV1TradeResponse) error) (func() error, error)
SubscribeTrade :
type SpotWebsocketV1PublicV1Topic ¶
type SpotWebsocketV1PublicV1Topic string
SpotWebsocketV1PublicV1Topic :
type SpotWebsocketV1PublicV1TradeContent ¶
type SpotWebsocketV1PublicV1TradeContent struct {
TradeID string `json:"v"`
Timestamp int `json:"t"`
Price string `json:"p"`
Quantity string `json:"q"`
IsBuySideTaker bool `json:"m"`
}
SpotWebsocketV1PublicV1TradeContent :
type SpotWebsocketV1PublicV1TradeParam ¶
type SpotWebsocketV1PublicV1TradeParam struct {
Symbol SymbolSpot `json:"symbol"`
Topic SpotWebsocketV1PublicV1Topic `json:"topic"`
Event SpotWebsocketV1PublicV1Event `json:"event"`
Params SpotWebsocketV1PublicV1TradeParamChild `json:"params"`
}
SpotWebsocketV1PublicV1TradeParam :
type SpotWebsocketV1PublicV1TradeParamChild ¶
type SpotWebsocketV1PublicV1TradeParamChild struct {
Binary bool `json:"binary"`
}
SpotWebsocketV1PublicV1TradeParamChild :
type SpotWebsocketV1PublicV1TradeParamKey ¶
type SpotWebsocketV1PublicV1TradeParamKey struct {
Symbol SymbolSpot
Topic SpotWebsocketV1PublicV1Topic
}
SpotWebsocketV1PublicV1TradeParamKey :
type SpotWebsocketV1PublicV1TradeResponse ¶
type SpotWebsocketV1PublicV1TradeResponse struct {
Symbol SymbolSpot `json:"symbol"`
SymbolName string `json:"symbolName"`
Topic SpotWebsocketV1PublicV1Topic `json:"topic"`
SendTime int `json:"sendTime"`
IsFirstMessage bool `json:"f"`
Params SpotWebsocketV1PublicV1TradeResponseParams `json:"params"`
Data []SpotWebsocketV1PublicV1TradeContent `json:"data"`
}
SpotWebsocketV1PublicV1TradeResponse :
type SpotWebsocketV1PublicV1TradeResponseParams ¶
type SpotWebsocketV1PublicV1TradeResponseParams struct {
RealtimeInterval string `json:"realtimeInterval"`
Binary string `json:"binary"`
}
SpotWebsocketV1PublicV1TradeResponseParams :
type SpotWebsocketV1PublicV2Event ¶
type SpotWebsocketV1PublicV2Event string
SpotWebsocketV1PublicV2Event :
type SpotWebsocketV1PublicV2Service ¶
type SpotWebsocketV1PublicV2Service struct {
// contains filtered or unexported fields
}
SpotWebsocketV1PublicV2Service :
func (*SpotWebsocketV1PublicV2Service) Close ¶
func (s *SpotWebsocketV1PublicV2Service) Close() error
Close :
func (*SpotWebsocketV1PublicV2Service) Ping ¶
func (s *SpotWebsocketV1PublicV2Service) Ping() error
Ping :
func (*SpotWebsocketV1PublicV2Service) Run ¶
func (s *SpotWebsocketV1PublicV2Service) Run() error
Run :
func (*SpotWebsocketV1PublicV2Service) Start ¶
func (s *SpotWebsocketV1PublicV2Service) Start(ctx context.Context)
Start :
func (*SpotWebsocketV1PublicV2Service) SubscribeTrade ¶
func (s *SpotWebsocketV1PublicV2Service) SubscribeTrade(symbol SymbolSpot, f func(response SpotWebsocketV1PublicV2TradeResponse) error) (func() error, error)
SubscribeTrade :
type SpotWebsocketV1PublicV2Topic ¶
type SpotWebsocketV1PublicV2Topic string
SpotWebsocketV1PublicV2Topic :
type SpotWebsocketV1PublicV2TradeContent ¶
type SpotWebsocketV1PublicV2TradeContent struct {
TradeID string `json:"v"`
Timestamp int `json:"t"`
Price string `json:"p"`
Quantity string `json:"q"`
IsBuySideTaker bool `json:"m"`
}
SpotWebsocketV1PublicV2TradeContent :
type SpotWebsocketV1PublicV2TradeParam ¶
type SpotWebsocketV1PublicV2TradeParam struct {
Topic SpotWebsocketV1PublicV2Topic `json:"topic"`
Event SpotWebsocketV1PublicV2Event `json:"event"`
Params SpotWebsocketV1PublicV2TradeParamChild `json:"params"`
}
SpotWebsocketV1PublicV2TradeParam :
type SpotWebsocketV1PublicV2TradeParamChild ¶
type SpotWebsocketV1PublicV2TradeParamChild struct {
Symbol SymbolSpot `json:"symbol"`
Binary bool `json:"binary"`
}
SpotWebsocketV1PublicV2TradeParamChild :
type SpotWebsocketV1PublicV2TradeParamKey ¶
type SpotWebsocketV1PublicV2TradeParamKey struct {
Symbol SymbolSpot
Topic SpotWebsocketV1PublicV2Topic
}
SpotWebsocketV1PublicV2TradeParamKey :
type SpotWebsocketV1PublicV2TradeResponse ¶
type SpotWebsocketV1PublicV2TradeResponse struct {
Topic SpotWebsocketV1PublicV2Topic `json:"topic"`
Params SpotWebsocketV1PublicV2TradeResponseParams `json:"params"`
Data SpotWebsocketV1PublicV2TradeContent `json:"data"`
}
SpotWebsocketV1PublicV2TradeResponse :
type SpotWebsocketV1PublicV2TradeResponseParams ¶
type SpotWebsocketV1PublicV2TradeResponseParams struct {
Symbol SymbolSpot `json:"symbol"`
SymbolName string `json:"symbolName"`
Binary string `json:"binary"`
}
SpotWebsocketV1PublicV2TradeResponseParams :
type SpotWebsocketV1Service ¶
type SpotWebsocketV1Service struct {
// contains filtered or unexported fields
}
SpotWebsocketV1Service :
func (*SpotWebsocketV1Service) Private ¶
func (s *SpotWebsocketV1Service) Private() (*SpotWebsocketV1PrivateService, error)
Private :
func (*SpotWebsocketV1Service) PublicV1 ¶
func (s *SpotWebsocketV1Service) PublicV1() (*SpotWebsocketV1PublicV1Service, error)
PublicV1 :
func (*SpotWebsocketV1Service) PublicV2 ¶
func (s *SpotWebsocketV1Service) PublicV2() (*SpotWebsocketV1PublicV2Service, error)
PublicV2 :
type SymbolsResponse ¶
type SymbolsResponse struct {
CommonResponse `json:",inline"`
Result []SymbolsResult `json:"result"`
}
SymbolsResponse :
type SymbolsResult ¶
type SymbolsResult struct {
Name string `json:"name"`
BaseCurrency string `json:"base_currency"`
QuoteCurrency string `json:"quote_currency"`
PriceScale float64 `json:"price_scale"`
TakerFee string `json:"taker_fee"`
MakerFee string `json:"maker_fee"`
LeverageFilter LeverageFilter `json:"leverage_filter"`
PriceFilter PriceFilter `json:"price_filter"`
LotSizeFilter LotSizeFilter `json:"lot_size_filter"`
}
SymbolsResult :
type TestClient ¶
type TestClient struct {
*Client
}
TestClient :
func (*TestClient) WithAuthFromEnv ¶
func (c *TestClient) WithAuthFromEnv() *TestClient
WithAuthFromEnv :
type TestWebSocketClient ¶
type TestWebSocketClient struct {
*WebSocketClient
}
TestWebSocketClient :
func NewTestWebsocketClient ¶
func NewTestWebsocketClient() *TestWebSocketClient
NewTestWebsocketClient :
func (*TestWebSocketClient) WithAuthFromEnv ¶
func (c *TestWebSocketClient) WithAuthFromEnv() *TestWebSocketClient
WithAuthFromEnv :
type TickersResponse ¶
type TickersResponse struct {
CommonResponse `json:",inline"`
Result []TickersResult `json:"result"`
}
TickersResponse :
type TickersResult ¶
type TickersResult struct {
Symbol SymbolFuture `json:"symbol"`
BidPrice string `json:"bid_price"`
AskPrice string `json:"ask_price"`
LastPrice string `json:"last_price"`
LastTickDirection TickDirection `json:"last_tick_direction"`
PrevPrice24h string `json:"prev_price_24h"`
Price24hPcnt string `json:"price_24h_pcnt"`
HighPrice24h string `json:"high_price_24h"`
LowPrice24h string `json:"low_price_24h"`
PrevPrice1h string `json:"prev_price_1h"`
Price1hPcnt string `json:"price_1h_pcnt"`
MarkPrice string `json:"mark_price"`
IndexPrice string `json:"index_price"`
OpenInterest float64 `json:"open_interest"`
OpenValue string `json:"open_value"`
TotalTurnover string `json:"total_turnover"`
Turnover24h string `json:"turnover_24h"`
TotalVolume float64 `json:"total_volume"`
Volume24h float64 `json:"volume_24h"`
FundingRate string `json:"funding_rate"`
PredictedFundingRate string `json:"predicted_funding_rate"`
NextFundingTime string `json:"next_funding_time"`
CountdownHour float64 `json:"countdown_hour"`
}
TickersResult :
type TimeService ¶
type TimeService struct {
// contains filtered or unexported fields
}
TimeService :
func (*TimeService) GetServerTime ¶
func (s *TimeService) GetServerTime() (*GetServerTimeResponse, error)
GetServerTime :
type TimeServiceI ¶
type TimeServiceI interface {
GetServerTime() (*GetServerTimeResponse, error)
}
TimeServiceI :
type TradingRecordsParam ¶
type TradingRecordsParam struct {
Symbol SymbolFuture `url:"symbol"`
From *int `url:"from,omitempty"`
Limit *int `url:"limit,omitempty"`
}
TradingRecordsParam :
type TradingRecordsResponse ¶
type TradingRecordsResponse struct {
CommonResponse `json:",inline"`
Result []TradingRecordsResult `json:"result"`
}
TradingRecordsResponse :
type TradingRecordsResult ¶
type TradingRecordsResult struct {
ID float64 `json:"id"`
Symbol SymbolFuture `json:"symbol"`
Price float64 `json:"price"`
Qty float64 `json:"qty"`
Side Side `json:"side"`
Time string `json:"time"`
}
TradingRecordsResult :
type TradingStopParam ¶
type TradingStopParam struct {
Symbol SymbolFuture `json:"symbol"`
TakeProfit *float64 `json:"take_profit,omitempty"`
StopLoss *float64 `json:"stop_loss,omitempty"`
TrailingStop *float64 `json:"trailing_stop,omitempty"`
TpTriggerBy *TriggerByFuture `json:"tp_trigger_by,omitempty"`
SlTriggerBy *TriggerByFuture `json:"sl_trigger_by,omitempty"`
NewTrailingActive *float64 `json:"new_trailing_active,omitempty"`
SlSize *float64 `json:"sl_size,omitempty"`
TpSize *float64 `json:"tp_size,omitempty"`
}
TradingStopParam :
type TradingStopResponse ¶
type TradingStopResponse struct {
CommonResponse `json:",inline"`
Result TradingStopResult `json:"result"`
}
TradingStopResponse :
type TradingStopResult ¶
type TradingStopResult struct {
ID int `json:"id"`
UserID int `json:"user_id"`
Symbol SymbolFuture `json:"symbol"`
Side Side `json:"side"`
Size float64 `json:"size"`
PositionValue float64 `json:"position_value"`
EntryPrice float64 `json:"entry_price"`
RiskID int `json:"risk_id"`
AutoAddMargin float64 `json:"auto_add_margin"`
Leverage float64 `json:"leverage"`
PositionMargin float64 `json:"position_margin"`
LiqPrice float64 `json:"liq_price"`
BustPrice float64 `json:"bust_price"`
OccClosingFee float64 `json:"occ_closing_fee"`
OccFundingFee float64 `json:"occ_funding_fee"`
TakeProfit float64 `json:"take_profit"`
StopLoss float64 `json:"stop_loss"`
TrailingStop float64 `json:"trailing_stop"`
PositionStatus string `json:"position_status"`
DeleverageIndicator int `json:"deleverage_indicator"`
OcCalcData string `json:"oc_calc_data"`
OrderMargin float64 `json:"order_margin"`
WalletBalance float64 `json:"wallet_balance"`
RealisedPnl float64 `json:"realised_pnl"`
CumRealisedPnl float64 `json:"cum_realised_pnl"`
CumCommission float64 `json:"cum_commission"`
CrossSeq float64 `json:"cross_seq"`
PositionSeq float64 `json:"position_seq"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ExtFields map[string]interface{} `json:"ext_fields"`
}
TradingStopResult :
type USDCContractOptionService ¶
type USDCContractOptionService struct {
// contains filtered or unexported fields
}
USDCContractOptionService :
type USDCContractPerpetualService ¶
type USDCContractPerpetualService struct {
// contains filtered or unexported fields
}
USDCContractPerpetualService :
type USDCContractService ¶
type USDCContractService struct {
// contains filtered or unexported fields
}
USDCContractService :
func (*USDCContractService) Option ¶
func (s *USDCContractService) Option() *USDCContractOptionService
Option :
func (*USDCContractService) Perpetual ¶
func (s *USDCContractService) Perpetual() *USDCContractPerpetualService
Perpetual :
type USDCContractServiceI ¶
type USDCContractServiceI interface {
Option() *USDCContractOptionService
Perpetual() *USDCContractPerpetualService
}
USDCContractServiceI :
type V5APIKeyResponse ¶
type V5APIKeyResponse struct {
CommonV5Response `json:",inline"`
Result V5ApiKeyResult `json:"result"`
}
V5APIKeyResponse :
type V5AccountInfoResult ¶
type V5AccountInfoResult struct {
MarginMode MarginMode `json:"marginMode"`
UpdatedTime string `json:"updatedTime"`
UnifiedMarginStatus UnifiedMarginStatus `json:"unifiedMarginStatus"`
}
V5AccountInfoResult :
type V5AccountService ¶
type V5AccountService struct {
// contains filtered or unexported fields
}
V5AccountService :
func (*V5AccountService) GetAccountInfo ¶
func (s *V5AccountService) GetAccountInfo() (*V5GetAccountInfoResponse, error)
GetAccountInfo :
func (*V5AccountService) GetCollateralInfo ¶
func (s *V5AccountService) GetCollateralInfo(param V5GetCollateralInfoParam) (*V5GetCollateralInfoResponse, error)
GetCollateralInfo :
func (*V5AccountService) GetTransactionLog ¶
func (s *V5AccountService) GetTransactionLog(param V5GetTransactionLogParam) (*V5GetTransactionLogResponse, error)
GetTransactionLog :
func (*V5AccountService) GetWalletBalance ¶
func (s *V5AccountService) GetWalletBalance(at AccountTypeV5, coins []Coin) (*V5GetWalletBalanceResponse, error)
GetWalletBalance :
at: UNIFIED, CONTRACT, SPOT
coin: If not passed, it returns non-zero asset info You can pass multiple coins to query, separated by comma. "USDT,USDC".
func (*V5AccountService) SetCollateralCoin ¶
func (s *V5AccountService) SetCollateralCoin(param V5SetCollateralCoinParam) (*V5SetCollateralCoinResponse, error)
SetCollateralCoin :
type V5AccountServiceI ¶
type V5AccountServiceI interface {
GetWalletBalance(AccountTypeV5, []Coin) (*V5GetWalletBalanceResponse, error)
SetCollateralCoin(V5SetCollateralCoinParam) (*V5SetCollateralCoinResponse, error)
GetCollateralInfo(V5GetCollateralInfoParam) (*V5GetCollateralInfoResponse, error)
GetAccountInfo() (*V5GetAccountInfoResponse, error)
GetTransactionLog(V5GetTransactionLogParam) (*V5GetTransactionLogResponse, error)
}
V5AccountServiceI :
type V5AmendOrderParam ¶
type V5AmendOrderParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
OrderID *string `json:"orderId,omitempty"`
OrderLinkID *string `json:"orderLinkId,omitempty"`
OrderIv *string `json:"orderIv,omitempty"`
TriggerPrice *string `json:"triggerPrice,omitempty"`
Qty *string `json:"qty,omitempty"`
Price *string `json:"price,omitempty"`
TakeProfit *string `json:"takeProfit,omitempty"`
StopLoss *string `json:"stopLoss,omitempty"`
TpTriggerBy *TriggerBy `json:"tpTriggerBy,omitempty"`
SlTriggerBy *TriggerBy `json:"slTriggerBy,omitempty"`
TriggerBy *TriggerBy `json:"triggerBy,omitempty"`
}
V5AmendOrderParam :
type V5AmendOrderResponse ¶
type V5AmendOrderResponse struct {
CommonV5Response `json:",inline"`
Result V5AmendOrderResult `json:"result"`
}
V5AmendOrderResponse :
type V5AmendOrderResult ¶
type V5AmendOrderResult struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
}
V5AmendOrderResult :
type V5ApiKeyResult ¶
type V5ApiKeyResult struct {
ID string `json:"id"`
Note string `json:"note"`
APIKey string `json:"apiKey"`
ReadOnly int `json:"readOnly"`
Secret string `json:"secret"`
Permissions struct {
ContractTrade []string `json:"ContractTrade"`
Spot []string `json:"Spot"`
Wallet []string `json:"Wallet"`
Options []string `json:"Options"`
Derivatives []string `json:"Derivatives"`
CopyTrading []string `json:"CopyTrading"`
BlockTrade []string `json:"BlockTrade"`
Exchange []string `json:"Exchange"`
Nft []string `json:"NFT"`
} `json:"permissions"`
Ips []string `json:"ips"`
Type int `json:"type"`
DeadlineDay int `json:"deadlineDay"`
ExpiredAt time.Time `json:"expiredAt"`
CreatedAt time.Time `json:"createdAt"`
Unified int `json:"unified"`
Uta int `json:"uta"`
UserID int `json:"userID"`
InviterID int `json:"inviterID"`
VipLevel string `json:"vipLevel"`
MktMakerLevel string `json:"mktMakerLevel"`
AffiliateID int `json:"affiliateID"`
}
V5ApiKeyResult :
type V5AssetService ¶
type V5AssetService struct {
// contains filtered or unexported fields
}
V5AssetService :
func (*V5AssetService) CreateInternalTransfer ¶
func (s *V5AssetService) CreateInternalTransfer(param V5CreateInternalTransferParam) (*V5CreateInternalTransferResponse, error)
CreateInternalTransfer :
func (*V5AssetService) CreateUniversalTransfer ¶
func (s *V5AssetService) CreateUniversalTransfer(param V5CreateUniversalTransferParam) (*V5CreateUniversalTransferResponse, error)
func (*V5AssetService) ExchangeConvertExecute ¶
func (s *V5AssetService) ExchangeConvertExecute(param V5ExchangeConvertExecuteParam) (*V5ExchangeConvertExecuteResponse, error)
func (*V5AssetService) ExchangeConvertResultQuery ¶
func (s *V5AssetService) ExchangeConvertResultQuery(param V5ExchangeConvertResultQueryParam) (*V5ExchangeConvertResultQueryResponse, error)
func (*V5AssetService) ExchangeQuoteApply ¶
func (s *V5AssetService) ExchangeQuoteApply(param V5ExchangeQuoteApplyParam) (*V5ExchangeQuoteApplyResponse, error)
func (*V5AssetService) GetAllCoinsBalance ¶
func (s *V5AssetService) GetAllCoinsBalance(param V5GetAllCoinsBalanceParam) (*V5GetAllCoinsBalanceResponse, error)
GetAllCoinsBalance : https://bybit-exchange.github.io/docs/v5/asset/all-balance
func (*V5AssetService) GetCoinInfo ¶
func (s *V5AssetService) GetCoinInfo(param V5GetCoinInfoParam) (*V5GetCoinInfoResponse, error)
GetCoinInfo :
func (*V5AssetService) GetDepositRecords ¶
func (s *V5AssetService) GetDepositRecords(param V5GetDepositRecordsParam) (*V5GetDepositRecordsResponse, error)
GetDepositRecords :
func (*V5AssetService) GetInternalDepositRecords ¶
func (s *V5AssetService) GetInternalDepositRecords(param V5GetInternalDepositRecordsParam) (*V5GetInternalDepositRecordsResponse, error)
GetInternalDepositRecords :
func (*V5AssetService) GetInternalTransferRecords ¶
func (s *V5AssetService) GetInternalTransferRecords(param V5GetInternalTransferRecordsParam) (*V5GetInternalTransferRecordsResponse, error)
GetInternalTransferRecords :
func (*V5AssetService) GetMasterDepositAddress ¶
func (s *V5AssetService) GetMasterDepositAddress(param V5GetMasterDepositAddressParam) (*V5GetMasterDepositAddressResponse, error)
func (*V5AssetService) GetSubDepositRecords ¶
func (s *V5AssetService) GetSubDepositRecords(param V5GetSubDepositRecordsParam) (*V5GetSubDepositRecordsResponse, error)
GetSubDepositRecords :
func (*V5AssetService) GetUniversalTransferRecords ¶
func (s *V5AssetService) GetUniversalTransferRecords(param V5GetUniversalTransferRecordsParam) (*V5GetUniversalTransferRecordsResponse, error)
func (*V5AssetService) GetWithdrawalRecords ¶
func (s *V5AssetService) GetWithdrawalRecords(param V5GetWithdrawalRecordsParam) (*V5GetWithdrawalRecordsResponse, error)
GetWithdrawalRecords :
func (*V5AssetService) Withdraw ¶
func (s *V5AssetService) Withdraw(param V5WithdrawParam) (*V5WithdrawResponse, error)
type V5AssetServiceI ¶
type V5AssetServiceI interface {
CreateInternalTransfer(V5CreateInternalTransferParam) (*V5CreateInternalTransferResponse, error)
GetInternalTransferRecords(V5GetInternalTransferRecordsParam) (*V5GetInternalTransferRecordsResponse, error)
CreateUniversalTransfer(V5CreateUniversalTransferParam) (*V5CreateUniversalTransferResponse, error)
GetUniversalTransferRecords(V5GetUniversalTransferRecordsParam) (*V5GetUniversalTransferRecordsResponse, error)
GetDepositRecords(V5GetDepositRecordsParam) (*V5GetDepositRecordsResponse, error)
GetSubDepositRecords(V5GetSubDepositRecordsParam) (*V5GetSubDepositRecordsResponse, error)
GetInternalDepositRecords(V5GetInternalDepositRecordsParam) (*V5GetInternalDepositRecordsResponse, error)
GetMasterDepositAddress(V5GetMasterDepositAddressParam) (*V5GetMasterDepositAddressResponse, error)
GetWithdrawalRecords(V5GetWithdrawalRecordsParam) (*V5GetWithdrawalRecordsResponse, error)
GetCoinInfo(V5GetCoinInfoParam) (*V5GetCoinInfoResponse, error)
GetAllCoinsBalance(V5GetAllCoinsBalanceParam) (*V5GetAllCoinsBalanceResponse, error)
Withdraw(param V5WithdrawParam) (*V5WithdrawResponse, error)
ExchangeQuoteApply(param V5ExchangeQuoteApplyParam) (*V5ExchangeQuoteApplyResponse, error)
ExchangeConvertExecute(param V5ExchangeConvertExecuteParam) (*V5ExchangeConvertExecuteResponse, error)
ExchangeConvertResultQuery(param V5ExchangeConvertResultQueryParam) (*V5ExchangeConvertResultQueryResponse, error)
}
V5AssetServiceI :
type V5CancelAllOrdersLinearInverseOptionResult ¶
type V5CancelAllOrdersLinearInverseOptionResult struct {
List []struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
} `json:"list"`
}
V5CancelAllOrdersLinearInverseOptionResult :
type V5CancelAllOrdersParam ¶
type V5CancelAllOrdersParam struct {
Category CategoryV5 `json:"category"`
Symbol *SymbolV5 `json:"symbol,omitempty"`
BaseCoin *Coin `json:"baseCoin,omitempty"`
SettleCoin *Coin `json:"settleCoin,omitempty"`
OrderFilter *OrderFilter `json:"orderFilter,omitempty"` // If not passed, Order by default
}
V5CancelAllOrdersParam : If you pass multiple of these params, the system will process one of param, which priority is symbol > baseCoin > settleCoin.
type V5CancelAllOrdersResponse ¶
type V5CancelAllOrdersResponse struct {
CommonV5Response `json:",inline"`
Result V5CancelAllOrdersResult `json:"result"`
}
V5CancelAllOrdersResponse :
type V5CancelAllOrdersResult ¶
type V5CancelAllOrdersResult struct {
LinearInverseOption *V5CancelAllOrdersLinearInverseOptionResult
Spot *V5CancelAllOrdersSpotResult
}
V5CancelAllOrdersResult :
func (*V5CancelAllOrdersResult) UnmarshalJSON ¶
func (r *V5CancelAllOrdersResult) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5CancelAllOrdersSpotResult ¶
type V5CancelAllOrdersSpotResult struct {
Success string `json:"success"` // 1: success, 0: fail
}
V5CancelAllOrdersSpotResult :
type V5CancelOrderParam ¶
type V5CancelOrderParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
OrderID *string `json:"orderId,omitempty"`
OrderLinkID *string `json:"orderLinkId,omitempty"`
OrderFilter *OrderFilter `json:"orderFilter,omitempty"` // If not passed, Order by default
}
V5CancelOrderParam :
type V5CancelOrderResponse ¶
type V5CancelOrderResponse struct {
CommonV5Response `json:",inline"`
Result V5CancelOrderResult `json:"result"`
}
V5CancelOrderResponse :
type V5CancelOrderResult ¶
type V5CancelOrderResult struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
}
V5CancelOrderResult :
type V5CreateInternalTransferParam ¶
type V5CreateInternalTransferParam struct {
TransferID string `json:"transferId"`
Coin Coin `json:"coin"`
Amount string `json:"amount"`
FromAccountType AccountTypeV5 `json:"fromAccountType"`
ToAccountType AccountTypeV5 `json:"toAccountType"`
}
V5CreateInternalTransferParam :
type V5CreateInternalTransferResponse ¶
type V5CreateInternalTransferResponse struct {
CommonV5Response `json:",inline"`
Result V5CreateInternalTransferResult `json:"result"`
}
V5CreateInternalTransferResponse :
type V5CreateInternalTransferResult ¶
type V5CreateInternalTransferResult struct {
TransferID string `json:"transferId"`
}
V5CreateInternalTransferResult :
type V5CreateOrderParam ¶
type V5CreateOrderParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
Side Side `json:"side"`
OrderType OrderType `json:"orderType"`
Qty string `json:"qty"`
IsLeverage *IsLeverage `json:"isLeverage,omitempty"`
Price *string `json:"price,omitempty"`
TriggerDirection *TriggerDirection `json:"triggerDirection,omitempty"`
OrderFilter *OrderFilter `json:"orderFilter,omitempty"` // If not passed, Order by default
TriggerPrice *string `json:"triggerPrice,omitempty"`
TriggerBy *TriggerBy `json:"triggerBy,omitempty"`
OrderIv *string `json:"orderIv,omitempty"` // option only.
TimeInForce *TimeInForce `json:"timeInForce,omitempty"` // If not passed, GTC is used by default
PositionIdx *PositionIdx `json:"positionIdx,omitempty"` // Under hedge-mode, this param is required
OrderLinkID *string `json:"orderLinkId,omitempty"`
TakeProfit *string `json:"takeProfit,omitempty"`
StopLoss *string `json:"stopLoss,omitempty"`
TpTriggerBy *TriggerBy `json:"tpTriggerBy,omitempty"`
SlTriggerBy *TriggerBy `json:"slTriggerBy,omitempty"`
ReduceOnly *bool `json:"reduce_only,omitempty"`
CloseOnTrigger *bool `json:"closeOnTrigger,omitempty"`
SmpType *string `json:"smpType,omitempty"`
MarketMakerProtection *bool `json:"mmp,omitempty"` // option only
TpSlMode *TpSlMode `json:"tpslMode,omitempty"`
TpLimitPrice *string `json:"tpLimitPrice,omitempty"`
SlLimitPrice *string `json:"slLimitPrice,omitempty"`
TpOrderType *OrderType `json:"tpOrderType,omitempty"`
SlOrderType *OrderType `json:"slOrderType,omitempty"`
MarketUnit *MarketUnit `json:"marketUnit,omitempty"` // The unit for qty when create Spot market orders for UTA account.
}
V5CreateOrderParam :
type V5CreateOrderResponse ¶
type V5CreateOrderResponse struct {
CommonV5Response `json:",inline"`
Result V5CreateOrderResult `json:"result"`
}
V5CreateOrderResponse :
type V5CreateOrderResult ¶
type V5CreateOrderResult struct {
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
}
V5CreateOrderResult :
type V5CreateUniversalTransferParam ¶
type V5CreateUniversalTransferParam struct {
TransferID string `json:"transferId"`
Coin Coin `json:"coin"`
Amount string `json:"amount"`
FromAccountType AccountTypeV5 `json:"fromAccountType"`
ToAccountType AccountTypeV5 `json:"toAccountType"`
FromMemberID int `json:"fromMemberId"`
ToMemberID int `json:"toMemberId"`
}
type V5CreateUniversalTransferResponse ¶
type V5CreateUniversalTransferResponse struct {
CommonV5Response `json:",inline"`
Result V5CreateInternalTransferResult `json:"result"`
}
type V5CreateUniversalTransferResult ¶
type V5CreateUniversalTransferResult struct {
TransferID string `json:"transferId"`
}
type V5ExchangeConvertExecuteParam ¶
type V5ExchangeConvertExecuteParam struct {
QuoteTxId string `json:"quoteTxId"`
}
V5ExchangeConvertExecuteParam :
type V5ExchangeConvertExecuteResponse ¶
type V5ExchangeConvertExecuteResponse struct {
CommonV5Response `json:",inline"`
Result V5ExchangeConvertExecuteResult `json:"result"`
}
V5ExchangeConvertExecuteResponse :
type V5ExchangeConvertExecuteResult ¶
type V5ExchangeConvertExecuteResult struct {
ExchangeStatus string `json:"exchangeStatus"`
QuoteTxId string `json:"quoteTxId"`
}
V5ExchangeConvertExecuteResult :
type V5ExchangeConvertResultQueryParam ¶
type V5ExchangeConvertResultQueryParam struct {
QuoteTxId *string `url:"quoteTxId"`
AccountType ConvertAccountTypeV5 `url:"accountType"`
}
V5ExchangeConvertResultQueryParam :
type V5ExchangeConvertResultQueryResponse ¶
type V5ExchangeConvertResultQueryResponse struct {
CommonV5Response `json:",inline"`
Result V5ExchangeConvertResultQueryResult `json:"result"`
}
V5ExchangeConvertResultQueryResponse :
type V5ExchangeConvertResultQueryResult ¶
type V5ExchangeConvertResultQueryResult struct {
Result struct {
AccountType string `json:"accountType"`
ExchangeTxId string `json:"exchangeTxId"`
UserId string `json:"userId"`
FromCoin string `json:"fromCoin"`
FromCoinType string `json:"fromCoinType"`
FromAmount string `json:"fromAmount"`
ToCoin string `json:"toCoin"`
ToCoinType string `json:"toCoinType"`
ToAmount string `json:"toAmount"`
ExchangeStatus string `json:"exchangeStatus"`
ExtInfo interface{} `json:"extInfo"`
ConvertRate string `json:"convertRate"`
CreatedAt string `json:"createdAt"`
} `json:"result"`
}
V5ExchangeConvertResultQueryResult :
type V5ExchangeQuoteApplyParam ¶
type V5ExchangeQuoteApplyParam struct {
FromCoin string `json:"fromCoin"`
ToCoin string `json:"toCoin"`
FromCoinType *string `json:"fromCoinType"`
ToCoinType *string `json:"toCoinType"`
RequestCoin string `json:"requestCoin"`
RequestAmount string `json:"requestAmount"`
AccountType ConvertAccountTypeV5 `json:"accountType"`
RequestId *string `json:"requestId"`
}
V5ExchangeQuoteApplyParam :
type V5ExchangeQuoteApplyResponse ¶
type V5ExchangeQuoteApplyResponse struct {
CommonV5Response `json:",inline"`
Result V5ExchangeQuoteApplyResult `json:"result"`
}
V5ExchangeQuoteApplyResponse :
type V5ExchangeQuoteApplyResult ¶
type V5ExchangeQuoteApplyResult struct {
QuoteTxId string `json:"quoteTxId"`
ExchangeRate string `json:"exchangeRate"`
FromCoin string `json:"fromCoin"`
FromCoinType string `json:"fromCoinType"`
ToCoin string `json:"toCoin"`
ToCoinType string `json:"toCoinType"`
FromAmount string `json:"fromAmount"`
ToAmount string `json:"toAmount"`
ExpiredTime string `json:"expiredTime"`
RequestId string `json:"requestId"`
}
V5ExchangeQuoteApplyResult :
type V5ExecutionService ¶
type V5ExecutionService struct {
// contains filtered or unexported fields
}
V5ExecutionService :
func (*V5ExecutionService) GetExecutionList ¶
func (s *V5ExecutionService) GetExecutionList(param V5GetExecutionParam) (*V5GetExecutionListResponse, error)
type V5ExecutionServiceI ¶
type V5ExecutionServiceI interface {
GetExecutionList(V5GetExecutionParam) (*V5GetExecutionListResponse, error)
}
V5ExecutionServiceI :
type V5GetAccountInfoResponse ¶
type V5GetAccountInfoResponse struct {
CommonV5Response `json:",inline"`
Result V5AccountInfoResult `json:"result"`
}
V5GetAccountInfoResponse :
type V5GetAllCoinsBalanceBalance ¶
type V5GetAllCoinsBalanceBalance struct {
Coin Coin `json:"coin"`
TransferBalance string `json:"transferBalance"`
WalletBalance string `json:"walletBalance"`
Bonus string `json:"bonus"`
}
V5GetAllCoinsBalanceBalance :
type V5GetAllCoinsBalanceParam ¶
type V5GetAllCoinsBalanceParam struct {
AccountType AccountTypeV5 `url:"accountType"`
MemberID string `url:"memberId,omitempty"`
WithBonus string `url:"withBonus,omitempty"`
Coins []Coin
}
V5GetAllCoinsBalanceParam :
type V5GetAllCoinsBalanceResponse ¶
type V5GetAllCoinsBalanceResponse struct {
CommonV5Response `json:",inline"`
Result V5GetAllCoinsBalanceResult `json:"result"`
}
V5GetAllCoinsBalanceResponse :
type V5GetAllCoinsBalanceResult ¶
type V5GetAllCoinsBalanceResult struct {
MemberID string `json:"memberId"`
AccountType AccountTypeV5 `json:"accountType"`
Balance []*V5GetAllCoinsBalanceBalance `json:"balance"`
}
V5GetAllCoinsBalanceResult :
type V5GetClosedPnLItem ¶
type V5GetClosedPnLItem struct {
Symbol SymbolV5 `json:"symbol"`
OrderID string `json:"orderId"`
Side Side `json:"side"`
Qty string `json:"qty"`
OrderPrice string `json:"orderPrice"`
OrderType OrderType `json:"orderType"`
ExecType ExecTypeV5 `json:"execType"`
ClosedSize string `json:"closedSize"`
CumEntryValue string `json:"cumEntryValue"`
AvgEntryPrice string `json:"avgEntryPrice"`
CumExitValue string `json:"cumExitValue"`
AvgExitPrice string `json:"avgExitPrice"`
ClosedPnl string `json:"closedPnl"`
FillCount string `json:"fillCount"`
Leverage string `json:"leverage"`
CreatedTime string `json:"createdTime"`
UpdatedTime string `json:"updatedTime"`
}
V5GetClosedPnLItem :
type V5GetClosedPnLParam ¶
type V5GetClosedPnLParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 100]. Default: 50
Cursor *string `url:"cursor,omitempty"`
}
V5GetClosedPnLParam :
type V5GetClosedPnLResponse ¶
type V5GetClosedPnLResponse struct {
CommonV5Response `json:",inline"`
Result V5GetClosedPnLResult `json:"result"`
}
V5GetClosedPnLResponse :
type V5GetClosedPnLResult ¶
type V5GetClosedPnLResult struct {
Category CategoryV5 `json:"category"`
NextPageCursor string `json:"nextPageCursor"`
List V5GetClosedPnLList `json:"list"`
}
V5GetClosedPnLResult :
type V5GetCoinInfoChain ¶
type V5GetCoinInfoChain struct {
Chain string `json:"chain"`
ChainType string `json:"chainType"`
Confirmation string `json:"confirmation"`
WithdrawFee string `json:"withdrawFee"`
DepositMin string `json:"depositMin"`
WithdrawMin string `json:"withdrawMin"`
MinAccuracy string `json:"minAccuracy"`
ChainDeposit string `json:"chainDeposit"`
ChainWithdraw string `json:"chainWithdraw"`
WithdrawPercentageFee string `json:"withdrawPercentageFee"`
}
V5GetCoinInfoChain :
type V5GetCoinInfoParam ¶
type V5GetCoinInfoParam struct {
Coin *Coin `url:"coin,omitempty"`
}
V5GetCoinInfoParam :
type V5GetCoinInfoResponse ¶
type V5GetCoinInfoResponse struct {
CommonV5Response `json:",inline"`
Result V5GetCoinInfoResult `json:"result"`
}
V5GetCoinInfoResponse :
type V5GetCoinInfoResult ¶
type V5GetCoinInfoResult struct {
Rows V5GetCoinInfoRows `json:"rows"`
}
V5GetCoinInfoResult :
type V5GetCoinInfoRow ¶
type V5GetCoinInfoRow struct {
Name string `json:"name"`
Coin Coin `json:"coin"`
RemainAmount string `json:"remainAmount"`
Chains V5GetCoinInfoChains `json:"chains"`
}
V5GetCoinInfoRow :
type V5GetCollateralInfoList ¶
type V5GetCollateralInfoList struct {
Currency string `json:"currency"`
HourlyBorrowRate string `json:"hourlyBorrowRate"`
MaxBorrowingAmount string `json:"maxBorrowingAmount"`
FreeBorrowingLimit string `json:"freeBorrowingLimit"`
FreeBorrowAmount string `json:"freeBorrowAmount"`
BorrowAmount string `json:"borrowAmount"`
FreeBorrowingAmount string `json:"freeBorrowingAmount"`
AvailableToBorrow string `json:"availableToBorrow"`
Borrowable bool `json:"borrowable"`
BorrowUsageRate string `json:"borrowUsageRate"`
MarginCollateral bool `json:"marginCollateral"`
CollateralSwitch bool `json:"collateralSwitch"`
CollateralRatio string `json:"collateralRatio"`
}
V5GetCollateralInfoList :
type V5GetCollateralInfoParam ¶
type V5GetCollateralInfoParam struct {
Currency *string `url:"currency,omitempty"`
}
V5GetCollateralInfoParam :
type V5GetCollateralInfoResponse ¶
type V5GetCollateralInfoResponse struct {
CommonV5Response `json:",inline"`
Result V5GetCollateralInfoResult
}
V5GetCollateralInfoResponse :
type V5GetCollateralInfoResult ¶
type V5GetCollateralInfoResult struct {
List []V5GetCollateralInfoList `json:"list"`
}
V5GetCollateralInfoResult :
type V5GetDepositRecordsParam ¶
type V5GetDepositRecordsParam struct {
Coin *Coin `url:"coin,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // Start time (ms). Default value: 30 days before the current time
EndTime *int64 `url:"endTime,omitempty"` // End time (ms). Default value: current time
Limit *int `url:"limit,omitempty"` // Number of items per page, [1, 50]. Default value: 50
Cursor *string `url:"cursor,omitempty"`
}
V5GetDepositRecordsParam :
type V5GetDepositRecordsResponse ¶
type V5GetDepositRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetDepositRecordsResult `json:"result"`
}
V5GetDepositRecordsResponse :
type V5GetDepositRecordsResult ¶
type V5GetDepositRecordsResult struct {
Rows V5GetDepositRecordsRows `json:"rows"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetDepositRecordsResult :
type V5GetDepositRecordsRow ¶
type V5GetDepositRecordsRow struct {
Coin Coin `json:"coin"`
Chain string `json:"chain"`
Amount string `json:"amount"`
TxID string `json:"txID"`
Status DepositStatusV5 `json:"status"`
ToAddress string `json:"toAddress"`
Tag string `json:"tag"`
DepositFee string `json:"depositFee"`
SuccessAt string `json:"successAt"`
Confirmations string `json:"confirmations"`
TxIndex string `json:"txIndex"`
BlockHash string `json:"blockHash"`
}
V5GetDepositRecordsRow :
type V5GetDepositRecordsRows ¶
type V5GetDepositRecordsRows []V5GetDepositRecordsRow
V5GetDepositRecordsRows :
type V5GetExecutionListItem ¶
type V5GetExecutionListItem struct {
Symbol SymbolV5 `json:"symbol"`
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
Side Side `json:"side"`
OrderPrice string `json:"orderPrice"`
OrderQty string `json:"orderQty"`
LeavesQty string `json:"leavesQty"`
OrderType OrderType `json:"orderType"`
StopOrderType string `json:"stopOrderType"`
ExecFee string `json:"execFee"`
ExecID string `json:"execId"`
ExecPrice string `json:"execPrice"`
ExecQty string `json:"execQty"`
ExecType ExecTypeV5 `json:"execType"`
ExecValue string `json:"execValue"`
ExecTime string `json:"execTime"`
IsMaker bool `json:"isMaker"`
FeeRate string `json:"feeRate"`
TradeIv string `json:"tradeIv"`
MarkIv string `json:"markIv"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
UnderlyingPrice string `json:"underlyingPrice"`
BlockTradeID string `json:"blockTradeId"`
ClosedSize string `json:"closedSize"`
}
V5GetExecutionListItem :
type V5GetExecutionListResponse ¶
type V5GetExecutionListResponse struct {
CommonV5Response `json:",inline"`
Result V5GetExecutionListResult `json:"result"`
}
V5GetExecutionListResponse :
type V5GetExecutionListResult ¶
type V5GetExecutionListResult struct {
NextPageCursor string `json:"nextPageCursor"`
Category string `json:"category"`
List []V5GetExecutionListItem `json:"list"`
}
V5GetExecutionListResult :
type V5GetExecutionParam ¶
type V5GetExecutionParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
StartTime *int `url:"startTime,omitempty"`
EndTime *int `url:"endTime,omitempty"`
ExecType *ExecTypeV5 `url:"execType,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
V5GetExecutionParam :
type V5GetFundingRateHistoryParam ¶
type V5GetFundingRateHistoryParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
}
V5GetFundingRateHistoryParam :
type V5GetFundingRateHistoryResponse ¶
type V5GetFundingRateHistoryResponse struct {
CommonV5Response `json:",inline"`
Result V5GetFundingRateHistoryResult `json:"result"`
}
V5GetFundingRateHistoryResponse :
type V5GetFundingRateHistoryResult ¶
type V5GetFundingRateHistoryResult struct {
Category CategoryV5 `json:"category"`
List []V5GetFundingRateHistoryItem `json:"list"`
}
V5GetFundingRateHistoryResult :
type V5GetHistoricalVolatilityListItem ¶
type V5GetHistoricalVolatilityListItem struct {
Period int `json:"period"`
Value string `json:"value"`
Time string `json:"time"`
}
V5GetHistoricalVolatilityListItem :
type V5GetHistoricalVolatilityParam ¶
type V5GetHistoricalVolatilityParam struct {
Category CategoryV5 `url:"category"` // option only
BaseCoin *Coin `url:"baseCoin,omitempty"`
Period *int `url:"period,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
}
V5GetHistoricalVolatilityParam :
type V5GetHistoricalVolatilityResponse ¶
type V5GetHistoricalVolatilityResponse struct {
CommonV5Response `json:",inline"`
Result V5GetHistoricalVolatilityResult `json:"result"`
}
V5GetHistoricalVolatilityResponse :
func (*V5GetHistoricalVolatilityResponse) UnmarshalJSON ¶
func (r *V5GetHistoricalVolatilityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON : Because the response structure is different from others
type V5GetHistoricalVolatilityResult ¶
type V5GetHistoricalVolatilityResult struct {
Category CategoryV5 `json:"category"`
List []V5GetHistoricalVolatilityListItem `json:"list"`
}
V5GetHistoricalVolatilityResult :
type V5GetHistoryOrdersParam ¶
type V5GetHistoryOrdersParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
OrderFilter *OrderFilter `url:"orderFilter,omitempty"` // If not passed, Order by default
OrderStatus *OrderStatus `url:"orderStatus,omitempty"`
StartTime *int `url:"startTime,omitempty"`
EndTime *int `url:"endTime,omitempty"`
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
V5GetGetHistoryOrderssParam :
type V5GetIndexPriceKlineItem ¶
type V5GetIndexPriceKlineItem struct {
StartTime string
Open string
High string
Low string
Close string
}
V5GetIndexPriceKlineItem :
type V5GetIndexPriceKlineList ¶
type V5GetIndexPriceKlineList []V5GetIndexPriceKlineItem
V5GetIndexPriceKlineList :
func (*V5GetIndexPriceKlineList) UnmarshalJSON ¶
func (l *V5GetIndexPriceKlineList) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetIndexPriceKlineParam ¶
type V5GetIndexPriceKlineParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
Interval Interval `url:"interval"`
Start *int64 `url:"start,omitempty"` // timestamp point for result, in milliseconds
End *int64 `url:"end,omitempty"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
}
V5GetIndexPriceKlineParam :
type V5GetIndexPriceKlineResponse ¶
type V5GetIndexPriceKlineResponse struct {
CommonV5Response `json:",inline"`
Result V5GetIndexPriceKlineResult `json:"result"`
}
V5GetIndexPriceKlineResponse :
type V5GetIndexPriceKlineResult ¶
type V5GetIndexPriceKlineResult struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
List V5GetIndexPriceKlineList `json:"list"`
}
V5GetIndexPriceKlineResult :
type V5GetInstrumentsInfoLinearInverseItem ¶
type V5GetInstrumentsInfoLinearInverseItem struct {
Symbol SymbolV5 `json:"symbol"`
ContractType ContractType `json:"contractType"`
Status InstrumentStatus `json:"status"`
BaseCoin Coin `json:"baseCoin"`
QuoteCoin Coin `json:"quoteCoin"`
SettleCoin Coin `json:"settleCoin"`
LaunchTime string `json:"launchTime"`
DeliveryTime string `json:"deliveryTime"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
PriceScale string `json:"priceScale"`
LeverageFilter LinearInverseLeverageFilterV5 `json:"leverageFilter"`
PriceFilter LinearInversePriceFilterV5 `json:"priceFilter"`
LotSizeFilter LinearInverseLotSizeFilterV5 `json:"lotSizeFilter"`
UnifiedMarginTrade bool `json:"unifiedMarginTrade"`
FundingInterval int `json:"fundingInterval"`
}
type V5GetInstrumentsInfoLinearInverseResult ¶
type V5GetInstrumentsInfoLinearInverseResult struct {
Category CategoryV5 `json:"category"`
NextPageCursor string `json:"nextPageCursor"`
List []V5GetInstrumentsInfoLinearInverseItem `json:"list"`
}
V5GetInstrumentsInfoLinearInverseResult :
type V5GetInstrumentsInfoOptionItem ¶
type V5GetInstrumentsInfoOptionItem struct {
Symbol SymbolV5 `json:"symbol"`
OptionsType OptionsType `json:"optionsType"`
Status InstrumentStatus `json:"status"`
BaseCoin Coin `json:"baseCoin"`
QuoteCoin Coin `json:"quoteCoin"`
SettleCoin Coin `json:"settleCoin"`
LaunchTime string `json:"launchTime"`
DeliveryTime string `json:"deliveryTime"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
PriceFilter OptionPriceFilterV5 `json:"priceFilter"`
LotSizeFilter OptionLotSizeFilterV5 `json:"lotSizeFilter"`
}
type V5GetInstrumentsInfoOptionResult ¶
type V5GetInstrumentsInfoOptionResult struct {
Category CategoryV5 `json:"category"`
NextPageCursor string `json:"nextPageCursor"`
List []V5GetInstrumentsInfoOptionItem `json:"list"`
}
V5GetInstrumentsInfoOptionResult :
type V5GetInstrumentsInfoParam ¶
type V5GetInstrumentsInfoParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"` // Base coin. linear,inverse,option only
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 1000]. Default: 500
Cursor *string `url:"cursor,omitempty"`
}
V5GetInstrumentsInfoParam : Spot does not support pagination, so limit, cursor are invalid. When query by baseCoin, regardless of category=linear or inverse, the result will have Linear contract and Inverse contract symbols.
type V5GetInstrumentsInfoResponse ¶
type V5GetInstrumentsInfoResponse struct {
CommonV5Response `json:",inline"`
Result V5GetInstrumentsInfoResult `json:"result"`
}
V5GetInstrumentsInfoResponse :
type V5GetInstrumentsInfoResult ¶
type V5GetInstrumentsInfoResult struct {
LinearInverse *V5GetInstrumentsInfoLinearInverseResult
Option *V5GetInstrumentsInfoOptionResult
Spot *V5GetInstrumentsInfoSpotResult
}
V5GetInstrumentsInfoResult : Responses are filled according to category.
func (*V5GetInstrumentsInfoResult) UnmarshalJSON ¶
func (r *V5GetInstrumentsInfoResult) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetInstrumentsInfoSpotItem ¶
type V5GetInstrumentsInfoSpotItem struct {
Symbol SymbolV5 `json:"symbol"`
BaseCoin Coin `json:"baseCoin"`
QuoteCoin Coin `json:"quoteCoin"`
Innovation Innovation `json:"innovation"`
Status InstrumentStatus `json:"status"`
LotSizeFilter SpotLotSizeFilterV5 `json:"lotSizeFilter"`
PriceFilter SpotPriceFilterV5 `json:"priceFilter"`
}
type V5GetInstrumentsInfoSpotResult ¶
type V5GetInstrumentsInfoSpotResult struct {
Category CategoryV5 `json:"category"`
List []V5GetInstrumentsInfoSpotItem `json:"list"`
}
V5GetInstrumentsInfoSpotResult :
type V5GetInsuranceItem ¶
type V5GetInsuranceParam ¶
type V5GetInsuranceParam struct {
Coin *Coin `url:"coin"`
}
V5GetInsuranceParam :
type V5GetInsuranceResponse ¶
type V5GetInsuranceResponse struct {
CommonV5Response `json:",inline"`
Result V5GetInsuranceResult `json:"result"`
}
V5GetInsuranceResponse :
type V5GetInsuranceResult ¶
type V5GetInsuranceResult struct {
UpdatedTime string `json:"updatedTime"`
List []V5GetInsuranceItem `json:"list"`
}
V5GetInsuranceResult :
type V5GetInternalDepositRecordsParam ¶
type V5GetInternalDepositRecordsParam struct {
StartTime *int64 `url:"startTime,omitempty"` // Start time (ms). Default value: 30 days before the current time
EndTime *int64 `url:"endTime,omitempty"` // End time (ms). Default value: current time
Coin *Coin `url:"coin,omitempty"`
Cursor *string `url:"cursor,omitempty"`
Limit *int `url:"limit,omitempty"` // Number of items per page, [1, 50]. Default value: 50
}
V5GetInternalDepositRecordsParam :
type V5GetInternalDepositRecordsResponse ¶
type V5GetInternalDepositRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetInternalDepositRecordsResult `json:"result"`
}
V5GetInternalDepositRecordsResponse :
type V5GetInternalDepositRecordsResult ¶
type V5GetInternalDepositRecordsResult struct {
Rows V5GetInternalDepositRecordsRows `json:"rows"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetInternalDepositRecordsResult :
type V5GetInternalDepositRecordsRow ¶
type V5GetInternalDepositRecordsRow struct {
ID string `json:"id"`
Type string `json:"type"`
Coin Coin `json:"coin"`
Amount string `json:"amount"`
Status InternalDepositStatusV5 `json:"status"`
Address string `json:"address"` // Email address or phone number
CreatedTime string `json:"createdTime"`
}
V5GetInternalDepositRecordsRow :
type V5GetInternalDepositRecordsRows ¶
type V5GetInternalDepositRecordsRows []V5GetInternalDepositRecordsRow
V5GetInternalDepositRecordsRows :
type V5GetInternalTransferRecordsItem ¶
type V5GetInternalTransferRecordsItem struct {
TransferID string `json:"transferId"`
Coin Coin `json:"coin"`
Amount string `json:"amount"`
FromAccountType AccountTypeV5 `json:"fromAccountType"`
ToAccountType AccountTypeV5 `json:"toAccountType"`
Timestamp string `json:"timestamp"`
Status TransferStatusV5 `json:"status"`
}
V5GetInternalTransferRecordsItem :
type V5GetInternalTransferRecordsList ¶
type V5GetInternalTransferRecordsList []V5GetInternalTransferRecordsItem
V5GetInternalTransferRecordsList :
type V5GetInternalTransferRecordsParam ¶
type V5GetInternalTransferRecordsParam struct {
TransferID *string `url:"transferId,omitempty"`
Coin *Coin `url:"coin,omitempty"`
Status *TransferStatusV5 `url:"status,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 50]. Default: 20
Cursor *string `url:"cursor,omitempty"`
}
V5GetInternalTransferRecordsParam :
type V5GetInternalTransferRecordsResponse ¶
type V5GetInternalTransferRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetInternalTransferRecordsResult `json:"result"`
}
V5GetInternalTransferRecordsResponse :
type V5GetInternalTransferRecordsResult ¶
type V5GetInternalTransferRecordsResult struct {
List V5GetInternalTransferRecordsList `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetInternalTransferRecordsResult :
type V5GetKlineItem ¶
type V5GetKlineItem struct {
StartTime string
Open string
High string
Low string
Close string
Volume string
Turnover string
}
V5GetKlineItem :
type V5GetKlineList ¶
type V5GetKlineList []V5GetKlineItem
V5GetKlineList :
func (*V5GetKlineList) UnmarshalJSON ¶
func (l *V5GetKlineList) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetKlineParam ¶
type V5GetKlineParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
Interval Interval `url:"interval"`
Start *int64 `url:"start,omitempty"` // timestamp point for result, in milliseconds
End *int64 `url:"end,omitempty"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
}
V5GetKlineParam :
type V5GetKlineResponse ¶
type V5GetKlineResponse struct {
CommonV5Response `json:",inline"`
Result V5GetKlineResult `json:"result"`
}
V5GetKlineResponse :
type V5GetKlineResult ¶
type V5GetKlineResult struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
List V5GetKlineList `json:"list"`
}
V5GetKlineResult :
type V5GetMarkPriceKlineItem ¶
type V5GetMarkPriceKlineItem struct {
StartTime string
Open string
High string
Low string
Close string
}
V5GetMarkPriceKlineItem :
type V5GetMarkPriceKlineList ¶
type V5GetMarkPriceKlineList []V5GetMarkPriceKlineItem
V5GetMarkPriceKlineList :
func (*V5GetMarkPriceKlineList) UnmarshalJSON ¶
func (l *V5GetMarkPriceKlineList) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetMarkPriceKlineParam ¶
type V5GetMarkPriceKlineParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
Interval Interval `url:"interval"`
Start *int64 `url:"start,omitempty"` // timestamp point for result, in milliseconds
End *int64 `url:"end,omitempty"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
}
V5GetMarkPriceKlineParam :
type V5GetMarkPriceKlineResponse ¶
type V5GetMarkPriceKlineResponse struct {
CommonV5Response `json:",inline"`
Result V5GetMarkPriceKlineResult `json:"result"`
}
V5GetMarkPriceKlineResponse :
type V5GetMarkPriceKlineResult ¶
type V5GetMarkPriceKlineResult struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
List V5GetMarkPriceKlineList `json:"list"`
}
V5GetMarkPriceKlineResult :
type V5GetMasterDepositAddressResponse ¶
type V5GetMasterDepositAddressResponse struct {
CommonV5Response `json:",inline"`
Result V5GetMasterDepositAddressResult `json:"result"`
}
type V5GetMasterDepositAddressResult ¶
type V5GetMasterDepositAddressResult struct {
Coin Coin `json:"coin"`
Chains []V5GetMasterDepositAddressChain `json:"chains"`
}
type V5GetOpenInterestItem ¶
type V5GetOpenInterestParam ¶
type V5GetOpenInterestParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
IntervalTime Period `url:"intervalTime"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 50
Cursor *string `url:"cursor,omitempty"`
}
V5GetOpenInterestParam :
type V5GetOpenInterestResponse ¶
type V5GetOpenInterestResponse struct {
CommonV5Response `json:",inline"`
Result V5GetOpenInterestResult `json:"result"`
}
V5GetOpenInterestResponse :
type V5GetOpenInterestResult ¶
type V5GetOpenInterestResult struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
List []V5GetOpenInterestItem `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetOpenInterestResult :
type V5GetOpenOrdersParam ¶
type V5GetOpenOrdersParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
SettleCoin *Coin `url:"settleCoin,omitempty"`
OrderID *string `url:"orderId,omitempty"`
OrderLinkID *string `url:"orderLinkId,omitempty"`
OpenOnly *int `url:"openOnly,omitempty"`
OrderFilter *OrderFilter `url:"orderFilter,omitempty"` // If not passed, Order by default
Limit *int `url:"limit,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
V5GetOpenOrdersParam :
type V5GetOrder ¶
type V5GetOrder struct {
Symbol SymbolV5 `json:"symbol"`
OrderType OrderType `json:"orderType"`
OrderLinkID string `json:"orderLinkId"`
OrderID string `json:"orderId"`
CancelType string `json:"cancelType"`
AvgPrice string `json:"avgPrice"`
StopOrderType string `json:"stopOrderType"`
LastPriceOnCreated string `json:"lastPriceOnCreated"`
OrderStatus OrderStatus `json:"orderStatus"`
TakeProfit string `json:"takeProfit"`
CumExecValue string `json:"cumExecValue"`
TriggerDirection int `json:"triggerDirection"`
IsLeverage string `json:"isLeverage"`
RejectReason string `json:"rejectReason"`
Price string `json:"price"`
OrderIv string `json:"orderIv"`
CreatedTime string `json:"createdTime"`
TpTriggerBy string `json:"tpTriggerBy"`
PositionIdx int `json:"positionIdx"`
TimeInForce TimeInForce `json:"timeInForce"`
LeavesValue string `json:"leavesValue"`
UpdatedTime string `json:"updatedTime"`
Side Side `json:"side"`
TriggerPrice string `json:"triggerPrice"`
CumExecFee string `json:"cumExecFee"`
LeavesQty string `json:"leavesQty"`
SlTriggerBy string `json:"slTriggerBy"`
CloseOnTrigger bool `json:"closeOnTrigger"`
CumExecQty string `json:"cumExecQty"`
ReduceOnly bool `json:"reduceOnly"`
Qty string `json:"qty"`
StopLoss string `json:"stopLoss"`
TriggerBy TriggerBy `json:"triggerBy"`
}
type V5GetOrderbookBidAsk ¶
V5GetOrderbookBidAsk :
type V5GetOrderbookBidAsks ¶
type V5GetOrderbookBidAsks []V5GetOrderbookBidAsk
V5GetOrderbookBidAsks :
func (*V5GetOrderbookBidAsks) UnmarshalJSON ¶
func (b *V5GetOrderbookBidAsks) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetOrderbookParam ¶
type V5GetOrderbookParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
// spot: [1, 50]. Default: 1.
// linear&inverse: [1, 200]. Default: 25.
// option: [1, 25]. Default: 1.
Limit *int `url:"limit,omitempty"`
}
V5GetOrderbookParam :
type V5GetOrderbookResponse ¶
type V5GetOrderbookResponse struct {
CommonV5Response `json:",inline"`
Result V5GetOrderbookResult `json:"result"`
}
V5GetOrderbookResponse :
type V5GetOrderbookResult ¶
type V5GetOrderbookResult struct {
Symbol SymbolV5 `json:"s"`
Bids V5GetOrderbookBidAsks `json:"b"`
Asks V5GetOrderbookBidAsks `json:"a"`
Timestamp int64 `json:"ts"`
UpdateID int `json:"u"`
}
V5GetOrderbookResult :
type V5GetOrdersResponse ¶
type V5GetOrdersResponse struct {
CommonV5Response `json:",inline"`
Result V5GetOrdersResult `json:"result"`
}
V5GetOrdersResponse :
type V5GetOrdersResult ¶
type V5GetOrdersResult struct {
Category CategoryV5 `json:"category"`
NextPageCursor string `json:"nextPageCursor"`
List []V5GetOrder `json:"list"`
}
V5GetOrdersResult :
type V5GetPositionInfoItem ¶
type V5GetPositionInfoItem struct {
Symbol SymbolV5 `json:"symbol"`
Leverage string `json:"leverage"`
AvgPrice string `json:"avgPrice"`
LiqPrice string `json:"liqPrice"`
RiskLimitValue string `json:"riskLimitValue"`
TakeProfit string `json:"takeProfit"`
PositionValue string `json:"positionValue"`
TpSlMode TpSlMode `json:"tpslMode"`
RiskID int `json:"riskId"`
TrailingStop string `json:"trailingStop"`
UnrealisedPnl string `json:"unrealisedPnl"`
MarkPrice string `json:"markPrice"`
CumRealisedPnl string `json:"cumRealisedPnl"`
AdlRankIndicator AdlRankIndicator `json:"adlRankIndicator"`
IsReduceOnly bool `json:"isReduceOnly"`
MmrSysUpdatedTime string `json:"mmrSysUpdatedTime"`
LeverageSysUpdatedTime string `json:"leverageSysUpdatedTime"`
PositionMM string `json:"positionMM"`
PositionBalance string `json:"positionBalance"`
CreatedTime string `json:"createdTime"`
UpdatedTime string `json:"updatedTime"`
Seq int64 `json:"seq"`
PositionIdx int `json:"positionIdx"`
PositionIM string `json:"positionIM"`
Side Side `json:"side"`
BustPrice string `json:"bustPrice"`
Size string `json:"size"`
PositionStatus string `json:"positionStatus"`
StopLoss string `json:"stopLoss"`
TradeMode int `json:"tradeMode"`
AutoAddMargin int `json:"autoAddMargin"`
}
V5GetPositionInfoItem :
type V5GetPositionInfoList ¶
type V5GetPositionInfoList []V5GetPositionInfoItem
V5GetPositionInfoList :
type V5GetPositionInfoParam ¶
type V5GetPositionInfoParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"` // option only
SettleCoin *Coin `url:"settleCoin,omitempty"` // Settle coin. For linear & inverse, either symbol or settleCon is required. symbol has a higher priority
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
Cursor *string `url:"cursor,omitempty"` // Cursor. Used for pagination
}
V5GetPositionInfoParam :
type V5GetPositionInfoResponse ¶
type V5GetPositionInfoResponse struct {
CommonV5Response `json:",inline"`
Result V5GetPositionInfoResult `json:"result"`
}
V5GetPositionInfoResponse :
type V5GetPositionInfoResult ¶
type V5GetPositionInfoResult struct {
Category CategoryV5 `json:"category"`
NextPageCursor string `json:"nextPageCursor"`
List V5GetPositionInfoList `json:"list"`
}
V5GetPositionInfoResult :
type V5GetPremiumIndexPriceKlineItem ¶
type V5GetPremiumIndexPriceKlineItem struct {
StartTime string
Open string
High string
Low string
Close string
}
V5GetPremiumIndexPriceKlineItem :
type V5GetPremiumIndexPriceKlineList ¶
type V5GetPremiumIndexPriceKlineList []V5GetPremiumIndexPriceKlineItem
V5GetPremiumIndexPriceKlineList :
func (*V5GetPremiumIndexPriceKlineList) UnmarshalJSON ¶
func (l *V5GetPremiumIndexPriceKlineList) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetPremiumIndexPriceKlineParam ¶
type V5GetPremiumIndexPriceKlineParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
Interval Interval `url:"interval"`
Start *int64 `url:"start,omitempty"` // timestamp point for result, in milliseconds
End *int64 `url:"end,omitempty"` // timestamp point for result, in milliseconds
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 200]. Default: 200
}
V5GetPremiumIndexPriceKlineParam :
type V5GetPremiumIndexPriceKlineResponse ¶
type V5GetPremiumIndexPriceKlineResponse struct {
CommonV5Response `json:",inline"`
Result V5GetPremiumIndexPriceKlineResult `json:"result"`
}
V5GetPremiumIndexPriceKlineResponse :
type V5GetPremiumIndexPriceKlineResult ¶
type V5GetPremiumIndexPriceKlineResult struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
List V5GetPremiumIndexPriceKlineList `json:"list"`
}
V5GetPremiumIndexPriceKlineResult :
type V5GetPublicTradingHistoryParam ¶
type V5GetPublicTradingHistoryParam struct {
Category CategoryV5 `url:"category"`
Symbol SymbolV5 `url:"symbol"`
BaseCoin *Coin `url:"baseCoin,omitempty"` // For option only. If not passed, return BTC data by default
OptionType *OptionsType `url:"optionType,omitempty"`
// Limit for data size per page.
// - spot: [1,60], default: 60
// - others: [1,1000], default: 500
Limit *int `url:"limit,omitempty"`
}
V5GetPublicTradingHistoryParam :
type V5GetPublicTradingHistoryResponse ¶
type V5GetPublicTradingHistoryResponse struct {
CommonV5Response `json:",inline"`
Result V5GetPublicTradingHistoryResult `json:"result"`
}
V5GetPublicTradingHistoryResponse :
type V5GetPublicTradingHistoryResult ¶
type V5GetPublicTradingHistoryResult struct {
Category CategoryV5 `json:"category"`
List []V5GetPublicTradingHistoryItem `json:"list"`
}
V5GetPublicTradingHistoryResult :
type V5GetRiskLimitItem ¶
type V5GetRiskLimitItem struct {
ID int64 `json:"id"`
Symbol SymbolV5 `json:"symbol"`
RiskLimitValue string `json:"riskLimitValue"`
MaintenanceMargin string `json:"maintenanceMargin"`
InitialMargin string `json:"initialMargin"`
IsLowestRisk IsLowestRisk `json:"isLowestRisk"`
MaxLeverage string `json:"maxLeverage"`
}
type V5GetRiskLimitParam ¶
type V5GetRiskLimitParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
Cursor *string `url:"cursor,omitempty"`
}
V5GetRiskLimitParam :
type V5GetRiskLimitResponse ¶
type V5GetRiskLimitResponse struct {
CommonV5Response `json:",inline"`
Result V5GetRiskLimitResult `json:"result"`
}
V5GetRiskLimitResponse :
type V5GetRiskLimitResult ¶
type V5GetRiskLimitResult struct {
Category CategoryV5 `json:"category"`
List []V5GetRiskLimitItem `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetRiskLimitResult :
type V5GetSubDepositRecordsParam ¶
type V5GetSubDepositRecordsParam struct {
SubMemberID string `url:"subMemberId"`
Coin *Coin `url:"coin,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // Start time (ms). Default value: 30 days before the current time
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 50]. Default: 50
Cursor *string `url:"cursor,omitempty"`
}
V5GetSubDepositRecordsParam :
type V5GetSubDepositRecordsResponse ¶
type V5GetSubDepositRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetSubDepositRecordsResult `json:"result"`
}
V5GetSubDepositRecordsResponse :
type V5GetSubDepositRecordsResult ¶
type V5GetSubDepositRecordsResult struct {
Rows V5GetSubDepositRecordsRows `json:"rows"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetSubDepositRecordsResult :
type V5GetSubDepositRecordsRow ¶
type V5GetSubDepositRecordsRow struct {
Coin Coin `json:"coin"`
Chain string `json:"chain"`
Amount string `json:"amount"`
TxID string `json:"txID"`
Status DepositStatusV5 `json:"status"`
ToAddress string `json:"toAddress"`
Tag string `json:"tag"`
DepositFee string `json:"depositFee"`
SuccessAt string `json:"successAt"`
Confirmations string `json:"confirmations"`
TxIndex string `json:"txIndex"`
BlockHash string `json:"blockHash"`
}
V5GetSubDepositRecordsRow :
type V5GetSubDepositRecordsRows ¶
type V5GetSubDepositRecordsRows []V5GetSubDepositRecordsRow
V5GetSubDepositRecordsRows :
type V5GetTickersLinearInverseItem ¶
type V5GetTickersLinearInverseItem struct {
Symbol SymbolV5 `json:"symbol"`
LastPrice string `json:"lastPrice"`
IndexPrice string `json:"indexPrice"`
MarkPrice string `json:"markPrice"`
PrevPrice24H string `json:"prevPrice24h"`
Price24HPcnt string `json:"price24hPcnt"`
HighPrice24H string `json:"highPrice24h"`
LowPrice24H string `json:"lowPrice24h"`
PrevPrice1H string `json:"prevPrice1h"`
OpenInterest string `json:"openInterest"`
OpenInterestValue string `json:"openInterestValue"`
Turnover24H string `json:"turnover24h"`
Volume24H string `json:"volume24h"`
FundingRate string `json:"fundingRate"`
NextFundingTime string `json:"nextFundingTime"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice"`
BasisRate string `json:"basisRate"`
DeliveryFeeRate string `json:"deliveryFeeRate"`
DeliveryTime string `json:"deliveryTime"`
Ask1Size string `json:"ask1Size"`
Bid1Price string `json:"bid1Price"`
Ask1Price string `json:"ask1Price"`
Bid1Size string `json:"bid1Size"`
}
type V5GetTickersLinearInverseResult ¶
type V5GetTickersLinearInverseResult struct {
Category CategoryV5 `json:"category"`
List []V5GetTickersLinearInverseItem `json:"list"`
}
V5GetTickersLinearInverseResult :
type V5GetTickersOptionItem ¶
type V5GetTickersOptionItem struct {
Symbol SymbolV5 `json:"symbol"`
Bid1Price string `json:"bid1Price"`
Bid1Size string `json:"bid1Size"`
Bid1Iv string `json:"bid1Iv"`
Ask1Price string `json:"ask1Price"`
Ask1Size string `json:"ask1Size"`
Ask1Iv string `json:"ask1Iv"`
LastPrice string `json:"lastPrice"`
HighPrice24H string `json:"highPrice24h"`
LowPrice24H string `json:"lowPrice24h"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
MarkIv string `json:"markIv"`
UnderlyingPrice string `json:"underlyingPrice"`
OpenInterest string `json:"openInterest"`
Turnover24H string `json:"turnover24h"`
Volume24H string `json:"volume24h"`
TotalVolume string `json:"totalVolume"`
TotalTurnover string `json:"totalTurnover"`
Delta string `json:"delta"`
Gamma string `json:"gamma"`
Vega string `json:"vega"`
Theta string `json:"theta"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice"`
Change24H string `json:"change24h"`
}
type V5GetTickersOptionResult ¶
type V5GetTickersOptionResult struct {
Category CategoryV5 `json:"category"`
List []V5GetTickersOptionItem `json:"list"`
}
V5GetTickersOptionResult :
type V5GetTickersParam ¶
type V5GetTickersParam struct {
Category CategoryV5 `url:"category"`
Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"` // Base coin. For option only
ExpDate *string `url:"expDate,omitempty"` // Expiry date. e.g., 25DEC22. For option only
}
V5GetTickersParam :
type V5GetTickersResponse ¶
type V5GetTickersResponse struct {
CommonV5Response `json:",inline"`
Result V5GetTickersResult `json:"result"`
}
V5GetTickersResponse :
type V5GetTickersResult ¶
type V5GetTickersResult struct {
LinearInverse *V5GetTickersLinearInverseResult
Option *V5GetTickersOptionResult
Spot *V5GetTickersSpotResult
}
V5GetTickersResult : Responses are filled according to category.
func (*V5GetTickersResult) UnmarshalJSON ¶
func (r *V5GetTickersResult) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5GetTickersSpotItem ¶
type V5GetTickersSpotItem struct {
Symbol SymbolV5 `json:"symbol"`
Bid1Price string `json:"bid1Price"`
Bid1Size string `json:"bid1Size"`
Ask1Price string `json:"ask1Price"`
Ask1Size string `json:"ask1Size"`
LastPrice string `json:"lastPrice"`
PrevPrice24H string `json:"prevPrice24h"`
Price24HPcnt string `json:"price24hPcnt"`
HighPrice24H string `json:"highPrice24h"`
LowPrice24H string `json:"lowPrice24h"`
Turnover24H string `json:"turnover24h"`
Volume24H string `json:"volume24h"`
UsdIndexPrice string `json:"usdIndexPrice"`
}
type V5GetTickersSpotResult ¶
type V5GetTickersSpotResult struct {
Category CategoryV5 `json:"category"`
List []V5GetTickersSpotItem `json:"list"`
}
V5GetTickersSpotResult :
type V5GetTransactionLogItem ¶
type V5GetTransactionLogItem struct {
Symbol SymbolV5 `json:"symbol"`
Category CategoryV5 `json:"category"`
Side Side `json:"side"`
TransactionTime string `json:"transactionTime"`
Type TransactionLogTypeV5 `json:"type"`
Qty string `json:"qty"`
Size string `json:"size"`
Currency string `json:"currency"`
TradePrice string `json:"tradePrice"`
Funding string `json:"funding"`
Fee string `json:"fee"`
CashFlow string `json:"cashFlow"`
Change string `json:"change"`
CashBalance string `json:"cashBalance"`
FeeRate string `json:"feeRate"`
BonusChange string `json:"bonusChange"`
TradeID string `json:"tradeId"`
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
}
V5GetTransactionLogItem :
type V5GetTransactionLogList ¶
type V5GetTransactionLogList []V5GetTransactionLogItem
V5GetTransactionLogList :
type V5GetTransactionLogParam ¶
type V5GetTransactionLogParam struct {
AccountType *AccountTypeV5 `url:"accountType,omitempty"`
Category *CategoryV5 `url:"category,omitempty"`
Currency *string `url:"currency,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
Type *TransactionLogTypeV5 `url:"type,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 50]. Default: 20
Cursor *string `url:"cursor,omitempty"`
}
V5GetTransactionLogParam :
type V5GetTransactionLogResponse ¶
type V5GetTransactionLogResponse struct {
CommonV5Response `json:",inline"`
Result V5GetTransactionLogResult `json:"result"`
}
V5GetTransactionLogResponse :
type V5GetTransactionLogResult ¶
type V5GetTransactionLogResult struct {
NextPageCursor string `json:"nextPageCursor"`
List V5GetTransactionLogList `json:"list"`
}
V5GetTransactionLogResult :
type V5GetUniversalTransferRecordsItem ¶
type V5GetUniversalTransferRecordsItem struct {
TransferID string `json:"transferId"`
Coin Coin `json:"coin"`
Amount string `json:"amount"`
FromMemberID string `json:"fromMemberId"`
ToMemberID string `json:"toMemberId"`
FromAccountType AccountTypeV5 `json:"fromAccountType"`
ToAccountType AccountTypeV5 `json:"toAccountType"`
Timestamp string `json:"timestamp"`
Status TransferStatusV5 `json:"status"`
}
type V5GetUniversalTransferRecordsList ¶
type V5GetUniversalTransferRecordsList []V5GetUniversalTransferRecordsItem
type V5GetUniversalTransferRecordsParam ¶
type V5GetUniversalTransferRecordsParam struct {
TransferID *string `url:"transferId,omitempty"`
Coin *Coin `url:"coin,omitempty"`
Status *TransferStatusV5 `url:"status,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 50]. Default: 20
Cursor *string `url:"cursor,omitempty"`
}
type V5GetUniversalTransferRecordsResponse ¶
type V5GetUniversalTransferRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetUniversalTransferRecordsResult `json:"result"`
}
type V5GetUniversalTransferRecordsResult ¶
type V5GetUniversalTransferRecordsResult struct {
List V5GetUniversalTransferRecordsList `json:"list"`
NextPageCursor string `json:"nextPageCursor"`
}
type V5GetWalletBalanceResponse ¶
type V5GetWalletBalanceResponse struct {
CommonV5Response `json:",inline"`
Result V5WalletBalanceResult `json:"result"`
}
V5GetWalletBalanceResponse :
type V5GetWithdrawalRecordsParam ¶
type V5GetWithdrawalRecordsParam struct {
WithdrawID *string `url:"withdrawId,omitempty"`
Coin *Coin `url:"coin,omitempty"`
WithdrawType *WithdrawTypeV5 `url:"withdrawType,omitempty"`
StartTime *int64 `url:"startTime,omitempty"` // The start timestamp (ms)
EndTime *int64 `url:"endTime,omitempty"` // The start timestamp (ms)
Limit *int `url:"limit,omitempty"` // Limit for data size per page. [1, 50]. Default: 50
Cursor *string `url:"cursor,omitempty"`
}
V5GetWithdrawalRecordsParam :
type V5GetWithdrawalRecordsResponse ¶
type V5GetWithdrawalRecordsResponse struct {
CommonV5Response `json:",inline"`
Result V5GetWithdrawalRecordsResult `json:"result"`
}
V5GetWithdrawalRecordsResponse :
type V5GetWithdrawalRecordsResult ¶
type V5GetWithdrawalRecordsResult struct {
Rows V5GetWithdrawalRecordsRows `json:"rows"`
NextPageCursor string `json:"nextPageCursor"`
}
V5GetWithdrawalRecordsResult :
type V5GetWithdrawalRecordsRow ¶
type V5GetWithdrawalRecordsRow struct {
WithdrawID string `json:"withdrawId"`
TxID string `json:"txId"`
WithdrawType WithdrawTypeV5 `json:"withdrawType"`
Coin Coin `json:"coin"`
Chain string `json:"chain"`
Amount string `json:"amount"`
WithdrawFee string `json:"withdrawFee"`
Status WithdrawStatusV5 `json:"status"`
ToAddress string `json:"toAddress"`
Tag string `json:"tag"`
CreatedTime string `json:"createTime"`
UpdatedTime string `json:"updateTime"`
}
V5GetWithdrawalRecordsRow :
type V5GetWithdrawalRecordsRows ¶
type V5GetWithdrawalRecordsRows []V5GetWithdrawalRecordsRow
V5GetWithdrawalRecordsRows :
type V5MarketService ¶
type V5MarketService struct {
// contains filtered or unexported fields
}
V5MarketService :
func (*V5MarketService) GetFundingRateHistory ¶
func (s *V5MarketService) GetFundingRateHistory(param V5GetFundingRateHistoryParam) (*V5GetFundingRateHistoryResponse, error)
GetFundingRateHistory :
func (*V5MarketService) GetHistoricalVolatility ¶
func (s *V5MarketService) GetHistoricalVolatility(param V5GetHistoricalVolatilityParam) (*V5GetHistoricalVolatilityResponse, error)
GetHistoricalVolatility :
func (*V5MarketService) GetIndexPriceKline ¶
func (s *V5MarketService) GetIndexPriceKline(param V5GetIndexPriceKlineParam) (*V5GetIndexPriceKlineResponse, error)
GetIndexPriceKline :
func (*V5MarketService) GetInstrumentsInfo ¶
func (s *V5MarketService) GetInstrumentsInfo(param V5GetInstrumentsInfoParam) (*V5GetInstrumentsInfoResponse, error)
GetInstrumentsInfo :
func (*V5MarketService) GetInsurance ¶
func (s *V5MarketService) GetInsurance(param V5GetInsuranceParam) (*V5GetInsuranceResponse, error)
GetInsurance :
func (*V5MarketService) GetKline ¶
func (s *V5MarketService) GetKline(param V5GetKlineParam) (*V5GetKlineResponse, error)
GetKline :
func (*V5MarketService) GetMarkPriceKline ¶
func (s *V5MarketService) GetMarkPriceKline(param V5GetMarkPriceKlineParam) (*V5GetMarkPriceKlineResponse, error)
GetMarkPriceKline :
func (*V5MarketService) GetOpenInterest ¶
func (s *V5MarketService) GetOpenInterest(param V5GetOpenInterestParam) (*V5GetOpenInterestResponse, error)
GetOpenInterest :
func (*V5MarketService) GetOrderbook ¶
func (s *V5MarketService) GetOrderbook(param V5GetOrderbookParam) (*V5GetOrderbookResponse, error)
GetOrderbook :
func (*V5MarketService) GetPremiumIndexPriceKline ¶
func (s *V5MarketService) GetPremiumIndexPriceKline(param V5GetPremiumIndexPriceKlineParam) (*V5GetPremiumIndexPriceKlineResponse, error)
GetPremiumIndexPriceKline :
func (*V5MarketService) GetPublicTradingHistory ¶
func (s *V5MarketService) GetPublicTradingHistory(param V5GetPublicTradingHistoryParam) (*V5GetPublicTradingHistoryResponse, error)
GetPublicTradingHistory :
func (*V5MarketService) GetRiskLimit ¶
func (s *V5MarketService) GetRiskLimit(param V5GetRiskLimitParam) (*V5GetRiskLimitResponse, error)
GetRiskLimit :
func (*V5MarketService) GetTickers ¶
func (s *V5MarketService) GetTickers(param V5GetTickersParam) (*V5GetTickersResponse, error)
GetTickers :
type V5MarketServiceI ¶
type V5MarketServiceI interface {
GetKline(V5GetKlineParam) (*V5GetKlineResponse, error)
GetMarkPriceKline(V5GetMarkPriceKlineParam) (*V5GetMarkPriceKlineResponse, error)
GetIndexPriceKline(V5GetIndexPriceKlineParam) (*V5GetIndexPriceKlineResponse, error)
GetPremiumIndexPriceKline(V5GetPremiumIndexPriceKlineParam) (*V5GetPremiumIndexPriceKlineResponse, error)
GetInstrumentsInfo(V5GetInstrumentsInfoParam) (*V5GetInstrumentsInfoResponse, error)
GetOrderbook(V5GetOrderbookParam) (*V5GetOrderbookResponse, error)
GetTickers(V5GetTickersParam) (*V5GetTickersResponse, error)
GetFundingRateHistory(V5GetFundingRateHistoryParam) (*V5GetFundingRateHistoryResponse, error)
GetPublicTradingHistory(V5GetPublicTradingHistoryParam) (*V5GetPublicTradingHistoryResponse, error)
GetOpenInterest(V5GetOpenInterestParam) (*V5GetOpenInterestResponse, error)
GetHistoricalVolatility(V5GetHistoricalVolatilityParam) (*V5GetHistoricalVolatilityResponse, error)
GetInsurance(V5GetInsuranceParam) (*V5GetInsuranceResponse, error)
GetRiskLimit(V5GetRiskLimitParam) (*V5GetRiskLimitResponse, error)
}
V5MarketServiceI :
type V5OrderService ¶
type V5OrderService struct {
// contains filtered or unexported fields
}
V5OrderService :
func (*V5OrderService) AmendOrder ¶
func (s *V5OrderService) AmendOrder(param V5AmendOrderParam) (*V5AmendOrderResponse, error)
AmendOrder :
func (*V5OrderService) CancelAllOrders ¶
func (s *V5OrderService) CancelAllOrders(param V5CancelAllOrdersParam) (*V5CancelAllOrdersResponse, error)
CancelAllOrders :
func (*V5OrderService) CancelOrder ¶
func (s *V5OrderService) CancelOrder(param V5CancelOrderParam) (*V5CancelOrderResponse, error)
CancelOrder :
func (*V5OrderService) CreateOrder ¶
func (s *V5OrderService) CreateOrder(param V5CreateOrderParam) (*V5CreateOrderResponse, error)
CreateOrder :
func (*V5OrderService) GetHistoryOrders ¶
func (s *V5OrderService) GetHistoryOrders(param V5GetHistoryOrdersParam) (*V5GetOrdersResponse, error)
GetHistoryOrders :
func (*V5OrderService) GetOpenOrders ¶
func (s *V5OrderService) GetOpenOrders(param V5GetOpenOrdersParam) (*V5GetOrdersResponse, error)
GetOpenOrders :
type V5OrderServiceI ¶
type V5OrderServiceI interface {
CreateOrder(V5CreateOrderParam) (*V5CreateOrderResponse, error)
AmendOrder(V5AmendOrderParam) (*V5AmendOrderResponse, error)
CancelOrder(V5CancelOrderParam) (*V5CancelOrderResponse, error)
GetOpenOrders(V5GetOpenOrdersParam) (*V5GetOrdersResponse, error)
CancelAllOrders(V5CancelAllOrdersParam) (*V5CancelAllOrdersResponse, error)
GetHistoryOrders(V5GetHistoryOrdersParam) (*V5GetOrdersResponse, error)
}
V5OrderServiceI :
type V5PositionService ¶
type V5PositionService struct {
// contains filtered or unexported fields
}
V5PositionService :
func (*V5PositionService) GetClosedPnL ¶
func (s *V5PositionService) GetClosedPnL(param V5GetClosedPnLParam) (*V5GetClosedPnLResponse, error)
GetClosedPnL :
func (*V5PositionService) GetPositionInfo ¶
func (s *V5PositionService) GetPositionInfo(param V5GetPositionInfoParam) (*V5GetPositionInfoResponse, error)
GetPositionInfo :
func (*V5PositionService) SetLeverage ¶
func (s *V5PositionService) SetLeverage(param V5SetLeverageParam) (*V5SetLeverageResponse, error)
SetLeverage :
func (*V5PositionService) SetRiskLimit ¶
func (s *V5PositionService) SetRiskLimit(param V5SetRiskLimitParam) (*V5SetRiskLimitResponse, error)
SetRiskLimit :
func (*V5PositionService) SetTpSlMode ¶
func (s *V5PositionService) SetTpSlMode(param V5SetTpSlModeParam) (*V5SetTpSlModeResponse, error)
SetTpSlMode :
func (*V5PositionService) SetTradingStop ¶
func (s *V5PositionService) SetTradingStop(param V5SetTradingStopParam) (*V5SetTradingStopResponse, error)
SetTradingStop :
func (*V5PositionService) SwitchPositionMarginMode ¶
func (s *V5PositionService) SwitchPositionMarginMode(param V5SwitchPositionMarginModeParam) (*V5SwitchPositionMarginModeResponse, error)
SwitchPositionMarginMode :
func (*V5PositionService) SwitchPositionMode ¶
func (s *V5PositionService) SwitchPositionMode(param V5SwitchPositionModeParam) (*V5SwitchPositionModeResponse, error)
SwitchPositionMode :
type V5PositionServiceI ¶
type V5PositionServiceI interface {
GetPositionInfo(V5GetPositionInfoParam) (*V5GetPositionInfoResponse, error)
SetLeverage(V5SetLeverageParam) (*V5SetLeverageResponse, error)
SetTradingStop(V5SetTradingStopParam) (*V5SetTradingStopResponse, error)
SetTpSlMode(V5SetTpSlModeParam) (*V5SetTpSlModeResponse, error)
SwitchPositionMode(V5SwitchPositionModeParam) (*V5SwitchPositionModeResponse, error)
GetClosedPnL(V5GetClosedPnLParam) (*V5GetClosedPnLResponse, error)
SwitchPositionMarginMode(V5SwitchPositionMarginModeParam) (*V5SwitchPositionMarginModeResponse, error)
SetRiskLimit(V5SetRiskLimitParam) (*V5SetRiskLimitResponse, error)
}
V5PositionServiceI :
type V5Service ¶
type V5Service struct {
// contains filtered or unexported fields
}
V5Service :
func (*V5Service) SpotLeverageToken ¶
func (s *V5Service) SpotLeverageToken() V5SpotLeverageTokenServiceI
SpotLeverageToken :
func (*V5Service) SpotMarginTrade ¶
func (s *V5Service) SpotMarginTrade() V5SpotMarginTradeServiceI
SpotMarginTrade :
type V5ServiceI ¶
type V5ServiceI interface {
Market() V5MarketServiceI
Order() V5OrderServiceI
Position() V5PositionServiceI
Execution() V5ExecutionServiceI
Account() V5AccountServiceI
SpotLeverageToken() V5SpotLeverageTokenServiceI
SpotMarginTrade() V5SpotMarginTradeServiceI
Asset() V5AssetServiceI
User() V5UserServiceI
}
V5ServiceI :
type V5SetCollateralCoinParam ¶
type V5SetCollateralCoinParam struct {
// Coin:
// You cannot pass multiple coins to query
// USDT,USDC cannot be switched off
Coin Coin `json:"coin"`
// CollateralSwitch: CollateralSwitchV5On or CollateralSwitchV5Off
CollateralSwitch CollateralSwitchV5 `json:"collateralSwitch"`
}
V5SetCollateralCoinParam :
type V5SetCollateralCoinResponse ¶
type V5SetCollateralCoinResponse struct {
CommonV5Response `json:",inline"`
Result interface{} `json:"result"`
}
V5SetCollateralCoinResponse :
type V5SetLeverageParam ¶
type V5SetLeverageParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
BuyLeverage string `json:"buyLeverage"`
SellLeverage string `json:"sellLeverage"`
}
V5SetLeverageParam :
type V5SetLeverageResponse ¶
type V5SetLeverageResponse struct {
CommonV5Response `json:",inline"`
Result interface{} `json:"result"`
}
V5SetLeverageResponse :
type V5SetRiskLimitParam ¶
type V5SetRiskLimitParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
RiskID int64 `json:"riskId"`
PositionIdx *PositionIdx `json:"positionIdx,omitempty"`
}
V5SetRiskLimitParam :
type V5SetRiskLimitResponse ¶
type V5SetRiskLimitResponse struct {
CommonV5Response `json:",inline"`
Result V5SetRiskLimitResult `json:"result"`
}
V5SetRiskLimitResponse :
type V5SetRiskLimitResult ¶
type V5SetRiskLimitResult struct {
Category CategoryV5 `json:"category"`
RiskID int64 `json:"riskId"`
RiskLimitValue string `json:"riskLimitValue"`
}
V5SetRiskLimitResult :
type V5SetTpSlModeParam ¶
type V5SetTpSlModeParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
TpSlMode TpSlMode `json:"tpSlMode"`
}
V5SetTpSlModeParam :
type V5SetTpSlModeResponse ¶
type V5SetTpSlModeResponse struct {
CommonV5Response `json:",inline"`
Result V5SetTpSlModeResult `json:"result"`
}
V5SetTpSlModeResponse :
type V5SetTpSlModeResult ¶
type V5SetTpSlModeResult struct {
TpSlMode TpSlMode `json:"tpSlMode"`
}
V5SetTpSlModeResult :
type V5SetTradingStopParam ¶
type V5SetTradingStopParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
PositionIdx PositionIdx `json:"positionIdx"`
TakeProfit *string `json:"takeProfit,omitempty"`
StopLoss *string `json:"stopLoss,omitempty"`
TrailingStop *string `json:"trailingStop,omitempty"`
TpTriggerBy *TriggerBy `json:"tpTriggerBy,omitempty"`
SlTriggerBy *TriggerBy `json:"slTriggerBy,omitempty"`
ActivePrice *string `json:"activePrice,omitempty"`
TpSize *string `json:"tpSize,omitempty"`
SlSize *string `json:"slSize,omitempty"`
TpslMode *TpSlMode `json:"tpslMode,omitempty"`
TpLimitPrice *string `json:"tpLimitPrice,omitempty"`
SlLimitPrice *string `json:"slLimitPrice,omitempty"`
TpOrderType *OrderType `json:"tpOrderType,omitempty"`
SlOrderType *OrderType `json:"slOrderType,omitempty"`
}
V5SetTradingStopParam :
type V5SetTradingStopResponse ¶
type V5SetTradingStopResponse struct {
CommonV5Response `json:",inline"`
Result interface{} `json:"result"` // no content
}
V5SetTradingStopResponse :
type V5SpotLeverageTokenService ¶
type V5SpotLeverageTokenService struct {
// contains filtered or unexported fields
}
V5SpotLeverageTokenService :
type V5SpotLeverageTokenServiceI ¶
type V5SpotLeverageTokenServiceI interface {
}
V5SpotLeverageTokenServiceI :
type V5SpotMarginTradeService ¶
type V5SpotMarginTradeService struct {
// contains filtered or unexported fields
}
V5SpotMarginTradeService :
type V5SpotMarginTradeServiceI ¶
type V5SpotMarginTradeServiceI interface {
}
V5SpotMarginTradeServiceI :
type V5SwitchPositionMarginModeParam ¶
type V5SwitchPositionMarginModeParam struct {
Category CategoryV5 `json:"category"`
TradeMode PositionMarginMode `json:"tradeMode"`
Symbol SymbolV5 `json:"symbol"`
BuyLeverage string `json:"buyLeverage"`
SellLeverage string `json:"sellLeverage"`
}
V5SwitchPositionMarginModeParam :
type V5SwitchPositionMarginModeResponse ¶
type V5SwitchPositionMarginModeResponse struct {
CommonV5Response `json:",inline"`
Result interface{} `json:"result"` // no content
}
V5SwitchPositionMarginModeResponse :
type V5SwitchPositionModeParam ¶
type V5SwitchPositionModeParam struct {
Category CategoryV5 `json:"category"`
Mode PositionMode `json:"mode"`
Symbol *SymbolV5 `json:"symbol,omitempty"`
Coin *Coin `json:"coin,omitempty"`
}
V5SwitchPositionModeParam :
type V5SwitchPositionModeResponse ¶
type V5SwitchPositionModeResponse struct {
CommonV5Response `json:",inline"`
Result interface{} `json:"result"` // no content
}
V5SwitchPositionModeResponse :
type V5UserService ¶
type V5UserService struct {
// contains filtered or unexported fields
}
V5UserService :
func (*V5UserService) GetAPIKey ¶
func (s *V5UserService) GetAPIKey() (*V5APIKeyResponse, error)
GetAPIKey :
type V5UserServiceI ¶
type V5UserServiceI interface {
GetAPIKey() (*V5APIKeyResponse, error)
}
V5UserServiceI :
type V5WalletBalanceCoin ¶
type V5WalletBalanceCoin struct {
AvailableToBorrow string `json:"availableToBorrow"`
AccruedInterest string `json:"accruedInterest"`
AvailableToWithdraw string `json:"availableToWithdraw"`
TotalOrderIM string `json:"totalOrderIM"`
Equity string `json:"equity"`
TotalPositionMM string `json:"totalPositionMM"`
UsdValue string `json:"usdValue"`
UnrealisedPnl string `json:"unrealisedPnl"`
BorrowAmount string `json:"borrowAmount"`
TotalPositionIM string `json:"totalPositionIM"`
WalletBalance string `json:"walletBalance"`
CumRealisedPnl string `json:"cumRealisedPnl"`
Free string `json:"free"`
Locked string `json:"locked"`
Coin Coin `json:"coin"`
}
V5WalletBalanceCoin :
type V5WalletBalanceList ¶
type V5WalletBalanceList struct {
TotalEquity string `json:"totalEquity"`
AccountIMRate string `json:"accountIMRate"`
TotalMarginBalance string `json:"totalMarginBalance"`
TotalInitialMargin string `json:"totalInitialMargin"`
AccountType string `json:"accountType"`
TotalAvailableBalance string `json:"totalAvailableBalance"`
AccountMMRate string `json:"accountMMRate"`
TotalPerpUPL string `json:"totalPerpUPL"`
TotalWalletBalance string `json:"totalWalletBalance"`
TotalMaintenanceMargin string `json:"totalMaintenanceMargin"`
Coin []V5WalletBalanceCoin `json:"coin"`
}
V5WalletBalanceList :
type V5WalletBalanceResult ¶
type V5WalletBalanceResult struct {
List []V5WalletBalanceList `json:"list"`
}
V5WalletBalanceResult :
type V5WebsocketPrivateExecutionData ¶
type V5WebsocketPrivateExecutionData struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
ExecFee string `json:"execFee"`
ExecID string `json:"execId"`
ExecPrice string `json:"execPrice"`
ExecQty string `json:"execQty"`
ExecType ExecTypeV5 `json:"execType"`
ExecValue string `json:"execValue"`
IsMaker bool `json:"isMaker"`
FeeRate string `json:"feeRate"`
TradeIv string `json:"tradeIv"`
MarkIv string `json:"markIv"`
BlockTradeID string `json:"blockTradeId"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
UnderlyingPrice string `json:"underlyingPrice"`
LeavesQty string `json:"leavesQty"`
OrderID string `json:"orderId"`
OrderLinkID string `json:"orderLinkId"`
OrderPrice string `json:"orderPrice"`
OrderQty string `json:"orderQty"`
OrderType OrderType `json:"orderType"`
StopOrderType OrderType `json:"stopOrderType"`
Side Side `json:"side"`
ExecTime string `json:"execTime"`
IsLeverage string `json:"isLeverage"`
ClosedSize string `json:"closedSize"`
CrossSequence int64 `json:"seq"`
}
V5WebsocketPrivateExecutionData :
type V5WebsocketPrivateExecutionResponse ¶
type V5WebsocketPrivateExecutionResponse struct {
ID string `json:"id"`
Topic V5WebsocketPrivateTopic `json:"topic"`
CreationTime int64 `json:"creationTime"`
Data []V5WebsocketPrivateExecutionData `json:"data"`
}
V5WebsocketPrivateExecutionResponse :
func (*V5WebsocketPrivateExecutionResponse) Key ¶
func (r *V5WebsocketPrivateExecutionResponse) Key() V5WebsocketPrivateParamKey
Key :
type V5WebsocketPrivateOrderData ¶
type V5WebsocketPrivateOrderData struct {
AvgPrice string `json:"avgPrice"`
BlockTradeID string `json:"blockTradeId"`
CancelType string `json:"cancelType"`
Category string `json:"category"`
CloseOnTrigger bool `json:"closeOnTrigger"`
CreatedTime string `json:"createdTime"`
CumExecFee string `json:"cumExecFee"`
CumExecQty string `json:"cumExecQty"`
CumExecValue string `json:"cumExecValue"`
LeavesQty string `json:"leavesQty"`
LeavesValue string `json:"leavesValue"`
OrderID string `json:"orderId"`
OrderIv string `json:"orderIv"`
IsLeverage string `json:"isLeverage"`
LastPriceOnCreated string `json:"lastPriceOnCreated"`
OrderStatus OrderStatus `json:"orderStatus"`
OrderLinkID string `json:"orderLinkId"`
OrderType OrderType `json:"orderType"`
PositionIdx int `json:"positionIdx"`
Price string `json:"price"`
Qty string `json:"qty"`
ReduceOnly bool `json:"reduceOnly"`
RejectReason string `json:"rejectReason"`
Side Side `json:"side"`
SlTriggerBy TriggerBy `json:"slTriggerBy"`
StopLoss string `json:"stopLoss"`
StopOrderType string `json:"stopOrderType"`
Symbol SymbolV5 `json:"symbol"`
TakeProfit string `json:"takeProfit"`
TimeInForce TimeInForce `json:"timeInForce"`
TpTriggerBy TriggerBy `json:"tpTriggerBy"`
TriggerBy TriggerBy `json:"triggerBy"`
TriggerDirection TriggerDirection `json:"triggerDirection"`
TriggerPrice string `json:"triggerPrice"`
UpdatedTime string `json:"updatedTime"`
}
V5WebsocketPrivateOrderData :
type V5WebsocketPrivateOrderResponse ¶
type V5WebsocketPrivateOrderResponse struct {
ID string `json:"id"`
Topic V5WebsocketPrivateTopic `json:"topic"`
CreationTime int64 `json:"creationTime"`
Data []V5WebsocketPrivateOrderData `json:"data"`
}
V5WebsocketPrivateOrderResponse :
func (*V5WebsocketPrivateOrderResponse) Key ¶
func (r *V5WebsocketPrivateOrderResponse) Key() V5WebsocketPrivateParamKey
Key :
type V5WebsocketPrivateParamKey ¶
type V5WebsocketPrivateParamKey struct {
Topic V5WebsocketPrivateTopic
}
V5WebsocketPrivateParamKey :
type V5WebsocketPrivatePositionData ¶
type V5WebsocketPrivatePositionData struct {
AutoAddMargin int `json:"autoAddMargin"`
PositionIdx int `json:"positionIdx"`
TradeMode int `json:"tradeMode"`
RiskID int `json:"riskId"`
RiskLimitValue string `json:"riskLimitValue"`
Symbol SymbolV5 `json:"symbol"`
Side Side `json:"side"`
Size string `json:"size"`
EntryPrice string `json:"entryPrice"`
Leverage string `json:"leverage"`
PositionValue string `json:"positionValue"`
MarkPrice string `json:"markPrice"`
PositionBalance string `json:"positionBalance"`
PositionIM string `json:"positionIM"`
PositionMM string `json:"positionMM"`
TakeProfit string `json:"takeProfit"`
StopLoss string `json:"stopLoss"`
TrailingStop string `json:"trailingStop"`
UnrealisedPnl string `json:"unrealisedPnl"`
CumRealisedPnl string `json:"cumRealisedPnl"`
CreatedTime string `json:"CreatedTime"`
UpdatedTime string `json:"updatedTime"`
TpslMode TpSlMode `json:"tpslMode"`
LiqPrice string `json:"liqPrice"`
BustPrice string `json:"bustPrice"`
Category CategoryV5 `json:"category"`
PositionStatus string `json:"positionStatus"`
}
V5WebsocketPrivatePositionData :
type V5WebsocketPrivatePositionResponse ¶
type V5WebsocketPrivatePositionResponse struct {
ID string `json:"id"`
Topic V5WebsocketPrivateTopic `json:"topic"`
CreationTime int64 `json:"creationTime"`
Data []V5WebsocketPrivatePositionData `json:"data"`
}
V5WebsocketPrivatePositionResponse :
func (*V5WebsocketPrivatePositionResponse) Key ¶
func (r *V5WebsocketPrivatePositionResponse) Key() V5WebsocketPrivateParamKey
Key :
type V5WebsocketPrivateService ¶
type V5WebsocketPrivateService struct {
// contains filtered or unexported fields
}
V5WebsocketPrivateService :
func (*V5WebsocketPrivateService) Start ¶
func (s *V5WebsocketPrivateService) Start(ctx context.Context, errHandler ErrHandler) error
Start :
func (*V5WebsocketPrivateService) Subscribe ¶
func (s *V5WebsocketPrivateService) Subscribe() error
Subscribe : Apply for authentication when establishing a connection.
func (*V5WebsocketPrivateService) SubscribeExecution ¶
func (s *V5WebsocketPrivateService) SubscribeExecution( f func(V5WebsocketPrivateExecutionResponse) error, ) (func() error, error)
SubscribeExecution :
func (*V5WebsocketPrivateService) SubscribeOrder ¶
func (s *V5WebsocketPrivateService) SubscribeOrder( f func(V5WebsocketPrivateOrderResponse) error, ) (func() error, error)
SubscribeOrder :
func (*V5WebsocketPrivateService) SubscribePosition ¶
func (s *V5WebsocketPrivateService) SubscribePosition( f func(V5WebsocketPrivatePositionResponse) error, ) (func() error, error)
SubscribePosition :
func (*V5WebsocketPrivateService) SubscribeWallet ¶
func (s *V5WebsocketPrivateService) SubscribeWallet( f func(V5WebsocketPrivateWalletResponse) error, ) (func() error, error)
SubscribeWallet :
type V5WebsocketPrivateServiceI ¶
type V5WebsocketPrivateServiceI interface {
Start(context.Context, ErrHandler) error
Subscribe() error
Run() error
Ping() error
Close() error
SubscribeOrder(
func(V5WebsocketPrivateOrderResponse) error,
) (func() error, error)
SubscribePosition(
func(V5WebsocketPrivatePositionResponse) error,
) (func() error, error)
SubscribeExecution(
func(V5WebsocketPrivateExecutionResponse) error,
) (func() error, error)
SubscribeWallet(
func(V5WebsocketPrivateWalletResponse) error,
) (func() error, error)
}
V5WebsocketPrivateServiceI :
type V5WebsocketPrivateTopic ¶
type V5WebsocketPrivateTopic string
V5WebsocketPrivateTopic :
const ( // V5WebsocketPrivateTopicPong : V5WebsocketPrivateTopicPong V5WebsocketPrivateTopic = "pong" // V5WebsocketPrivateTopicOrder : V5WebsocketPrivateTopicOrder V5WebsocketPrivateTopic = "order" // V5WebsocketPrivateTopicPosition : V5WebsocketPrivateTopicPosition V5WebsocketPrivateTopic = "position" // V5WebsocketPrivateTopicExecution : V5WebsocketPrivateTopicExecution V5WebsocketPrivateTopic = "execution" // V5WebsocketPrivateTopicWallet : V5WebsocketPrivateTopicWallet V5WebsocketPrivateTopic = "wallet" )
type V5WebsocketPrivateWalletCoin ¶
type V5WebsocketPrivateWalletCoin struct {
Coin Coin `json:"coin"`
Equity string `json:"equity"`
UsdValue string `json:"usdValue"`
WalletBalance string `json:"walletBalance"`
AvailableToWithdraw string `json:"availableToWithdraw"`
AvailableToBorrow string `json:"availableToBorrow"`
BorrowAmount string `json:"borrowAmount"`
AccruedInterest string `json:"accruedInterest"`
TotalOrderIM string `json:"totalOrderIM"`
TotalPositionIM string `json:"totalPositionIM"`
TotalPositionMM string `json:"totalPositionMM"`
UnrealisedPnl string `json:"unrealisedPnl"`
CumRealisedPnl string `json:"cumRealisedPnl"`
}
V5WebsocketPrivateWalletCoin :
type V5WebsocketPrivateWalletData ¶
type V5WebsocketPrivateWalletData struct {
AccountIMRate string `json:"accountIMRate"`
AccountMMRate string `json:"accountMMRate"`
TotalEquity string `json:"totalEquity"`
TotalWalletBalance string `json:"totalWalletBalance"`
TotalMarginBalance string `json:"totalMarginBalance"`
TotalAvailableBalance string `json:"totalAvailableBalance"`
TotalPerpUPL string `json:"totalPerpUPL"`
TotalInitialMargin string `json:"totalInitialMargin"`
TotalMaintenanceMargin string `json:"totalMaintenanceMargin"`
AccountType AccountTypeV5 `json:"accountType"`
Coins []V5WebsocketPrivateWalletCoin `json:"coin"`
}
V5WebsocketPrivateWalletData :
type V5WebsocketPrivateWalletResponse ¶
type V5WebsocketPrivateWalletResponse struct {
ID string `json:"id"`
Topic V5WebsocketPrivateTopic `json:"topic"`
CreationTime int64 `json:"creationTime"`
Data []V5WebsocketPrivateWalletData `json:"data"`
}
V5WebsocketPrivateWalletResponse :
func (*V5WebsocketPrivateWalletResponse) Key ¶
func (r *V5WebsocketPrivateWalletResponse) Key() V5WebsocketPrivateParamKey
Key :
type V5WebsocketPublicKlineData ¶
type V5WebsocketPublicKlineData struct {
Start int64 `json:"start"`
End int64 `json:"end"`
Interval Interval `json:"interval"`
Open string `json:"open"`
Close string `json:"close"`
High string `json:"high"`
Low string `json:"low"`
Volume string `json:"volume"`
Turnover string `json:"turnover"`
Confirm bool `json:"confirm"`
Timestamp int64 `json:"timestamp"`
}
V5WebsocketPublicKlineData :
type V5WebsocketPublicKlineParamKey ¶
V5WebsocketPublicKlineParamKey :
func (*V5WebsocketPublicKlineParamKey) Topic ¶
func (k *V5WebsocketPublicKlineParamKey) Topic() string
Topic :
type V5WebsocketPublicKlineResponse ¶
type V5WebsocketPublicKlineResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data []V5WebsocketPublicKlineData `json:"data"`
}
V5WebsocketPublicKlineResponse :
func (*V5WebsocketPublicKlineResponse) Key ¶
func (r *V5WebsocketPublicKlineResponse) Key() V5WebsocketPublicKlineParamKey
Key :
type V5WebsocketPublicLiquidationData ¶
type V5WebsocketPublicLiquidationData struct {
UpdatedTime uint64 `json:"updatedTime"` // The updated timestamp (ms)
Symbol SymbolV5 `json:"symbol"` // Symbol name
Side Side `json:"side"` // Position side. Buy,Sell. When you receive a Buy update, this means that a long position has been liquidated
Size string `json:"size"` // Executed size
Price string `json:"price"` // Bankruptcy price
}
V5WebsocketPublicLiquidationData :
type V5WebsocketPublicLiquidationParamKey ¶
type V5WebsocketPublicLiquidationParamKey struct {
Symbol SymbolV5
}
V5WebsocketPublicLiquidationParamKey :
func (*V5WebsocketPublicLiquidationParamKey) Topic ¶
func (k *V5WebsocketPublicLiquidationParamKey) Topic() string
Topic :
type V5WebsocketPublicLiquidationResponse ¶
type V5WebsocketPublicLiquidationResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data []V5WebsocketPublicLiquidationData `json:"data"`
}
V5WebsocketPublicLiquidationResponse :
type V5WebsocketPublicOrderBookAsks ¶
type V5WebsocketPublicOrderBookAsks []struct {
Price string `json:"price"`
Size string `json:"size"`
}
V5WebsocketPublicOrderBookAsks :
func (*V5WebsocketPublicOrderBookAsks) UnmarshalJSON ¶
func (b *V5WebsocketPublicOrderBookAsks) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5WebsocketPublicOrderBookBids ¶
type V5WebsocketPublicOrderBookBids []struct {
Price string `json:"price"`
Size string `json:"size"`
}
V5WebsocketPublicOrderBookBids :
func (*V5WebsocketPublicOrderBookBids) UnmarshalJSON ¶
func (b *V5WebsocketPublicOrderBookBids) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5WebsocketPublicOrderBookData ¶
type V5WebsocketPublicOrderBookData struct {
Symbol SymbolV5 `json:"s"`
Bids V5WebsocketPublicOrderBookBids `json:"b"`
Asks V5WebsocketPublicOrderBookAsks `json:"a"`
UpdateID int `json:"u"`
Seq int `json:"seq"`
}
V5WebsocketPublicOrderBookData :
type V5WebsocketPublicOrderBookParamKey ¶
V5WebsocketPublicOrderBookParamKey :
func (*V5WebsocketPublicOrderBookParamKey) Topic ¶
func (k *V5WebsocketPublicOrderBookParamKey) Topic() string
Topic :
type V5WebsocketPublicOrderBookResponse ¶
type V5WebsocketPublicOrderBookResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data V5WebsocketPublicOrderBookData `json:"data"`
}
V5WebsocketPublicOrderBookResponse :
func (*V5WebsocketPublicOrderBookResponse) Key ¶
func (r *V5WebsocketPublicOrderBookResponse) Key() V5WebsocketPublicOrderBookParamKey
Key :
type V5WebsocketPublicService ¶
type V5WebsocketPublicService struct {
// contains filtered or unexported fields
}
V5WebsocketPublicService :
func (*V5WebsocketPublicService) Start ¶
func (s *V5WebsocketPublicService) Start(ctx context.Context, errHandler ErrHandler) error
Start :
func (*V5WebsocketPublicService) SubscribeKline ¶
func (s *V5WebsocketPublicService) SubscribeKline( key V5WebsocketPublicKlineParamKey, f func(V5WebsocketPublicKlineResponse) error, ) (func() error, error)
SubscribeKline :
func (*V5WebsocketPublicService) SubscribeLiquidation ¶
func (s *V5WebsocketPublicService) SubscribeLiquidation( key V5WebsocketPublicLiquidationParamKey, f func(V5WebsocketPublicLiquidationResponse) error, ) (func() error, error)
SubscribeLiquidation :
func (*V5WebsocketPublicService) SubscribeOrderBook ¶
func (s *V5WebsocketPublicService) SubscribeOrderBook( key V5WebsocketPublicOrderBookParamKey, f func(V5WebsocketPublicOrderBookResponse) error, ) (func() error, error)
SubscribeOrderBook :
func (*V5WebsocketPublicService) SubscribeTicker ¶
func (s *V5WebsocketPublicService) SubscribeTicker( key V5WebsocketPublicTickerParamKey, f func(V5WebsocketPublicTickerResponse) error, ) (func() error, error)
SubscribeTicker :
func (*V5WebsocketPublicService) SubscribeTrade ¶
func (s *V5WebsocketPublicService) SubscribeTrade( key V5WebsocketPublicTradeParamKey, f func(V5WebsocketPublicTradeResponse) error, ) (func() error, error)
SubscribeTrade :
type V5WebsocketPublicServiceI ¶
type V5WebsocketPublicServiceI interface {
Start(context.Context, ErrHandler) error
Run() error
Ping() error
Close() error
SubscribeOrderBook(
V5WebsocketPublicOrderBookParamKey,
func(V5WebsocketPublicOrderBookResponse) error,
) (func() error, error)
SubscribeKline(
V5WebsocketPublicKlineParamKey,
func(V5WebsocketPublicKlineResponse) error,
) (func() error, error)
SubscribeTicker(
V5WebsocketPublicTickerParamKey,
func(V5WebsocketPublicTickerResponse) error,
) (func() error, error)
SubscribeTrade(
V5WebsocketPublicTradeParamKey,
func(V5WebsocketPublicTradeResponse) error,
) (func() error, error)
SubscribeLiquidation(
V5WebsocketPublicLiquidationParamKey,
func(V5WebsocketPublicLiquidationResponse) error,
) (func() error, error)
}
V5WebsocketPublicServiceI :
type V5WebsocketPublicTickerData ¶
type V5WebsocketPublicTickerData struct {
LinearInverse *V5WebsocketPublicTickerLinearInverseResult
Option *V5WebsocketPublicTickerOptionResult
Spot *V5WebsocketPublicTickerSpotResult
// contains filtered or unexported fields
}
V5WebsocketPublicTickerData :
func (*V5WebsocketPublicTickerData) UnmarshalJSON ¶
func (r *V5WebsocketPublicTickerData) UnmarshalJSON(data []byte) error
UnmarshalJSON :
type V5WebsocketPublicTickerLinearInverseResult ¶
type V5WebsocketPublicTickerLinearInverseResult struct {
Symbol SymbolV5 `json:"symbol"`
TickDirection TickDirection `json:"tickDirection"`
Price24hPercent string `json:"price24hPcnt"`
LastPrice string `json:"lastPrice"`
PrevPrice24h string `json:"prevPrice24h"`
HighPrice24h string `json:"highPrice24h"`
LowPrice24h string `json:"lowPrice24h"`
PrevPrice1h string `json:"prevPrice1h"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
OpenInterest string `json:"openInterest"`
OpenInterestValue string `json:"openInterestValue"`
Turnover24h string `json:"turnover24h"`
Volume24h string `json:"volume24h"`
NextFundingTime string `json:"nextFundingTime"`
FundingRate string `json:"fundingRate"`
Bid1Price string `json:"bid1Price"`
Bid1Size string `json:"bid1Size"`
Ask1Price string `json:"ask1Price"`
Ask1Size string `json:"ask1Size"`
DeliveryTime string `json:"deliveryTime,omitempty"`
BasisRate string `json:"basisRate,omitempty"`
DeliveryFeeRate string `json:"deliveryFeeRate,omitempty"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice,omitempty"`
}
V5WebsocketPublicTickerLinearInverseResult :
type V5WebsocketPublicTickerOptionResult ¶
type V5WebsocketPublicTickerOptionResult struct {
Symbol SymbolV5 `json:"symbol"`
BidPrice string `json:"bidPrice"`
BidSize string `json:"bidSize"`
BidIv string `json:"bidIv"`
AskPrice string `json:"askPrice"`
AskSize string `json:"askSize"`
AskIv string `json:"askIv"`
LastPrice string `json:"lastPrice"`
HighPrice24H string `json:"highPrice24h"`
LowPrice24H string `json:"lowPrice24h"`
MarkPrice string `json:"markPrice"`
IndexPrice string `json:"indexPrice"`
MarkPriceIv string `json:"markPriceIv"`
UnderlyingPrice string `json:"underlyingPrice"`
OpenInterest string `json:"openInterest"`
Turnover24H string `json:"turnover24h"`
Volume24H string `json:"volume24h"`
TotalVolume string `json:"totalVolume"`
TotalTurnover string `json:"totalTurnover"`
Delta string `json:"delta"`
Gamma string `json:"gamma"`
Vega string `json:"vega"`
Theta string `json:"theta"`
PredictedDeliveryPrice string `json:"predictedDeliveryPrice"`
Change24H string `json:"change24h"`
}
V5WebsocketPublicTickerOptionResult :
type V5WebsocketPublicTickerParamKey ¶
type V5WebsocketPublicTickerParamKey struct {
Symbol SymbolV5
}
V5WebsocketPublicTickerParamKey :
func (*V5WebsocketPublicTickerParamKey) Topic ¶
func (k *V5WebsocketPublicTickerParamKey) Topic() string
Topic :
type V5WebsocketPublicTickerResponse ¶
type V5WebsocketPublicTickerResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
CrossSeq int64 `json:"cs,omitempty"`
ID string `json:"id,omitempty"`
Data V5WebsocketPublicTickerData `json:"data"`
}
V5WebsocketPublicTickerResponse :
func (*V5WebsocketPublicTickerResponse) Key ¶
func (r *V5WebsocketPublicTickerResponse) Key() V5WebsocketPublicTickerParamKey
Key :
type V5WebsocketPublicTickerSpotResult ¶
type V5WebsocketPublicTickerSpotResult struct {
Symbol SymbolV5 `json:"symbol"`
LastPrice string `json:"lastPrice"`
HighPrice24H string `json:"highPrice24h"`
LowPrice24H string `json:"lowPrice24h"`
PrevPrice24H string `json:"prevPrice24h"`
Volume24H string `json:"volume24h"`
Turnover24H string `json:"turnover24h"`
Price24HPcnt string `json:"price24hPcnt"`
UsdIndexPrice string `json:"usdIndexPrice"`
}
V5WebsocketPublicTickerSpotResult :
type V5WebsocketPublicTopic ¶
type V5WebsocketPublicTopic string
V5WebsocketPublicTopic :
func (V5WebsocketPublicTopic) String ¶
func (t V5WebsocketPublicTopic) String() string
type V5WebsocketPublicTradeData ¶
type V5WebsocketPublicTradeData struct {
Timestamp uint64 `json:"T"` // The timestamp (ms) that the order is filled
Symbol SymbolV5 `json:"s"` // Symbol name
Side Side `json:"S"` // Side of taker. Buy,Sell
Value string `json:"v"` // Trade size
Trade string `json:"p"` // Trade price
Direction string `json:"L"` // Direction of price change. Unique field for future
ID string `json:"i"` // Trade ID
BlockTrade bool `json:"BT"` // Whether it is a block trade order or not
}
V5WebsocketPublicTradeData :
type V5WebsocketPublicTradeParamKey ¶
type V5WebsocketPublicTradeParamKey struct {
Symbol SymbolV5
}
V5WebsocketPublicTradeParamKey :
func (*V5WebsocketPublicTradeParamKey) Topic ¶
func (k *V5WebsocketPublicTradeParamKey) Topic() string
Topic :
type V5WebsocketPublicTradeResponse ¶
type V5WebsocketPublicTradeResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data []V5WebsocketPublicTradeData `json:"data"`
}
V5WebsocketPublicTradeResponse :
func (*V5WebsocketPublicTradeResponse) Key ¶
func (r *V5WebsocketPublicTradeResponse) Key() V5WebsocketPublicTradeParamKey
Key :
type V5WebsocketService ¶
type V5WebsocketService struct {
// contains filtered or unexported fields
}
V5WebsocketService :
func (*V5WebsocketService) Private ¶
func (s *V5WebsocketService) Private() (V5WebsocketPrivateServiceI, error)
Private :
func (*V5WebsocketService) Public ¶
func (s *V5WebsocketService) Public(category CategoryV5) (V5WebsocketPublicServiceI, error)
Public :
type V5WebsocketServiceI ¶
type V5WebsocketServiceI interface {
Public(CategoryV5) (V5WebsocketPublicService, error)
Private() (V5WebsocketPrivateService, error)
}
V5WebsocketServiceI :
type V5WithdrawParam ¶
type V5WithdrawParam struct {
Coin Coin `json:"coin"`
Address string `json:"address"`
Amount string `json:"amount"`
Timestamp int64 `json:"timestamp"`
Chain *string `json:"chain,omitempty"`
Tag *string `json:"tag,omitempty"`
ForceChain *bool `json:"forceChain,omitempty"`
AccountType *AccountTypeV5 `json:"accountType,omitempty"`
FeeType *int `json:"feeType,omitempty"`
RequestID *string `json:"requestId,omitempty"`
}
type V5WithdrawResponse ¶
type V5WithdrawResponse struct {
CommonV5Response `json:",inline"`
Result V5WithdrawResult `json:"result"`
}
type V5WithdrawResult ¶
type V5WithdrawResult struct {
ID string `json:"id"`
}
type WebSocketClient ¶
type WebSocketClient struct {
// contains filtered or unexported fields
}
WebSocketClient :
func (*WebSocketClient) Start ¶
func (c *WebSocketClient) Start(ctx context.Context, executors []WebsocketExecutor)
Start :
func (*WebSocketClient) WithAuth ¶
func (c *WebSocketClient) WithAuth(key string, secret string) *WebSocketClient
WithAuth :
func (*WebSocketClient) WithBaseURL ¶
func (c *WebSocketClient) WithBaseURL(url string) *WebSocketClient
WithBaseURL :
func (*WebSocketClient) WithDebug ¶
func (c *WebSocketClient) WithDebug(debug bool) *WebSocketClient
WithDebug :
func (*WebSocketClient) WithLogger ¶
func (c *WebSocketClient) WithLogger(logger *log.Logger) *WebSocketClient
WithLogger :
type WebsocketExecutor ¶
WebsocketExecutor :
type WithdrawStatusV5 ¶
type WithdrawStatusV5 string
type WithdrawTypeV5 ¶
type WithdrawTypeV5 int
Source Files
¶
- account_asset.go
- client.go
- client_service.go
- client_web_socket.go
- client_web_socket_service.go
- copy_trading.go
- derivative_common.go
- derivative_contract.go
- derivative_unified_margin.go
- enum.go
- enum_derivative_common.go
- enum_future_common.go
- enum_spot_v1.go
- future_common.go
- future_inverse_future.go
- future_inverse_perpetual.go
- future_usdt_perpetual.go
- logger.go
- response.go
- spot_v1.go
- spot_v3.go
- testclient.go
- testclient_websocket.go
- time_service.go
- usdc_contract_option.go
- usdc_contract_perpetual.go
- v5_account_service.go
- v5_asset_service.go
- v5_client_service.go
- v5_client_web_socket_service.go
- v5_enum.go
- v5_execution_service.go
- v5_market_service.go
- v5_order_service.go
- v5_position_service.go
- v5_spot_leverage_token_service.go
- v5_spot_margin_trade_service.go
- v5_user_service.go
- v5_ws_private.go
- v5_ws_private_execution.go
- v5_ws_private_order.go
- v5_ws_private_position.go
- v5_ws_private_wallet.go
- v5_ws_public.go
- v5_ws_public_kline.go
- v5_ws_public_liquidation.go
- v5_ws_public_orderbook.go
- v5_ws_public_ticker.go
- v5_ws_public_trade.go
- ws_error.go
- ws_spot_v1.go
- ws_spot_v1_private.go
- ws_spot_v1_public_v1.go
- ws_spot_v1_public_v2.go