Documentation
¶
Index ¶
- Constants
- Variables
- func IsPortfolioError(e error) bool
- type ADLQuantile
- type APIResponse
- type Account
- type AccountStatus
- type Amendment
- type AmendmentDetail
- type AutoRepayFuturesStatus
- type BNBTransferResponse
- type BNBTransferService
- type Balance
- type Bracket
- type CMADLQuantileResponse
- type CMADLQuantileService
- type CMAccountDetail
- type CMAccountTrade
- type CMAccountTradeService
- func (s *CMAccountTradeService) Do(ctx context.Context) ([]*CMAccountTrade, error)
- func (s *CMAccountTradeService) EndTime(endTime int64) *CMAccountTradeService
- func (s *CMAccountTradeService) FromID(fromID int64) *CMAccountTradeService
- func (s *CMAccountTradeService) Limit(limit int) *CMAccountTradeService
- func (s *CMAccountTradeService) Pair(pair string) *CMAccountTradeService
- func (s *CMAccountTradeService) RecvWindow(recvWindow int64) *CMAccountTradeService
- func (s *CMAccountTradeService) StartTime(startTime int64) *CMAccountTradeService
- func (s *CMAccountTradeService) Symbol(symbol string) *CMAccountTradeService
- type CMAccountTradesService
- func (s *CMAccountTradesService) Do(ctx context.Context) ([]*CMAccountTrade, error)
- func (s *CMAccountTradesService) EndTime(endTime int64) *CMAccountTradesService
- func (s *CMAccountTradesService) FromID(fromID int64) *CMAccountTradesService
- func (s *CMAccountTradesService) Limit(limit int) *CMAccountTradesService
- func (s *CMAccountTradesService) Pair(pair string) *CMAccountTradesService
- func (s *CMAccountTradesService) RecvWindow(recvWindow int64) *CMAccountTradesService
- func (s *CMAccountTradesService) StartTime(startTime int64) *CMAccountTradesService
- func (s *CMAccountTradesService) Symbol(symbol string) *CMAccountTradesService
- type CMAllOrdersResponse
- type CMAllOrdersService
- func (s *CMAllOrdersService) Do(ctx context.Context) ([]*CMAllOrdersResponse, error)
- func (s *CMAllOrdersService) EndTime(endTime int64) *CMAllOrdersService
- func (s *CMAllOrdersService) Limit(limit int) *CMAllOrdersService
- func (s *CMAllOrdersService) OrderID(orderID int64) *CMAllOrdersService
- func (s *CMAllOrdersService) Pair(pair string) *CMAllOrdersService
- func (s *CMAllOrdersService) RecvWindow(recvWindow int64) *CMAllOrdersService
- func (s *CMAllOrdersService) StartTime(startTime int64) *CMAllOrdersService
- func (s *CMAllOrdersService) Symbol(symbol string) *CMAllOrdersService
- type CMAsset
- type CMBracket
- type CMCancelAllConditionalOrdersResponse
- type CMCancelAllConditionalOrdersService
- func (s *CMCancelAllConditionalOrdersService) Do(ctx context.Context) (*CMCancelAllConditionalOrdersResponse, error)
- func (s *CMCancelAllConditionalOrdersService) RecvWindow(recvWindow int64) *CMCancelAllConditionalOrdersService
- func (s *CMCancelAllConditionalOrdersService) Symbol(symbol string) *CMCancelAllConditionalOrdersService
- type CMCancelAllOrdersResponse
- type CMCancelAllOrdersService
- type CMCancelConditionalOrderResponse
- type CMCancelConditionalOrderService
- func (s *CMCancelConditionalOrderService) Do(ctx context.Context) (*CMCancelConditionalOrderResponse, error)
- func (s *CMCancelConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *CMCancelConditionalOrderService
- func (s *CMCancelConditionalOrderService) RecvWindow(recvWindow int64) *CMCancelConditionalOrderService
- func (s *CMCancelConditionalOrderService) StrategyID(strategyID int64) *CMCancelConditionalOrderService
- func (s *CMCancelConditionalOrderService) Symbol(symbol string) *CMCancelConditionalOrderService
- type CMCancelOrderResponse
- type CMCancelOrderService
- func (s *CMCancelOrderService) Do(ctx context.Context) (*CMCancelOrderResponse, error)
- func (s *CMCancelOrderService) OrderID(orderID int64) *CMCancelOrderService
- func (s *CMCancelOrderService) OrigClientOrderID(origClientOrderID string) *CMCancelOrderService
- func (s *CMCancelOrderService) RecvWindow(recvWindow int64) *CMCancelOrderService
- func (s *CMCancelOrderService) Symbol(symbol string) *CMCancelOrderService
- type CMConditionalOrder
- type CMConditionalOrderHistoryResponse
- type CMConditionalOrderHistoryService
- func (s *CMConditionalOrderHistoryService) Do(ctx context.Context) (*CMConditionalOrderHistoryResponse, error)
- func (s *CMConditionalOrderHistoryService) NewClientStrategyID(newClientStrategyID string) *CMConditionalOrderHistoryService
- func (s *CMConditionalOrderHistoryService) RecvWindow(recvWindow int64) *CMConditionalOrderHistoryService
- func (s *CMConditionalOrderHistoryService) StrategyID(strategyID int64) *CMConditionalOrderHistoryService
- func (s *CMConditionalOrderHistoryService) Symbol(symbol string) *CMConditionalOrderHistoryService
- type CMConditionalOrderResponse
- type CMConditionalOrderService
- func (s *CMConditionalOrderService) ActivationPrice(price string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) CallbackRate(rate string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CMConditionalOrder, err error)
- func (s *CMConditionalOrderService) NewClientStrategyID(id string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) PositionSide(positionSide PositionSideType) *CMConditionalOrderService
- func (s *CMConditionalOrderService) Price(price string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) PriceProtect(protect bool) *CMConditionalOrderService
- func (s *CMConditionalOrderService) Quantity(quantity string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) Side(side SideType) *CMConditionalOrderService
- func (s *CMConditionalOrderService) StopPrice(stopPrice string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) StrategyType(strategyType string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) Symbol(symbol string) *CMConditionalOrderService
- func (s *CMConditionalOrderService) TimeInForce(timeInForce TimeInForceType) *CMConditionalOrderService
- func (s *CMConditionalOrderService) WorkingType(workingType string) *CMConditionalOrderService
- type CMConditionalOrdersService
- func (s *CMConditionalOrdersService) Do(ctx context.Context) ([]*CMConditionalOrderResponse, error)
- func (s *CMConditionalOrdersService) EndTime(endTime int64) *CMConditionalOrdersService
- func (s *CMConditionalOrdersService) Limit(limit int) *CMConditionalOrdersService
- func (s *CMConditionalOrdersService) RecvWindow(recvWindow int64) *CMConditionalOrdersService
- func (s *CMConditionalOrdersService) StartTime(startTime int64) *CMConditionalOrdersService
- func (s *CMConditionalOrdersService) StrategyID(strategyID int64) *CMConditionalOrdersService
- func (s *CMConditionalOrdersService) Symbol(symbol string) *CMConditionalOrdersService
- type CMForceOrderResponse
- type CMForceOrdersService
- func (s *CMForceOrdersService) AutoCloseType(autoCloseType string) *CMForceOrdersService
- func (s *CMForceOrdersService) Do(ctx context.Context) ([]*CMForceOrderResponse, error)
- func (s *CMForceOrdersService) EndTime(endTime int64) *CMForceOrdersService
- func (s *CMForceOrdersService) Limit(limit int) *CMForceOrdersService
- func (s *CMForceOrdersService) RecvWindow(recvWindow int64) *CMForceOrdersService
- func (s *CMForceOrdersService) StartTime(startTime int64) *CMForceOrdersService
- func (s *CMForceOrdersService) Symbol(symbol string) *CMForceOrdersService
- type CMLeverage
- type CMLeverageBracket
- type CMModifyOrderHistoryResponse
- type CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) Do(ctx context.Context) ([]*CMModifyOrderHistoryResponse, error)
- func (s *CMModifyOrderHistoryService) EndTime(endTime int64) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) Limit(limit int) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) OrderID(orderID int64) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) OrigClientOrderID(origClientOrderID string) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) RecvWindow(recvWindow int64) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) StartTime(startTime int64) *CMModifyOrderHistoryService
- func (s *CMModifyOrderHistoryService) Symbol(symbol string) *CMModifyOrderHistoryService
- type CMModifyOrderResponse
- type CMModifyOrderService
- func (s *CMModifyOrderService) Do(ctx context.Context) (*CMModifyOrderResponse, error)
- func (s *CMModifyOrderService) OrderID(orderID int64) *CMModifyOrderService
- func (s *CMModifyOrderService) OrigClientOrderID(origClientOrderID string) *CMModifyOrderService
- func (s *CMModifyOrderService) Price(price string) *CMModifyOrderService
- func (s *CMModifyOrderService) Quantity(quantity string) *CMModifyOrderService
- func (s *CMModifyOrderService) RecvWindow(recvWindow int64) *CMModifyOrderService
- func (s *CMModifyOrderService) Side(side SideType) *CMModifyOrderService
- func (s *CMModifyOrderService) Symbol(symbol string) *CMModifyOrderService
- type CMOpenConditionalOrderResponse
- type CMOpenConditionalOrderService
- func (s *CMOpenConditionalOrderService) Do(ctx context.Context) (*CMOpenConditionalOrderResponse, error)
- func (s *CMOpenConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *CMOpenConditionalOrderService
- func (s *CMOpenConditionalOrderService) RecvWindow(recvWindow int64) *CMOpenConditionalOrderService
- func (s *CMOpenConditionalOrderService) StrategyID(strategyID int64) *CMOpenConditionalOrderService
- func (s *CMOpenConditionalOrderService) Symbol(symbol string) *CMOpenConditionalOrderService
- type CMOpenConditionalOrdersService
- func (s *CMOpenConditionalOrdersService) Do(ctx context.Context) ([]*CMOpenConditionalOrderResponse, error)
- func (s *CMOpenConditionalOrdersService) RecvWindow(recvWindow int64) *CMOpenConditionalOrdersService
- func (s *CMOpenConditionalOrdersService) Symbol(symbol string) *CMOpenConditionalOrdersService
- type CMOpenOrderResponse
- type CMOpenOrderService
- func (s *CMOpenOrderService) Do(ctx context.Context) (*CMOpenOrderResponse, error)
- func (s *CMOpenOrderService) OrderID(orderID int64) *CMOpenOrderService
- func (s *CMOpenOrderService) OrigClientOrderID(origClientOrderID string) *CMOpenOrderService
- func (s *CMOpenOrderService) RecvWindow(recvWindow int64) *CMOpenOrderService
- func (s *CMOpenOrderService) Symbol(symbol string) *CMOpenOrderService
- type CMOpenOrdersResponse
- type CMOpenOrdersService
- func (s *CMOpenOrdersService) Do(ctx context.Context) ([]*CMOpenOrdersResponse, error)
- func (s *CMOpenOrdersService) Pair(pair string) *CMOpenOrdersService
- func (s *CMOpenOrdersService) RecvWindow(recvWindow int64) *CMOpenOrdersService
- func (s *CMOpenOrdersService) Symbol(symbol string) *CMOpenOrdersService
- type CMOrder
- type CMOrderService
- func (s *CMOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CMOrder, err error)
- func (s *CMOrderService) NewClientOrderID(newClientOrderID string) *CMOrderService
- func (s *CMOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *CMOrderService
- func (s *CMOrderService) PositionSide(positionSide PositionSideType) *CMOrderService
- func (s *CMOrderService) Price(price string) *CMOrderService
- func (s *CMOrderService) Quantity(quantity string) *CMOrderService
- func (s *CMOrderService) ReduceOnly(reduceOnly bool) *CMOrderService
- func (s *CMOrderService) Side(side SideType) *CMOrderService
- func (s *CMOrderService) Symbol(symbol string) *CMOrderService
- func (s *CMOrderService) TimeInForce(timeInForce TimeInForceType) *CMOrderService
- func (s *CMOrderService) Type(orderType OrderType) *CMOrderService
- type CMPosition
- type CMQueryOrderResponse
- type CMQueryOrderService
- func (s *CMQueryOrderService) Do(ctx context.Context) (*CMQueryOrderResponse, error)
- func (s *CMQueryOrderService) OrderID(orderID int64) *CMQueryOrderService
- func (s *CMQueryOrderService) OrigClientOrderID(origClientOrderID string) *CMQueryOrderService
- func (s *CMQueryOrderService) RecvWindow(recvWindow int64) *CMQueryOrderService
- func (s *CMQueryOrderService) Symbol(symbol string) *CMQueryOrderService
- type ChangeAutoRepayFuturesStatusService
- type ChangeCMInitialLeverageService
- func (s *ChangeCMInitialLeverageService) Do(ctx context.Context, opts ...RequestOption) (res *CMLeverage, err error)
- func (s *ChangeCMInitialLeverageService) Leverage(leverage int) *ChangeCMInitialLeverageService
- func (s *ChangeCMInitialLeverageService) Symbol(symbol string) *ChangeCMInitialLeverageService
- type ChangeCMPositionModeService
- type ChangeUMInitialLeverageService
- func (s *ChangeUMInitialLeverageService) Do(ctx context.Context, opts ...RequestOption) (res *UMLeverage, err error)
- func (s *ChangeUMInitialLeverageService) Leverage(leverage int) *ChangeUMInitialLeverageService
- func (s *ChangeUMInitialLeverageService) Symbol(symbol string) *ChangeUMInitialLeverageService
- type ChangeUMPositionModeService
- type Client
- func (c *Client) NewBNBTransferService() *BNBTransferService
- func (c *Client) NewCMADLQuantileService() *CMADLQuantileService
- func (c *Client) NewCMAccountTradeService() *CMAccountTradeService
- func (c *Client) NewCMAccountTradesService() *CMAccountTradesService
- func (c *Client) NewCMAllOrdersService() *CMAllOrdersService
- func (c *Client) NewCMCancelAllConditionalOrdersService() *CMCancelAllConditionalOrdersService
- func (c *Client) NewCMCancelAllOrdersService() *CMCancelAllOrdersService
- func (c *Client) NewCMCancelConditionalOrderService() *CMCancelConditionalOrderService
- func (c *Client) NewCMCancelOrderService() *CMCancelOrderService
- func (c *Client) NewCMConditionalOrder() *CMConditionalOrderService
- func (c *Client) NewCMConditionalOrderHistoryService() *CMConditionalOrderHistoryService
- func (c *Client) NewCMConditionalOrderService() *CMConditionalOrderService
- func (c *Client) NewCMConditionalOrdersService() *CMConditionalOrdersService
- func (c *Client) NewCMForceOrdersService() *CMForceOrdersService
- func (c *Client) NewCMModifyOrderHistoryService() *CMModifyOrderHistoryService
- func (c *Client) NewCMModifyOrderService() *CMModifyOrderService
- func (c *Client) NewCMOpenConditionalOrderService() *CMOpenConditionalOrderService
- func (c *Client) NewCMOpenConditionalOrdersService() *CMOpenConditionalOrdersService
- func (c *Client) NewCMOpenOrderService() *CMOpenOrderService
- func (c *Client) NewCMOpenOrdersService() *CMOpenOrdersService
- func (c *Client) NewCMOrderService() *CMOrderService
- func (c *Client) NewCMQueryOrderService() *CMQueryOrderService
- func (c *Client) NewChangeAutoRepayFuturesStatusService() *ChangeAutoRepayFuturesStatusService
- func (c *Client) NewChangeCMInitialLeverageService() *ChangeCMInitialLeverageService
- func (c *Client) NewChangeCMPositionModeService() *ChangeCMPositionModeService
- func (c *Client) NewChangeUMInitialLeverageService() *ChangeUMInitialLeverageService
- func (c *Client) NewChangeUMPositionModeService() *ChangeUMPositionModeService
- func (c *Client) NewFundAutoCollectionService() *FundAutoCollectionService
- func (c *Client) NewFundCollectionByAssetService() *FundCollectionByAssetService
- func (c *Client) NewGetAccountService() *GetAccountService
- func (c *Client) NewGetAutoRepayFuturesStatusService() *GetAutoRepayFuturesStatusService
- func (c *Client) NewGetBalanceService() *GetBalanceService
- func (c *Client) NewGetCMAccountDetailService() *GetCMAccountDetailService
- func (c *Client) NewGetCMCommissionRateService() *GetCMCommissionRateService
- func (c *Client) NewGetCMIncomeHistoryService() *GetCMIncomeHistoryService
- func (c *Client) NewGetCMLeverageBracketService() *GetCMLeverageBracketService
- func (c *Client) NewGetCMPositionModeService() *GetCMPositionModeService
- func (c *Client) NewGetCMPositionRiskService() *GetCMPositionRiskService
- func (c *Client) NewGetMarginAllOrdersService() *GetMarginAllOrdersService
- func (c *Client) NewGetMarginForceOrdersService() *GetMarginForceOrdersService
- func (c *Client) NewGetMarginInterestHistoryService() *GetMarginInterestHistoryService
- func (c *Client) NewGetMarginLoanService() *GetMarginLoanService
- func (c *Client) NewGetMarginMaxBorrowService() *GetMarginMaxBorrowService
- func (c *Client) NewGetMarginMaxWithdrawService() *GetMarginMaxWithdrawService
- func (c *Client) NewGetMarginOpenOrdersService() *GetMarginOpenOrdersService
- func (c *Client) NewGetMarginRepayService() *GetMarginRepayService
- func (c *Client) NewGetNegativeBalanceExchangeRecordService() *GetNegativeBalanceExchangeRecordService
- func (c *Client) NewGetNegativeBalanceInterestHistoryService() *GetNegativeBalanceInterestHistoryService
- func (c *Client) NewGetRateLimitService() *GetRateLimitService
- func (c *Client) NewGetUMAccountConfigService() *UMAccountConfigService
- func (c *Client) NewGetUMAccountDetailService() *GetUMAccountDetailService
- func (c *Client) NewGetUMAccountDetailV2Service() *UMAccountDetailV2Service
- func (c *Client) NewGetUMCommissionRateService() *GetUMCommissionRateService
- func (c *Client) NewGetUMIncomeHistoryService() *GetUMIncomeHistoryService
- func (c *Client) NewGetUMLeverageBracketService() *GetUMLeverageBracketService
- func (c *Client) NewGetUMOrderDownloadLinkService() *GetUMOrderDownloadLinkService
- func (c *Client) NewGetUMOrderHistoryDownloadIDService() *GetUMOrderHistoryDownloadIDService
- func (c *Client) NewGetUMPositionModeService() *GetUMPositionModeService
- func (c *Client) NewGetUMPositionRiskService() *GetUMPositionRiskService
- func (c *Client) NewGetUMSymbolConfigService() *UMSymbolConfigService
- func (c *Client) NewGetUMTradeDownloadLinkService() *GetUMTradeDownloadLinkService
- func (c *Client) NewGetUMTradeHistoryDownloadIDService() *GetUMTradeHistoryDownloadIDService
- func (c *Client) NewGetUMTradingStatusService() *GetUMTradingStatusService
- func (c *Client) NewGetUMTransactionDownloadLinkService() *GetUMTransactionDownloadLinkService
- func (c *Client) NewGetUMTransactionHistoryDownloadIDService() *GetUMTransactionHistoryDownloadIDService
- func (c *Client) NewMarginAccountTradesService() *MarginAccountTradesService
- func (c *Client) NewMarginAllOCOService() *MarginAllOCOService
- func (c *Client) NewMarginCancelAllOrdersService() *MarginCancelAllOrdersService
- func (c *Client) NewMarginCancelOCOService() *MarginCancelOCOService
- func (c *Client) NewMarginCancelOrderService() *MarginCancelOrderService
- func (c *Client) NewMarginForceOrdersService() *MarginForceOrdersService
- func (c *Client) NewMarginLoanService() *MarginLoanService
- func (c *Client) NewMarginOCOQueryService() *MarginOCOQueryService
- func (c *Client) NewMarginOCOService() *MarginOCOService
- func (c *Client) NewMarginOpenOCOService() *MarginOpenOCOService
- func (c *Client) NewMarginOrderService() *MarginOrderService
- func (c *Client) NewMarginRepayDebtService() *MarginRepayDebtService
- func (c *Client) NewMarginRepayService() *MarginRepayService
- func (c *Client) NewPingService() *PingService
- func (c *Client) NewRepayFuturesNegativeBalanceService() *RepayFuturesNegativeBalanceService
- func (c *Client) NewUMADLQuantileService() *UMADLQuantileService
- func (c *Client) NewUMAccountTradeService() *UMAccountTradeService
- func (c *Client) NewUMAccountTradesService() *UMAccountTradesService
- func (c *Client) NewUMAllConditionalOrdersService() *UMAllConditionalOrdersService
- func (c *Client) NewUMAllOrdersService() *UMAllOrdersService
- func (c *Client) NewUMCancelAllConditionalOrdersService() *UMCancelAllConditionalOrdersService
- func (c *Client) NewUMCancelAllOrdersService() *UMCancelAllOrdersService
- func (c *Client) NewUMCancelConditionalOrderService() *UMCancelConditionalOrderService
- func (c *Client) NewUMCancelOrderService() *UMCancelOrderService
- func (c *Client) NewUMConditionalOrderHistoryService() *UMConditionalOrderHistoryService
- func (c *Client) NewUMConditionalOrderService() *UMConditionalOrderService
- func (c *Client) NewUMFeeBurnService() *UMFeeBurnService
- func (c *Client) NewUMFeeBurnStatusService() *UMFeeBurnStatusService
- func (c *Client) NewUMForceOrdersService() *UMForceOrdersService
- func (c *Client) NewUMGetADLQuantileService() *UMGetADLQuantileService
- func (c *Client) NewUMModifyOrderHistoryService() *UMModifyOrderHistoryService
- func (c *Client) NewUMModifyOrderService() *UMModifyOrderService
- func (c *Client) NewUMOpenConditionalOrderService() *UMOpenConditionalOrderService
- func (c *Client) NewUMOpenConditionalOrdersService() *UMOpenConditionalOrdersService
- func (c *Client) NewUMOpenOrderService() *UMOpenOrderService
- func (c *Client) NewUMOpenOrdersService() *UMOpenOrdersService
- func (c *Client) NewUMOrderService() *UMOrderService
- func (c *Client) NewUMQueryOrderService() *UMQueryOrderService
- func (c *Client) SetApiEndpoint(url string) *Client
- type CommissionRate
- type ContractType
- type Error
- type Fill
- type ForceOrderCloseType
- type FundAutoCollectionService
- type FundCollectionByAssetService
- type GetAccountService
- type GetAutoRepayFuturesStatusService
- type GetBalanceService
- type GetCMAccountDetailService
- type GetCMCommissionRateService
- type GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*Income, err error)
- func (s *GetCMIncomeHistoryService) EndTime(endTime int64) *GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) IncomeType(incomeType string) *GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) Limit(limit int) *GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) Page(page int) *GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) StartTime(startTime int64) *GetCMIncomeHistoryService
- func (s *GetCMIncomeHistoryService) Symbol(symbol string) *GetCMIncomeHistoryService
- type GetCMLeverageBracketService
- type GetCMPositionModeService
- type GetCMPositionRiskService
- type GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) Do(ctx context.Context) ([]*MarginOrder, error)
- func (s *GetMarginAllOrdersService) EndTime(endTime int64) *GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) Limit(limit int) *GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) OrderID(orderID int64) *GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) RecvWindow(recvWindow int64) *GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) StartTime(startTime int64) *GetMarginAllOrdersService
- func (s *GetMarginAllOrdersService) Symbol(symbol string) *GetMarginAllOrdersService
- type GetMarginForceOrdersService
- func (s *GetMarginForceOrdersService) Current(current int64) *GetMarginForceOrdersService
- func (s *GetMarginForceOrdersService) Do(ctx context.Context) (*MarginForceOrdersResponse, error)
- func (s *GetMarginForceOrdersService) EndTime(endTime int64) *GetMarginForceOrdersService
- func (s *GetMarginForceOrdersService) RecvWindow(recvWindow int64) *GetMarginForceOrdersService
- func (s *GetMarginForceOrdersService) Size(size int64) *GetMarginForceOrdersService
- func (s *GetMarginForceOrdersService) StartTime(startTime int64) *GetMarginForceOrdersService
- type GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) Archived(archived bool) *GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) Asset(asset string) *GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) Current(current int64) *GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) Do(ctx context.Context, opts ...RequestOption) (*MarginInterestHistoryResponse, error)
- func (s *GetMarginInterestHistoryService) EndTime(endTime int64) *GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) Size(size int64) *GetMarginInterestHistoryService
- func (s *GetMarginInterestHistoryService) StartTime(startTime int64) *GetMarginInterestHistoryService
- type GetMarginLoanResponse
- type GetMarginLoanService
- func (s *GetMarginLoanService) Archived(archived bool) *GetMarginLoanService
- func (s *GetMarginLoanService) Asset(asset string) *GetMarginLoanService
- func (s *GetMarginLoanService) Current(current int64) *GetMarginLoanService
- func (s *GetMarginLoanService) Do(ctx context.Context, opts ...RequestOption) (*GetMarginLoanResponse, error)
- func (s *GetMarginLoanService) EndTime(endTime int64) *GetMarginLoanService
- func (s *GetMarginLoanService) Size(size int64) *GetMarginLoanService
- func (s *GetMarginLoanService) StartTime(startTime int64) *GetMarginLoanService
- func (s *GetMarginLoanService) TxID(txID int64) *GetMarginLoanService
- type GetMarginMaxBorrowService
- type GetMarginMaxWithdrawService
- type GetMarginOpenOrdersService
- type GetMarginRepayResponse
- type GetMarginRepayService
- func (s *GetMarginRepayService) Archived(archived bool) *GetMarginRepayService
- func (s *GetMarginRepayService) Asset(asset string) *GetMarginRepayService
- func (s *GetMarginRepayService) Current(current int64) *GetMarginRepayService
- func (s *GetMarginRepayService) Do(ctx context.Context, opts ...RequestOption) (*GetMarginRepayResponse, error)
- func (s *GetMarginRepayService) EndTime(endTime int64) *GetMarginRepayService
- func (s *GetMarginRepayService) Size(size int64) *GetMarginRepayService
- func (s *GetMarginRepayService) StartTime(startTime int64) *GetMarginRepayService
- func (s *GetMarginRepayService) TxID(txID int64) *GetMarginRepayService
- type GetNegativeBalanceExchangeRecordService
- func (s *GetNegativeBalanceExchangeRecordService) Do(ctx context.Context, opts ...RequestOption) (*NegativeBalanceExchangeRecord, error)
- func (s *GetNegativeBalanceExchangeRecordService) EndTime(endTime int64) *GetNegativeBalanceExchangeRecordService
- func (s *GetNegativeBalanceExchangeRecordService) RecvWindow(recvWindow int64) *GetNegativeBalanceExchangeRecordService
- func (s *GetNegativeBalanceExchangeRecordService) StartTime(startTime int64) *GetNegativeBalanceExchangeRecordService
- type GetNegativeBalanceInterestHistoryService
- func (s *GetNegativeBalanceInterestHistoryService) Asset(asset string) *GetNegativeBalanceInterestHistoryService
- func (s *GetNegativeBalanceInterestHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*NegativeBalanceInterest, err error)
- func (s *GetNegativeBalanceInterestHistoryService) EndTime(endTime int64) *GetNegativeBalanceInterestHistoryService
- func (s *GetNegativeBalanceInterestHistoryService) Size(size int64) *GetNegativeBalanceInterestHistoryService
- func (s *GetNegativeBalanceInterestHistoryService) StartTime(startTime int64) *GetNegativeBalanceInterestHistoryService
- type GetRateLimitService
- type GetUMAccountDetailService
- type GetUMCommissionRateService
- type GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*Income, err error)
- func (s *GetUMIncomeHistoryService) EndTime(endTime int64) *GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) IncomeType(incomeType string) *GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) Limit(limit int) *GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) Page(page int) *GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) StartTime(startTime int64) *GetUMIncomeHistoryService
- func (s *GetUMIncomeHistoryService) Symbol(symbol string) *GetUMIncomeHistoryService
- type GetUMLeverageBracketService
- type GetUMOrderDownloadLinkService
- func (s *GetUMOrderDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMOrderDownloadLink, error)
- func (s *GetUMOrderDownloadLinkService) DownloadID(downloadID string) *GetUMOrderDownloadLinkService
- func (s *GetUMOrderDownloadLinkService) RecvWindow(recvWindow int64) *GetUMOrderDownloadLinkService
- type GetUMOrderHistoryDownloadIDService
- func (s *GetUMOrderHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMOrderHistoryDownloadID, error)
- func (s *GetUMOrderHistoryDownloadIDService) EndTime(endTime int64) *GetUMOrderHistoryDownloadIDService
- func (s *GetUMOrderHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMOrderHistoryDownloadIDService
- func (s *GetUMOrderHistoryDownloadIDService) StartTime(startTime int64) *GetUMOrderHistoryDownloadIDService
- type GetUMPositionModeService
- type GetUMPositionRiskService
- type GetUMTradeDownloadLinkService
- func (s *GetUMTradeDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMTradeDownloadLink, error)
- func (s *GetUMTradeDownloadLinkService) DownloadID(downloadID string) *GetUMTradeDownloadLinkService
- func (s *GetUMTradeDownloadLinkService) RecvWindow(recvWindow int64) *GetUMTradeDownloadLinkService
- type GetUMTradeHistoryDownloadIDService
- func (s *GetUMTradeHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMTradeHistoryDownloadID, error)
- func (s *GetUMTradeHistoryDownloadIDService) EndTime(endTime int64) *GetUMTradeHistoryDownloadIDService
- func (s *GetUMTradeHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMTradeHistoryDownloadIDService
- func (s *GetUMTradeHistoryDownloadIDService) StartTime(startTime int64) *GetUMTradeHistoryDownloadIDService
- type GetUMTradingStatusService
- type GetUMTransactionDownloadLinkService
- func (s *GetUMTransactionDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMTransactionDownloadLink, error)
- func (s *GetUMTransactionDownloadLinkService) DownloadID(downloadID string) *GetUMTransactionDownloadLinkService
- func (s *GetUMTransactionDownloadLinkService) RecvWindow(recvWindow int64) *GetUMTransactionDownloadLinkService
- type GetUMTransactionHistoryDownloadIDService
- func (s *GetUMTransactionHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMTransactionHistoryDownloadID, error)
- func (s *GetUMTransactionHistoryDownloadIDService) EndTime(endTime int64) *GetUMTransactionHistoryDownloadIDService
- func (s *GetUMTransactionHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMTransactionHistoryDownloadIDService
- func (s *GetUMTransactionHistoryDownloadIDService) StartTime(startTime int64) *GetUMTransactionHistoryDownloadIDService
- type Income
- type Indicator
- type LeverageBracket
- type MarginAccountTradesService
- func (s *MarginAccountTradesService) Do(ctx context.Context) ([]*MarginTrade, error)
- func (s *MarginAccountTradesService) EndTime(endTime int64) *MarginAccountTradesService
- func (s *MarginAccountTradesService) FromID(fromID int64) *MarginAccountTradesService
- func (s *MarginAccountTradesService) Limit(limit int) *MarginAccountTradesService
- func (s *MarginAccountTradesService) OrderID(orderID int64) *MarginAccountTradesService
- func (s *MarginAccountTradesService) RecvWindow(recvWindow int64) *MarginAccountTradesService
- func (s *MarginAccountTradesService) StartTime(startTime int64) *MarginAccountTradesService
- func (s *MarginAccountTradesService) Symbol(symbol string) *MarginAccountTradesService
- type MarginAllOCOService
- func (s *MarginAllOCOService) Do(ctx context.Context) ([]*MarginOCOResponse, error)
- func (s *MarginAllOCOService) EndTime(endTime int64) *MarginAllOCOService
- func (s *MarginAllOCOService) FromID(fromID int64) *MarginAllOCOService
- func (s *MarginAllOCOService) Limit(limit int) *MarginAllOCOService
- func (s *MarginAllOCOService) RecvWindow(recvWindow int64) *MarginAllOCOService
- func (s *MarginAllOCOService) StartTime(startTime int64) *MarginAllOCOService
- type MarginCancelAllOrdersResponse
- type MarginCancelAllOrdersService
- type MarginCancelOCOResponse
- type MarginCancelOCOService
- func (s *MarginCancelOCOService) Do(ctx context.Context) (*MarginCancelOCOResponse, error)
- func (s *MarginCancelOCOService) ListClientOrderID(listClientOrderID string) *MarginCancelOCOService
- func (s *MarginCancelOCOService) NewClientOrderID(newClientOrderID string) *MarginCancelOCOService
- func (s *MarginCancelOCOService) OrderListID(orderListID int64) *MarginCancelOCOService
- func (s *MarginCancelOCOService) RecvWindow(recvWindow int64) *MarginCancelOCOService
- func (s *MarginCancelOCOService) Symbol(symbol string) *MarginCancelOCOService
- type MarginCancelOrderResponse
- type MarginCancelOrderService
- func (s *MarginCancelOrderService) Do(ctx context.Context) (*MarginCancelOrderResponse, error)
- func (s *MarginCancelOrderService) NewClientOrderID(newClientOrderID string) *MarginCancelOrderService
- func (s *MarginCancelOrderService) OrderID(orderID int64) *MarginCancelOrderService
- func (s *MarginCancelOrderService) OrigClientOrderID(origClientOrderID string) *MarginCancelOrderService
- func (s *MarginCancelOrderService) RecvWindow(recvWindow int64) *MarginCancelOrderService
- func (s *MarginCancelOrderService) Symbol(symbol string) *MarginCancelOrderService
- type MarginForceOrder
- type MarginForceOrdersResponse
- type MarginForceOrdersService
- func (s *MarginForceOrdersService) Current(current int64) *MarginForceOrdersService
- func (s *MarginForceOrdersService) Do(ctx context.Context) (*MarginForceOrdersResponse, error)
- func (s *MarginForceOrdersService) EndTime(endTime int64) *MarginForceOrdersService
- func (s *MarginForceOrdersService) RecvWindow(recvWindow int64) *MarginForceOrdersService
- func (s *MarginForceOrdersService) Size(size int64) *MarginForceOrdersService
- func (s *MarginForceOrdersService) StartTime(startTime int64) *MarginForceOrdersService
- type MarginInterest
- type MarginInterestHistoryResponse
- type MarginLoan
- type MarginLoanResponse
- type MarginLoanService
- type MarginOCODetail
- type MarginOCOOrder
- type MarginOCOOrderDetail
- type MarginOCOOrderReport
- type MarginOCOQueryService
- type MarginOCOResponse
- type MarginOCOService
- func (s *MarginOCOService) Do(ctx context.Context, opts ...RequestOption) (res *MarginOCOResponse, err error)
- func (s *MarginOCOService) LimitClientOrderID(limitClientOrderID string) *MarginOCOService
- func (s *MarginOCOService) LimitIcebergQty(limitIcebergQty string) *MarginOCOService
- func (s *MarginOCOService) ListClientOrderID(listClientOrderID string) *MarginOCOService
- func (s *MarginOCOService) NewOrderRespType(newOrderRespType NewOrderRespType) *MarginOCOService
- func (s *MarginOCOService) Price(price string) *MarginOCOService
- func (s *MarginOCOService) Quantity(quantity string) *MarginOCOService
- func (s *MarginOCOService) RecvWindow(recvWindow int64) *MarginOCOService
- func (s *MarginOCOService) Side(side SideType) *MarginOCOService
- func (s *MarginOCOService) SideEffectType(sideEffectType SideEffectType) *MarginOCOService
- func (s *MarginOCOService) StopClientOrderID(stopClientOrderID string) *MarginOCOService
- func (s *MarginOCOService) StopIcebergQty(stopIcebergQty string) *MarginOCOService
- func (s *MarginOCOService) StopLimitPrice(stopLimitPrice string) *MarginOCOService
- func (s *MarginOCOService) StopLimitTimeInForce(timeInForce TimeInForceType) *MarginOCOService
- func (s *MarginOCOService) StopPrice(stopPrice string) *MarginOCOService
- func (s *MarginOCOService) Symbol(symbol string) *MarginOCOService
- type MarginOpenOCOService
- type MarginOrder
- type MarginOrderService
- func (s *MarginOrderService) AutoRepayAtCancel(autoRepay bool) *MarginOrderService
- func (s *MarginOrderService) Do(ctx context.Context, opts ...RequestOption) (res *MarginOrder, err error)
- func (s *MarginOrderService) IcebergQty(icebergQty string) *MarginOrderService
- func (s *MarginOrderService) NewClientOrderID(newClientOrderID string) *MarginOrderService
- func (s *MarginOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *MarginOrderService
- func (s *MarginOrderService) Price(price string) *MarginOrderService
- func (s *MarginOrderService) Quantity(quantity string) *MarginOrderService
- func (s *MarginOrderService) QuoteOrderQty(quoteOrderQty string) *MarginOrderService
- func (s *MarginOrderService) SelfTradePreventionMode(mode SelfTradePreventionMode) *MarginOrderService
- func (s *MarginOrderService) Side(side SideType) *MarginOrderService
- func (s *MarginOrderService) SideEffectType(sideEffectType string) *MarginOrderService
- func (s *MarginOrderService) StopPrice(stopPrice string) *MarginOrderService
- func (s *MarginOrderService) Symbol(symbol string) *MarginOrderService
- func (s *MarginOrderService) TimeInForce(timeInForce TimeInForceType) *MarginOrderService
- func (s *MarginOrderService) Type(orderType OrderType) *MarginOrderService
- type MarginRepay
- type MarginRepayDebtResponse
- type MarginRepayDebtService
- func (s *MarginRepayDebtService) Amount(amount string) *MarginRepayDebtService
- func (s *MarginRepayDebtService) Asset(asset string) *MarginRepayDebtService
- func (s *MarginRepayDebtService) Do(ctx context.Context) (*MarginRepayDebtResponse, error)
- func (s *MarginRepayDebtService) RecvWindow(recvWindow int64) *MarginRepayDebtService
- func (s *MarginRepayDebtService) SpecifyRepayAssets(assets string) *MarginRepayDebtService
- type MarginRepayResponse
- type MarginRepayService
- func (s *MarginRepayService) Amount(amount string) *MarginRepayService
- func (s *MarginRepayService) Asset(asset string) *MarginRepayService
- func (s *MarginRepayService) Do(ctx context.Context, opts ...RequestOption) (res *MarginRepayResponse, err error)
- func (s *MarginRepayService) RecvWindow(recvWindow int64) *MarginRepayService
- type MarginTrade
- type MarginType
- type MaxBorrow
- type MaxWithdraw
- type NegativeBalanceExchange
- type NegativeBalanceExchangeDetail
- type NegativeBalanceExchangeRecord
- type NegativeBalanceInterest
- type NewOrderRespType
- type Order
- type OrderExecutionType
- type OrderStatusType
- type OrderType
- type PingService
- type PositionMode
- type PositionSideType
- type PriceMatchType
- type RateLimit
- type RepayFuturesNegativeBalanceService
- type Report
- type RequestOption
- type SelfTradePreventionMode
- type SideEffectType
- type SideType
- type StrategyType
- type SuccessResponse
- type SymbolFilterType
- type SymbolStatusType
- type SymbolType
- type TimeInForceType
- type TradingStatus
- type UMADLQuantileResponse
- type UMADLQuantileService
- type UMAccountConfig
- type UMAccountConfigService
- type UMAccountDetail
- type UMAccountDetailV2
- type UMAccountDetailV2Service
- type UMAccountTrade
- type UMAccountTradeService
- func (s *UMAccountTradeService) Do(ctx context.Context) ([]*UMAccountTrade, error)
- func (s *UMAccountTradeService) EndTime(endTime int64) *UMAccountTradeService
- func (s *UMAccountTradeService) FromID(fromID int64) *UMAccountTradeService
- func (s *UMAccountTradeService) Limit(limit int) *UMAccountTradeService
- func (s *UMAccountTradeService) RecvWindow(recvWindow int64) *UMAccountTradeService
- func (s *UMAccountTradeService) StartTime(startTime int64) *UMAccountTradeService
- func (s *UMAccountTradeService) Symbol(symbol string) *UMAccountTradeService
- type UMAccountTradesService
- func (s *UMAccountTradesService) Do(ctx context.Context) ([]*UMAccountTrade, error)
- func (s *UMAccountTradesService) EndTime(endTime int64) *UMAccountTradesService
- func (s *UMAccountTradesService) FromID(fromID int64) *UMAccountTradesService
- func (s *UMAccountTradesService) Limit(limit int) *UMAccountTradesService
- func (s *UMAccountTradesService) RecvWindow(recvWindow int64) *UMAccountTradesService
- func (s *UMAccountTradesService) StartTime(startTime int64) *UMAccountTradesService
- func (s *UMAccountTradesService) Symbol(symbol string) *UMAccountTradesService
- type UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) Do(ctx context.Context) ([]*UMConditionalOrderResponse, error)
- func (s *UMAllConditionalOrdersService) EndTime(endTime int64) *UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) Limit(limit int) *UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) RecvWindow(recvWindow int64) *UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) StartTime(startTime int64) *UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) StrategyID(strategyID int64) *UMAllConditionalOrdersService
- func (s *UMAllConditionalOrdersService) Symbol(symbol string) *UMAllConditionalOrdersService
- type UMAllOrdersResponse
- type UMAllOrdersService
- func (s *UMAllOrdersService) Do(ctx context.Context) ([]*UMAllOrdersResponse, error)
- func (s *UMAllOrdersService) EndTime(endTime int64) *UMAllOrdersService
- func (s *UMAllOrdersService) Limit(limit int) *UMAllOrdersService
- func (s *UMAllOrdersService) OrderID(orderID int64) *UMAllOrdersService
- func (s *UMAllOrdersService) RecvWindow(recvWindow int64) *UMAllOrdersService
- func (s *UMAllOrdersService) StartTime(startTime int64) *UMAllOrdersService
- func (s *UMAllOrdersService) Symbol(symbol string) *UMAllOrdersService
- type UMAsset
- type UMAssetV2
- type UMCancelAllConditionalOrdersResponse
- type UMCancelAllConditionalOrdersService
- func (s *UMCancelAllConditionalOrdersService) Do(ctx context.Context) (*UMCancelAllConditionalOrdersResponse, error)
- func (s *UMCancelAllConditionalOrdersService) RecvWindow(recvWindow int64) *UMCancelAllConditionalOrdersService
- func (s *UMCancelAllConditionalOrdersService) Symbol(symbol string) *UMCancelAllConditionalOrdersService
- type UMCancelAllOrdersResponse
- type UMCancelAllOrdersService
- type UMCancelConditionalOrderResponse
- type UMCancelConditionalOrderService
- func (s *UMCancelConditionalOrderService) Do(ctx context.Context) (*UMCancelConditionalOrderResponse, error)
- func (s *UMCancelConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *UMCancelConditionalOrderService
- func (s *UMCancelConditionalOrderService) RecvWindow(recvWindow int64) *UMCancelConditionalOrderService
- func (s *UMCancelConditionalOrderService) StrategyID(strategyID int64) *UMCancelConditionalOrderService
- func (s *UMCancelConditionalOrderService) Symbol(symbol string) *UMCancelConditionalOrderService
- type UMCancelOrderService
- func (s *UMCancelOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMOrder, err error)
- func (s *UMCancelOrderService) OrderID(orderID int64) *UMCancelOrderService
- func (s *UMCancelOrderService) OrigClientOrderID(origClientOrderID string) *UMCancelOrderService
- func (s *UMCancelOrderService) RecvWindow(recvWindow int64) *UMCancelOrderService
- func (s *UMCancelOrderService) Symbol(symbol string) *UMCancelOrderService
- type UMConditionalOrder
- type UMConditionalOrderHistoryResponse
- type UMConditionalOrderHistoryService
- func (s *UMConditionalOrderHistoryService) Do(ctx context.Context) (*UMConditionalOrderHistoryResponse, error)
- func (s *UMConditionalOrderHistoryService) NewClientStrategyID(newClientStrategyID string) *UMConditionalOrderHistoryService
- func (s *UMConditionalOrderHistoryService) RecvWindow(recvWindow int64) *UMConditionalOrderHistoryService
- func (s *UMConditionalOrderHistoryService) StrategyID(strategyID int64) *UMConditionalOrderHistoryService
- func (s *UMConditionalOrderHistoryService) Symbol(symbol string) *UMConditionalOrderHistoryService
- type UMConditionalOrderResponse
- type UMConditionalOrderService
- func (s *UMConditionalOrderService) ActivationPrice(price string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) CallbackRate(rate string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMConditionalOrder, err error)
- func (s *UMConditionalOrderService) PositionSide(positionSide PositionSideType) *UMConditionalOrderService
- func (s *UMConditionalOrderService) Price(price string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) PriceProtect(protect bool) *UMConditionalOrderService
- func (s *UMConditionalOrderService) Quantity(quantity string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) Side(side SideType) *UMConditionalOrderService
- func (s *UMConditionalOrderService) StopPrice(stopPrice string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) StrategyType(strategyType string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) Symbol(symbol string) *UMConditionalOrderService
- func (s *UMConditionalOrderService) TimeInForce(timeInForce TimeInForceType) *UMConditionalOrderService
- func (s *UMConditionalOrderService) WorkingType(workingType string) *UMConditionalOrderService
- type UMFeeBurnResponse
- type UMFeeBurnService
- type UMFeeBurnStatusResponse
- type UMFeeBurnStatusService
- type UMForceOrderResponse
- type UMForceOrdersService
- func (s *UMForceOrdersService) AutoCloseType(autoCloseType string) *UMForceOrdersService
- func (s *UMForceOrdersService) Do(ctx context.Context) ([]*UMForceOrderResponse, error)
- func (s *UMForceOrdersService) EndTime(endTime int64) *UMForceOrdersService
- func (s *UMForceOrdersService) Limit(limit int) *UMForceOrdersService
- func (s *UMForceOrdersService) RecvWindow(recvWindow int64) *UMForceOrdersService
- func (s *UMForceOrdersService) StartTime(startTime int64) *UMForceOrdersService
- func (s *UMForceOrdersService) Symbol(symbol string) *UMForceOrdersService
- type UMGetADLQuantileService
- type UMLeverage
- type UMModifyOrderHistoryResponse
- type UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) Do(ctx context.Context) ([]*UMModifyOrderHistoryResponse, error)
- func (s *UMModifyOrderHistoryService) EndTime(endTime int64) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) Limit(limit int) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) OrderID(orderID int64) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) OrigClientOrderID(origClientOrderID string) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) RecvWindow(recvWindow int64) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) StartTime(startTime int64) *UMModifyOrderHistoryService
- func (s *UMModifyOrderHistoryService) Symbol(symbol string) *UMModifyOrderHistoryService
- type UMModifyOrderResponse
- type UMModifyOrderService
- func (s *UMModifyOrderService) Do(ctx context.Context) (*UMModifyOrderResponse, error)
- func (s *UMModifyOrderService) OrderID(orderID int64) *UMModifyOrderService
- func (s *UMModifyOrderService) OrigClientOrderID(origClientOrderID string) *UMModifyOrderService
- func (s *UMModifyOrderService) Price(price string) *UMModifyOrderService
- func (s *UMModifyOrderService) PriceMatch(priceMatch string) *UMModifyOrderService
- func (s *UMModifyOrderService) Quantity(quantity string) *UMModifyOrderService
- func (s *UMModifyOrderService) RecvWindow(recvWindow int64) *UMModifyOrderService
- func (s *UMModifyOrderService) Side(side SideType) *UMModifyOrderService
- func (s *UMModifyOrderService) Symbol(symbol string) *UMModifyOrderService
- type UMOpenConditionalOrderResponse
- type UMOpenConditionalOrderService
- func (s *UMOpenConditionalOrderService) Do(ctx context.Context) (*UMOpenConditionalOrderResponse, error)
- func (s *UMOpenConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *UMOpenConditionalOrderService
- func (s *UMOpenConditionalOrderService) RecvWindow(recvWindow int64) *UMOpenConditionalOrderService
- func (s *UMOpenConditionalOrderService) StrategyID(strategyID int64) *UMOpenConditionalOrderService
- func (s *UMOpenConditionalOrderService) Symbol(symbol string) *UMOpenConditionalOrderService
- type UMOpenConditionalOrdersService
- func (s *UMOpenConditionalOrdersService) Do(ctx context.Context) ([]*UMOpenConditionalOrderResponse, error)
- func (s *UMOpenConditionalOrdersService) RecvWindow(recvWindow int64) *UMOpenConditionalOrdersService
- func (s *UMOpenConditionalOrdersService) Symbol(symbol string) *UMOpenConditionalOrdersService
- type UMOpenOrderResponse
- type UMOpenOrderService
- func (s *UMOpenOrderService) Do(ctx context.Context) (*UMOpenOrderResponse, error)
- func (s *UMOpenOrderService) OrderID(orderID int64) *UMOpenOrderService
- func (s *UMOpenOrderService) OrigClientOrderID(origClientOrderID string) *UMOpenOrderService
- func (s *UMOpenOrderService) RecvWindow(recvWindow int64) *UMOpenOrderService
- func (s *UMOpenOrderService) Symbol(symbol string) *UMOpenOrderService
- type UMOpenOrdersResponse
- type UMOpenOrdersService
- type UMOrder
- type UMOrderDownloadLink
- type UMOrderHistoryDownloadID
- type UMOrderService
- func (s *UMOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMOrder, err error)
- func (s *UMOrderService) GoodTillDate(timestamp int64) *UMOrderService
- func (s *UMOrderService) NewClientOrderID(newClientOrderID string) *UMOrderService
- func (s *UMOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *UMOrderService
- func (s *UMOrderService) PositionSide(positionSide PositionSideType) *UMOrderService
- func (s *UMOrderService) Price(price string) *UMOrderService
- func (s *UMOrderService) PriceMatch(priceMatch PriceMatchType) *UMOrderService
- func (s *UMOrderService) Quantity(quantity string) *UMOrderService
- func (s *UMOrderService) ReduceOnly(reduceOnly bool) *UMOrderService
- func (s *UMOrderService) SelfTradePreventionMode(mode SelfTradePreventionMode) *UMOrderService
- func (s *UMOrderService) Side(side SideType) *UMOrderService
- func (s *UMOrderService) Symbol(symbol string) *UMOrderService
- func (s *UMOrderService) TimeInForce(timeInForce TimeInForceType) *UMOrderService
- func (s *UMOrderService) Type(orderType OrderType) *UMOrderService
- type UMPosition
- type UMPositionV2
- type UMQueryOrderResponse
- type UMQueryOrderService
- func (s *UMQueryOrderService) Do(ctx context.Context) (*UMQueryOrderResponse, error)
- func (s *UMQueryOrderService) OrderID(orderID int64) *UMQueryOrderService
- func (s *UMQueryOrderService) OrigClientOrderID(origClientOrderID string) *UMQueryOrderService
- func (s *UMQueryOrderService) RecvWindow(recvWindow int64) *UMQueryOrderService
- func (s *UMQueryOrderService) Symbol(symbol string) *UMQueryOrderService
- type UMSymbolConfig
- type UMSymbolConfigService
- type UMTradeDownloadLink
- type UMTradeHistoryDownloadID
- type UMTransactionDownloadLink
- type UMTransactionHistoryDownloadID
- type UserDataEventReasonType
- type UserDataEventType
- type WorkingType
Constants ¶
const ( TransferSideToUM = "TO_UM" TransferSideFromUM = "FROM_UM" )
Constants for transfer side
const ( SideTypeBuy SideType = "BUY" SideTypeSell SideType = "SELL" PositionSideTypeBoth PositionSideType = "BOTH" PositionSideTypeLong PositionSideType = "LONG" PositionSideTypeShort PositionSideType = "SHORT" OrderTypeLimit OrderType = "LIMIT" OrderTypeMarket OrderType = "MARKET" OrderTypeStop OrderType = "STOP" OrderTypeStopMarket OrderType = "STOP_MARKET" OrderTypeTakeProfit OrderType = "TAKE_PROFIT" OrderTypeTakeProfitLimit OrderType = "TAKE_PROFIT_LIMIT" OrderTypeTakeProfitMarket OrderType = "TAKE_PROFIT_MARKET" OrderTypeTrailingStopMarket OrderType = "TRAILING_STOP_MARKET" OrderTypeLiquidation OrderType = "LIQUIDATION" TimeInForceTypeGTC TimeInForceType = "GTC" // Good Till Cancel TimeInForceTypeIOC TimeInForceType = "IOC" // Immediate or Cancel TimeInForceTypeFOK TimeInForceType = "FOK" // Fill or Kill TimeInForceTypeGTX TimeInForceType = "GTX" // Good Till Crossing (Post Only) TimeInForceTypeGTD TimeInForceType = "GTD" // Good Till Date NewOrderRespTypeACK NewOrderRespType = "ACK" NewOrderRespTypeRESULT NewOrderRespType = "RESULT" OrderExecutionTypeNew OrderExecutionType = "NEW" OrderExecutionTypePartialFill OrderExecutionType = "PARTIAL_FILL" OrderExecutionTypeFill OrderExecutionType = "FILL" OrderExecutionTypeCanceled OrderExecutionType = "CANCELED" OrderExecutionTypeCalculated OrderExecutionType = "CALCULATED" OrderExecutionTypeExpired OrderExecutionType = "EXPIRED" OrderExecutionTypeTrade OrderExecutionType = "TRADE" OrderStatusTypeNew OrderStatusType = "NEW" OrderStatusTypePartiallyFilled OrderStatusType = "PARTIALLY_FILLED" OrderStatusTypeFilled OrderStatusType = "FILLED" OrderStatusTypeCanceled OrderStatusType = "CANCELED" OrderStatusTypeRejected OrderStatusType = "REJECTED" OrderStatusTypeExpired OrderStatusType = "EXPIRED" OrderStatusTypeNewInsurance OrderStatusType = "NEW_INSURANCE" OrderStatusTypeNewADL OrderStatusType = "NEW_ADL" PriceMatchTypeOpponent PriceMatchType = "OPPONENT" PriceMatchTypeOpponent5 PriceMatchType = "OPPONENT_5" PriceMatchTypeOpponent10 PriceMatchType = "OPPONENT_10" PriceMatchTypeOpponent20 PriceMatchType = "OPPONENT_20" PriceMatchTypeQueue PriceMatchType = "QUEUE" PriceMatchTypeQueue5 PriceMatchType = "QUEUE_5" PriceMatchTypeQueue10 PriceMatchType = "QUEUE_10" PriceMatchTypeQueue20 PriceMatchType = "QUEUE_20" PriceMatchTypeNone PriceMatchType = "NONE" SymbolTypeFuture SymbolType = "FUTURE" WorkingTypeMarkPrice WorkingType = "MARK_PRICE" WorkingTypeContractPrice WorkingType = "CONTRACT_PRICE" SymbolStatusTypePreTrading SymbolStatusType = "PRE_TRADING" SymbolStatusTypeTrading SymbolStatusType = "TRADING" SymbolStatusTypePostTrading SymbolStatusType = "POST_TRADING" SymbolStatusTypeEndOfDay SymbolStatusType = "END_OF_DAY" SymbolStatusTypeHalt SymbolStatusType = "HALT" SymbolStatusTypeAuctionMatch SymbolStatusType = "AUCTION_MATCH" SymbolStatusTypeBreak SymbolStatusType = "BREAK" SymbolFilterTypeLotSize SymbolFilterType = "LOT_SIZE" SymbolFilterTypePrice SymbolFilterType = "PRICE_FILTER" SymbolFilterTypePercentPrice SymbolFilterType = "PERCENT_PRICE" SymbolFilterTypeMarketLotSize SymbolFilterType = "MARKET_LOT_SIZE" SymbolFilterTypeMaxNumOrders SymbolFilterType = "MAX_NUM_ORDERS" SymbolFilterTypeMaxNumAlgoOrders SymbolFilterType = "MAX_NUM_ALGO_ORDERS" SymbolFilterTypeMinNotional SymbolFilterType = "MIN_NOTIONAL" SideEffectTypeNoSideEffect SideEffectType = "NO_SIDE_EFFECT" SideEffectTypeMarginBuy SideEffectType = "MARGIN_BUY" SideEffectTypeAutoRepay SideEffectType = "AUTO_REPAY" MarginTypeIsolated MarginType = "ISOLATED" MarginTypeCrossed MarginType = "CROSSED" ContractTypePerpetual ContractType = "PERPETUAL" ContractTypeCurrentQuarter ContractType = "CURRENT_QUARTER" ContractTypeNextQuarter ContractType = "NEXT_QUARTER" UserDataEventTypeListenKeyExpired UserDataEventType = "listenKeyExpired" UserDataEventTypeMarginCall UserDataEventType = "MARGIN_CALL" UserDataEventTypeAccountUpdate UserDataEventType = "ACCOUNT_UPDATE" UserDataEventTypeOrderTradeUpdate UserDataEventType = "ORDER_TRADE_UPDATE" UserDataEventTypeAccountConfigUpdate UserDataEventType = "ACCOUNT_CONFIG_UPDATE" UserDataEventTypeTradeLite UserDataEventType = "TRADE_LITE" UserDataEventReasonTypeDeposit UserDataEventReasonType = "DEPOSIT" UserDataEventReasonTypeWithdraw UserDataEventReasonType = "WITHDRAW" UserDataEventReasonTypeOrder UserDataEventReasonType = "ORDER" UserDataEventReasonTypeFundingFee UserDataEventReasonType = "FUNDING_FEE" UserDataEventReasonTypeWithdrawReject UserDataEventReasonType = "WITHDRAW_REJECT" UserDataEventReasonTypeAdjustment UserDataEventReasonType = "ADJUSTMENT" UserDataEventReasonTypeInsuranceClear UserDataEventReasonType = "INSURANCE_CLEAR" UserDataEventReasonTypeAdminDeposit UserDataEventReasonType = "ADMIN_DEPOSIT" UserDataEventReasonTypeAdminWithdraw UserDataEventReasonType = "ADMIN_WITHDRAW" UserDataEventReasonTypeMarginTransfer UserDataEventReasonType = "MARGIN_TRANSFER" UserDataEventReasonTypeMarginTypeChange UserDataEventReasonType = "MARGIN_TYPE_CHANGE" UserDataEventReasonTypeAssetTransfer UserDataEventReasonType = "ASSET_TRANSFER" UserDataEventReasonTypeOptionsPremiumFee UserDataEventReasonType = "OPTIONS_PREMIUM_FEE" UserDataEventReasonTypeOptionsSettleProfit UserDataEventReasonType = "OPTIONS_SETTLE_PROFIT" ForceOrderCloseTypeLiquidation ForceOrderCloseType = "LIQUIDATION" ForceOrderCloseTypeADL ForceOrderCloseType = "ADL" SelfTradePreventionModeNone SelfTradePreventionMode = "NONE" SelfTradePreventionModeExpireTaker SelfTradePreventionMode = "EXPIRE_TAKER" SelfTradePreventionModeExpireBoth SelfTradePreventionMode = "EXPIRE_BOTH" SelfTradePreventionModeExpireMaker SelfTradePreventionMode = "EXPIRE_MAKER" StrategyTypeStop StrategyType = "STOP" StrategyTypeStopMarket StrategyType = "STOP_MARKET" StrategyTypeTakeProfit StrategyType = "TAKE_PROFIT" StrategyTypeTakeProfitMarket StrategyType = "TAKE_PROFIT_MARKET" StrategyTypeTrailingStopMarket StrategyType = "TRAILING_STOP_MARKET" )
Global enums
const ( CMIncomeTypeTransfer = "TRANSFER" CMIncomeTypeWelcomeBonus = "WELCOME_BONUS" CMIncomeTypeFundingFee = "FUNDING_FEE" CMIncomeTypeRealizedPNL = "REALIZED_PNL" CMIncomeTypeCommission = "COMMISSION" CMIncomeTypeInsuranceClear = "INSURANCE_CLEAR" CMIncomeTypeDeliveredSettlement = "DELIVERED_SETTELMENT" )
Constants for CM income types
const ( ErrUnknown = -1000 // An unknown error occurred while processing the request ErrDisconnected = -1001 // Internal error; unable to process your request ErrTooManyRequests = -1003 // Too many requests ErrDuplicateIP = -1004 // This IP is already on the white list ErrNoSuchIP = -1005 // No such IP has been white listed ErrUnexpectedResp = -1006 // An unexpected response was received from the message bus ErrTimeout = -1007 // Timeout waiting for response from backend server ErrErrorMsgReceived = -1010 // Error message received ErrNonWhiteList = -1011 // This IP cannot access this route ErrInvalidMessage = -1013 // Invalid message ErrUnknownOrderCompose = -1014 // Unsupported order combination ErrTooManyOrders = -1015 // Too many new orders ErrServiceShuttingDown = -1016 // This service is no longer available ErrUnsupportedOperation = -1020 // This operation is not supported ErrInvalidTimestamp = -1021 // Timestamp for this request is outside of the recvWindow ErrInvalidSignature = -1022 // Signature for this request is not valid ErrStartTimeGreaterEnd = -1023 // Start time is greater than end time )
10xx - General Server or Network issues
const ( ErrIllegalChars = -1100 // Illegal characters found in parameter ErrTooManyParameters = -1101 // Too many parameters sent for this endpoint ErrMandatoryParamEmptyOrMalformed = -1102 // Mandatory parameter was not sent, empty/null, or malformed ErrUnknownParam = -1103 // An unknown parameter was sent ErrUnreadParameters = -1104 // Not all sent parameters were read ErrParamEmpty = -1105 // Parameter was empty ErrParamNotRequired = -1106 // Parameter was sent when not required ErrBadAsset = -1108 // Invalid asset ErrBadAccount = -1109 // Invalid account ErrBadInstrumentType = -1110 // Invalid symbolType ErrBadPrecision = -1111 // Precision is over the maximum defined ErrNoDepth = -1112 // No orders on book for symbol ErrWithdrawNotNegative = -1113 // Withdrawal amount must be negative ErrTIFNotRequired = -1114 // TimeInForce parameter sent when not required ErrInvalidTIF = -1115 // Invalid timeInForce ErrInvalidOrderType = -1116 // Invalid orderType ErrInvalidSide = -1117 // Invalid side ErrEmptyNewClOrdID = -1118 // New client order ID was empty ErrEmptyOrgClOrdID = -1119 // Original client order ID was empty ErrBadInterval = -1120 // Invalid interval ErrBadSymbol = -1121 // Invalid symbol ErrInvalidListenKey = -1125 // This listenKey does not exist ErrMoreThanXXHours = -1127 // Lookup interval is too big ErrOptionalParamsBadCombo = -1128 // Combination of optional parameters invalid ErrInvalidParameter = -1130 // Invalid data sent for a parameter ErrInvalidNewOrderRespType = -1136 // Invalid newOrderRespType )
11xx - Request issues
const ( ErrNewOrderRejected = -2010 // NEW_ORDER_REJECTED ErrCancelRejected = -2011 // CANCEL_REJECTED ErrNoSuchOrder = -2013 // Order does not exist ErrBadAPIKeyFmt = -2014 // API-key format invalid ErrRejectedMBXKey = -2015 // Invalid API-key, IP, or permissions ErrNoTradingWindow = -2016 // No trading window could be found ErrBalanceNotSufficient = -2018 // Balance is insufficient ErrMarginNotSufficient = -2019 // Margin is insufficient ErrUnableToFill = -2020 // Unable to fill ErrOrderWouldImmediatelyTrigger = -2021 // Order would immediately trigger ErrReduceOnlyReject = -2022 // ReduceOnly Order is rejected ErrUserInLiquidation = -2023 // User in liquidation mode now ErrPositionNotSufficient = -2024 // Position is not sufficient ErrMaxOpenOrderExceeded = -2025 // Max open order exceeded ErrReduceOnlyOrderTypeNotSupported = -2026 // Reduce only order type not supported ErrMaxLeverageRatio = -2027 // Max leverage ratio reached ErrMinLeverageRatio = -2028 // Min leverage ratio reached )
20xx - Processing Issues
const ( ErrInvalidOrderStatus = -4000 // Invalid order status ErrPriceLessThanZero = -4001 // Price less than zero ErrPriceGreaterThanMaxPrice = -4002 // Price greater than max price ErrQtyLessThanZero = -4003 // Quantity less than zero ErrQtyLessThanMinQty = -4004 // Quantity less than min quantity ErrQtyGreaterThanMaxQty = -4005 // Quantity greater than max quantity ErrStopPriceLessThanZero = -4006 // Stop price less than zero ErrStopPriceGreaterThanMaxPrice = -4007 // Stop price greater than max price ErrTickSizeLessThanZero = -4008 // Tick size less than zero ErrMaxPriceLessThanMinPrice = -4009 // Max price less than min price ErrMaxQtyLessThanMinQty = -4010 // Max quantity less than min quantity ErrStepSizeLessThanZero = -4011 // Step size less than zero ErrMaxNumOrdersLessThanZero = -4012 // Max number of orders less than zero ErrPriceLessThanMinPrice = -4013 // Price less than min price ErrPriceNotIncreasedByTickSize = -4014 // Price not increased by tick size ErrInvalidClOrdIDLen = -4015 // Invalid client order ID length ErrPriceHigherThanMultiplierUp = -4016 // Price higher than multiplier up ErrMultiplierUpLessThanZero = -4017 // Multiplier up less than zero ErrMultiplierDownLessThanZero = -4018 // Multiplier down less than zero ErrCompositeScaleOverflow = -4019 // Composite scale overflow ErrTargetStrategyInvalid = -4020 // Target strategy invalid ErrInvalidDepthLimit = -4021 // Invalid depth limit ErrWrongMarketStatus = -4022 // Wrong market status ErrQtyNotIncreasedByStepSize = -4023 // Quantity not increased by step size ErrPriceLowerThanMultiplierDown = -4024 // Price lower than multiplier down ErrMultiplierDecimalLessThanZero = -4025 // Multiplier decimal less than zero ErrCommissionInvalid = -4026 // Commission invalid ErrInvalidAccountType = -4027 // Invalid account type ErrInvalidLeverage = -4028 // Invalid leverage ErrInvalidTickSizePrecision = -4029 // Invalid tick size precision ErrInvalidStepSizePrecision = -4030 // Invalid step size precision ErrInvalidWorkingType = -4031 // Invalid working type ErrExceedMaxCancelOrderSize = -4032 // Exceed max cancel order size ErrInsuranceAccountNotFound = -4033 // Insurance account not found ErrInvalidBalanceType = -4044 // Invalid balance type ErrMaxStopOrderExceeded = -4045 // Max stop order exceeded ErrNoNeedToChangeMarginType = -4046 // No need to change margin type ErrThereExistsOpenOrders = -4047 // There exists open orders ErrThereExistsQuantity = -4048 // There exists quantity ErrAddIsolatedMarginReject = -4049 // Add isolated margin reject ErrCrossBalanceInsufficient = -4050 // Cross balance insufficient ErrIsolatedBalanceInsufficient = -4051 // Isolated balance insufficient ErrNoNeedToChangeAutoAddMargin = -4052 // No need to change auto add margin ErrAutoAddCrossedMarginReject = -4053 // Auto add crossed margin reject ErrAddIsolatedMarginNoPositionReject = -4054 // Add isolated margin no position reject ErrAmountMustBePositive = -4055 // Amount must be positive ErrInvalidAPIKeyType = -4056 // Invalid API key type ErrInvalidRSAPublicKey = -4057 // Invalid RSA public key ErrMaxPriceTooLarge = -4058 // Max price too large ErrNoNeedToChangePositionSide = -4059 // No need to change position side ErrInvalidPositionSide = -4060 // Invalid position side ErrPositionSideNotMatch = -4061 // Position side not match ErrReduceOnlyConflict = -4062 // Reduce only conflict ErrInvalidOptionsRequestType = -4063 // Invalid options request type ErrInvalidOptionsTimeFrame = -4064 // Invalid options time frame ErrInvalidOptionsAmount = -4065 // Invalid options amount ErrInvalidOptionsEventType = -4066 // Invalid options event type ErrPositionSideChangeExistsOpenOrders = -4067 // Position side change exists open orders ErrPositionSideChangeExistsQuantity = -4068 // Position side change exists quantity ErrInvalidOptionsPremiumFee = -4069 // Invalid options premium fee ErrInvalidClOptionsIDLen = -4070 // Invalid cl options ID length ErrInvalidOptionsDirection = -4071 // Invalid options direction ErrOptionsPremiumNotUpdate = -4072 // Options premium not update ErrOptionsPremiumInputLessThanZero = -4073 // Options premium input less than zero ErrOptionsAmountBiggerThanUpper = -4074 // Options amount bigger than upper ErrOptionsPremiumOutputZero = -4075 // Options premium output zero ErrOptionsPremiumTooDiff = -4076 // Options premium too diff ErrOptionsPremiumReachLimit = -4077 // Options premium reach limit ErrOptionsCommonError = -4078 // Options common error ErrInvalidOptionsID = -4079 // Invalid options ID ErrOptionsUserNotFound = -4080 // Options user not found ErrOptionsNotFound = -4081 // Options not found ErrInvalidBatchPlaceOrderSize = -4082 // Invalid batch place order size ErrPlaceBatchOrdersFail = -4083 // Place batch orders fail ErrUpcomingMethod = -4084 // Upcoming method ErrInvalidNotionalLimitCoef = -4085 // Invalid notional limit coefficient ErrInvalidPriceSpreadThreshold = -4086 // Invalid price spread threshold ErrReduceOnlyOrderPermission = -4087 // Reduce only order permission ErrNoPlaceOrderPermission = -4088 // No place order permission ErrInvalidContractType = -4104 // Invalid contract type ErrInvalidClientTranIDLen = -4114 // Invalid client transaction ID length ErrDuplicatedClientTranID = -4115 // Duplicated client transaction ID ErrReduceOnlyMarginCheckFailed = -4118 // Reduce only margin check failed ErrMarketOrderReject = -4131 // Market order reject ErrInvalidActivationPrice = -4135 // Invalid activation price ErrQuantityExistsWithClosePosition = -4137 // Quantity exists with close position ErrReduceOnlyMustBeTrue = -4138 // Reduce only must be true ErrOrderTypeCannotBeMKT = -4139 // Order type cannot be MKT ErrInvalidOpeningPositionStatus = -4140 // Invalid opening position status ErrSymbolAlreadyClosed = -4141 // Symbol already closed ErrStrategyInvalidTriggerPrice = -4142 // Strategy invalid trigger price ErrInvalidPair = -4144 // Invalid pair ErrIsolatedLeverageRejectWithPosition = -4161 // Isolated leverage reject with position ErrMinNotional = -4164 // Min notional ErrInvalidTimeInterval = -4165 // Invalid time interval ErrPriceHigherThanStopMultiplierUp = -4183 // Price higher than stop multiplier up ErrPriceLowerThanStopMultiplierDown = -4184 // Price lower than stop multiplier down )
40xx - Filters and Other Issues
const ( ErrFOKOrderReject = -5021 // FOK order rejected ErrGTXOrderReject = -5022 // GTX order rejected ErrMERecvWindowReject = -5028 // ME recvWindow rejected ErrTooManyRequestQueue = -5041 // Too many requests in queue )
50xx - Order Execution Issues
const ( IncomeTypeTransfer = "TRANSFER" IncomeTypeWelcomeBonus = "WELCOME_BONUS" IncomeTypeRealizedPNL = "REALIZED_PNL" IncomeTypeFundingFee = "FUNDING_FEE" IncomeTypeCommission = "COMMISSION" IncomeTypeInsuranceClear = "INSURANCE_CLEAR" IncomeTypeReferralKickback = "REFERRAL_KICKBACK" IncomeTypeCommissionRebate = "COMMISSION_REBATE" IncomeTypeAPIRebate = "API_REBATE" IncomeTypeContestReward = "CONTEST_REWARD" IncomeTypeCrossCollateralTransfer = "CROSS_COLLATERAL_TRANSFER" IncomeTypeOptionsPremiumFee = "OPTIONS_PREMIUM_FEE" IncomeTypeOptionsSettleProfit = "OPTIONS_SETTLE_PROFIT" IncomeTypeInternalTransfer = "INTERNAL_TRANSFER" IncomeTypeAutoExchange = "AUTO_EXCHANGE" IncomeTypeDeliveredSettlement = "DELIVERED_SETTELMENT" IncomeTypeCoinSwapDeposit = "COIN_SWAP_DEPOSIT" IncomeTypeCoinSwapWithdraw = "COIN_SWAP_WITHDRAW" IncomeTypePositionLimitIncreaseFee = "POSITION_LIMIT_INCREASE_FEE" )
Constants for income types
Variables ¶
var (
BaseApiMainUrl = "https://papi.binance.com"
)
Endpoints
Functions ¶
func IsPortfolioError ¶
IsPortfolioError check if e is a Portfolio error
Types ¶
type ADLQuantile ¶
type ADLQuantile struct {
LONG int `json:"LONG"`
SHORT int `json:"SHORT"`
BOTH *int `json:"BOTH,omitempty"`
HEDGE *int `json:"HEDGE,omitempty"`
}
ADLQuantile define ADL quantile values
type APIResponse ¶
APIResponse define API response
type Account ¶
type Account struct {
UniMMR string `json:"uniMMR"` // Portfolio margin account maintenance margin rate
AccountEquity string `json:"accountEquity"` // Account equity, in USD value
ActualEquity string `json:"actualEquity"` // Account equity without collateral rate, in USD value
AccountInitialMargin string `json:"accountInitialMargin"`
AccountMaintMargin string `json:"accountMaintMargin"` // Portfolio margin account maintenance margin, unit:USD
AccountStatus string `json:"accountStatus"` // Portfolio margin account status
VirtualMaxWithdrawAmount string `json:"virtualMaxWithdrawAmount"` // Portfolio margin maximum amount for transfer out in USD
TotalAvailableBalance string `json:"totalAvailableBalance"`
TotalMarginOpenLoss string `json:"totalMarginOpenLoss"` // in USD margin open order
UpdateTime int64 `json:"updateTime"` // last update time
}
Account define account info
type AccountStatus ¶
type AccountStatus string
Add account status constants
const ( AccountStatusNormal AccountStatus = "NORMAL" AccountStatusMarginCall AccountStatus = "MARGIN_CALL" AccountStatusSupplyMargin AccountStatus = "SUPPLY_MARGIN" AccountStatusReduceOnly AccountStatus = "REDUCE_ONLY" AccountStatusActiveLiquidation AccountStatus = "ACTIVE_LIQUIDATION" AccountStatusForceLiquidation AccountStatus = "FORCE_LIQUIDATION" AccountStatusBankrupted AccountStatus = "BANKRUPTED" )
type Amendment ¶
type Amendment struct {
Price AmendmentDetail `json:"price"`
OrigQty AmendmentDetail `json:"origQty"`
Count int `json:"count"`
}
Amendment define amendment information
type AmendmentDetail ¶
AmendmentDetail define amendment detail
type AutoRepayFuturesStatus ¶
type AutoRepayFuturesStatus struct {
AutoRepay bool `json:"autoRepay"` // true for turn on the auto-repay futures; false for turn off
}
AutoRepayFuturesStatus define auto repay futures status
type BNBTransferResponse ¶
type BNBTransferResponse struct {
TranID int64 `json:"tranId"` // transaction id
}
BNBTransferResponse define bnb transfer response
type BNBTransferService ¶
type BNBTransferService struct {
// contains filtered or unexported fields
}
BNBTransferService transfer BNB in and out of UM
func (*BNBTransferService) Amount ¶
func (s *BNBTransferService) Amount(amount string) *BNBTransferService
Amount set amount
func (*BNBTransferService) Do ¶
func (s *BNBTransferService) Do(ctx context.Context, opts ...RequestOption) (*BNBTransferResponse, error)
Do send request
func (*BNBTransferService) TransferSide ¶
func (s *BNBTransferService) TransferSide(transferSide string) *BNBTransferService
TransferSide set transfer side
type Balance ¶
type Balance struct {
Asset string `json:"asset"`
TotalWalletBalance string `json:"totalWalletBalance"`
CrossMarginAsset string `json:"crossMarginAsset"`
CrossMarginBorrowed string `json:"crossMarginBorrowed"`
CrossMarginFree string `json:"crossMarginFree"`
CrossMarginInterest string `json:"crossMarginInterest"`
CrossMarginLocked string `json:"crossMarginLocked"`
UMWalletBalance string `json:"umWalletBalance"`
UMUnrealizedPNL string `json:"umUnrealizedPNL"`
CMWalletBalance string `json:"cmWalletBalance"`
CMUnrealizedPNL string `json:"cmUnrealizedPNL"`
UpdateTime int64 `json:"updateTime"`
NegativeBalance string `json:"negativeBalance"`
}
Balance define user balance of your account
type Bracket ¶
type Bracket struct {
Bracket int `json:"bracket"` // Notional bracket
InitialLeverage int `json:"initialLeverage"` // Max initial leverage for this bracket
NotionalCap float64 `json:"notionalCap"` // Cap notional of this bracket
NotionalFloor float64 `json:"notionalFloor"` // Notional threshold of this bracket
MaintMarginRatio float64 `json:"maintMarginRatio"` // Maintenance ratio for this bracket
Cum float64 `json:"cum"` // Auxiliary number for quick calculation
}
Bracket define bracket info
type CMADLQuantileResponse ¶
type CMADLQuantileResponse struct {
Symbol string `json:"symbol"`
ADLQuantile ADLQuantile `json:"adlQuantile"`
}
CMADLQuantileResponse define CM ADL quantile response
type CMADLQuantileService ¶
type CMADLQuantileService struct {
// contains filtered or unexported fields
}
CMADLQuantileService service to get CM position ADL quantile estimation
func (*CMADLQuantileService) Do ¶
func (s *CMADLQuantileService) Do(ctx context.Context) ([]*CMADLQuantileResponse, error)
Do send request
func (*CMADLQuantileService) RecvWindow ¶
func (s *CMADLQuantileService) RecvWindow(recvWindow int64) *CMADLQuantileService
RecvWindow set recvWindow
func (*CMADLQuantileService) Symbol ¶
func (s *CMADLQuantileService) Symbol(symbol string) *CMADLQuantileService
Symbol set symbol
type CMAccountDetail ¶
type CMAccountDetail struct {
Assets []CMAsset `json:"assets"`
Positions []CMPosition `json:"positions"`
}
CMAccountDetail define CM account detail
type CMAccountTrade ¶
type CMAccountTrade struct {
Symbol string `json:"symbol"`
ID int64 `json:"id"`
OrderID int64 `json:"orderId"`
Pair string `json:"pair"`
Side string `json:"side"`
Price string `json:"price"`
Qty string `json:"qty"`
RealizedPnl string `json:"realizedPnl"`
MarginAsset string `json:"marginAsset"`
BaseQty string `json:"baseQty"`
Commission string `json:"commission"`
CommissionAsset string `json:"commissionAsset"`
Time int64 `json:"time"`
PositionSide string `json:"positionSide"`
Buyer bool `json:"buyer"`
Maker bool `json:"maker"`
}
CMAccountTrade define CM account trade
type CMAccountTradeService ¶
type CMAccountTradeService struct {
// contains filtered or unexported fields
}
CMAccountTradeService service to get CM account trade list
func (*CMAccountTradeService) Do ¶
func (s *CMAccountTradeService) Do(ctx context.Context) ([]*CMAccountTrade, error)
Do send request
func (*CMAccountTradeService) EndTime ¶
func (s *CMAccountTradeService) EndTime(endTime int64) *CMAccountTradeService
EndTime set endTime
func (*CMAccountTradeService) FromID ¶
func (s *CMAccountTradeService) FromID(fromID int64) *CMAccountTradeService
FromID set fromId
func (*CMAccountTradeService) Limit ¶
func (s *CMAccountTradeService) Limit(limit int) *CMAccountTradeService
Limit set limit
func (*CMAccountTradeService) Pair ¶
func (s *CMAccountTradeService) Pair(pair string) *CMAccountTradeService
Pair set pair
func (*CMAccountTradeService) RecvWindow ¶
func (s *CMAccountTradeService) RecvWindow(recvWindow int64) *CMAccountTradeService
RecvWindow set recvWindow
func (*CMAccountTradeService) StartTime ¶
func (s *CMAccountTradeService) StartTime(startTime int64) *CMAccountTradeService
StartTime set startTime
func (*CMAccountTradeService) Symbol ¶
func (s *CMAccountTradeService) Symbol(symbol string) *CMAccountTradeService
Symbol set symbol
type CMAccountTradesService ¶
type CMAccountTradesService struct {
// contains filtered or unexported fields
}
CMAccountTradesService service to get CM account trade list
func (*CMAccountTradesService) Do ¶
func (s *CMAccountTradesService) Do(ctx context.Context) ([]*CMAccountTrade, error)
Do send request
func (*CMAccountTradesService) EndTime ¶
func (s *CMAccountTradesService) EndTime(endTime int64) *CMAccountTradesService
EndTime set endTime
func (*CMAccountTradesService) FromID ¶
func (s *CMAccountTradesService) FromID(fromID int64) *CMAccountTradesService
FromID set fromID
func (*CMAccountTradesService) Limit ¶
func (s *CMAccountTradesService) Limit(limit int) *CMAccountTradesService
Limit set limit
func (*CMAccountTradesService) Pair ¶
func (s *CMAccountTradesService) Pair(pair string) *CMAccountTradesService
Pair set pair
func (*CMAccountTradesService) RecvWindow ¶
func (s *CMAccountTradesService) RecvWindow(recvWindow int64) *CMAccountTradesService
RecvWindow set recvWindow
func (*CMAccountTradesService) StartTime ¶
func (s *CMAccountTradesService) StartTime(startTime int64) *CMAccountTradesService
StartTime set startTime
func (*CMAccountTradesService) Symbol ¶
func (s *CMAccountTradesService) Symbol(symbol string) *CMAccountTradesService
Symbol set symbol
type CMAllOrdersResponse ¶
type CMAllOrdersResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMAllOrdersResponse define all orders response
type CMAllOrdersService ¶
type CMAllOrdersService struct {
// contains filtered or unexported fields
}
CMAllOrdersService service to get all CM orders
func (*CMAllOrdersService) Do ¶
func (s *CMAllOrdersService) Do(ctx context.Context) ([]*CMAllOrdersResponse, error)
Do send request
func (*CMAllOrdersService) EndTime ¶
func (s *CMAllOrdersService) EndTime(endTime int64) *CMAllOrdersService
EndTime set endTime
func (*CMAllOrdersService) Limit ¶
func (s *CMAllOrdersService) Limit(limit int) *CMAllOrdersService
Limit set limit
func (*CMAllOrdersService) OrderID ¶
func (s *CMAllOrdersService) OrderID(orderID int64) *CMAllOrdersService
OrderID set orderID
func (*CMAllOrdersService) Pair ¶
func (s *CMAllOrdersService) Pair(pair string) *CMAllOrdersService
Pair set pair
func (*CMAllOrdersService) RecvWindow ¶
func (s *CMAllOrdersService) RecvWindow(recvWindow int64) *CMAllOrdersService
RecvWindow set recvWindow
func (*CMAllOrdersService) StartTime ¶
func (s *CMAllOrdersService) StartTime(startTime int64) *CMAllOrdersService
StartTime set startTime
func (*CMAllOrdersService) Symbol ¶
func (s *CMAllOrdersService) Symbol(symbol string) *CMAllOrdersService
Symbol set symbol
type CMAsset ¶
type CMAsset struct {
Asset string `json:"asset"` // asset name
CrossWalletBalance string `json:"crossWalletBalance"` // total wallet balance
CrossUnPnl string `json:"crossUnPnl"` // unrealized profit or loss
MaintMargin string `json:"maintMargin"` // maintenance margin
InitialMargin string `json:"initialMargin"` // total initial margin required with the latest mark price
PositionInitialMargin string `json:"positionInitialMargin"` // positions' margin required with the latest mark price
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // open orders' initial margin required with the latest mark price
UpdateTime int64 `json:"updateTime"` // last update time
}
CMAsset define CM asset info
type CMBracket ¶
type CMBracket struct {
Bracket int `json:"bracket"` // bracket level
InitialLeverage int `json:"initialLeverage"` // the maximum leverage
QtyCap float64 `json:"qtyCap"` // upper edge of base asset quantity
QtyFloor float64 `json:"qtyFloor"` // lower edge of base asset quantity
MaintMarginRatio float64 `json:"maintMarginRatio"` // maintenance margin rate
Cum float64 `json:"cum"` // Auxiliary number for quick calculation
}
CMBracket define CM bracket info
type CMCancelAllConditionalOrdersResponse ¶
type CMCancelAllConditionalOrdersResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
}
CMCancelAllConditionalOrdersResponse define cancel all conditional orders response
type CMCancelAllConditionalOrdersService ¶
type CMCancelAllConditionalOrdersService struct {
// contains filtered or unexported fields
}
CMCancelAllConditionalOrdersService service to cancel all open CM conditional orders
func (*CMCancelAllConditionalOrdersService) Do ¶
func (s *CMCancelAllConditionalOrdersService) Do(ctx context.Context) (*CMCancelAllConditionalOrdersResponse, error)
Do send request
func (*CMCancelAllConditionalOrdersService) RecvWindow ¶
func (s *CMCancelAllConditionalOrdersService) RecvWindow(recvWindow int64) *CMCancelAllConditionalOrdersService
RecvWindow set recvWindow
func (*CMCancelAllConditionalOrdersService) Symbol ¶
func (s *CMCancelAllConditionalOrdersService) Symbol(symbol string) *CMCancelAllConditionalOrdersService
Symbol set symbol
type CMCancelAllOrdersResponse ¶
CMCancelAllOrdersResponse define cancel all orders response
type CMCancelAllOrdersService ¶
type CMCancelAllOrdersService struct {
// contains filtered or unexported fields
}
CMCancelAllOrdersService service to cancel all open CM orders
func (*CMCancelAllOrdersService) Do ¶
func (s *CMCancelAllOrdersService) Do(ctx context.Context) (*CMCancelAllOrdersResponse, error)
Do send request
func (*CMCancelAllOrdersService) RecvWindow ¶
func (s *CMCancelAllOrdersService) RecvWindow(recvWindow int64) *CMCancelAllOrdersService
RecvWindow set recvWindow
func (*CMCancelAllOrdersService) Symbol ¶
func (s *CMCancelAllOrdersService) Symbol(symbol string) *CMCancelAllOrdersService
Symbol set symbol
type CMCancelConditionalOrderResponse ¶
type CMCancelConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
TimeInForce string `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
}
CMCancelConditionalOrderResponse define cancel conditional order response
type CMCancelConditionalOrderService ¶
type CMCancelConditionalOrderService struct {
// contains filtered or unexported fields
}
CMCancelConditionalOrderService service to cancel CM conditional orders
func (*CMCancelConditionalOrderService) Do ¶
func (s *CMCancelConditionalOrderService) Do(ctx context.Context) (*CMCancelConditionalOrderResponse, error)
Do send request
func (*CMCancelConditionalOrderService) NewClientStrategyID ¶
func (s *CMCancelConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *CMCancelConditionalOrderService
NewClientStrategyID set newClientStrategyId
func (*CMCancelConditionalOrderService) RecvWindow ¶
func (s *CMCancelConditionalOrderService) RecvWindow(recvWindow int64) *CMCancelConditionalOrderService
RecvWindow set recvWindow
func (*CMCancelConditionalOrderService) StrategyID ¶
func (s *CMCancelConditionalOrderService) StrategyID(strategyID int64) *CMCancelConditionalOrderService
StrategyID set strategyId
func (*CMCancelConditionalOrderService) Symbol ¶
func (s *CMCancelConditionalOrderService) Symbol(symbol string) *CMCancelConditionalOrderService
Symbol set symbol
type CMCancelOrderResponse ¶
type CMCancelOrderResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumQty string `json:"cumQty"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMCancelOrderResponse define cancel order response
type CMCancelOrderService ¶
type CMCancelOrderService struct {
// contains filtered or unexported fields
}
CMCancelOrderService service to cancel CM orders
func (*CMCancelOrderService) Do ¶
func (s *CMCancelOrderService) Do(ctx context.Context) (*CMCancelOrderResponse, error)
Do send request
func (*CMCancelOrderService) OrderID ¶
func (s *CMCancelOrderService) OrderID(orderID int64) *CMCancelOrderService
OrderID set orderID
func (*CMCancelOrderService) OrigClientOrderID ¶
func (s *CMCancelOrderService) OrigClientOrderID(origClientOrderID string) *CMCancelOrderService
OrigClientOrderID set origClientOrderId
func (*CMCancelOrderService) RecvWindow ¶
func (s *CMCancelOrderService) RecvWindow(recvWindow int64) *CMCancelOrderService
RecvWindow set recvWindow
func (*CMCancelOrderService) Symbol ¶
func (s *CMCancelOrderService) Symbol(symbol string) *CMCancelOrderService
Symbol set symbol
type CMConditionalOrder ¶
type CMConditionalOrder struct {
NewClientStrategyId string `json:"newClientStrategyId"`
StrategyId int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side SideType `json:"side"`
PositionSide PositionSideType `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
TimeInForce TimeInForceType `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
}
CMConditionalOrder define conditional order info
type CMConditionalOrderHistoryResponse ¶
type CMConditionalOrderHistoryResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
Status string `json:"status"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TriggerTime int64 `json:"triggerTime"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
PriceMatch string `json:"priceMatch"`
}
CMConditionalOrderHistoryResponse define conditional order history response
type CMConditionalOrderHistoryService ¶
type CMConditionalOrderHistoryService struct {
// contains filtered or unexported fields
}
CMConditionalOrderHistoryService service to get CM conditional order history
func (*CMConditionalOrderHistoryService) Do ¶
func (s *CMConditionalOrderHistoryService) Do(ctx context.Context) (*CMConditionalOrderHistoryResponse, error)
Do send request
func (*CMConditionalOrderHistoryService) NewClientStrategyID ¶
func (s *CMConditionalOrderHistoryService) NewClientStrategyID(newClientStrategyID string) *CMConditionalOrderHistoryService
NewClientStrategyID set newClientStrategyId
func (*CMConditionalOrderHistoryService) RecvWindow ¶
func (s *CMConditionalOrderHistoryService) RecvWindow(recvWindow int64) *CMConditionalOrderHistoryService
RecvWindow set recvWindow
func (*CMConditionalOrderHistoryService) StrategyID ¶
func (s *CMConditionalOrderHistoryService) StrategyID(strategyID int64) *CMConditionalOrderHistoryService
StrategyID set strategyId
func (*CMConditionalOrderHistoryService) Symbol ¶
func (s *CMConditionalOrderHistoryService) Symbol(symbol string) *CMConditionalOrderHistoryService
Symbol set symbol
type CMConditionalOrderResponse ¶
type CMConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
Status string `json:"status"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TriggerTime int64 `json:"triggerTime"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
}
CMConditionalOrderResponse define conditional order response
type CMConditionalOrderService ¶
type CMConditionalOrderService struct {
// contains filtered or unexported fields
}
CMConditionalOrderService service to place CM conditional orders
func (*CMConditionalOrderService) ActivationPrice ¶
func (s *CMConditionalOrderService) ActivationPrice(price string) *CMConditionalOrderService
ActivationPrice set activation price
func (*CMConditionalOrderService) CallbackRate ¶
func (s *CMConditionalOrderService) CallbackRate(rate string) *CMConditionalOrderService
CallbackRate set callback rate
func (*CMConditionalOrderService) Do ¶
func (s *CMConditionalOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CMConditionalOrder, err error)
Do send request
func (*CMConditionalOrderService) NewClientStrategyID ¶
func (s *CMConditionalOrderService) NewClientStrategyID(id string) *CMConditionalOrderService
NewClientStrategyID set client strategy ID
func (*CMConditionalOrderService) PositionSide ¶
func (s *CMConditionalOrderService) PositionSide(positionSide PositionSideType) *CMConditionalOrderService
PositionSide set position side
func (*CMConditionalOrderService) Price ¶
func (s *CMConditionalOrderService) Price(price string) *CMConditionalOrderService
Price set price
func (*CMConditionalOrderService) PriceProtect ¶
func (s *CMConditionalOrderService) PriceProtect(protect bool) *CMConditionalOrderService
PriceProtect set price protect
func (*CMConditionalOrderService) Quantity ¶
func (s *CMConditionalOrderService) Quantity(quantity string) *CMConditionalOrderService
Quantity set quantity
func (*CMConditionalOrderService) Side ¶
func (s *CMConditionalOrderService) Side(side SideType) *CMConditionalOrderService
Side set side
func (*CMConditionalOrderService) StopPrice ¶
func (s *CMConditionalOrderService) StopPrice(stopPrice string) *CMConditionalOrderService
StopPrice set stop price
func (*CMConditionalOrderService) StrategyType ¶
func (s *CMConditionalOrderService) StrategyType(strategyType string) *CMConditionalOrderService
StrategyType set strategy type
func (*CMConditionalOrderService) Symbol ¶
func (s *CMConditionalOrderService) Symbol(symbol string) *CMConditionalOrderService
Symbol set symbol
func (*CMConditionalOrderService) TimeInForce ¶
func (s *CMConditionalOrderService) TimeInForce(timeInForce TimeInForceType) *CMConditionalOrderService
TimeInForce set time in force
func (*CMConditionalOrderService) WorkingType ¶
func (s *CMConditionalOrderService) WorkingType(workingType string) *CMConditionalOrderService
WorkingType set working type
type CMConditionalOrdersService ¶
type CMConditionalOrdersService struct {
// contains filtered or unexported fields
}
CMConditionalOrdersService service to get all CM conditional orders
func (*CMConditionalOrdersService) Do ¶
func (s *CMConditionalOrdersService) Do(ctx context.Context) ([]*CMConditionalOrderResponse, error)
Do send request
func (*CMConditionalOrdersService) EndTime ¶
func (s *CMConditionalOrdersService) EndTime(endTime int64) *CMConditionalOrdersService
EndTime set endTime
func (*CMConditionalOrdersService) Limit ¶
func (s *CMConditionalOrdersService) Limit(limit int) *CMConditionalOrdersService
Limit set limit
func (*CMConditionalOrdersService) RecvWindow ¶
func (s *CMConditionalOrdersService) RecvWindow(recvWindow int64) *CMConditionalOrdersService
RecvWindow set recvWindow
func (*CMConditionalOrdersService) StartTime ¶
func (s *CMConditionalOrdersService) StartTime(startTime int64) *CMConditionalOrdersService
StartTime set startTime
func (*CMConditionalOrdersService) StrategyID ¶
func (s *CMConditionalOrdersService) StrategyID(strategyID int64) *CMConditionalOrdersService
StrategyID set strategyId
func (*CMConditionalOrdersService) Symbol ¶
func (s *CMConditionalOrdersService) Symbol(symbol string) *CMConditionalOrdersService
Symbol set symbol
type CMForceOrderResponse ¶
type CMForceOrderResponse struct {
OrderID int64 `json:"orderId"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
Status string `json:"status"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CumBase string `json:"cumBase"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
OrigType string `json:"origType"`
Time int64 `json:"time"`
UpdateTime int64 `json:"updateTime"`
}
CMForceOrderResponse define force order response
type CMForceOrdersService ¶
type CMForceOrdersService struct {
// contains filtered or unexported fields
}
CMForceOrdersService service to get user's CM force orders
func (*CMForceOrdersService) AutoCloseType ¶
func (s *CMForceOrdersService) AutoCloseType(autoCloseType string) *CMForceOrdersService
AutoCloseType set autoCloseType
func (*CMForceOrdersService) Do ¶
func (s *CMForceOrdersService) Do(ctx context.Context) ([]*CMForceOrderResponse, error)
Do send request
func (*CMForceOrdersService) EndTime ¶
func (s *CMForceOrdersService) EndTime(endTime int64) *CMForceOrdersService
EndTime set endTime
func (*CMForceOrdersService) Limit ¶
func (s *CMForceOrdersService) Limit(limit int) *CMForceOrdersService
Limit set limit
func (*CMForceOrdersService) RecvWindow ¶
func (s *CMForceOrdersService) RecvWindow(recvWindow int64) *CMForceOrdersService
RecvWindow set recvWindow
func (*CMForceOrdersService) StartTime ¶
func (s *CMForceOrdersService) StartTime(startTime int64) *CMForceOrdersService
StartTime set startTime
func (*CMForceOrdersService) Symbol ¶
func (s *CMForceOrdersService) Symbol(symbol string) *CMForceOrdersService
Symbol set symbol
type CMLeverage ¶
type CMLeverage struct {
Leverage int `json:"leverage"`
MaxQty string `json:"maxQty"`
Symbol string `json:"symbol"`
}
CMLeverage define leverage info
type CMLeverageBracket ¶
type CMLeverageBracket struct {
Symbol string `json:"symbol"`
Brackets []CMBracket `json:"brackets"`
}
CMLeverageBracket define CM leverage bracket
type CMModifyOrderHistoryResponse ¶
type CMModifyOrderHistoryResponse struct {
AmendmentID int64 `json:"amendmentId"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
Time int64 `json:"time"`
Amendment Amendment `json:"amendment"`
}
CMModifyOrderHistoryResponse define modify order history response
type CMModifyOrderHistoryService ¶
type CMModifyOrderHistoryService struct {
// contains filtered or unexported fields
}
CMModifyOrderHistoryService service to get CM order modification history
func (*CMModifyOrderHistoryService) Do ¶
func (s *CMModifyOrderHistoryService) Do(ctx context.Context) ([]*CMModifyOrderHistoryResponse, error)
Do send request
func (*CMModifyOrderHistoryService) EndTime ¶
func (s *CMModifyOrderHistoryService) EndTime(endTime int64) *CMModifyOrderHistoryService
EndTime set endTime
func (*CMModifyOrderHistoryService) Limit ¶
func (s *CMModifyOrderHistoryService) Limit(limit int) *CMModifyOrderHistoryService
Limit set limit
func (*CMModifyOrderHistoryService) OrderID ¶
func (s *CMModifyOrderHistoryService) OrderID(orderID int64) *CMModifyOrderHistoryService
OrderID set orderID
func (*CMModifyOrderHistoryService) OrigClientOrderID ¶
func (s *CMModifyOrderHistoryService) OrigClientOrderID(origClientOrderID string) *CMModifyOrderHistoryService
OrigClientOrderID set origClientOrderID
func (*CMModifyOrderHistoryService) RecvWindow ¶
func (s *CMModifyOrderHistoryService) RecvWindow(recvWindow int64) *CMModifyOrderHistoryService
RecvWindow set recvWindow
func (*CMModifyOrderHistoryService) StartTime ¶
func (s *CMModifyOrderHistoryService) StartTime(startTime int64) *CMModifyOrderHistoryService
StartTime set startTime
func (*CMModifyOrderHistoryService) Symbol ¶
func (s *CMModifyOrderHistoryService) Symbol(symbol string) *CMModifyOrderHistoryService
Symbol set symbol
type CMModifyOrderResponse ¶
type CMModifyOrderResponse struct {
OrderID int64 `json:"orderId"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
Status string `json:"status"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CumQty string `json:"cumQty"`
CumBase string `json:"cumBase"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
OrigType string `json:"origType"`
UpdateTime int64 `json:"updateTime"`
}
CMModifyOrderResponse define modify order response
type CMModifyOrderService ¶
type CMModifyOrderService struct {
// contains filtered or unexported fields
}
CMModifyOrderService service to modify CM orders
func (*CMModifyOrderService) Do ¶
func (s *CMModifyOrderService) Do(ctx context.Context) (*CMModifyOrderResponse, error)
Do send request
func (*CMModifyOrderService) OrderID ¶
func (s *CMModifyOrderService) OrderID(orderID int64) *CMModifyOrderService
OrderID set orderID
func (*CMModifyOrderService) OrigClientOrderID ¶
func (s *CMModifyOrderService) OrigClientOrderID(origClientOrderID string) *CMModifyOrderService
OrigClientOrderID set origClientOrderId
func (*CMModifyOrderService) Price ¶
func (s *CMModifyOrderService) Price(price string) *CMModifyOrderService
Price set price
func (*CMModifyOrderService) Quantity ¶
func (s *CMModifyOrderService) Quantity(quantity string) *CMModifyOrderService
Quantity set quantity
func (*CMModifyOrderService) RecvWindow ¶
func (s *CMModifyOrderService) RecvWindow(recvWindow int64) *CMModifyOrderService
RecvWindow set recvWindow
func (*CMModifyOrderService) Side ¶
func (s *CMModifyOrderService) Side(side SideType) *CMModifyOrderService
Side set side
func (*CMModifyOrderService) Symbol ¶
func (s *CMModifyOrderService) Symbol(symbol string) *CMModifyOrderService
Symbol set symbol
type CMOpenConditionalOrderResponse ¶
type CMOpenConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TimeInForce string `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
}
CMOpenConditionalOrderResponse define open conditional order response
type CMOpenConditionalOrderService ¶
type CMOpenConditionalOrderService struct {
// contains filtered or unexported fields
}
CMOpenConditionalOrderService service to get current CM open conditional order
func (*CMOpenConditionalOrderService) Do ¶
func (s *CMOpenConditionalOrderService) Do(ctx context.Context) (*CMOpenConditionalOrderResponse, error)
Do send request
func (*CMOpenConditionalOrderService) NewClientStrategyID ¶
func (s *CMOpenConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *CMOpenConditionalOrderService
NewClientStrategyID set newClientStrategyId
func (*CMOpenConditionalOrderService) RecvWindow ¶
func (s *CMOpenConditionalOrderService) RecvWindow(recvWindow int64) *CMOpenConditionalOrderService
RecvWindow set recvWindow
func (*CMOpenConditionalOrderService) StrategyID ¶
func (s *CMOpenConditionalOrderService) StrategyID(strategyID int64) *CMOpenConditionalOrderService
StrategyID set strategyId
func (*CMOpenConditionalOrderService) Symbol ¶
func (s *CMOpenConditionalOrderService) Symbol(symbol string) *CMOpenConditionalOrderService
Symbol set symbol
type CMOpenConditionalOrdersService ¶
type CMOpenConditionalOrdersService struct {
// contains filtered or unexported fields
}
CMOpenConditionalOrdersService service to get all current CM open conditional orders
func (*CMOpenConditionalOrdersService) Do ¶
func (s *CMOpenConditionalOrdersService) Do(ctx context.Context) ([]*CMOpenConditionalOrderResponse, error)
Do send request
func (*CMOpenConditionalOrdersService) RecvWindow ¶
func (s *CMOpenConditionalOrdersService) RecvWindow(recvWindow int64) *CMOpenConditionalOrdersService
RecvWindow set recvWindow
func (*CMOpenConditionalOrdersService) Symbol ¶
func (s *CMOpenConditionalOrdersService) Symbol(symbol string) *CMOpenConditionalOrdersService
Symbol set symbol
type CMOpenOrderResponse ¶
type CMOpenOrderResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMOpenOrderResponse define open order response
type CMOpenOrderService ¶
type CMOpenOrderService struct {
// contains filtered or unexported fields
}
CMOpenOrderService service to get current CM open order
func (*CMOpenOrderService) Do ¶
func (s *CMOpenOrderService) Do(ctx context.Context) (*CMOpenOrderResponse, error)
Do send request
func (*CMOpenOrderService) OrderID ¶
func (s *CMOpenOrderService) OrderID(orderID int64) *CMOpenOrderService
OrderID set orderID
func (*CMOpenOrderService) OrigClientOrderID ¶
func (s *CMOpenOrderService) OrigClientOrderID(origClientOrderID string) *CMOpenOrderService
OrigClientOrderID set origClientOrderId
func (*CMOpenOrderService) RecvWindow ¶
func (s *CMOpenOrderService) RecvWindow(recvWindow int64) *CMOpenOrderService
RecvWindow set recvWindow
func (*CMOpenOrderService) Symbol ¶
func (s *CMOpenOrderService) Symbol(symbol string) *CMOpenOrderService
Symbol set symbol
type CMOpenOrdersResponse ¶
type CMOpenOrdersResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMOpenOrdersResponse define open orders response
type CMOpenOrdersService ¶
type CMOpenOrdersService struct {
// contains filtered or unexported fields
}
CMOpenOrdersService service to get all current CM open orders
func (*CMOpenOrdersService) Do ¶
func (s *CMOpenOrdersService) Do(ctx context.Context) ([]*CMOpenOrdersResponse, error)
Do send request
func (*CMOpenOrdersService) Pair ¶
func (s *CMOpenOrdersService) Pair(pair string) *CMOpenOrdersService
Pair set pair
func (*CMOpenOrdersService) RecvWindow ¶
func (s *CMOpenOrdersService) RecvWindow(recvWindow int64) *CMOpenOrdersService
RecvWindow set recvWindow
func (*CMOpenOrdersService) Symbol ¶
func (s *CMOpenOrdersService) Symbol(symbol string) *CMOpenOrdersService
Symbol set symbol
type CMOrder ¶
type CMOrder struct {
ClientOrderID string `json:"clientOrderId"`
CumQty string `json:"cumQty"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side SideType `json:"side"`
PositionSide PositionSideType `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
TimeInForce TimeInForceType `json:"timeInForce"`
Type OrderType `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMOrder define CM order info
type CMOrderService ¶
type CMOrderService struct {
// contains filtered or unexported fields
}
CMOrderService service to place CM orders
func (*CMOrderService) Do ¶
func (s *CMOrderService) Do(ctx context.Context, opts ...RequestOption) (res *CMOrder, err error)
Do send request
func (*CMOrderService) NewClientOrderID ¶
func (s *CMOrderService) NewClientOrderID(newClientOrderID string) *CMOrderService
NewClientOrderID set custom order id
func (*CMOrderService) NewOrderRespType ¶
func (s *CMOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *CMOrderService
NewOrderRespType set response type
func (*CMOrderService) PositionSide ¶
func (s *CMOrderService) PositionSide(positionSide PositionSideType) *CMOrderService
PositionSide set position side
func (*CMOrderService) Price ¶
func (s *CMOrderService) Price(price string) *CMOrderService
Price set price
func (*CMOrderService) Quantity ¶
func (s *CMOrderService) Quantity(quantity string) *CMOrderService
Quantity set quantity
func (*CMOrderService) ReduceOnly ¶
func (s *CMOrderService) ReduceOnly(reduceOnly bool) *CMOrderService
ReduceOnly set reduce only
func (*CMOrderService) Side ¶
func (s *CMOrderService) Side(side SideType) *CMOrderService
Side set side
func (*CMOrderService) Symbol ¶
func (s *CMOrderService) Symbol(symbol string) *CMOrderService
Symbol set symbol
func (*CMOrderService) TimeInForce ¶
func (s *CMOrderService) TimeInForce(timeInForce TimeInForceType) *CMOrderService
TimeInForce set time in force
func (*CMOrderService) Type ¶
func (s *CMOrderService) Type(orderType OrderType) *CMOrderService
Type set order type
type CMPosition ¶
type CMPosition struct {
Symbol string `json:"symbol"` // Symbol name
PositionAmt string `json:"positionAmt"` // Position amount
EntryPrice string `json:"entryPrice"` // Average entry price
UnrealizedProfit string `json:"unRealizedProfit"` // Unrealized profit or loss
PositionSide string `json:"positionSide"` // Position side (BOTH, LONG, SHORT)
InitialMargin string `json:"initialMargin"` // Initial margin required
MaintMargin string `json:"maintMargin"` // Maintenance margin required
PositionInitialMargin string `json:"positionInitialMargin"` // Position initial margin
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // Open orders initial margin
Leverage string `json:"leverage"` // Current leverage
MaxQty string `json:"maxQty"` // Maximum quantity of base asset
MarkPrice string `json:"markPrice,omitempty"` // Mark price
LiquidationPrice string `json:"liquidationPrice,omitempty"` // Liquidation price
NotionalValue string `json:"notionalValue,omitempty"` // Notional value
UpdateTime int64 `json:"updateTime"` // Last update time
}
CMPosition define CM position information
type CMQueryOrderResponse ¶
type CMQueryOrderResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumBase string `json:"cumBase"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
PositionSide string `json:"positionSide"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
}
CMQueryOrderResponse define query order response
type CMQueryOrderService ¶
type CMQueryOrderService struct {
// contains filtered or unexported fields
}
CMQueryOrderService service to query CM orders
func (*CMQueryOrderService) Do ¶
func (s *CMQueryOrderService) Do(ctx context.Context) (*CMQueryOrderResponse, error)
Do send request
func (*CMQueryOrderService) OrderID ¶
func (s *CMQueryOrderService) OrderID(orderID int64) *CMQueryOrderService
OrderID set orderID
func (*CMQueryOrderService) OrigClientOrderID ¶
func (s *CMQueryOrderService) OrigClientOrderID(origClientOrderID string) *CMQueryOrderService
OrigClientOrderID set origClientOrderId
func (*CMQueryOrderService) RecvWindow ¶
func (s *CMQueryOrderService) RecvWindow(recvWindow int64) *CMQueryOrderService
RecvWindow set recvWindow
func (*CMQueryOrderService) Symbol ¶
func (s *CMQueryOrderService) Symbol(symbol string) *CMQueryOrderService
Symbol set symbol
type ChangeAutoRepayFuturesStatusService ¶
type ChangeAutoRepayFuturesStatusService struct {
// contains filtered or unexported fields
}
ChangeAutoRepayFuturesStatusService change auto-repay-futures status
func (*ChangeAutoRepayFuturesStatusService) AutoRepay ¶
func (s *ChangeAutoRepayFuturesStatusService) AutoRepay(autoRepay bool) *ChangeAutoRepayFuturesStatusService
AutoRepay set auto repay status
func (*ChangeAutoRepayFuturesStatusService) Do ¶
func (s *ChangeAutoRepayFuturesStatusService) Do(ctx context.Context, opts ...RequestOption) (*SuccessResponse, error)
Do send request
type ChangeCMInitialLeverageService ¶
type ChangeCMInitialLeverageService struct {
// contains filtered or unexported fields
}
ChangeCMInitialLeverageService change user's initial leverage of specific symbol in CM
func (*ChangeCMInitialLeverageService) Do ¶
func (s *ChangeCMInitialLeverageService) Do(ctx context.Context, opts ...RequestOption) (res *CMLeverage, err error)
Do send request
func (*ChangeCMInitialLeverageService) Leverage ¶
func (s *ChangeCMInitialLeverageService) Leverage(leverage int) *ChangeCMInitialLeverageService
Leverage set leverage
func (*ChangeCMInitialLeverageService) Symbol ¶
func (s *ChangeCMInitialLeverageService) Symbol(symbol string) *ChangeCMInitialLeverageService
Symbol set symbol
type ChangeCMPositionModeService ¶
type ChangeCMPositionModeService struct {
// contains filtered or unexported fields
}
ChangeCMPositionModeService change user's position mode on EVERY symbol in CM
func (*ChangeCMPositionModeService) Do ¶
func (s *ChangeCMPositionModeService) Do(ctx context.Context, opts ...RequestOption) (res *APIResponse, err error)
Do send request
func (*ChangeCMPositionModeService) DualSidePosition ¶
func (s *ChangeCMPositionModeService) DualSidePosition(dualSidePosition bool) *ChangeCMPositionModeService
DualSidePosition set position mode
type ChangeUMInitialLeverageService ¶
type ChangeUMInitialLeverageService struct {
// contains filtered or unexported fields
}
ChangeUMInitialLeverageService change user's initial leverage of specific symbol in UM
func (*ChangeUMInitialLeverageService) Do ¶
func (s *ChangeUMInitialLeverageService) Do(ctx context.Context, opts ...RequestOption) (res *UMLeverage, err error)
Do send request
func (*ChangeUMInitialLeverageService) Leverage ¶
func (s *ChangeUMInitialLeverageService) Leverage(leverage int) *ChangeUMInitialLeverageService
Leverage set leverage
func (*ChangeUMInitialLeverageService) Symbol ¶
func (s *ChangeUMInitialLeverageService) Symbol(symbol string) *ChangeUMInitialLeverageService
Symbol set symbol
type ChangeUMPositionModeService ¶
type ChangeUMPositionModeService struct {
// contains filtered or unexported fields
}
ChangeUMPositionModeService change user's position mode on EVERY symbol in UM
func (*ChangeUMPositionModeService) Do ¶
func (s *ChangeUMPositionModeService) Do(ctx context.Context, opts ...RequestOption) (res *APIResponse, err error)
Do send request
func (*ChangeUMPositionModeService) DualSidePosition ¶
func (s *ChangeUMPositionModeService) DualSidePosition(dualSidePosition bool) *ChangeUMPositionModeService
DualSidePosition set position mode
type Client ¶
type Client struct {
APIKey string
SecretKey string
KeyType string
BaseURL string
UserAgent string
HTTPClient *http.Client
Debug bool
Logger *log.Logger
TimeOffset int64
// contains filtered or unexported fields
}
Client define API client
func NewClient ¶
NewClient initialize an API client instance with API key and secret key. You should always call this function before using this SDK. Services will be created by the form client.NewXXXService().
func NewProxiedClient ¶
NewProxiedClient passing a proxy url
func (*Client) NewBNBTransferService ¶
func (c *Client) NewBNBTransferService() *BNBTransferService
NewBNBTransferService init BNB transfer service
func (*Client) NewCMADLQuantileService ¶
func (c *Client) NewCMADLQuantileService() *CMADLQuantileService
NewCMADLQuantileService creates a new CMADLQuantileService
func (*Client) NewCMAccountTradeService ¶
func (c *Client) NewCMAccountTradeService() *CMAccountTradeService
NewCMAccountTradeService creates a new CMAccountTradeService
func (*Client) NewCMAccountTradesService ¶
func (c *Client) NewCMAccountTradesService() *CMAccountTradesService
NewCMAccountTradesService creates a new CMAccountTradesService
func (*Client) NewCMAllOrdersService ¶
func (c *Client) NewCMAllOrdersService() *CMAllOrdersService
NewCMAllOrdersService creates a new CMAllOrdersService
func (*Client) NewCMCancelAllConditionalOrdersService ¶
func (c *Client) NewCMCancelAllConditionalOrdersService() *CMCancelAllConditionalOrdersService
NewCMCancelAllConditionalOrdersService creates a new CMCancelAllConditionalOrdersService
func (*Client) NewCMCancelAllOrdersService ¶
func (c *Client) NewCMCancelAllOrdersService() *CMCancelAllOrdersService
NewCMCancelAllOrdersService creates a new CMCancelAllOrdersService
func (*Client) NewCMCancelConditionalOrderService ¶
func (c *Client) NewCMCancelConditionalOrderService() *CMCancelConditionalOrderService
NewCMCancelConditionalOrderService creates a new CMCancelConditionalOrderService
func (*Client) NewCMCancelOrderService ¶
func (c *Client) NewCMCancelOrderService() *CMCancelOrderService
NewCMCancelOrderService creates a new CMCancelOrderService
func (*Client) NewCMConditionalOrder ¶
func (c *Client) NewCMConditionalOrder() *CMConditionalOrderService
NewCMConditionalOrder creates a new CMConditionalOrder
func (*Client) NewCMConditionalOrderHistoryService ¶
func (c *Client) NewCMConditionalOrderHistoryService() *CMConditionalOrderHistoryService
NewCMConditionalOrderHistoryService creates a new CMConditionalOrderHistoryService
func (*Client) NewCMConditionalOrderService ¶
func (c *Client) NewCMConditionalOrderService() *CMConditionalOrderService
NewCMConditionalOrderService creates a new CMConditionalOrderService
func (*Client) NewCMConditionalOrdersService ¶
func (c *Client) NewCMConditionalOrdersService() *CMConditionalOrdersService
NewCMConditionalOrdersService creates a new CMConditionalOrdersService
func (*Client) NewCMForceOrdersService ¶
func (c *Client) NewCMForceOrdersService() *CMForceOrdersService
NewCMForceOrdersService creates a new CMForceOrdersService
func (*Client) NewCMModifyOrderHistoryService ¶
func (c *Client) NewCMModifyOrderHistoryService() *CMModifyOrderHistoryService
NewCMModifyOrderHistoryService creates a new CMModifyOrderHistoryService
func (*Client) NewCMModifyOrderService ¶
func (c *Client) NewCMModifyOrderService() *CMModifyOrderService
NewCMModifyOrderService creates a new CMModifyOrderService
func (*Client) NewCMOpenConditionalOrderService ¶
func (c *Client) NewCMOpenConditionalOrderService() *CMOpenConditionalOrderService
NewCMOpenConditionalOrderService creates a new CMOpenConditionalOrderService
func (*Client) NewCMOpenConditionalOrdersService ¶
func (c *Client) NewCMOpenConditionalOrdersService() *CMOpenConditionalOrdersService
NewCMOpenConditionalOrdersService creates a new CMOpenConditionalOrdersService
func (*Client) NewCMOpenOrderService ¶
func (c *Client) NewCMOpenOrderService() *CMOpenOrderService
NewCMOpenOrderService creates a new CMOpenOrderService
func (*Client) NewCMOpenOrdersService ¶
func (c *Client) NewCMOpenOrdersService() *CMOpenOrdersService
NewCMOpenOrdersService creates a new CMOpenOrdersService
func (*Client) NewCMOrderService ¶
func (c *Client) NewCMOrderService() *CMOrderService
NewCMOrderService creates a new CMOrderService
func (*Client) NewCMQueryOrderService ¶
func (c *Client) NewCMQueryOrderService() *CMQueryOrderService
NewCMQueryOrderService creates a new CMQueryOrderService
func (*Client) NewChangeAutoRepayFuturesStatusService ¶
func (c *Client) NewChangeAutoRepayFuturesStatusService() *ChangeAutoRepayFuturesStatusService
NewChangeAutoRepayFuturesStatusService init change auto repay futures status service
func (*Client) NewChangeCMInitialLeverageService ¶
func (c *Client) NewChangeCMInitialLeverageService() *ChangeCMInitialLeverageService
NewChangeCMInitialLeverageService init change CM initial leverage service
func (*Client) NewChangeCMPositionModeService ¶
func (c *Client) NewChangeCMPositionModeService() *ChangeCMPositionModeService
NewChangeCMPositionModeService init change CM position mode service
func (*Client) NewChangeUMInitialLeverageService ¶
func (c *Client) NewChangeUMInitialLeverageService() *ChangeUMInitialLeverageService
NewChangeUMInitialLeverageService init change UM initial leverage service
func (*Client) NewChangeUMPositionModeService ¶
func (c *Client) NewChangeUMPositionModeService() *ChangeUMPositionModeService
NewChangeUMPositionModeService init change UM position mode service
func (*Client) NewFundAutoCollectionService ¶
func (c *Client) NewFundAutoCollectionService() *FundAutoCollectionService
NewFundAutoCollectionService init fund auto-collection service
func (*Client) NewFundCollectionByAssetService ¶
func (c *Client) NewFundCollectionByAssetService() *FundCollectionByAssetService
NewFundCollectionByAssetService init fund collection by asset service
func (*Client) NewGetAccountService ¶
func (c *Client) NewGetAccountService() *GetAccountService
NewGetAccountService init get account service
func (*Client) NewGetAutoRepayFuturesStatusService ¶
func (c *Client) NewGetAutoRepayFuturesStatusService() *GetAutoRepayFuturesStatusService
NewGetAutoRepayFuturesStatusService init get auto repay futures status service
func (*Client) NewGetBalanceService ¶
func (c *Client) NewGetBalanceService() *GetBalanceService
NewServerTimeService init server time service
func (*Client) NewGetCMAccountDetailService ¶
func (c *Client) NewGetCMAccountDetailService() *GetCMAccountDetailService
NewGetCMAccountDetailService init get CM account detail service
func (*Client) NewGetCMCommissionRateService ¶
func (c *Client) NewGetCMCommissionRateService() *GetCMCommissionRateService
NewGetCMCommissionRateService init get CM commission rate service
func (*Client) NewGetCMIncomeHistoryService ¶
func (c *Client) NewGetCMIncomeHistoryService() *GetCMIncomeHistoryService
NewGetCMIncomeHistoryService init get CM income history service
func (*Client) NewGetCMLeverageBracketService ¶
func (c *Client) NewGetCMLeverageBracketService() *GetCMLeverageBracketService
NewGetCMLeverageBracketService init get CM leverage bracket service
func (*Client) NewGetCMPositionModeService ¶
func (c *Client) NewGetCMPositionModeService() *GetCMPositionModeService
NewGetCMPositionModeService init get CM position mode service
func (*Client) NewGetCMPositionRiskService ¶
func (c *Client) NewGetCMPositionRiskService() *GetCMPositionRiskService
NewGetCMPositionRiskService init CM position risk service
func (*Client) NewGetMarginAllOrdersService ¶
func (c *Client) NewGetMarginAllOrdersService() *GetMarginAllOrdersService
NewGetMarginAllOrdersService creates a new GetMarginAllOrdersService
func (*Client) NewGetMarginForceOrdersService ¶
func (c *Client) NewGetMarginForceOrdersService() *GetMarginForceOrdersService
NewGetMarginForceOrdersService creates a new GetMarginForceOrdersService
func (*Client) NewGetMarginInterestHistoryService ¶
func (c *Client) NewGetMarginInterestHistoryService() *GetMarginInterestHistoryService
NewGetMarginInterestHistoryService init get margin interest history service
func (*Client) NewGetMarginLoanService ¶
func (c *Client) NewGetMarginLoanService() *GetMarginLoanService
NewGetMarginLoanService init get margin loan service
func (*Client) NewGetMarginMaxBorrowService ¶
func (c *Client) NewGetMarginMaxBorrowService() *GetMarginMaxBorrowService
NewGetMarginMaxBorrowService init margin max borrow service
func (*Client) NewGetMarginMaxWithdrawService ¶
func (c *Client) NewGetMarginMaxWithdrawService() *GetMarginMaxWithdrawService
NewGetMarginMaxWithdrawService init margin max withdraw service
func (*Client) NewGetMarginOpenOrdersService ¶
func (c *Client) NewGetMarginOpenOrdersService() *GetMarginOpenOrdersService
NewGetMarginOpenOrdersService creates a new GetMarginOpenOrdersService
func (*Client) NewGetMarginRepayService ¶
func (c *Client) NewGetMarginRepayService() *GetMarginRepayService
NewGetMarginRepayService init get margin repay service
func (*Client) NewGetNegativeBalanceExchangeRecordService ¶
func (c *Client) NewGetNegativeBalanceExchangeRecordService() *GetNegativeBalanceExchangeRecordService
NewGetNegativeBalanceExchangeRecordService init getting negative balance exchange record service
func (*Client) NewGetNegativeBalanceInterestHistoryService ¶
func (c *Client) NewGetNegativeBalanceInterestHistoryService() *GetNegativeBalanceInterestHistoryService
NewGetNegativeBalanceInterestHistoryService init get negative balance interest history service
func (*Client) NewGetRateLimitService ¶
func (c *Client) NewGetRateLimitService() *GetRateLimitService
NewGetRateLimitService init getting rate limit service
func (*Client) NewGetUMAccountConfigService ¶
func (c *Client) NewGetUMAccountConfigService() *UMAccountConfigService
NewGetUMAccountConfigService init get UM futures account configuration service
func (*Client) NewGetUMAccountDetailService ¶
func (c *Client) NewGetUMAccountDetailService() *GetUMAccountDetailService
NewGetUMAccountDetailService init get UM account detail service
func (*Client) NewGetUMAccountDetailV2Service ¶
func (c *Client) NewGetUMAccountDetailV2Service() *UMAccountDetailV2Service
NewGetUMAccountDetailV2Service init get UM account detail v2 service
func (*Client) NewGetUMCommissionRateService ¶
func (c *Client) NewGetUMCommissionRateService() *GetUMCommissionRateService
NewGetUMCommissionRateService init get UM commission rate service
func (*Client) NewGetUMIncomeHistoryService ¶
func (c *Client) NewGetUMIncomeHistoryService() *GetUMIncomeHistoryService
NewGetUMIncomeHistoryService init get UM income history service
func (*Client) NewGetUMLeverageBracketService ¶
func (c *Client) NewGetUMLeverageBracketService() *GetUMLeverageBracketService
NewGetUMLeverageBracketService init get UM leverage bracket service
func (*Client) NewGetUMOrderDownloadLinkService ¶
func (c *Client) NewGetUMOrderDownloadLinkService() *GetUMOrderDownloadLinkService
NewGetUMOrderDownloadLinkService init getting um order download link service
func (*Client) NewGetUMOrderHistoryDownloadIDService ¶
func (c *Client) NewGetUMOrderHistoryDownloadIDService() *GetUMOrderHistoryDownloadIDService
NewGetUMOrderHistoryDownloadIDService init getting um order history download id service
func (*Client) NewGetUMPositionModeService ¶
func (c *Client) NewGetUMPositionModeService() *GetUMPositionModeService
NewGetUMPositionModeService init get UM position mode service
func (*Client) NewGetUMPositionRiskService ¶
func (c *Client) NewGetUMPositionRiskService() *GetUMPositionRiskService
NewGetUMPositionRiskService init UM position risk service
func (*Client) NewGetUMSymbolConfigService ¶
func (c *Client) NewGetUMSymbolConfigService() *UMSymbolConfigService
NewGetUMSymbolConfigService init get UM futures symbol configuration service
func (*Client) NewGetUMTradeDownloadLinkService ¶
func (c *Client) NewGetUMTradeDownloadLinkService() *GetUMTradeDownloadLinkService
NewGetUMTradeDownloadLinkService init getting um trade download link service
func (*Client) NewGetUMTradeHistoryDownloadIDService ¶
func (c *Client) NewGetUMTradeHistoryDownloadIDService() *GetUMTradeHistoryDownloadIDService
NewGetUMTradeHistoryDownloadIDService init getting um trade history download id service
func (*Client) NewGetUMTradingStatusService ¶
func (c *Client) NewGetUMTradingStatusService() *GetUMTradingStatusService
NewGetUMTradingStatusService init get UM trading status service
func (*Client) NewGetUMTransactionDownloadLinkService ¶
func (c *Client) NewGetUMTransactionDownloadLinkService() *GetUMTransactionDownloadLinkService
NewGetUMTransactionDownloadLinkService init getting um transaction download link service
func (*Client) NewGetUMTransactionHistoryDownloadIDService ¶
func (c *Client) NewGetUMTransactionHistoryDownloadIDService() *GetUMTransactionHistoryDownloadIDService
NewGetUMTransactionHistoryDownloadIDService init getting um transaction history download id service
func (*Client) NewMarginAccountTradesService ¶
func (c *Client) NewMarginAccountTradesService() *MarginAccountTradesService
NewMarginAccountTradesService creates a new MarginAccountTradesService
func (*Client) NewMarginAllOCOService ¶
func (c *Client) NewMarginAllOCOService() *MarginAllOCOService
NewMarginAllOCOService creates a new MarginAllOCOService
func (*Client) NewMarginCancelAllOrdersService ¶
func (c *Client) NewMarginCancelAllOrdersService() *MarginCancelAllOrdersService
NewMarginCancelAllOrdersService creates a new MarginCancelAllOrdersService
func (*Client) NewMarginCancelOCOService ¶
func (c *Client) NewMarginCancelOCOService() *MarginCancelOCOService
NewMarginCancelOCOService creates a new MarginCancelOCOService
func (*Client) NewMarginCancelOrderService ¶
func (c *Client) NewMarginCancelOrderService() *MarginCancelOrderService
NewMarginCancelOrderService creates a new MarginCancelOrderService
func (*Client) NewMarginForceOrdersService ¶
func (c *Client) NewMarginForceOrdersService() *MarginForceOrdersService
NewMarginForceOrdersService creates a new MarginForceOrdersService
func (*Client) NewMarginLoanService ¶
func (c *Client) NewMarginLoanService() *MarginLoanService
NewMarginLoanService creates a new MarginLoanService
func (*Client) NewMarginOCOQueryService ¶
func (c *Client) NewMarginOCOQueryService() *MarginOCOQueryService
NewMarginOCOQueryService creates a new MarginOCOQueryService
func (*Client) NewMarginOCOService ¶
func (c *Client) NewMarginOCOService() *MarginOCOService
NewMarginOCOService creates a new MarginOCOService
func (*Client) NewMarginOpenOCOService ¶
func (c *Client) NewMarginOpenOCOService() *MarginOpenOCOService
NewMarginOpenOCOService creates a new MarginOpenOCOService
func (*Client) NewMarginOrderService ¶
func (c *Client) NewMarginOrderService() *MarginOrderService
NewMarginOrderService creates a new MarginOrderService
func (*Client) NewMarginRepayDebtService ¶
func (c *Client) NewMarginRepayDebtService() *MarginRepayDebtService
NewMarginRepayDebtService creates a new MarginRepayDebtService
func (*Client) NewMarginRepayService ¶
func (c *Client) NewMarginRepayService() *MarginRepayService
NewMarginRepayService creates a new MarginRepayService
func (*Client) NewPingService ¶
func (c *Client) NewPingService() *PingService
NewPingService init ping service
func (*Client) NewRepayFuturesNegativeBalanceService ¶
func (c *Client) NewRepayFuturesNegativeBalanceService() *RepayFuturesNegativeBalanceService
NewRepayFuturesNegativeBalanceService init repay futures negative balance service
func (*Client) NewUMADLQuantileService ¶
func (c *Client) NewUMADLQuantileService() *UMADLQuantileService
NewUMADLQuantileService creates a new UMADLQuantileService
func (*Client) NewUMAccountTradeService ¶
func (c *Client) NewUMAccountTradeService() *UMAccountTradeService
NewUMAccountTradeService creates a new UMAccountTradeService
func (*Client) NewUMAccountTradesService ¶
func (c *Client) NewUMAccountTradesService() *UMAccountTradesService
NewUMAccountTradesService creates a new UMAccountTradesService
func (*Client) NewUMAllConditionalOrdersService ¶
func (c *Client) NewUMAllConditionalOrdersService() *UMAllConditionalOrdersService
NewUMAllConditionalOrdersService creates a new UMAllConditionalOrdersService
func (*Client) NewUMAllOrdersService ¶
func (c *Client) NewUMAllOrdersService() *UMAllOrdersService
NewUMAllOrdersService creates a new UMAllOrdersService
func (*Client) NewUMCancelAllConditionalOrdersService ¶
func (c *Client) NewUMCancelAllConditionalOrdersService() *UMCancelAllConditionalOrdersService
NewUMCancelAllConditionalOrdersService creates a new UMCancelAllConditionalOrdersService
func (*Client) NewUMCancelAllOrdersService ¶
func (c *Client) NewUMCancelAllOrdersService() *UMCancelAllOrdersService
NewUMCancelAllOrdersService creates a new UMCancelAllOrdersService
func (*Client) NewUMCancelConditionalOrderService ¶
func (c *Client) NewUMCancelConditionalOrderService() *UMCancelConditionalOrderService
NewUMCancelConditionalOrderService creates a new UMCancelConditionalOrderService
func (*Client) NewUMCancelOrderService ¶
func (c *Client) NewUMCancelOrderService() *UMCancelOrderService
NewUMCancelOrderService creates a new UMCancelOrderService
func (*Client) NewUMConditionalOrderHistoryService ¶
func (c *Client) NewUMConditionalOrderHistoryService() *UMConditionalOrderHistoryService
NewUMConditionalOrderHistoryService creates a new UMConditionalOrderHistoryService
func (*Client) NewUMConditionalOrderService ¶
func (c *Client) NewUMConditionalOrderService() *UMConditionalOrderService
NewUMConditionalOrderService init UM conditional order service
func (*Client) NewUMFeeBurnService ¶
func (c *Client) NewUMFeeBurnService() *UMFeeBurnService
NewUMFeeBurnService creates a new UMFeeBurnService
func (*Client) NewUMFeeBurnStatusService ¶
func (c *Client) NewUMFeeBurnStatusService() *UMFeeBurnStatusService
NewUMFeeBurnStatusService creates a new UMFeeBurnStatusService
func (*Client) NewUMForceOrdersService ¶
func (c *Client) NewUMForceOrdersService() *UMForceOrdersService
NewUMForceOrdersService creates a new UMForceOrdersService
func (*Client) NewUMGetADLQuantileService ¶
func (c *Client) NewUMGetADLQuantileService() *UMGetADLQuantileService
NewUMGetADLQuantileService creates a new UMGetADLQuantileService
func (*Client) NewUMModifyOrderHistoryService ¶
func (c *Client) NewUMModifyOrderHistoryService() *UMModifyOrderHistoryService
NewUMModifyOrderHistoryService creates a new UMModifyOrderHistoryService
func (*Client) NewUMModifyOrderService ¶
func (c *Client) NewUMModifyOrderService() *UMModifyOrderService
NewUMModifyOrderService creates a new UMModifyOrderService
func (*Client) NewUMOpenConditionalOrderService ¶
func (c *Client) NewUMOpenConditionalOrderService() *UMOpenConditionalOrderService
NewUMOpenConditionalOrderService creates a new UMOpenConditionalOrderService
func (*Client) NewUMOpenConditionalOrdersService ¶
func (c *Client) NewUMOpenConditionalOrdersService() *UMOpenConditionalOrdersService
NewUMOpenConditionalOrdersService creates a new UMOpenConditionalOrdersService
func (*Client) NewUMOpenOrderService ¶
func (c *Client) NewUMOpenOrderService() *UMOpenOrderService
NewUMOpenOrderService creates a new UMOpenOrderService
func (*Client) NewUMOpenOrdersService ¶
func (c *Client) NewUMOpenOrdersService() *UMOpenOrdersService
NewUMOpenOrdersService creates a new UMOpenOrdersService
func (*Client) NewUMOrderService ¶
func (c *Client) NewUMOrderService() *UMOrderService
NewUMOrderService init UM order service
func (*Client) NewUMQueryOrderService ¶
func (c *Client) NewUMQueryOrderService() *UMQueryOrderService
NewUMQueryOrderService creates a new UMQueryOrderService
func (*Client) SetApiEndpoint ¶
SetApiEndpoint set api Endpoint
type CommissionRate ¶
type CommissionRate struct {
Symbol string `json:"symbol"`
MakerCommissionRate string `json:"makerCommissionRate"` // 0.02%
TakerCommissionRate string `json:"takerCommissionRate"` // 0.04%
}
CommissionRate define commission rate info
type Error ¶
Error represents a portfolio error extending the common APIError
func NewErrorFromResponse ¶
NewErrorFromResponse creates a new portfolio Error from raw response
type Fill ¶
type Fill struct {
Price string `json:"price"`
Qty string `json:"qty"`
Commission string `json:"commission"`
CommissionAsset string `json:"commissionAsset"`
}
Fill define fill info
type ForceOrderCloseType ¶
type ForceOrderCloseType string
ForceOrderCloseType define reason type for force order
type FundAutoCollectionService ¶
type FundAutoCollectionService struct {
// contains filtered or unexported fields
}
FundAutoCollectionService fund auto-collection for Portfolio Margin
func (*FundAutoCollectionService) Do ¶
func (s *FundAutoCollectionService) Do(ctx context.Context, opts ...RequestOption) (*SuccessResponse, error)
Do send request
type FundCollectionByAssetService ¶
type FundCollectionByAssetService struct {
// contains filtered or unexported fields
}
FundCollectionByAssetService transfers specific asset from Futures Account to Margin account
func (*FundCollectionByAssetService) Asset ¶
func (s *FundCollectionByAssetService) Asset(asset string) *FundCollectionByAssetService
Asset set asset
func (*FundCollectionByAssetService) Do ¶
func (s *FundCollectionByAssetService) Do(ctx context.Context, opts ...RequestOption) (*SuccessResponse, error)
Do send request
type GetAccountService ¶
type GetAccountService struct {
// contains filtered or unexported fields
}
GetAccountService get account information
func (*GetAccountService) Do ¶
func (s *GetAccountService) Do(ctx context.Context, opts ...RequestOption) (res *Account, err error)
Do send request
type GetAutoRepayFuturesStatusService ¶
type GetAutoRepayFuturesStatusService struct {
// contains filtered or unexported fields
}
GetAutoRepayFuturesStatusService get auto-repay-futures status
func (*GetAutoRepayFuturesStatusService) Do ¶
func (s *GetAutoRepayFuturesStatusService) Do(ctx context.Context, opts ...RequestOption) (*AutoRepayFuturesStatus, error)
Do send request
type GetBalanceService ¶
type GetBalanceService struct {
// contains filtered or unexported fields
}
GetBalanceService get account balance
func (*GetBalanceService) Asset ¶
func (s *GetBalanceService) Asset(asset string) *GetBalanceService
Asset set asset
func (*GetBalanceService) Do ¶
func (s *GetBalanceService) Do(ctx context.Context, opts ...RequestOption) (res []*Balance, err error)
Do send request
type GetCMAccountDetailService ¶
type GetCMAccountDetailService struct {
// contains filtered or unexported fields
}
GetCMAccountDetailService get current CM account asset and position information
func (*GetCMAccountDetailService) Do ¶
func (s *GetCMAccountDetailService) Do(ctx context.Context, opts ...RequestOption) (*CMAccountDetail, error)
Do send request
type GetCMCommissionRateService ¶
type GetCMCommissionRateService struct {
// contains filtered or unexported fields
}
GetCMCommissionRateService get user commission rate for CM
func (*GetCMCommissionRateService) Do ¶
func (s *GetCMCommissionRateService) Do(ctx context.Context, opts ...RequestOption) (*CommissionRate, error)
Do send request
func (*GetCMCommissionRateService) Symbol ¶
func (s *GetCMCommissionRateService) Symbol(symbol string) *GetCMCommissionRateService
Symbol set symbol
type GetCMIncomeHistoryService ¶
type GetCMIncomeHistoryService struct {
// contains filtered or unexported fields
}
GetCMIncomeHistoryService get CM income history
func (*GetCMIncomeHistoryService) Do ¶
func (s *GetCMIncomeHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*Income, err error)
Do send request
func (*GetCMIncomeHistoryService) EndTime ¶
func (s *GetCMIncomeHistoryService) EndTime(endTime int64) *GetCMIncomeHistoryService
EndTime set endTime
func (*GetCMIncomeHistoryService) IncomeType ¶
func (s *GetCMIncomeHistoryService) IncomeType(incomeType string) *GetCMIncomeHistoryService
IncomeType set income type
func (*GetCMIncomeHistoryService) Limit ¶
func (s *GetCMIncomeHistoryService) Limit(limit int) *GetCMIncomeHistoryService
Limit set limit
func (*GetCMIncomeHistoryService) Page ¶
func (s *GetCMIncomeHistoryService) Page(page int) *GetCMIncomeHistoryService
Page set page
func (*GetCMIncomeHistoryService) StartTime ¶
func (s *GetCMIncomeHistoryService) StartTime(startTime int64) *GetCMIncomeHistoryService
StartTime set startTime
func (*GetCMIncomeHistoryService) Symbol ¶
func (s *GetCMIncomeHistoryService) Symbol(symbol string) *GetCMIncomeHistoryService
Symbol set symbol
type GetCMLeverageBracketService ¶
type GetCMLeverageBracketService struct {
// contains filtered or unexported fields
}
GetCMLeverageBracketService get CM notional and leverage brackets
func (*GetCMLeverageBracketService) Do ¶
func (s *GetCMLeverageBracketService) Do(ctx context.Context, opts ...RequestOption) (res []*CMLeverageBracket, err error)
Do send request
func (*GetCMLeverageBracketService) Symbol ¶
func (s *GetCMLeverageBracketService) Symbol(symbol string) *GetCMLeverageBracketService
Symbol set symbol
type GetCMPositionModeService ¶
type GetCMPositionModeService struct {
// contains filtered or unexported fields
}
GetCMPositionModeService get user's position mode on EVERY symbol in CM
func (*GetCMPositionModeService) Do ¶
func (s *GetCMPositionModeService) Do(ctx context.Context, opts ...RequestOption) (res *PositionMode, err error)
Do send request
type GetCMPositionRiskService ¶
type GetCMPositionRiskService struct {
// contains filtered or unexported fields
}
GetCMPositionRiskService get CM position risk information
func (*GetCMPositionRiskService) Do ¶
func (s *GetCMPositionRiskService) Do(ctx context.Context, opts ...RequestOption) (res []*CMPosition, err error)
Do send request
func (*GetCMPositionRiskService) MarginAsset ¶
func (s *GetCMPositionRiskService) MarginAsset(marginAsset string) *GetCMPositionRiskService
MarginAsset set margin asset
func (*GetCMPositionRiskService) Pair ¶
func (s *GetCMPositionRiskService) Pair(pair string) *GetCMPositionRiskService
Pair set trading pair
type GetMarginAllOrdersService ¶
type GetMarginAllOrdersService struct {
// contains filtered or unexported fields
}
GetMarginAllOrdersService service to get all margin account orders
func (*GetMarginAllOrdersService) Do ¶
func (s *GetMarginAllOrdersService) Do(ctx context.Context) ([]*MarginOrder, error)
Do send request
func (*GetMarginAllOrdersService) EndTime ¶
func (s *GetMarginAllOrdersService) EndTime(endTime int64) *GetMarginAllOrdersService
EndTime set endTime
func (*GetMarginAllOrdersService) Limit ¶
func (s *GetMarginAllOrdersService) Limit(limit int) *GetMarginAllOrdersService
Limit set limit
func (*GetMarginAllOrdersService) OrderID ¶
func (s *GetMarginAllOrdersService) OrderID(orderID int64) *GetMarginAllOrdersService
OrderID set orderID
func (*GetMarginAllOrdersService) RecvWindow ¶
func (s *GetMarginAllOrdersService) RecvWindow(recvWindow int64) *GetMarginAllOrdersService
RecvWindow set recvWindow
func (*GetMarginAllOrdersService) StartTime ¶
func (s *GetMarginAllOrdersService) StartTime(startTime int64) *GetMarginAllOrdersService
StartTime set startTime
func (*GetMarginAllOrdersService) Symbol ¶
func (s *GetMarginAllOrdersService) Symbol(symbol string) *GetMarginAllOrdersService
Symbol set symbol
type GetMarginForceOrdersService ¶
type GetMarginForceOrdersService struct {
// contains filtered or unexported fields
}
GetMarginForceOrdersService service to get user's margin force orders
func (*GetMarginForceOrdersService) Current ¶
func (s *GetMarginForceOrdersService) Current(current int64) *GetMarginForceOrdersService
Current set current page
func (*GetMarginForceOrdersService) Do ¶
func (s *GetMarginForceOrdersService) Do(ctx context.Context) (*MarginForceOrdersResponse, error)
Do send request
func (*GetMarginForceOrdersService) EndTime ¶
func (s *GetMarginForceOrdersService) EndTime(endTime int64) *GetMarginForceOrdersService
EndTime set endTime
func (*GetMarginForceOrdersService) RecvWindow ¶
func (s *GetMarginForceOrdersService) RecvWindow(recvWindow int64) *GetMarginForceOrdersService
RecvWindow set recvWindow
func (*GetMarginForceOrdersService) Size ¶
func (s *GetMarginForceOrdersService) Size(size int64) *GetMarginForceOrdersService
Size set page size
func (*GetMarginForceOrdersService) StartTime ¶
func (s *GetMarginForceOrdersService) StartTime(startTime int64) *GetMarginForceOrdersService
StartTime set startTime
type GetMarginInterestHistoryService ¶
type GetMarginInterestHistoryService struct {
// contains filtered or unexported fields
}
GetMarginInterestHistoryService get margin borrow/loan interest history
func (*GetMarginInterestHistoryService) Archived ¶
func (s *GetMarginInterestHistoryService) Archived(archived bool) *GetMarginInterestHistoryService
Archived set archived
func (*GetMarginInterestHistoryService) Asset ¶
func (s *GetMarginInterestHistoryService) Asset(asset string) *GetMarginInterestHistoryService
Asset set asset
func (*GetMarginInterestHistoryService) Current ¶
func (s *GetMarginInterestHistoryService) Current(current int64) *GetMarginInterestHistoryService
Current set current page
func (*GetMarginInterestHistoryService) Do ¶
func (s *GetMarginInterestHistoryService) Do(ctx context.Context, opts ...RequestOption) (*MarginInterestHistoryResponse, error)
Do send request
func (*GetMarginInterestHistoryService) EndTime ¶
func (s *GetMarginInterestHistoryService) EndTime(endTime int64) *GetMarginInterestHistoryService
EndTime set endTime
func (*GetMarginInterestHistoryService) Size ¶
func (s *GetMarginInterestHistoryService) Size(size int64) *GetMarginInterestHistoryService
Size set page size
func (*GetMarginInterestHistoryService) StartTime ¶
func (s *GetMarginInterestHistoryService) StartTime(startTime int64) *GetMarginInterestHistoryService
StartTime set startTime
type GetMarginLoanResponse ¶
type GetMarginLoanResponse struct {
Rows []MarginLoan `json:"rows"`
Total int64 `json:"total"`
}
GetMarginLoanResponse define margin loan response
type GetMarginLoanService ¶
type GetMarginLoanService struct {
// contains filtered or unexported fields
}
GetMarginLoanService query margin loan record
func (*GetMarginLoanService) Archived ¶
func (s *GetMarginLoanService) Archived(archived bool) *GetMarginLoanService
Archived set archived
func (*GetMarginLoanService) Asset ¶
func (s *GetMarginLoanService) Asset(asset string) *GetMarginLoanService
Asset set asset
func (*GetMarginLoanService) Current ¶
func (s *GetMarginLoanService) Current(current int64) *GetMarginLoanService
Current set current page
func (*GetMarginLoanService) Do ¶
func (s *GetMarginLoanService) Do(ctx context.Context, opts ...RequestOption) (*GetMarginLoanResponse, error)
Do send request
func (*GetMarginLoanService) EndTime ¶
func (s *GetMarginLoanService) EndTime(endTime int64) *GetMarginLoanService
EndTime set endTime
func (*GetMarginLoanService) Size ¶
func (s *GetMarginLoanService) Size(size int64) *GetMarginLoanService
Size set page size
func (*GetMarginLoanService) StartTime ¶
func (s *GetMarginLoanService) StartTime(startTime int64) *GetMarginLoanService
StartTime set startTime
func (*GetMarginLoanService) TxID ¶
func (s *GetMarginLoanService) TxID(txID int64) *GetMarginLoanService
TxID set transaction id
type GetMarginMaxBorrowService ¶
type GetMarginMaxBorrowService struct {
// contains filtered or unexported fields
}
GetMarginMaxBorrowService get margin max borrowable amount
func (*GetMarginMaxBorrowService) Asset ¶
func (s *GetMarginMaxBorrowService) Asset(asset string) *GetMarginMaxBorrowService
Asset set asset
func (*GetMarginMaxBorrowService) Do ¶
func (s *GetMarginMaxBorrowService) Do(ctx context.Context, opts ...RequestOption) (res *MaxBorrow, err error)
Do send request
type GetMarginMaxWithdrawService ¶
type GetMarginMaxWithdrawService struct {
// contains filtered or unexported fields
}
GetMarginMaxWithdrawService get margin max withdrawable amount
func (*GetMarginMaxWithdrawService) Asset ¶
func (s *GetMarginMaxWithdrawService) Asset(asset string) *GetMarginMaxWithdrawService
Asset set asset
func (*GetMarginMaxWithdrawService) Do ¶
func (s *GetMarginMaxWithdrawService) Do(ctx context.Context, opts ...RequestOption) (res *MaxWithdraw, err error)
Do send request
type GetMarginOpenOrdersService ¶
type GetMarginOpenOrdersService struct {
// contains filtered or unexported fields
}
GetMarginOpenOrdersService service to get current margin open orders
func (*GetMarginOpenOrdersService) Do ¶
func (s *GetMarginOpenOrdersService) Do(ctx context.Context) ([]*MarginOrder, error)
Do send request
func (*GetMarginOpenOrdersService) RecvWindow ¶
func (s *GetMarginOpenOrdersService) RecvWindow(recvWindow int64) *GetMarginOpenOrdersService
RecvWindow set recvWindow
func (*GetMarginOpenOrdersService) Symbol ¶
func (s *GetMarginOpenOrdersService) Symbol(symbol string) *GetMarginOpenOrdersService
Symbol set symbol
type GetMarginRepayResponse ¶
type GetMarginRepayResponse struct {
Rows []MarginRepay `json:"rows"`
Total int64 `json:"total"`
}
GetMarginRepayResponse define margin repay response
type GetMarginRepayService ¶
type GetMarginRepayService struct {
// contains filtered or unexported fields
}
GetMarginRepayService query margin repay record
func (*GetMarginRepayService) Archived ¶
func (s *GetMarginRepayService) Archived(archived bool) *GetMarginRepayService
Archived set archived
func (*GetMarginRepayService) Asset ¶
func (s *GetMarginRepayService) Asset(asset string) *GetMarginRepayService
Asset set asset
func (*GetMarginRepayService) Current ¶
func (s *GetMarginRepayService) Current(current int64) *GetMarginRepayService
Current set current page
func (*GetMarginRepayService) Do ¶
func (s *GetMarginRepayService) Do(ctx context.Context, opts ...RequestOption) (*GetMarginRepayResponse, error)
Do send request
func (*GetMarginRepayService) EndTime ¶
func (s *GetMarginRepayService) EndTime(endTime int64) *GetMarginRepayService
EndTime set endTime
func (*GetMarginRepayService) Size ¶
func (s *GetMarginRepayService) Size(size int64) *GetMarginRepayService
Size set page size
func (*GetMarginRepayService) StartTime ¶
func (s *GetMarginRepayService) StartTime(startTime int64) *GetMarginRepayService
StartTime set startTime
func (*GetMarginRepayService) TxID ¶
func (s *GetMarginRepayService) TxID(txID int64) *GetMarginRepayService
TxID set transaction id
type GetNegativeBalanceExchangeRecordService ¶
type GetNegativeBalanceExchangeRecordService struct {
// contains filtered or unexported fields
}
GetNegativeBalanceExchangeRecordService get user negative balance auto exchange record
func (*GetNegativeBalanceExchangeRecordService) Do ¶
func (s *GetNegativeBalanceExchangeRecordService) Do(ctx context.Context, opts ...RequestOption) (*NegativeBalanceExchangeRecord, error)
Do send request
func (*GetNegativeBalanceExchangeRecordService) EndTime ¶
func (s *GetNegativeBalanceExchangeRecordService) EndTime(endTime int64) *GetNegativeBalanceExchangeRecordService
EndTime set endTime
func (*GetNegativeBalanceExchangeRecordService) RecvWindow ¶
func (s *GetNegativeBalanceExchangeRecordService) RecvWindow(recvWindow int64) *GetNegativeBalanceExchangeRecordService
RecvWindow set recvWindow
func (*GetNegativeBalanceExchangeRecordService) StartTime ¶
func (s *GetNegativeBalanceExchangeRecordService) StartTime(startTime int64) *GetNegativeBalanceExchangeRecordService
StartTime set startTime
type GetNegativeBalanceInterestHistoryService ¶
type GetNegativeBalanceInterestHistoryService struct {
// contains filtered or unexported fields
}
GetNegativeBalanceInterestHistoryService get portfolio margin negative balance interest history
func (*GetNegativeBalanceInterestHistoryService) Asset ¶
func (s *GetNegativeBalanceInterestHistoryService) Asset(asset string) *GetNegativeBalanceInterestHistoryService
Asset set asset
func (*GetNegativeBalanceInterestHistoryService) Do ¶
func (s *GetNegativeBalanceInterestHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*NegativeBalanceInterest, err error)
Do send request
func (*GetNegativeBalanceInterestHistoryService) EndTime ¶
func (s *GetNegativeBalanceInterestHistoryService) EndTime(endTime int64) *GetNegativeBalanceInterestHistoryService
EndTime set endTime
func (*GetNegativeBalanceInterestHistoryService) Size ¶
func (s *GetNegativeBalanceInterestHistoryService) Size(size int64) *GetNegativeBalanceInterestHistoryService
Size set size
func (*GetNegativeBalanceInterestHistoryService) StartTime ¶
func (s *GetNegativeBalanceInterestHistoryService) StartTime(startTime int64) *GetNegativeBalanceInterestHistoryService
StartTime set startTime
type GetRateLimitService ¶
type GetRateLimitService struct {
// contains filtered or unexported fields
}
GetRateLimitService get user rate limit
func (*GetRateLimitService) Do ¶
func (s *GetRateLimitService) Do(ctx context.Context, opts ...RequestOption) ([]*RateLimit, error)
Do send request
func (*GetRateLimitService) RecvWindow ¶
func (s *GetRateLimitService) RecvWindow(recvWindow int64) *GetRateLimitService
RecvWindow set recvWindow
type GetUMAccountDetailService ¶
type GetUMAccountDetailService struct {
// contains filtered or unexported fields
}
GetUMAccountDetailService get current UM account asset and position information
func (*GetUMAccountDetailService) Do ¶
func (s *GetUMAccountDetailService) Do(ctx context.Context, opts ...RequestOption) (*UMAccountDetail, error)
Do send request
type GetUMCommissionRateService ¶
type GetUMCommissionRateService struct {
// contains filtered or unexported fields
}
GetUMCommissionRateService get user commission rate for UM
func (*GetUMCommissionRateService) Do ¶
func (s *GetUMCommissionRateService) Do(ctx context.Context, opts ...RequestOption) (*CommissionRate, error)
Do send request
func (*GetUMCommissionRateService) Symbol ¶
func (s *GetUMCommissionRateService) Symbol(symbol string) *GetUMCommissionRateService
Symbol set symbol
type GetUMIncomeHistoryService ¶
type GetUMIncomeHistoryService struct {
// contains filtered or unexported fields
}
GetUMIncomeHistoryService get UM income history
func (*GetUMIncomeHistoryService) Do ¶
func (s *GetUMIncomeHistoryService) Do(ctx context.Context, opts ...RequestOption) (res []*Income, err error)
Do send request
func (*GetUMIncomeHistoryService) EndTime ¶
func (s *GetUMIncomeHistoryService) EndTime(endTime int64) *GetUMIncomeHistoryService
EndTime set endTime
func (*GetUMIncomeHistoryService) IncomeType ¶
func (s *GetUMIncomeHistoryService) IncomeType(incomeType string) *GetUMIncomeHistoryService
IncomeType set income type
func (*GetUMIncomeHistoryService) Limit ¶
func (s *GetUMIncomeHistoryService) Limit(limit int) *GetUMIncomeHistoryService
Limit set limit
func (*GetUMIncomeHistoryService) Page ¶
func (s *GetUMIncomeHistoryService) Page(page int) *GetUMIncomeHistoryService
Page set page
func (*GetUMIncomeHistoryService) StartTime ¶
func (s *GetUMIncomeHistoryService) StartTime(startTime int64) *GetUMIncomeHistoryService
StartTime set startTime
func (*GetUMIncomeHistoryService) Symbol ¶
func (s *GetUMIncomeHistoryService) Symbol(symbol string) *GetUMIncomeHistoryService
Symbol set symbol
type GetUMLeverageBracketService ¶
type GetUMLeverageBracketService struct {
// contains filtered or unexported fields
}
GetUMLeverageBracketService get UM notional and leverage brackets
func (*GetUMLeverageBracketService) Do ¶
func (s *GetUMLeverageBracketService) Do(ctx context.Context, opts ...RequestOption) (res []*LeverageBracket, err error)
Do send request
func (*GetUMLeverageBracketService) Symbol ¶
func (s *GetUMLeverageBracketService) Symbol(symbol string) *GetUMLeverageBracketService
Symbol set symbol
type GetUMOrderDownloadLinkService ¶
type GetUMOrderDownloadLinkService struct {
// contains filtered or unexported fields
}
GetUMOrderDownloadLinkService get UM futures order download link by Id
func (*GetUMOrderDownloadLinkService) Do ¶
func (s *GetUMOrderDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMOrderDownloadLink, error)
Do send request
func (*GetUMOrderDownloadLinkService) DownloadID ¶
func (s *GetUMOrderDownloadLinkService) DownloadID(downloadID string) *GetUMOrderDownloadLinkService
DownloadID set downloadId
func (*GetUMOrderDownloadLinkService) RecvWindow ¶
func (s *GetUMOrderDownloadLinkService) RecvWindow(recvWindow int64) *GetUMOrderDownloadLinkService
RecvWindow set recvWindow
type GetUMOrderHistoryDownloadIDService ¶
type GetUMOrderHistoryDownloadIDService struct {
// contains filtered or unexported fields
}
GetUMOrderHistoryDownloadIDService get download id for UM futures order history
func (*GetUMOrderHistoryDownloadIDService) Do ¶
func (s *GetUMOrderHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMOrderHistoryDownloadID, error)
Do send request
func (*GetUMOrderHistoryDownloadIDService) EndTime ¶
func (s *GetUMOrderHistoryDownloadIDService) EndTime(endTime int64) *GetUMOrderHistoryDownloadIDService
EndTime set endTime
func (*GetUMOrderHistoryDownloadIDService) RecvWindow ¶
func (s *GetUMOrderHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMOrderHistoryDownloadIDService
RecvWindow set recvWindow
func (*GetUMOrderHistoryDownloadIDService) StartTime ¶
func (s *GetUMOrderHistoryDownloadIDService) StartTime(startTime int64) *GetUMOrderHistoryDownloadIDService
StartTime set startTime
type GetUMPositionModeService ¶
type GetUMPositionModeService struct {
// contains filtered or unexported fields
}
GetUMPositionModeService get user's position mode on EVERY symbol in UM
func (*GetUMPositionModeService) Do ¶
func (s *GetUMPositionModeService) Do(ctx context.Context, opts ...RequestOption) (res *PositionMode, err error)
Do send request
type GetUMPositionRiskService ¶
type GetUMPositionRiskService struct {
// contains filtered or unexported fields
}
GetUMPositionRiskService get UM position risk information
func (*GetUMPositionRiskService) Do ¶
func (s *GetUMPositionRiskService) Do(ctx context.Context, opts ...RequestOption) (res []*UMPosition, err error)
Do send request
func (*GetUMPositionRiskService) Symbol ¶
func (s *GetUMPositionRiskService) Symbol(symbol string) *GetUMPositionRiskService
Symbol set symbol
type GetUMTradeDownloadLinkService ¶
type GetUMTradeDownloadLinkService struct {
// contains filtered or unexported fields
}
GetUMTradeDownloadLinkService get UM futures trade download link by Id
func (*GetUMTradeDownloadLinkService) Do ¶
func (s *GetUMTradeDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMTradeDownloadLink, error)
Do send request
func (*GetUMTradeDownloadLinkService) DownloadID ¶
func (s *GetUMTradeDownloadLinkService) DownloadID(downloadID string) *GetUMTradeDownloadLinkService
DownloadID set downloadId
func (*GetUMTradeDownloadLinkService) RecvWindow ¶
func (s *GetUMTradeDownloadLinkService) RecvWindow(recvWindow int64) *GetUMTradeDownloadLinkService
RecvWindow set recvWindow
type GetUMTradeHistoryDownloadIDService ¶
type GetUMTradeHistoryDownloadIDService struct {
// contains filtered or unexported fields
}
GetUMTradeHistoryDownloadIDService get download id for UM futures trade history
func (*GetUMTradeHistoryDownloadIDService) Do ¶
func (s *GetUMTradeHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMTradeHistoryDownloadID, error)
Do send request
func (*GetUMTradeHistoryDownloadIDService) EndTime ¶
func (s *GetUMTradeHistoryDownloadIDService) EndTime(endTime int64) *GetUMTradeHistoryDownloadIDService
EndTime set endTime
func (*GetUMTradeHistoryDownloadIDService) RecvWindow ¶
func (s *GetUMTradeHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMTradeHistoryDownloadIDService
RecvWindow set recvWindow
func (*GetUMTradeHistoryDownloadIDService) StartTime ¶
func (s *GetUMTradeHistoryDownloadIDService) StartTime(startTime int64) *GetUMTradeHistoryDownloadIDService
StartTime set startTime
type GetUMTradingStatusService ¶
type GetUMTradingStatusService struct {
// contains filtered or unexported fields
}
GetUMTradingStatusService get UM trading quantitative rules indicators
func (*GetUMTradingStatusService) Do ¶
func (s *GetUMTradingStatusService) Do(ctx context.Context, opts ...RequestOption) (*TradingStatus, error)
Do send request
func (*GetUMTradingStatusService) Symbol ¶
func (s *GetUMTradingStatusService) Symbol(symbol string) *GetUMTradingStatusService
Symbol set symbol
type GetUMTransactionDownloadLinkService ¶
type GetUMTransactionDownloadLinkService struct {
// contains filtered or unexported fields
}
GetUMTransactionDownloadLinkService get UM futures transaction download link by Id
func (*GetUMTransactionDownloadLinkService) Do ¶
func (s *GetUMTransactionDownloadLinkService) Do(ctx context.Context, opts ...RequestOption) (*UMTransactionDownloadLink, error)
Do send request
func (*GetUMTransactionDownloadLinkService) DownloadID ¶
func (s *GetUMTransactionDownloadLinkService) DownloadID(downloadID string) *GetUMTransactionDownloadLinkService
DownloadID set downloadId
func (*GetUMTransactionDownloadLinkService) RecvWindow ¶
func (s *GetUMTransactionDownloadLinkService) RecvWindow(recvWindow int64) *GetUMTransactionDownloadLinkService
RecvWindow set recvWindow
type GetUMTransactionHistoryDownloadIDService ¶
type GetUMTransactionHistoryDownloadIDService struct {
// contains filtered or unexported fields
}
GetUMTransactionHistoryDownloadIDService get download id for UM futures transaction history
func (*GetUMTransactionHistoryDownloadIDService) Do ¶
func (s *GetUMTransactionHistoryDownloadIDService) Do(ctx context.Context, opts ...RequestOption) (*UMTransactionHistoryDownloadID, error)
Do send request
func (*GetUMTransactionHistoryDownloadIDService) EndTime ¶
func (s *GetUMTransactionHistoryDownloadIDService) EndTime(endTime int64) *GetUMTransactionHistoryDownloadIDService
EndTime set endTime
func (*GetUMTransactionHistoryDownloadIDService) RecvWindow ¶
func (s *GetUMTransactionHistoryDownloadIDService) RecvWindow(recvWindow int64) *GetUMTransactionHistoryDownloadIDService
RecvWindow set recvWindow
func (*GetUMTransactionHistoryDownloadIDService) StartTime ¶
func (s *GetUMTransactionHistoryDownloadIDService) StartTime(startTime int64) *GetUMTransactionHistoryDownloadIDService
StartTime set startTime
type Income ¶
type Income struct {
Symbol string `json:"symbol"` // trade symbol, if existing
IncomeType string `json:"incomeType"` // income type
Income string `json:"income"` // income amount
Asset string `json:"asset"` // income asset
Info string `json:"info"` // extra information
Time int64 `json:"time"`
TranID int64 `json:"tranId"` // transaction id
TradeID string `json:"tradeId"` // trade id, if existing
}
Income define income info
type Indicator ¶
type Indicator struct {
IsLocked bool `json:"isLocked"`
PlannedRecoverTime int64 `json:"plannedRecoverTime"`
Indicator string `json:"indicator"` // UFR/IFER/GCR/DR/TMV
Value float64 `json:"value"` // Current value
TriggerValue float64 `json:"triggerValue"` // Trigger value
}
Indicator define trading indicator
type LeverageBracket ¶
type LeverageBracket struct {
Symbol string `json:"symbol"`
NotionalCoef string `json:"notionalCoef"`
Brackets []Bracket `json:"brackets"`
}
LeverageBracket define leverage bracket
type MarginAccountTradesService ¶
type MarginAccountTradesService struct {
// contains filtered or unexported fields
}
MarginAccountTradesService service to get margin account trade list
func (*MarginAccountTradesService) Do ¶
func (s *MarginAccountTradesService) Do(ctx context.Context) ([]*MarginTrade, error)
Do send request
func (*MarginAccountTradesService) EndTime ¶
func (s *MarginAccountTradesService) EndTime(endTime int64) *MarginAccountTradesService
EndTime set endTime
func (*MarginAccountTradesService) FromID ¶
func (s *MarginAccountTradesService) FromID(fromID int64) *MarginAccountTradesService
FromID set fromID
func (*MarginAccountTradesService) Limit ¶
func (s *MarginAccountTradesService) Limit(limit int) *MarginAccountTradesService
Limit set limit
func (*MarginAccountTradesService) OrderID ¶
func (s *MarginAccountTradesService) OrderID(orderID int64) *MarginAccountTradesService
OrderID set orderID
func (*MarginAccountTradesService) RecvWindow ¶
func (s *MarginAccountTradesService) RecvWindow(recvWindow int64) *MarginAccountTradesService
RecvWindow set recvWindow
func (*MarginAccountTradesService) StartTime ¶
func (s *MarginAccountTradesService) StartTime(startTime int64) *MarginAccountTradesService
StartTime set startTime
func (*MarginAccountTradesService) Symbol ¶
func (s *MarginAccountTradesService) Symbol(symbol string) *MarginAccountTradesService
Symbol set symbol
type MarginAllOCOService ¶
type MarginAllOCOService struct {
// contains filtered or unexported fields
}
MarginAllOCOService service to get all OCO orders for a margin account
func (*MarginAllOCOService) Do ¶
func (s *MarginAllOCOService) Do(ctx context.Context) ([]*MarginOCOResponse, error)
Do send request
func (*MarginAllOCOService) EndTime ¶
func (s *MarginAllOCOService) EndTime(endTime int64) *MarginAllOCOService
EndTime set endTime
func (*MarginAllOCOService) FromID ¶
func (s *MarginAllOCOService) FromID(fromID int64) *MarginAllOCOService
FromID set fromID
func (*MarginAllOCOService) Limit ¶
func (s *MarginAllOCOService) Limit(limit int) *MarginAllOCOService
Limit set limit
func (*MarginAllOCOService) RecvWindow ¶
func (s *MarginAllOCOService) RecvWindow(recvWindow int64) *MarginAllOCOService
RecvWindow set recvWindow
func (*MarginAllOCOService) StartTime ¶
func (s *MarginAllOCOService) StartTime(startTime int64) *MarginAllOCOService
StartTime set startTime
type MarginCancelAllOrdersResponse ¶
type MarginCancelAllOrdersResponse struct {
Symbol string `json:"symbol"`
OrigClientOrderID string `json:"origClientOrderId,omitempty"`
OrderID int64 `json:"orderId,omitempty"`
OrderListID int64 `json:"orderListId"`
ClientOrderID string `json:"clientOrderId,omitempty"`
Price string `json:"price,omitempty"`
OrigQty string `json:"origQty,omitempty"`
ExecutedQty string `json:"executedQty,omitempty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty,omitempty"`
Status string `json:"status,omitempty"`
TimeInForce string `json:"timeInForce,omitempty"`
Type string `json:"type,omitempty"`
Side string `json:"side,omitempty"`
ContingencyType string `json:"contingencyType,omitempty"`
ListStatusType string `json:"listStatusType,omitempty"`
ListOrderStatus string `json:"listOrderStatus,omitempty"`
ListClientOrderID string `json:"listClientOrderId,omitempty"`
TransactionTime int64 `json:"transactionTime,omitempty"`
Orders []Order `json:"orders,omitempty"`
OrderReports []Report `json:"orderReports,omitempty"`
}
MarginCancelAllOrdersResponse define cancel all orders response
type MarginCancelAllOrdersService ¶
type MarginCancelAllOrdersService struct {
// contains filtered or unexported fields
}
MarginCancelAllOrdersService service to cancel all margin account open orders on a symbol
func (*MarginCancelAllOrdersService) Do ¶
func (s *MarginCancelAllOrdersService) Do(ctx context.Context) ([]*MarginCancelAllOrdersResponse, error)
Do send request
func (*MarginCancelAllOrdersService) RecvWindow ¶
func (s *MarginCancelAllOrdersService) RecvWindow(recvWindow int64) *MarginCancelAllOrdersService
RecvWindow set recvWindow
func (*MarginCancelAllOrdersService) Symbol ¶
func (s *MarginCancelAllOrdersService) Symbol(symbol string) *MarginCancelAllOrdersService
Symbol set symbol
type MarginCancelOCOResponse ¶
type MarginCancelOCOResponse struct {
OrderListID int64 `json:"orderListId"`
ContingencyType string `json:"contingencyType"`
ListStatusType string `json:"listStatusType"`
ListOrderStatus string `json:"listOrderStatus"`
ListClientOrderID string `json:"listClientOrderId"`
TransactionTime int64 `json:"transactionTime"`
Symbol string `json:"symbol"`
Orders []struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
} `json:"orders"`
OrderReports []struct {
Symbol string `json:"symbol"`
OrigClientOrderID string `json:"origClientOrderId"`
OrderID int64 `json:"orderId"`
OrderListID int64 `json:"orderListId"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
StopPrice string `json:"stopPrice,omitempty"`
} `json:"orderReports"`
}
MarginCancelOCOResponse define cancel OCO response
type MarginCancelOCOService ¶
type MarginCancelOCOService struct {
// contains filtered or unexported fields
}
MarginCancelOCOService service to cancel margin account OCO orders
func (*MarginCancelOCOService) Do ¶
func (s *MarginCancelOCOService) Do(ctx context.Context) (*MarginCancelOCOResponse, error)
Do send request
func (*MarginCancelOCOService) ListClientOrderID ¶
func (s *MarginCancelOCOService) ListClientOrderID(listClientOrderID string) *MarginCancelOCOService
ListClientOrderID set listClientOrderId
func (*MarginCancelOCOService) NewClientOrderID ¶
func (s *MarginCancelOCOService) NewClientOrderID(newClientOrderID string) *MarginCancelOCOService
NewClientOrderID set newClientOrderId
func (*MarginCancelOCOService) OrderListID ¶
func (s *MarginCancelOCOService) OrderListID(orderListID int64) *MarginCancelOCOService
OrderListID set orderListId
func (*MarginCancelOCOService) RecvWindow ¶
func (s *MarginCancelOCOService) RecvWindow(recvWindow int64) *MarginCancelOCOService
RecvWindow set recvWindow
func (*MarginCancelOCOService) Symbol ¶
func (s *MarginCancelOCOService) Symbol(symbol string) *MarginCancelOCOService
Symbol set symbol
type MarginCancelOrderResponse ¶
type MarginCancelOrderResponse struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
OrigClientOrderID string `json:"origClientOrderId"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
}
MarginCancelOrderResponse define cancel order response
type MarginCancelOrderService ¶
type MarginCancelOrderService struct {
// contains filtered or unexported fields
}
MarginCancelOrderService service to cancel margin account orders
func (*MarginCancelOrderService) Do ¶
func (s *MarginCancelOrderService) Do(ctx context.Context) (*MarginCancelOrderResponse, error)
Do send request
func (*MarginCancelOrderService) NewClientOrderID ¶
func (s *MarginCancelOrderService) NewClientOrderID(newClientOrderID string) *MarginCancelOrderService
NewClientOrderID set newClientOrderId
func (*MarginCancelOrderService) OrderID ¶
func (s *MarginCancelOrderService) OrderID(orderID int64) *MarginCancelOrderService
OrderID set orderID
func (*MarginCancelOrderService) OrigClientOrderID ¶
func (s *MarginCancelOrderService) OrigClientOrderID(origClientOrderID string) *MarginCancelOrderService
OrigClientOrderID set origClientOrderId
func (*MarginCancelOrderService) RecvWindow ¶
func (s *MarginCancelOrderService) RecvWindow(recvWindow int64) *MarginCancelOrderService
RecvWindow set recvWindow
func (*MarginCancelOrderService) Symbol ¶
func (s *MarginCancelOrderService) Symbol(symbol string) *MarginCancelOrderService
Symbol set symbol
type MarginForceOrder ¶
type MarginForceOrder struct {
AvgPrice string `json:"avgPrice"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
Price string `json:"price"`
Qty string `json:"qty"`
Side string `json:"side"`
Symbol string `json:"symbol"`
TimeInForce string `json:"timeInForce"`
UpdatedTime int64 `json:"updatedTime"`
}
MarginForceOrder define margin force order
type MarginForceOrdersResponse ¶
type MarginForceOrdersResponse struct {
Rows []*MarginForceOrder `json:"rows"`
Total int64 `json:"total"`
}
MarginForceOrdersResponse define margin force orders response
type MarginForceOrdersService ¶
type MarginForceOrdersService struct {
// contains filtered or unexported fields
}
MarginForceOrdersService service to get user's margin force orders
func (*MarginForceOrdersService) Current ¶
func (s *MarginForceOrdersService) Current(current int64) *MarginForceOrdersService
Current set current page
func (*MarginForceOrdersService) Do ¶
func (s *MarginForceOrdersService) Do(ctx context.Context) (*MarginForceOrdersResponse, error)
Do send request
func (*MarginForceOrdersService) EndTime ¶
func (s *MarginForceOrdersService) EndTime(endTime int64) *MarginForceOrdersService
EndTime set endTime
func (*MarginForceOrdersService) RecvWindow ¶
func (s *MarginForceOrdersService) RecvWindow(recvWindow int64) *MarginForceOrdersService
RecvWindow set recvWindow
func (*MarginForceOrdersService) Size ¶
func (s *MarginForceOrdersService) Size(size int64) *MarginForceOrdersService
Size set page size
func (*MarginForceOrdersService) StartTime ¶
func (s *MarginForceOrdersService) StartTime(startTime int64) *MarginForceOrdersService
StartTime set startTime
type MarginInterest ¶
type MarginInterest struct {
TxID int64 `json:"txId"`
InterestAccuredTime int64 `json:"interestAccuredTime"`
Asset string `json:"asset"`
RawAsset string `json:"rawAsset"`
Principal string `json:"principal"`
Interest string `json:"interest"`
InterestRate string `json:"interestRate"`
Type string `json:"type"` // PERIODIC/ON_BORROW/PERIODIC_CONVERTED/ON_BORROW_CONVERTED/PORTFOLIO
}
MarginInterest define margin interest info
type MarginInterestHistoryResponse ¶
type MarginInterestHistoryResponse struct {
Rows []MarginInterest `json:"rows"`
Total int64 `json:"total"`
}
MarginInterestHistoryResponse define margin interest history response
type MarginLoan ¶
type MarginLoan struct {
TxID int64 `json:"txId"`
Asset string `json:"asset"`
Principal string `json:"principal"`
Timestamp int64 `json:"timestamp"`
Status string `json:"status"` // PENDING/CONFIRMED/FAILED
}
MarginLoan define margin loan info
type MarginLoanResponse ¶
type MarginLoanResponse struct {
TranID int64 `json:"tranId"`
}
MarginLoanResponse define margin loan response
type MarginLoanService ¶
type MarginLoanService struct {
// contains filtered or unexported fields
}
MarginLoanService service to borrow margin loan
func (*MarginLoanService) Amount ¶
func (s *MarginLoanService) Amount(amount string) *MarginLoanService
Amount set amount
func (*MarginLoanService) Asset ¶
func (s *MarginLoanService) Asset(asset string) *MarginLoanService
Asset set asset
func (*MarginLoanService) Do ¶
func (s *MarginLoanService) Do(ctx context.Context, opts ...RequestOption) (res *MarginLoanResponse, err error)
Do send request
type MarginOCODetail ¶
type MarginOCODetail struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
}
MarginOCODetail defines detail of an OCO order
type MarginOCOOrder ¶
type MarginOCOOrder struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
}
MarginOCOOrder defines margin OCO order
type MarginOCOOrderDetail ¶
type MarginOCOOrderDetail struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
}
MarginOCOOrderDetail define margin OCO order detail
type MarginOCOOrderReport ¶
type MarginOCOOrderReport struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
OrderListID int64 `json:"orderListId"`
ClientOrderID string `json:"clientOrderId"`
TransactTime int64 `json:"transactTime"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
Status string `json:"status"`
TimeInForce TimeInForceType `json:"timeInForce"`
Type OrderType `json:"type"`
Side SideType `json:"side"`
StopPrice string `json:"stopPrice,omitempty"`
}
MarginOCOOrderReport defines margin OCO order report
type MarginOCOQueryService ¶
type MarginOCOQueryService struct {
// contains filtered or unexported fields
}
MarginOCOQueryService service to query margin OCO orders
func (*MarginOCOQueryService) Do ¶
func (s *MarginOCOQueryService) Do(ctx context.Context, opts ...RequestOption) (res *MarginOCOResponse, err error)
Do send request
func (*MarginOCOQueryService) OrderListID ¶
func (s *MarginOCOQueryService) OrderListID(orderListID int64) *MarginOCOQueryService
OrderListID set orderListID
func (*MarginOCOQueryService) OrigClientOrderID ¶
func (s *MarginOCOQueryService) OrigClientOrderID(origClientOrderID string) *MarginOCOQueryService
OrigClientOrderID set origClientOrderID
type MarginOCOResponse ¶
type MarginOCOResponse struct {
OrderListID int64 `json:"orderListId"`
ContingencyType string `json:"contingencyType"`
ListStatusType string `json:"listStatusType"`
ListOrderStatus string `json:"listOrderStatus"`
ListClientOrderID string `json:"listClientOrderId"`
TransactionTime int64 `json:"transactionTime"`
Symbol string `json:"symbol"`
MarginBuyBorrowAmount string `json:"marginBuyBorrowAmount,omitempty"`
MarginBuyBorrowAsset string `json:"marginBuyBorrowAsset,omitempty"`
Orders []MarginOCOOrder `json:"orders"`
OrderReports []MarginOCOOrderReport `json:"orderReports"`
}
MarginOCOResponse defines margin OCO response
type MarginOCOService ¶
type MarginOCOService struct {
// contains filtered or unexported fields
}
MarginOCOService service to create OCO orders for margin account
func (*MarginOCOService) Do ¶
func (s *MarginOCOService) Do(ctx context.Context, opts ...RequestOption) (res *MarginOCOResponse, err error)
Do send request
func (*MarginOCOService) LimitClientOrderID ¶
func (s *MarginOCOService) LimitClientOrderID(limitClientOrderID string) *MarginOCOService
LimitClientOrderID set limitClientOrderId
func (*MarginOCOService) LimitIcebergQty ¶
func (s *MarginOCOService) LimitIcebergQty(limitIcebergQty string) *MarginOCOService
LimitIcebergQty set limitIcebergQty
func (*MarginOCOService) ListClientOrderID ¶
func (s *MarginOCOService) ListClientOrderID(listClientOrderID string) *MarginOCOService
ListClientOrderID set listClientOrderId
func (*MarginOCOService) NewOrderRespType ¶
func (s *MarginOCOService) NewOrderRespType(newOrderRespType NewOrderRespType) *MarginOCOService
NewOrderRespType set newOrderRespType
func (*MarginOCOService) Price ¶
func (s *MarginOCOService) Price(price string) *MarginOCOService
Price set price
func (*MarginOCOService) Quantity ¶
func (s *MarginOCOService) Quantity(quantity string) *MarginOCOService
Quantity set quantity
func (*MarginOCOService) RecvWindow ¶
func (s *MarginOCOService) RecvWindow(recvWindow int64) *MarginOCOService
RecvWindow set recvWindow
func (*MarginOCOService) Side ¶
func (s *MarginOCOService) Side(side SideType) *MarginOCOService
Side set side
func (*MarginOCOService) SideEffectType ¶
func (s *MarginOCOService) SideEffectType(sideEffectType SideEffectType) *MarginOCOService
SideEffectType set sideEffectType
func (*MarginOCOService) StopClientOrderID ¶
func (s *MarginOCOService) StopClientOrderID(stopClientOrderID string) *MarginOCOService
StopClientOrderID set stopClientOrderId
func (*MarginOCOService) StopIcebergQty ¶
func (s *MarginOCOService) StopIcebergQty(stopIcebergQty string) *MarginOCOService
StopIcebergQty set stop iceberg quantity
func (*MarginOCOService) StopLimitPrice ¶
func (s *MarginOCOService) StopLimitPrice(stopLimitPrice string) *MarginOCOService
StopLimitPrice set stop limit price
func (*MarginOCOService) StopLimitTimeInForce ¶
func (s *MarginOCOService) StopLimitTimeInForce(timeInForce TimeInForceType) *MarginOCOService
StopLimitTimeInForce set stopLimitTimeInForce
func (*MarginOCOService) StopPrice ¶
func (s *MarginOCOService) StopPrice(stopPrice string) *MarginOCOService
StopPrice set stop price
func (*MarginOCOService) Symbol ¶
func (s *MarginOCOService) Symbol(symbol string) *MarginOCOService
Symbol set symbol
type MarginOpenOCOService ¶
type MarginOpenOCOService struct {
// contains filtered or unexported fields
}
MarginOpenOCOService service to get margin account's open OCO orders
func (*MarginOpenOCOService) Do ¶
func (s *MarginOpenOCOService) Do(ctx context.Context) ([]*MarginOCOResponse, error)
Do send request
func (*MarginOpenOCOService) RecvWindow ¶
func (s *MarginOpenOCOService) RecvWindow(recvWindow int64) *MarginOpenOCOService
RecvWindow set recvWindow
type MarginOrder ¶
type MarginOrder struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
TransactTime int64 `json:"time"`
UpdateTime int64 `json:"updateTime"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
Status string `json:"status"`
TimeInForce TimeInForceType `json:"timeInForce"`
Type OrderType `json:"type"`
Side SideType `json:"side"`
MarginBuyBorrowAmount string `json:"marginBuyBorrowAmount,omitempty"`
MarginBuyBorrowAsset string `json:"marginBuyBorrowAsset,omitempty"`
IcebergQty string `json:"icebergQty"`
IsWorking bool `json:"isWorking"`
StopPrice string `json:"stopPrice"`
AccountID int64 `json:"accountId"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
PreventedMatchID *string `json:"preventedMatchId"`
PreventedQuantity *string `json:"preventedQuantity"`
Fills []*Fill `json:"fills"`
}
MarginOrder define margin order info
type MarginOrderService ¶
type MarginOrderService struct {
// contains filtered or unexported fields
}
MarginOrderService service to place margin orders
func (*MarginOrderService) AutoRepayAtCancel ¶
func (s *MarginOrderService) AutoRepayAtCancel(autoRepay bool) *MarginOrderService
AutoRepayAtCancel set auto repay at cancel
func (*MarginOrderService) Do ¶
func (s *MarginOrderService) Do(ctx context.Context, opts ...RequestOption) (res *MarginOrder, err error)
Do send request
func (*MarginOrderService) IcebergQty ¶
func (s *MarginOrderService) IcebergQty(icebergQty string) *MarginOrderService
IcebergQty set iceberg quantity
func (*MarginOrderService) NewClientOrderID ¶
func (s *MarginOrderService) NewClientOrderID(newClientOrderID string) *MarginOrderService
NewClientOrderID set custom order id
func (*MarginOrderService) NewOrderRespType ¶
func (s *MarginOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *MarginOrderService
NewOrderRespType set response type
func (*MarginOrderService) Price ¶
func (s *MarginOrderService) Price(price string) *MarginOrderService
Price set price
func (*MarginOrderService) Quantity ¶
func (s *MarginOrderService) Quantity(quantity string) *MarginOrderService
Quantity set quantity
func (*MarginOrderService) QuoteOrderQty ¶
func (s *MarginOrderService) QuoteOrderQty(quoteOrderQty string) *MarginOrderService
QuoteOrderQty set quote order quantity
func (*MarginOrderService) SelfTradePreventionMode ¶
func (s *MarginOrderService) SelfTradePreventionMode(mode SelfTradePreventionMode) *MarginOrderService
SelfTradePreventionMode set self trade prevention mode
func (*MarginOrderService) Side ¶
func (s *MarginOrderService) Side(side SideType) *MarginOrderService
Side set side
func (*MarginOrderService) SideEffectType ¶
func (s *MarginOrderService) SideEffectType(sideEffectType string) *MarginOrderService
SideEffectType set side effect type
func (*MarginOrderService) StopPrice ¶
func (s *MarginOrderService) StopPrice(stopPrice string) *MarginOrderService
StopPrice set stop price
func (*MarginOrderService) Symbol ¶
func (s *MarginOrderService) Symbol(symbol string) *MarginOrderService
Symbol set symbol
func (*MarginOrderService) TimeInForce ¶
func (s *MarginOrderService) TimeInForce(timeInForce TimeInForceType) *MarginOrderService
TimeInForce set time in force
func (*MarginOrderService) Type ¶
func (s *MarginOrderService) Type(orderType OrderType) *MarginOrderService
Type set order type
type MarginRepay ¶
type MarginRepay struct {
Amount string `json:"amount"` // Total amount repaid
Asset string `json:"asset"`
Interest string `json:"interest"` // Interest repaid
Principal string `json:"principal"` // Principal repaid
Status string `json:"status"` // PENDING/CONFIRMED/FAILED
Timestamp int64 `json:"timestamp"`
TxID int64 `json:"txId"`
}
MarginRepay define margin repay info
type MarginRepayDebtResponse ¶
type MarginRepayDebtResponse struct {
Amount string `json:"amount"`
Asset string `json:"asset"`
SpecifyRepayAssets []string `json:"specifyRepayAssets"`
UpdateTime int64 `json:"updateTime"`
Success bool `json:"success"`
}
MarginRepayDebtResponse represents the response from repaying margin debt
type MarginRepayDebtService ¶
type MarginRepayDebtService struct {
// contains filtered or unexported fields
}
MarginRepayDebtService service to repay margin debt
func (*MarginRepayDebtService) Amount ¶
func (s *MarginRepayDebtService) Amount(amount string) *MarginRepayDebtService
Amount set amount
func (*MarginRepayDebtService) Asset ¶
func (s *MarginRepayDebtService) Asset(asset string) *MarginRepayDebtService
Asset set asset
func (*MarginRepayDebtService) Do ¶
func (s *MarginRepayDebtService) Do(ctx context.Context) (*MarginRepayDebtResponse, error)
Do send request
func (*MarginRepayDebtService) RecvWindow ¶
func (s *MarginRepayDebtService) RecvWindow(recvWindow int64) *MarginRepayDebtService
RecvWindow set recvWindow
func (*MarginRepayDebtService) SpecifyRepayAssets ¶
func (s *MarginRepayDebtService) SpecifyRepayAssets(assets string) *MarginRepayDebtService
SpecifyRepayAssets set specific assets to repay debt
type MarginRepayResponse ¶
type MarginRepayResponse struct {
TranID int64 `json:"tranId"`
}
MarginRepayResponse define margin repay response
type MarginRepayService ¶
type MarginRepayService struct {
// contains filtered or unexported fields
}
MarginRepayService service to repay margin loans
func (*MarginRepayService) Amount ¶
func (s *MarginRepayService) Amount(amount string) *MarginRepayService
Amount set amount
func (*MarginRepayService) Asset ¶
func (s *MarginRepayService) Asset(asset string) *MarginRepayService
Asset set asset
func (*MarginRepayService) Do ¶
func (s *MarginRepayService) Do(ctx context.Context, opts ...RequestOption) (res *MarginRepayResponse, err error)
Do send request
func (*MarginRepayService) RecvWindow ¶
func (s *MarginRepayService) RecvWindow(recvWindow int64) *MarginRepayService
RecvWindow set recvWindow
type MarginTrade ¶
type MarginTrade struct {
Commission string `json:"commission"`
CommissionAsset string `json:"commissionAsset"`
ID int64 `json:"id"`
IsBestMatch bool `json:"isBestMatch"`
IsBuyer bool `json:"isBuyer"`
IsMaker bool `json:"isMaker"`
OrderID int64 `json:"orderId"`
Price string `json:"price"`
Qty string `json:"qty"`
Symbol string `json:"symbol"`
Time int64 `json:"time"`
}
MarginTrade define margin trade info
type MaxBorrow ¶
type MaxBorrow struct {
Amount string `json:"amount"` // account's currently max borrowable amount with sufficient system availability
BorrowLimit string `json:"borrowLimit"` // max borrowable amount limited by the account level
}
MaxBorrow define margin max borrowable amount info
type MaxWithdraw ¶
type MaxWithdraw struct {
Amount string `json:"amount"` // max withdrawable amount
}
MaxWithdraw define margin max withdrawable amount info
type NegativeBalanceExchange ¶
type NegativeBalanceExchange struct {
StartTime int64 `json:"startTime"`
EndTime int64 `json:"endTime"`
Details []*NegativeBalanceExchangeDetail `json:"details"`
}
NegativeBalanceExchange define negative balance exchange info
type NegativeBalanceExchangeDetail ¶
type NegativeBalanceExchangeDetail struct {
Asset string `json:"asset"`
NegativeBalance float64 `json:"negativeBalance"`
NegativeMaxThreshold float64 `json:"negativeMaxThreshold"`
}
NegativeBalanceExchangeDetail define negative balance exchange detail
type NegativeBalanceExchangeRecord ¶
type NegativeBalanceExchangeRecord struct {
Total int64 `json:"total"`
Rows []*NegativeBalanceExchange `json:"rows"`
}
NegativeBalanceExchangeRecord define negative balance exchange record response
type NegativeBalanceInterest ¶
type NegativeBalanceInterest struct {
Asset string `json:"asset"`
Interest string `json:"interest"` // interest amount
InterestAccuredTime int64 `json:"interestAccuredTime"`
InterestRate string `json:"interestRate"` // daily interest rate
Principal string `json:"principal"`
}
NegativeBalanceInterest define negative balance interest info
type NewOrderRespType ¶
type NewOrderRespType string
NewOrderRespType define response JSON verbosity
type Order ¶
type Order struct {
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
}
Order define order
type OrderExecutionType ¶
type OrderExecutionType string
OrderExecutionType define order execution type
type PingService ¶
type PingService struct {
// contains filtered or unexported fields
}
PingService ping server
func (*PingService) Do ¶
func (s *PingService) Do(ctx context.Context, opts ...RequestOption) (err error)
Do send request
type PositionMode ¶
type PositionMode struct {
DualSidePosition bool `json:"dualSidePosition"` // true: Hedge Mode; false: One-way Mode
}
PositionMode define position mode info
type PositionSideType ¶
type PositionSideType string
PositionSideType define position side type of order
type PriceMatchType ¶
type PriceMatchType string
PriceMatchType define priceMatch type Can't be passed together with price
type RateLimit ¶
type RateLimit struct {
RateLimitType string `json:"rateLimitType"`
Interval string `json:"interval"`
IntervalNum int64 `json:"intervalNum"`
Limit int64 `json:"limit"`
}
RateLimit define rate limit info
type RepayFuturesNegativeBalanceService ¶
type RepayFuturesNegativeBalanceService struct {
// contains filtered or unexported fields
}
RepayFuturesNegativeBalanceService repay futures negative balance
func (*RepayFuturesNegativeBalanceService) Do ¶
func (s *RepayFuturesNegativeBalanceService) Do(ctx context.Context, opts ...RequestOption) (*SuccessResponse, error)
Do send request
type Report ¶
type Report struct {
Symbol string `json:"symbol"`
OrigClientOrderID string `json:"origClientOrderId"`
OrderID int64 `json:"orderId"`
OrderListID int64 `json:"orderListId"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CummulativeQuoteQty string `json:"cummulativeQuoteQty"`
Status string `json:"status"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
Side string `json:"side"`
StopPrice string `json:"stopPrice,omitempty"`
IcebergQty string `json:"icebergQty,omitempty"`
}
Report define order report
type RequestOption ¶
type RequestOption func(*request)
RequestOption define option type for request
func WithExtraForm ¶
func WithExtraForm(m map[string]any) RequestOption
WithExtraForm add extra form data of the request
func WithHeader ¶
func WithHeader(key, value string, replace bool) RequestOption
WithHeader set or add a header value to the request
func WithHeaders ¶
func WithHeaders(header http.Header) RequestOption
WithHeaders set or replace the headers of the request
func WithRecvWindow ¶
func WithRecvWindow(recvWindow int64) RequestOption
WithRecvWindow set recvWindow param for the request
type SelfTradePreventionMode ¶
type SelfTradePreventionMode string
SelfTradePreventionMode define self trade prevention strategy
type StrategyType ¶
type StrategyType string
StrategyType define strategy type for conditional orders
type SuccessResponse ¶
type SuccessResponse struct {
Msg string `json:"msg"`
}
SuccessResponse define success response
type TimeInForceType ¶
type TimeInForceType string
TimeInForceType define time in force type of order
type TradingStatus ¶
type TradingStatus struct {
Indicators map[string][]Indicator `json:"indicators"`
UpdateTime int64 `json:"updateTime"`
}
TradingStatus define trading status
type UMADLQuantileResponse ¶
type UMADLQuantileResponse struct {
Symbol string `json:"symbol"`
ADLQuantile ADLQuantile `json:"adlQuantile"`
}
UMADLQuantileResponse define UM ADL quantile response
type UMADLQuantileService ¶
type UMADLQuantileService struct {
// contains filtered or unexported fields
}
UMADLQuantileService service to get UM position ADL quantile estimation
func (*UMADLQuantileService) Do ¶
func (s *UMADLQuantileService) Do(ctx context.Context) ([]*UMADLQuantileResponse, error)
Do send request
func (*UMADLQuantileService) RecvWindow ¶
func (s *UMADLQuantileService) RecvWindow(recvWindow int64) *UMADLQuantileService
RecvWindow set recvWindow
func (*UMADLQuantileService) Symbol ¶
func (s *UMADLQuantileService) Symbol(symbol string) *UMADLQuantileService
Symbol set symbol
type UMAccountConfig ¶
type UMAccountConfig struct {
FeeTier int `json:"feeTier"` // Account commission tier
CanTrade bool `json:"canTrade"` // If can trade
CanDeposit bool `json:"canDeposit"` // If can transfer in asset
CanWithdraw bool `json:"canWithdraw"` // If can transfer out asset
DualSidePosition bool `json:"dualSidePosition"` // If dual side position is enabled
UpdateTime int64 `json:"updateTime"` // Reserved property
MultiAssetsMargin bool `json:"multiAssetsMargin"`
TradeGroupId int `json:"tradeGroupId"`
}
UMAccountConfig define UM futures account configuration
type UMAccountConfigService ¶
type UMAccountConfigService struct {
// contains filtered or unexported fields
}
UMAccountConfigService get UM futures account configuration
func (*UMAccountConfigService) Do ¶
func (s *UMAccountConfigService) Do(ctx context.Context) (*UMAccountConfig, error)
Do send request
type UMAccountDetail ¶
type UMAccountDetail struct {
Assets []UMAsset `json:"assets"`
Positions []UMPosition `json:"positions"`
}
UMAccountDetail define UM account detail
type UMAccountDetailV2 ¶
type UMAccountDetailV2 struct {
Assets []*UMAssetV2 `json:"assets"`
Positions []*UMPositionV2 `json:"positions"`
}
UMAccountDetailV2 define UM account detail v2
type UMAccountDetailV2Service ¶
type UMAccountDetailV2Service struct {
// contains filtered or unexported fields
}
UMAccountDetailV2Service get UM account detail v2
func (*UMAccountDetailV2Service) Do ¶
func (s *UMAccountDetailV2Service) Do(ctx context.Context) (*UMAccountDetailV2, error)
Do send request
type UMAccountTrade ¶
type UMAccountTrade struct {
Symbol string `json:"symbol"`
ID int64 `json:"id"`
OrderID int64 `json:"orderId"`
Side string `json:"side"`
Price string `json:"price"`
Qty string `json:"qty"`
RealizedPnl string `json:"realizedPnl"`
QuoteQty string `json:"quoteQty"`
Commission string `json:"commission"`
CommissionAsset string `json:"commissionAsset"`
Time int64 `json:"time"`
Buyer bool `json:"buyer"`
Maker bool `json:"maker"`
PositionSide string `json:"positionSide"`
}
UMAccountTrade define UM account trade
type UMAccountTradeService ¶
type UMAccountTradeService struct {
// contains filtered or unexported fields
}
UMAccountTradeService service to get UM account trade list
func (*UMAccountTradeService) Do ¶
func (s *UMAccountTradeService) Do(ctx context.Context) ([]*UMAccountTrade, error)
Do send request
func (*UMAccountTradeService) EndTime ¶
func (s *UMAccountTradeService) EndTime(endTime int64) *UMAccountTradeService
EndTime set endTime
func (*UMAccountTradeService) FromID ¶
func (s *UMAccountTradeService) FromID(fromID int64) *UMAccountTradeService
FromID set fromId
func (*UMAccountTradeService) Limit ¶
func (s *UMAccountTradeService) Limit(limit int) *UMAccountTradeService
Limit set limit
func (*UMAccountTradeService) RecvWindow ¶
func (s *UMAccountTradeService) RecvWindow(recvWindow int64) *UMAccountTradeService
RecvWindow set recvWindow
func (*UMAccountTradeService) StartTime ¶
func (s *UMAccountTradeService) StartTime(startTime int64) *UMAccountTradeService
StartTime set startTime
func (*UMAccountTradeService) Symbol ¶
func (s *UMAccountTradeService) Symbol(symbol string) *UMAccountTradeService
Symbol set symbol
type UMAccountTradesService ¶
type UMAccountTradesService struct {
// contains filtered or unexported fields
}
UMAccountTradesService service to get UM account trade list
func (*UMAccountTradesService) Do ¶
func (s *UMAccountTradesService) Do(ctx context.Context) ([]*UMAccountTrade, error)
Do send request
func (*UMAccountTradesService) EndTime ¶
func (s *UMAccountTradesService) EndTime(endTime int64) *UMAccountTradesService
EndTime set endTime
func (*UMAccountTradesService) FromID ¶
func (s *UMAccountTradesService) FromID(fromID int64) *UMAccountTradesService
FromID set fromID
func (*UMAccountTradesService) Limit ¶
func (s *UMAccountTradesService) Limit(limit int) *UMAccountTradesService
Limit set limit
func (*UMAccountTradesService) RecvWindow ¶
func (s *UMAccountTradesService) RecvWindow(recvWindow int64) *UMAccountTradesService
RecvWindow set recvWindow
func (*UMAccountTradesService) StartTime ¶
func (s *UMAccountTradesService) StartTime(startTime int64) *UMAccountTradesService
StartTime set startTime
func (*UMAccountTradesService) Symbol ¶
func (s *UMAccountTradesService) Symbol(symbol string) *UMAccountTradesService
Symbol set symbol
type UMAllConditionalOrdersService ¶
type UMAllConditionalOrdersService struct {
// contains filtered or unexported fields
}
UMAllConditionalOrdersService service to get all UM conditional orders
func (*UMAllConditionalOrdersService) Do ¶
func (s *UMAllConditionalOrdersService) Do(ctx context.Context) ([]*UMConditionalOrderResponse, error)
Do send request
func (*UMAllConditionalOrdersService) EndTime ¶
func (s *UMAllConditionalOrdersService) EndTime(endTime int64) *UMAllConditionalOrdersService
EndTime set endTime
func (*UMAllConditionalOrdersService) Limit ¶
func (s *UMAllConditionalOrdersService) Limit(limit int) *UMAllConditionalOrdersService
Limit set limit
func (*UMAllConditionalOrdersService) RecvWindow ¶
func (s *UMAllConditionalOrdersService) RecvWindow(recvWindow int64) *UMAllConditionalOrdersService
RecvWindow set recvWindow
func (*UMAllConditionalOrdersService) StartTime ¶
func (s *UMAllConditionalOrdersService) StartTime(startTime int64) *UMAllConditionalOrdersService
StartTime set startTime
func (*UMAllConditionalOrdersService) StrategyID ¶
func (s *UMAllConditionalOrdersService) StrategyID(strategyID int64) *UMAllConditionalOrdersService
StrategyID set strategyId
func (*UMAllConditionalOrdersService) Symbol ¶
func (s *UMAllConditionalOrdersService) Symbol(symbol string) *UMAllConditionalOrdersService
Symbol set symbol
type UMAllOrdersResponse ¶
type UMAllOrdersResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumQuote string `json:"cumQuote"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMAllOrdersResponse define all orders response
type UMAllOrdersService ¶
type UMAllOrdersService struct {
// contains filtered or unexported fields
}
UMAllOrdersService service to get all UM orders
func (*UMAllOrdersService) Do ¶
func (s *UMAllOrdersService) Do(ctx context.Context) ([]*UMAllOrdersResponse, error)
Do send request
func (*UMAllOrdersService) EndTime ¶
func (s *UMAllOrdersService) EndTime(endTime int64) *UMAllOrdersService
EndTime set endTime
func (*UMAllOrdersService) Limit ¶
func (s *UMAllOrdersService) Limit(limit int) *UMAllOrdersService
Limit set limit
func (*UMAllOrdersService) OrderID ¶
func (s *UMAllOrdersService) OrderID(orderID int64) *UMAllOrdersService
OrderID set orderID
func (*UMAllOrdersService) RecvWindow ¶
func (s *UMAllOrdersService) RecvWindow(recvWindow int64) *UMAllOrdersService
RecvWindow set recvWindow
func (*UMAllOrdersService) StartTime ¶
func (s *UMAllOrdersService) StartTime(startTime int64) *UMAllOrdersService
StartTime set startTime
func (*UMAllOrdersService) Symbol ¶
func (s *UMAllOrdersService) Symbol(symbol string) *UMAllOrdersService
Symbol set symbol
type UMAsset ¶
type UMAsset struct {
Asset string `json:"asset"` // asset name
CrossWalletBalance string `json:"crossWalletBalance"` // wallet balance
CrossUnPnl string `json:"crossUnPnl"` // unrealized profit
MaintMargin string `json:"maintMargin"` // maintenance margin required
InitialMargin string `json:"initialMargin"` // total initial margin required with current mark price
PositionInitialMargin string `json:"positionInitialMargin"` // initial margin required for positions with current mark price
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // initial margin required for open orders with current mark price
UpdateTime int64 `json:"updateTime"` // last update time
}
UMAsset define UM asset info
type UMAssetV2 ¶
type UMAssetV2 struct {
Asset string `json:"asset"` // Asset name
CrossWalletBalance string `json:"crossWalletBalance"` // Wallet balance
CrossUnPnl string `json:"crossUnPnl"` // Unrealized profit
MaintMargin string `json:"maintMargin"` // Maintenance margin required
InitialMargin string `json:"initialMargin"` // Total initial margin required
PositionInitialMargin string `json:"positionInitialMargin"` // Initial margin required for positions
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // Initial margin required for open orders
UpdateTime int64 `json:"updateTime"` // Last update time
}
UMAssetV2 define UM asset detail v2
type UMCancelAllConditionalOrdersResponse ¶
type UMCancelAllConditionalOrdersResponse struct {
Code string `json:"code"`
Msg string `json:"msg"`
}
UMCancelAllConditionalOrdersResponse define cancel all conditional orders response
type UMCancelAllConditionalOrdersService ¶
type UMCancelAllConditionalOrdersService struct {
// contains filtered or unexported fields
}
UMCancelAllConditionalOrdersService service to cancel all open UM conditional orders
func (*UMCancelAllConditionalOrdersService) Do ¶
func (s *UMCancelAllConditionalOrdersService) Do(ctx context.Context) (*UMCancelAllConditionalOrdersResponse, error)
Do send request
func (*UMCancelAllConditionalOrdersService) RecvWindow ¶
func (s *UMCancelAllConditionalOrdersService) RecvWindow(recvWindow int64) *UMCancelAllConditionalOrdersService
RecvWindow set recvWindow
func (*UMCancelAllConditionalOrdersService) Symbol ¶
func (s *UMCancelAllConditionalOrdersService) Symbol(symbol string) *UMCancelAllConditionalOrdersService
Symbol set symbol
type UMCancelAllOrdersResponse ¶
UMCancelAllOrdersResponse defines cancel all orders response
type UMCancelAllOrdersService ¶
type UMCancelAllOrdersService struct {
// contains filtered or unexported fields
}
UMCancelAllOrdersService service to cancel all active UM orders on a symbol
func (*UMCancelAllOrdersService) Do ¶
func (s *UMCancelAllOrdersService) Do(ctx context.Context, opts ...RequestOption) (res *UMCancelAllOrdersResponse, err error)
Do send request
func (*UMCancelAllOrdersService) RecvWindow ¶
func (s *UMCancelAllOrdersService) RecvWindow(recvWindow int64) *UMCancelAllOrdersService
RecvWindow set recvWindow
func (*UMCancelAllOrdersService) Symbol ¶
func (s *UMCancelAllOrdersService) Symbol(symbol string) *UMCancelAllOrdersService
Symbol set symbol
type UMCancelConditionalOrderResponse ¶
type UMCancelConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
TimeInForce string `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMCancelConditionalOrderResponse define cancel conditional order response
type UMCancelConditionalOrderService ¶
type UMCancelConditionalOrderService struct {
// contains filtered or unexported fields
}
UMCancelConditionalOrderService service to cancel UM conditional orders
func (*UMCancelConditionalOrderService) Do ¶
func (s *UMCancelConditionalOrderService) Do(ctx context.Context) (*UMCancelConditionalOrderResponse, error)
Do send request
func (*UMCancelConditionalOrderService) NewClientStrategyID ¶
func (s *UMCancelConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *UMCancelConditionalOrderService
NewClientStrategyID set newClientStrategyId
func (*UMCancelConditionalOrderService) RecvWindow ¶
func (s *UMCancelConditionalOrderService) RecvWindow(recvWindow int64) *UMCancelConditionalOrderService
RecvWindow set recvWindow
func (*UMCancelConditionalOrderService) StrategyID ¶
func (s *UMCancelConditionalOrderService) StrategyID(strategyID int64) *UMCancelConditionalOrderService
StrategyID set strategyId
func (*UMCancelConditionalOrderService) Symbol ¶
func (s *UMCancelConditionalOrderService) Symbol(symbol string) *UMCancelConditionalOrderService
Symbol set symbol
type UMCancelOrderService ¶
type UMCancelOrderService struct {
// contains filtered or unexported fields
}
UMCancelOrderService service to cancel UM orders
func (*UMCancelOrderService) Do ¶
func (s *UMCancelOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMOrder, err error)
Do send request
func (*UMCancelOrderService) OrderID ¶
func (s *UMCancelOrderService) OrderID(orderID int64) *UMCancelOrderService
OrderID set orderID
func (*UMCancelOrderService) OrigClientOrderID ¶
func (s *UMCancelOrderService) OrigClientOrderID(origClientOrderID string) *UMCancelOrderService
OrigClientOrderID set origClientOrderID
func (*UMCancelOrderService) RecvWindow ¶
func (s *UMCancelOrderService) RecvWindow(recvWindow int64) *UMCancelOrderService
RecvWindow set recvWindow
func (*UMCancelOrderService) Symbol ¶
func (s *UMCancelOrderService) Symbol(symbol string) *UMCancelOrderService
Symbol set symbol
type UMConditionalOrder ¶
type UMConditionalOrder struct {
NewClientStrategyId string `json:"newClientStrategyId"`
StrategyId int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side SideType `json:"side"`
PositionSide PositionSideType `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
TimeInForce TimeInForceType `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
PriceMatch string `json:"priceMatch"`
}
UMConditionalOrder define conditional order info
type UMConditionalOrderHistoryResponse ¶
type UMConditionalOrderHistoryResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
Status string `json:"status"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TriggerTime int64 `json:"triggerTime"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
WorkingType string `json:"workingType"`
PriceProtect bool `json:"priceProtect"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
}
UMConditionalOrderHistoryResponse define conditional order history response
type UMConditionalOrderHistoryService ¶
type UMConditionalOrderHistoryService struct {
// contains filtered or unexported fields
}
UMConditionalOrderHistoryService service to get UM conditional order history
func (*UMConditionalOrderHistoryService) Do ¶
func (s *UMConditionalOrderHistoryService) Do(ctx context.Context) (*UMConditionalOrderHistoryResponse, error)
Do send request
func (*UMConditionalOrderHistoryService) NewClientStrategyID ¶
func (s *UMConditionalOrderHistoryService) NewClientStrategyID(newClientStrategyID string) *UMConditionalOrderHistoryService
NewClientStrategyID set newClientStrategyId
func (*UMConditionalOrderHistoryService) RecvWindow ¶
func (s *UMConditionalOrderHistoryService) RecvWindow(recvWindow int64) *UMConditionalOrderHistoryService
RecvWindow set recvWindow
func (*UMConditionalOrderHistoryService) StrategyID ¶
func (s *UMConditionalOrderHistoryService) StrategyID(strategyID int64) *UMConditionalOrderHistoryService
StrategyID set strategyId
func (*UMConditionalOrderHistoryService) Symbol ¶
func (s *UMConditionalOrderHistoryService) Symbol(symbol string) *UMConditionalOrderHistoryService
Symbol set symbol
type UMConditionalOrderResponse ¶
type UMConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
OrderID int64 `json:"orderId"`
Status string `json:"status"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TriggerTime int64 `json:"triggerTime"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMConditionalOrderResponse define conditional order response
type UMConditionalOrderService ¶
type UMConditionalOrderService struct {
// contains filtered or unexported fields
}
UMConditionalOrderService service to place UM conditional orders
func (*UMConditionalOrderService) ActivationPrice ¶
func (s *UMConditionalOrderService) ActivationPrice(price string) *UMConditionalOrderService
ActivationPrice set activation price
func (*UMConditionalOrderService) CallbackRate ¶
func (s *UMConditionalOrderService) CallbackRate(rate string) *UMConditionalOrderService
CallbackRate set callback rate
func (*UMConditionalOrderService) Do ¶
func (s *UMConditionalOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMConditionalOrder, err error)
Do send request
func (*UMConditionalOrderService) PositionSide ¶
func (s *UMConditionalOrderService) PositionSide(positionSide PositionSideType) *UMConditionalOrderService
PositionSide set position side
func (*UMConditionalOrderService) Price ¶
func (s *UMConditionalOrderService) Price(price string) *UMConditionalOrderService
Price set price
func (*UMConditionalOrderService) PriceProtect ¶
func (s *UMConditionalOrderService) PriceProtect(protect bool) *UMConditionalOrderService
PriceProtect set price protect
func (*UMConditionalOrderService) Quantity ¶
func (s *UMConditionalOrderService) Quantity(quantity string) *UMConditionalOrderService
Quantity set quantity
func (*UMConditionalOrderService) Side ¶
func (s *UMConditionalOrderService) Side(side SideType) *UMConditionalOrderService
Side set side
func (*UMConditionalOrderService) StopPrice ¶
func (s *UMConditionalOrderService) StopPrice(stopPrice string) *UMConditionalOrderService
StopPrice set stop price
func (*UMConditionalOrderService) StrategyType ¶
func (s *UMConditionalOrderService) StrategyType(strategyType string) *UMConditionalOrderService
StrategyType set strategy type
func (*UMConditionalOrderService) Symbol ¶
func (s *UMConditionalOrderService) Symbol(symbol string) *UMConditionalOrderService
Symbol set symbol
func (*UMConditionalOrderService) TimeInForce ¶
func (s *UMConditionalOrderService) TimeInForce(timeInForce TimeInForceType) *UMConditionalOrderService
TimeInForce set time in force
func (*UMConditionalOrderService) WorkingType ¶
func (s *UMConditionalOrderService) WorkingType(workingType string) *UMConditionalOrderService
WorkingType set working type
type UMFeeBurnResponse ¶
UMFeeBurnResponse define response for toggling BNB burn
type UMFeeBurnService ¶
type UMFeeBurnService struct {
// contains filtered or unexported fields
}
UMFeeBurnService service to toggle BNB burn on UM futures trade
func (*UMFeeBurnService) Do ¶
func (s *UMFeeBurnService) Do(ctx context.Context) (*UMFeeBurnResponse, error)
Do send request
func (*UMFeeBurnService) FeeBurn ¶
func (s *UMFeeBurnService) FeeBurn(feeBurn bool) *UMFeeBurnService
FeeBurn set feeBurn status
func (*UMFeeBurnService) RecvWindow ¶
func (s *UMFeeBurnService) RecvWindow(recvWindow int64) *UMFeeBurnService
RecvWindow set recvWindow
type UMFeeBurnStatusResponse ¶
type UMFeeBurnStatusResponse struct {
FeeBurn bool `json:"feeBurn"`
}
UMFeeBurnStatusResponse define response for getting BNB burn status
type UMFeeBurnStatusService ¶
type UMFeeBurnStatusService struct {
// contains filtered or unexported fields
}
UMFeeBurnStatusService service to get BNB burn status on UM futures trade
func (*UMFeeBurnStatusService) Do ¶
func (s *UMFeeBurnStatusService) Do(ctx context.Context) (*UMFeeBurnStatusResponse, error)
Do send request
func (*UMFeeBurnStatusService) RecvWindow ¶
func (s *UMFeeBurnStatusService) RecvWindow(recvWindow int64) *UMFeeBurnStatusService
RecvWindow set recvWindow
type UMForceOrderResponse ¶
type UMForceOrderResponse struct {
OrderID int64 `json:"orderId"`
Symbol string `json:"symbol"`
Status string `json:"status"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CumQuote string `json:"cumQuote"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
OrigType string `json:"origType"`
Time int64 `json:"time"`
UpdateTime int64 `json:"updateTime"`
}
UMForceOrderResponse define force order response
type UMForceOrdersService ¶
type UMForceOrdersService struct {
// contains filtered or unexported fields
}
UMForceOrdersService service to get user's UM force orders
func (*UMForceOrdersService) AutoCloseType ¶
func (s *UMForceOrdersService) AutoCloseType(autoCloseType string) *UMForceOrdersService
AutoCloseType set autoCloseType
func (*UMForceOrdersService) Do ¶
func (s *UMForceOrdersService) Do(ctx context.Context) ([]*UMForceOrderResponse, error)
Do send request
func (*UMForceOrdersService) EndTime ¶
func (s *UMForceOrdersService) EndTime(endTime int64) *UMForceOrdersService
EndTime set endTime
func (*UMForceOrdersService) Limit ¶
func (s *UMForceOrdersService) Limit(limit int) *UMForceOrdersService
Limit set limit
func (*UMForceOrdersService) RecvWindow ¶
func (s *UMForceOrdersService) RecvWindow(recvWindow int64) *UMForceOrdersService
RecvWindow set recvWindow
func (*UMForceOrdersService) StartTime ¶
func (s *UMForceOrdersService) StartTime(startTime int64) *UMForceOrdersService
StartTime set startTime
func (*UMForceOrdersService) Symbol ¶
func (s *UMForceOrdersService) Symbol(symbol string) *UMForceOrdersService
Symbol set symbol
type UMGetADLQuantileService ¶
type UMGetADLQuantileService struct {
// contains filtered or unexported fields
}
UMGetADLQuantileService service to get UM position ADL quantile estimation
func (*UMGetADLQuantileService) Do ¶
func (s *UMGetADLQuantileService) Do(ctx context.Context) ([]*UMADLQuantileResponse, error)
Do send request
func (*UMGetADLQuantileService) RecvWindow ¶
func (s *UMGetADLQuantileService) RecvWindow(recvWindow int64) *UMGetADLQuantileService
RecvWindow set recvWindow
func (*UMGetADLQuantileService) Symbol ¶
func (s *UMGetADLQuantileService) Symbol(symbol string) *UMGetADLQuantileService
Symbol set symbol
type UMLeverage ¶
type UMLeverage struct {
Leverage int `json:"leverage"`
MaxNotionalValue string `json:"maxNotionalValue"`
Symbol string `json:"symbol"`
}
UMLeverage define leverage info
type UMModifyOrderHistoryResponse ¶
type UMModifyOrderHistoryResponse struct {
AmendmentID int64 `json:"amendmentId"`
Symbol string `json:"symbol"`
Pair string `json:"pair"`
OrderID int64 `json:"orderId"`
ClientOrderID string `json:"clientOrderId"`
Time int64 `json:"time"`
Amendment Amendment `json:"amendment"`
PriceMatch string `json:"priceMatch"`
}
UMModifyOrderHistoryResponse define modify order history response
type UMModifyOrderHistoryService ¶
type UMModifyOrderHistoryService struct {
// contains filtered or unexported fields
}
UMModifyOrderHistoryService service to get UM order modification history
func (*UMModifyOrderHistoryService) Do ¶
func (s *UMModifyOrderHistoryService) Do(ctx context.Context) ([]*UMModifyOrderHistoryResponse, error)
Do send request
func (*UMModifyOrderHistoryService) EndTime ¶
func (s *UMModifyOrderHistoryService) EndTime(endTime int64) *UMModifyOrderHistoryService
EndTime set endTime
func (*UMModifyOrderHistoryService) Limit ¶
func (s *UMModifyOrderHistoryService) Limit(limit int) *UMModifyOrderHistoryService
Limit set limit
func (*UMModifyOrderHistoryService) OrderID ¶
func (s *UMModifyOrderHistoryService) OrderID(orderID int64) *UMModifyOrderHistoryService
OrderID set orderID
func (*UMModifyOrderHistoryService) OrigClientOrderID ¶
func (s *UMModifyOrderHistoryService) OrigClientOrderID(origClientOrderID string) *UMModifyOrderHistoryService
OrigClientOrderID set origClientOrderID
func (*UMModifyOrderHistoryService) RecvWindow ¶
func (s *UMModifyOrderHistoryService) RecvWindow(recvWindow int64) *UMModifyOrderHistoryService
RecvWindow set recvWindow
func (*UMModifyOrderHistoryService) StartTime ¶
func (s *UMModifyOrderHistoryService) StartTime(startTime int64) *UMModifyOrderHistoryService
StartTime set startTime
func (*UMModifyOrderHistoryService) Symbol ¶
func (s *UMModifyOrderHistoryService) Symbol(symbol string) *UMModifyOrderHistoryService
Symbol set symbol
type UMModifyOrderResponse ¶
type UMModifyOrderResponse struct {
OrderID int64 `json:"orderId"`
Symbol string `json:"symbol"`
Status string `json:"status"`
ClientOrderID string `json:"clientOrderId"`
Price string `json:"price"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
ExecutedQty string `json:"executedQty"`
CumQty string `json:"cumQty"`
CumQuote string `json:"cumQuote"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
OrigType string `json:"origType"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
UpdateTime int64 `json:"updateTime"`
PriceMatch string `json:"priceMatch"`
}
UMModifyOrderResponse define modify order response
type UMModifyOrderService ¶
type UMModifyOrderService struct {
// contains filtered or unexported fields
}
UMModifyOrderService service to modify UM orders
func (*UMModifyOrderService) Do ¶
func (s *UMModifyOrderService) Do(ctx context.Context) (*UMModifyOrderResponse, error)
Do send request
func (*UMModifyOrderService) OrderID ¶
func (s *UMModifyOrderService) OrderID(orderID int64) *UMModifyOrderService
OrderID set orderID
func (*UMModifyOrderService) OrigClientOrderID ¶
func (s *UMModifyOrderService) OrigClientOrderID(origClientOrderID string) *UMModifyOrderService
OrigClientOrderID set origClientOrderId
func (*UMModifyOrderService) Price ¶
func (s *UMModifyOrderService) Price(price string) *UMModifyOrderService
Price set price
func (*UMModifyOrderService) PriceMatch ¶
func (s *UMModifyOrderService) PriceMatch(priceMatch string) *UMModifyOrderService
PriceMatch set priceMatch
func (*UMModifyOrderService) Quantity ¶
func (s *UMModifyOrderService) Quantity(quantity string) *UMModifyOrderService
Quantity set quantity
func (*UMModifyOrderService) RecvWindow ¶
func (s *UMModifyOrderService) RecvWindow(recvWindow int64) *UMModifyOrderService
RecvWindow set recvWindow
func (*UMModifyOrderService) Side ¶
func (s *UMModifyOrderService) Side(side SideType) *UMModifyOrderService
Side set side
func (*UMModifyOrderService) Symbol ¶
func (s *UMModifyOrderService) Symbol(symbol string) *UMModifyOrderService
Symbol set symbol
type UMOpenConditionalOrderResponse ¶
type UMOpenConditionalOrderResponse struct {
NewClientStrategyID string `json:"newClientStrategyId"`
StrategyID int64 `json:"strategyId"`
StrategyStatus string `json:"strategyStatus"`
StrategyType string `json:"strategyType"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
StopPrice string `json:"stopPrice"`
Symbol string `json:"symbol"`
BookTime int64 `json:"bookTime"`
UpdateTime int64 `json:"updateTime"`
TimeInForce string `json:"timeInForce"`
ActivatePrice string `json:"activatePrice"`
PriceRate string `json:"priceRate"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMOpenConditionalOrderResponse define open conditional order response
type UMOpenConditionalOrderService ¶
type UMOpenConditionalOrderService struct {
// contains filtered or unexported fields
}
UMOpenConditionalOrderService service to get current UM open conditional order
func (*UMOpenConditionalOrderService) Do ¶
func (s *UMOpenConditionalOrderService) Do(ctx context.Context) (*UMOpenConditionalOrderResponse, error)
Do send request
func (*UMOpenConditionalOrderService) NewClientStrategyID ¶
func (s *UMOpenConditionalOrderService) NewClientStrategyID(newClientStrategyID string) *UMOpenConditionalOrderService
NewClientStrategyID set newClientStrategyId
func (*UMOpenConditionalOrderService) RecvWindow ¶
func (s *UMOpenConditionalOrderService) RecvWindow(recvWindow int64) *UMOpenConditionalOrderService
RecvWindow set recvWindow
func (*UMOpenConditionalOrderService) StrategyID ¶
func (s *UMOpenConditionalOrderService) StrategyID(strategyID int64) *UMOpenConditionalOrderService
StrategyID set strategyId
func (*UMOpenConditionalOrderService) Symbol ¶
func (s *UMOpenConditionalOrderService) Symbol(symbol string) *UMOpenConditionalOrderService
Symbol set symbol
type UMOpenConditionalOrdersService ¶
type UMOpenConditionalOrdersService struct {
// contains filtered or unexported fields
}
UMOpenConditionalOrdersService service to get all current UM open conditional orders
func (*UMOpenConditionalOrdersService) Do ¶
func (s *UMOpenConditionalOrdersService) Do(ctx context.Context) ([]*UMOpenConditionalOrderResponse, error)
Do send request
func (*UMOpenConditionalOrdersService) RecvWindow ¶
func (s *UMOpenConditionalOrdersService) RecvWindow(recvWindow int64) *UMOpenConditionalOrdersService
RecvWindow set recvWindow
func (*UMOpenConditionalOrdersService) Symbol ¶
func (s *UMOpenConditionalOrdersService) Symbol(symbol string) *UMOpenConditionalOrdersService
Symbol set symbol
type UMOpenOrderResponse ¶
type UMOpenOrderResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumQuote string `json:"cumQuote"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMOpenOrderResponse define open order response
type UMOpenOrderService ¶
type UMOpenOrderService struct {
// contains filtered or unexported fields
}
UMOpenOrderService service to get current UM open order
func (*UMOpenOrderService) Do ¶
func (s *UMOpenOrderService) Do(ctx context.Context) (*UMOpenOrderResponse, error)
Do send request
func (*UMOpenOrderService) OrderID ¶
func (s *UMOpenOrderService) OrderID(orderID int64) *UMOpenOrderService
OrderID set orderID
func (*UMOpenOrderService) OrigClientOrderID ¶
func (s *UMOpenOrderService) OrigClientOrderID(origClientOrderID string) *UMOpenOrderService
OrigClientOrderID set origClientOrderId
func (*UMOpenOrderService) RecvWindow ¶
func (s *UMOpenOrderService) RecvWindow(recvWindow int64) *UMOpenOrderService
RecvWindow set recvWindow
func (*UMOpenOrderService) Symbol ¶
func (s *UMOpenOrderService) Symbol(symbol string) *UMOpenOrderService
Symbol set symbol
type UMOpenOrdersResponse ¶
type UMOpenOrdersResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumQuote string `json:"cumQuote"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMOpenOrdersResponse define open orders response
type UMOpenOrdersService ¶
type UMOpenOrdersService struct {
// contains filtered or unexported fields
}
UMOpenOrdersService service to get all current UM open orders
func (*UMOpenOrdersService) Do ¶
func (s *UMOpenOrdersService) Do(ctx context.Context) ([]*UMOpenOrdersResponse, error)
Do send request
func (*UMOpenOrdersService) RecvWindow ¶
func (s *UMOpenOrdersService) RecvWindow(recvWindow int64) *UMOpenOrdersService
RecvWindow set recvWindow
func (*UMOpenOrdersService) Symbol ¶
func (s *UMOpenOrdersService) Symbol(symbol string) *UMOpenOrdersService
Symbol set symbol
type UMOrder ¶
type UMOrder struct {
ClientOrderID string `json:"clientOrderId"`
CumQty string `json:"cumQty"`
CumQuote string `json:"cumQuote"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
AvgPrice string `json:"avgPrice"`
OrigQty string `json:"origQty"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side SideType `json:"side"`
PositionSide PositionSideType `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
TimeInForce TimeInForceType `json:"timeInForce"`
Type OrderType `json:"type"`
SelfTradePreventionMode SelfTradePreventionMode `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
UpdateTime int64 `json:"updateTime"`
PriceMatch PriceMatchType `json:"priceMatch"`
}
UMOrder define UM order info
type UMOrderDownloadLink ¶
type UMOrderDownloadLink struct {
DownloadID string `json:"downloadId"`
Status string `json:"status"` // Enum:completed,processing
URL string `json:"url"` // The link is mapped to download id
S3Link string `json:"s3Link"`
Notified bool `json:"notified"` // ignore
ExpirationTimestamp int64 `json:"expirationTimestamp"` // The link would expire after this timestamp
IsExpired *bool `json:"isExpired"`
}
UMOrderDownloadLink define download link response
type UMOrderHistoryDownloadID ¶
type UMOrderHistoryDownloadID struct {
AvgCostTimestampOfLast30d int64 `json:"avgCostTimestampOfLast30d"`
DownloadID string `json:"downloadId"`
}
UMOrderHistoryDownloadID define download id response
type UMOrderService ¶
type UMOrderService struct {
// contains filtered or unexported fields
}
UMOrderService service to place UM orders
func (*UMOrderService) Do ¶
func (s *UMOrderService) Do(ctx context.Context, opts ...RequestOption) (res *UMOrder, err error)
Do send request
func (*UMOrderService) GoodTillDate ¶
func (s *UMOrderService) GoodTillDate(timestamp int64) *UMOrderService
GoodTillDate set good till date timestamp
func (*UMOrderService) NewClientOrderID ¶
func (s *UMOrderService) NewClientOrderID(newClientOrderID string) *UMOrderService
NewClientOrderID set custom order id
func (*UMOrderService) NewOrderRespType ¶
func (s *UMOrderService) NewOrderRespType(newOrderRespType NewOrderRespType) *UMOrderService
NewOrderRespType set response type
func (*UMOrderService) PositionSide ¶
func (s *UMOrderService) PositionSide(positionSide PositionSideType) *UMOrderService
PositionSide set position side
func (*UMOrderService) Price ¶
func (s *UMOrderService) Price(price string) *UMOrderService
Price set price
func (*UMOrderService) PriceMatch ¶
func (s *UMOrderService) PriceMatch(priceMatch PriceMatchType) *UMOrderService
PriceMatch set price match type
func (*UMOrderService) Quantity ¶
func (s *UMOrderService) Quantity(quantity string) *UMOrderService
Quantity set quantity
func (*UMOrderService) ReduceOnly ¶
func (s *UMOrderService) ReduceOnly(reduceOnly bool) *UMOrderService
ReduceOnly set reduce only
func (*UMOrderService) SelfTradePreventionMode ¶
func (s *UMOrderService) SelfTradePreventionMode(mode SelfTradePreventionMode) *UMOrderService
SelfTradePreventionMode set self trade prevention mode
func (*UMOrderService) Side ¶
func (s *UMOrderService) Side(side SideType) *UMOrderService
Side set side
func (*UMOrderService) Symbol ¶
func (s *UMOrderService) Symbol(symbol string) *UMOrderService
Symbol set symbol
func (*UMOrderService) TimeInForce ¶
func (s *UMOrderService) TimeInForce(timeInForce TimeInForceType) *UMOrderService
TimeInForce set time in force
func (*UMOrderService) Type ¶
func (s *UMOrderService) Type(orderType OrderType) *UMOrderService
Type set order type
type UMPosition ¶
type UMPosition struct {
Symbol string `json:"symbol"` // symbol name
PositionAmt string `json:"positionAmt"` // position amount
EntryPrice string `json:"entryPrice"` // average entry price
MarkPrice string `json:"markPrice,omitempty"` // mark price (only in position risk endpoint)
UnrealizedProfit string `json:"unrealizedProfit"` // unrealized profit
LiquidationPrice string `json:"liquidationPrice,omitempty"` // liquidation price (only in position risk endpoint)
Leverage string `json:"leverage"` // current initial leverage
MaxNotional string `json:"maxNotional,omitempty"` // maximum available notional with current leverage (account detail)
MaxNotionalValue string `json:"maxNotionalValue,omitempty"` // maximum notional value (position risk)
PositionSide string `json:"positionSide"` // position side
InitialMargin string `json:"initialMargin"` // initial margin required with current mark price
MaintMargin string `json:"maintMargin"` // maintenance margin required
PositionInitialMargin string `json:"positionInitialMargin"` // initial margin required for positions with current mark price
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // initial margin required for open orders with current mark price
Notional string `json:"notional,omitempty"` // notional value (only in position risk endpoint)
BidNotional string `json:"bidNotional"` // bids notional
AskNotional string `json:"askNotional"` // ask notional
UpdateTime int64 `json:"updateTime"` // last update time
}
UMPosition define UM position information
type UMPositionV2 ¶
type UMPositionV2 struct {
Symbol string `json:"symbol"` // Symbol name
InitialMargin string `json:"initialMargin"` // Initial margin required
MaintMargin string `json:"maintMargin"` // Maintenance margin required
UnrealizedProfit string `json:"unrealizedProfit"` // Unrealized profit
PositionSide string `json:"positionSide"` // Position side
PositionAmt string `json:"positionAmt"` // Position amount
UpdateTime int64 `json:"updateTime"` // Last update time
Notional string `json:"notional"` // Notional value
}
UMPositionV2 define UM position detail v2
type UMQueryOrderResponse ¶
type UMQueryOrderResponse struct {
AvgPrice string `json:"avgPrice"`
ClientOrderID string `json:"clientOrderId"`
CumQuote string `json:"cumQuote"`
ExecutedQty string `json:"executedQty"`
OrderID int64 `json:"orderId"`
OrigQty string `json:"origQty"`
OrigType string `json:"origType"`
Price string `json:"price"`
ReduceOnly bool `json:"reduceOnly"`
Side string `json:"side"`
PositionSide string `json:"positionSide"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Time int64 `json:"time"`
TimeInForce string `json:"timeInForce"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
SelfTradePreventionMode string `json:"selfTradePreventionMode"`
GoodTillDate int64 `json:"goodTillDate"`
PriceMatch string `json:"priceMatch"`
}
UMQueryOrderResponse define query order response
type UMQueryOrderService ¶
type UMQueryOrderService struct {
// contains filtered or unexported fields
}
UMQueryOrderService service to query UM orders
func (*UMQueryOrderService) Do ¶
func (s *UMQueryOrderService) Do(ctx context.Context) (*UMQueryOrderResponse, error)
Do send request
func (*UMQueryOrderService) OrderID ¶
func (s *UMQueryOrderService) OrderID(orderID int64) *UMQueryOrderService
OrderID set orderID
func (*UMQueryOrderService) OrigClientOrderID ¶
func (s *UMQueryOrderService) OrigClientOrderID(origClientOrderID string) *UMQueryOrderService
OrigClientOrderID set origClientOrderId
func (*UMQueryOrderService) RecvWindow ¶
func (s *UMQueryOrderService) RecvWindow(recvWindow int64) *UMQueryOrderService
RecvWindow set recvWindow
func (*UMQueryOrderService) Symbol ¶
func (s *UMQueryOrderService) Symbol(symbol string) *UMQueryOrderService
Symbol set symbol
type UMSymbolConfig ¶
type UMSymbolConfig struct {
Symbol string `json:"symbol"`
MarginType string `json:"marginType"`
IsAutoAddMargin bool `json:"isAutoAddMargin"`
Leverage int `json:"leverage"`
MaxNotionalValue string `json:"maxNotionalValue"`
}
UMSymbolConfig define UM futures symbol configuration
type UMSymbolConfigService ¶
type UMSymbolConfigService struct {
// contains filtered or unexported fields
}
UMSymbolConfigService get UM futures symbol configuration
func (*UMSymbolConfigService) Do ¶
func (s *UMSymbolConfigService) Do(ctx context.Context) ([]*UMSymbolConfig, error)
Do send request
func (*UMSymbolConfigService) Symbol ¶
func (s *UMSymbolConfigService) Symbol(symbol string) *UMSymbolConfigService
Symbol set symbol
type UMTradeDownloadLink ¶
type UMTradeDownloadLink struct {
DownloadID string `json:"downloadId"`
Status string `json:"status"` // Enum:completed,processing
URL string `json:"url"` // The link is mapped to download id
S3Link string `json:"s3Link"`
Notified bool `json:"notified"` // ignore
ExpirationTimestamp int64 `json:"expirationTimestamp"` // The link would expire after this timestamp
IsExpired *bool `json:"isExpired"`
}
UMTradeDownloadLink define download link response
type UMTradeHistoryDownloadID ¶
type UMTradeHistoryDownloadID struct {
AvgCostTimestampOfLast30d int64 `json:"avgCostTimestampOfLast30d"`
DownloadID string `json:"downloadId"`
}
UMTradeHistoryDownloadID define download id response
type UMTransactionDownloadLink ¶
type UMTransactionDownloadLink struct {
DownloadID string `json:"downloadId"`
Status string `json:"status"` // Enum:completed,processing
URL string `json:"url"` // The link is mapped to download id
S3Link string `json:"s3Link"`
Notified bool `json:"notified"` // ignore
ExpirationTimestamp int64 `json:"expirationTimestamp"` // The link would expire after this timestamp
IsExpired *bool `json:"isExpired"`
}
UMTransactionDownloadLink define download link response
type UMTransactionHistoryDownloadID ¶
type UMTransactionHistoryDownloadID struct {
AvgCostTimestampOfLast30d int64 `json:"avgCostTimestampOfLast30d"`
DownloadID string `json:"downloadId"`
}
UMTransactionHistoryDownloadID define download id response
type UserDataEventReasonType ¶
type UserDataEventReasonType string
UserDataEventReasonType define reason type for user data event
type UserDataEventType ¶
type UserDataEventType string
UserDataEventType define user data event type
Source Files
¶
- account_service.go
- auto_repay_futures_status_service.go
- auto_repay_futures_switch_service.go
- balance_service.go
- bnb_transfer_service.go
- client.go
- cm_account_detail_service.go
- cm_account_trade_service.go
- cm_account_trades_service.go
- cm_adl_quantile_service.go
- cm_all_orders_service.go
- cm_cancel_all_conditional_orders_service.go
- cm_cancel_all_orders_service.go
- cm_cancel_conditional_order_service.go
- cm_cancel_order_service.go
- cm_commission_rate_service.go
- cm_conditional_order_history_service.go
- cm_conditional_order_service.go
- cm_conditional_orders_service.go
- cm_force_orders_service.go
- cm_income_history_service.go
- cm_leverage_bracket_service.go
- cm_leverage_service.go
- cm_modify_order_history_service.go
- cm_modify_order_service.go
- cm_open_conditional_order_service.go
- cm_open_conditional_orders_service.go
- cm_open_order_service.go
- cm_open_orders_service.go
- cm_order_service.go
- cm_position_mode_get_service.go
- cm_position_mode_service.go
- cm_position_service.go
- cm_query_order_service.go
- errors.go
- fund_auto_collection_service.go
- fund_collection_by_asset_service.go
- get_margin_all_orders_service.go
- get_margin_force_orders_service.go
- get_margin_loan_service.go
- get_margin_open_orders_service.go
- get_margin_repay_service.go
- margin_account_trades_service.go
- margin_all_oco_service.go
- margin_borrow_service.go
- margin_cancel_all_orders_service.go
- margin_cancel_oco_service.go
- margin_cancel_order_service.go
- margin_force_orders_service.go
- margin_interest_history_service.go
- margin_loan_service.go
- margin_oco_query_service.go
- margin_oco_service.go
- margin_open_oco_service.go
- margin_order_service.go
- margin_repay_debt_service.go
- margin_repay_service.go
- margin_withdraw_service.go
- negative_balance_interest_history_service.go
- negative_balance_service.go
- rate_limit_service.go
- repay_futures_negative_balance_service.go
- request.go
- server_service.go
- um_account_config_service.go
- um_account_detail_service.go
- um_account_detail_v2_service.go
- um_account_trade_service.go
- um_account_trades_service.go
- um_adl_quantile_service.go
- um_all_conditional_orders_service.go
- um_all_orders_service.go
- um_cancel_all_conditional_orders_service.go
- um_cancel_all_orders_service.go
- um_cancel_conditional_order_service.go
- um_cancel_order_service.go
- um_commission_rate_service.go
- um_conditional_order_history_service.go
- um_conditional_order_service.go
- um_fee_burn_service.go
- um_fee_burn_status_service.go
- um_force_orders_service.go
- um_get_adl_quantile_service.go
- um_income_history_service.go
- um_leverage_bracket_service.go
- um_leverage_service.go
- um_modify_order_history_service.go
- um_modify_order_service.go
- um_open_conditional_order_service.go
- um_open_conditional_orders_service.go
- um_open_order_service.go
- um_open_orders_service.go
- um_order_download_link_service.go
- um_order_history_service.go
- um_order_service.go
- um_position_mode_get_service.go
- um_position_mode_service.go
- um_position_service.go
- um_query_order_service.go
- um_symbol_config_service.go
- um_trade_download_link_service.go
- um_trade_history_service.go
- um_trading_status_service.go
- um_transaction_download_link_service.go
- um_transaction_history_service.go