Documentation
¶
Index ¶
- Constants
- Variables
- func Sign(payload string, secret string) string
- type APIResponse
- type Account
- type AccountConfig
- type AccountLevelResponse
- type AccountRiskResponse
- type AssetBalance
- type AssetBalanceList
- type AssetCurrency
- type AutoRepayResponse
- type BalanceDetail
- type BatchCancelOrderRequest
- type BatchPlaceOrderRequest
- type BorrowInterestLimit
- type CancelOrderRequest
- func (c *CancelOrderRequest) ClientOrderID(clientOrderID string) *CancelOrderRequest
- func (c *CancelOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
- func (c *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
- func (c *CancelOrderRequest) GetParametersJSON() ([]byte, error)
- func (c *CancelOrderRequest) GetParametersQuery() (url.Values, error)
- func (c *CancelOrderRequest) GetPath() string
- func (c *CancelOrderRequest) GetQueryParameters() (url.Values, error)
- func (c *CancelOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (c *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
- func (c *CancelOrderRequest) InstrumentID(instrumentID string) *CancelOrderRequest
- func (c *CancelOrderRequest) OrderID(orderID string) *CancelOrderRequest
- type DepositRecord
- type FundingRate
- type GetAccountBalanceRequest
- func (g *GetAccountBalanceRequest) Do(ctx context.Context) ([]Account, error)
- func (g *GetAccountBalanceRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountBalanceRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountBalanceRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountBalanceRequest) GetPath() string
- func (g *GetAccountBalanceRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountBalanceRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountBalanceRequest) GetSlugsMap() (map[string]string, error)
- type GetAccountConfigRequest
- func (g *GetAccountConfigRequest) Do(ctx context.Context) ([]AccountConfig, error)
- func (g *GetAccountConfigRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountConfigRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountConfigRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountConfigRequest) GetPath() string
- func (g *GetAccountConfigRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountConfigRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountConfigRequest) GetSlugsMap() (map[string]string, error)
- type GetAccountInterestLimitsRequest
- func (g *GetAccountInterestLimitsRequest) Currency(currency string) *GetAccountInterestLimitsRequest
- func (g *GetAccountInterestLimitsRequest) Do(ctx context.Context) ([]BorrowInterestLimit, error)
- func (g *GetAccountInterestLimitsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountInterestLimitsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountInterestLimitsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountInterestLimitsRequest) GetPath() string
- func (g *GetAccountInterestLimitsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountInterestLimitsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountInterestLimitsRequest) GetSlugsMap() (map[string]string, error)
- type GetAccountLeverageInfoRequest
- func (g *GetAccountLeverageInfoRequest) Currency(currency string) *GetAccountLeverageInfoRequest
- func (g *GetAccountLeverageInfoRequest) Do(ctx context.Context) ([]LeverageInfo, error)
- func (g *GetAccountLeverageInfoRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountLeverageInfoRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountLeverageInfoRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountLeverageInfoRequest) GetPath() string
- func (g *GetAccountLeverageInfoRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountLeverageInfoRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountLeverageInfoRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAccountLeverageInfoRequest) InstrumentId(instrumentId string) *GetAccountLeverageInfoRequest
- func (g *GetAccountLeverageInfoRequest) MarginMode(marginMode MarginMode) *GetAccountLeverageInfoRequest
- type GetAccountMaxLoanRequest
- func (g *GetAccountMaxLoanRequest) Currency(currency string) *GetAccountMaxLoanRequest
- func (g *GetAccountMaxLoanRequest) Do(ctx context.Context) ([]MaxLoanResponse, error)
- func (g *GetAccountMaxLoanRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountMaxLoanRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountMaxLoanRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountMaxLoanRequest) GetPath() string
- func (g *GetAccountMaxLoanRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountMaxLoanRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountMaxLoanRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAccountMaxLoanRequest) InstrumentId(instrumentId string) *GetAccountMaxLoanRequest
- func (g *GetAccountMaxLoanRequest) MarginCurrency(marginCurrency string) *GetAccountMaxLoanRequest
- func (g *GetAccountMaxLoanRequest) MarginMode(marginMode MarginMode) *GetAccountMaxLoanRequest
- type GetAccountPositionRiskRequest
- func (g *GetAccountPositionRiskRequest) Do(ctx context.Context) ([]PositionRiskResponse, error)
- func (g *GetAccountPositionRiskRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountPositionRiskRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountPositionRiskRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountPositionRiskRequest) GetPath() string
- func (g *GetAccountPositionRiskRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountPositionRiskRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountPositionRiskRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAccountPositionRiskRequest) InstType(instType InstrumentType) *GetAccountPositionRiskRequest
- type GetAccountPositionsRequest
- func (g *GetAccountPositionsRequest) Do(ctx context.Context) ([]Position, error)
- func (g *GetAccountPositionsRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountPositionsRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountPositionsRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountPositionsRequest) GetPath() string
- func (g *GetAccountPositionsRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountPositionsRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountPositionsRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAccountPositionsRequest) InstType(instType InstrumentType) *GetAccountPositionsRequest
- type GetAccountRiskStateRequest
- func (g *GetAccountRiskStateRequest) Do(ctx context.Context) ([]AccountRiskResponse, error)
- func (g *GetAccountRiskStateRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountRiskStateRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountRiskStateRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountRiskStateRequest) GetPath() string
- func (g *GetAccountRiskStateRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountRiskStateRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountRiskStateRequest) GetSlugsMap() (map[string]string, error)
- type GetAccountSpotBorrowRepayHistoryRequest
- func (g *GetAccountSpotBorrowRepayHistoryRequest) After(after time.Time) *GetAccountSpotBorrowRepayHistoryRequest
- func (g *GetAccountSpotBorrowRepayHistoryRequest) Before(before time.Time) *GetAccountSpotBorrowRepayHistoryRequest
- func (g *GetAccountSpotBorrowRepayHistoryRequest) Currency(currency string) *GetAccountSpotBorrowRepayHistoryRequest
- func (g *GetAccountSpotBorrowRepayHistoryRequest) Do(ctx context.Context) ([]MarginHistoryEntry, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) EventType(eventType MarginEventType) *GetAccountSpotBorrowRepayHistoryRequest
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetPath() string
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAccountSpotBorrowRepayHistoryRequest) Limit(limit uint64) *GetAccountSpotBorrowRepayHistoryRequest
- type GetAssetDepositHistoryRequest
- func (g *GetAssetDepositHistoryRequest) After(after time.Time) *GetAssetDepositHistoryRequest
- func (g *GetAssetDepositHistoryRequest) Before(before time.Time) *GetAssetDepositHistoryRequest
- func (g *GetAssetDepositHistoryRequest) Currency(currency string) *GetAssetDepositHistoryRequest
- func (g *GetAssetDepositHistoryRequest) Do(ctx context.Context) ([]DepositRecord, error)
- func (g *GetAssetDepositHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetAssetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetAssetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetAssetDepositHistoryRequest) GetPath() string
- func (g *GetAssetDepositHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetAssetDepositHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetAssetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetAssetDepositHistoryRequest) Limit(limit uint64) *GetAssetDepositHistoryRequest
- type GetCandlesRequest
- func (g *GetCandlesRequest) After(after time.Time) *GetCandlesRequest
- func (g *GetCandlesRequest) Bar(bar string) *GetCandlesRequest
- func (g *GetCandlesRequest) Before(before time.Time) *GetCandlesRequest
- func (g *GetCandlesRequest) Do(ctx context.Context) (KLineSlice, error)
- func (g *GetCandlesRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetCandlesRequest) GetParametersJSON() ([]byte, error)
- func (g *GetCandlesRequest) GetParametersQuery() (url.Values, error)
- func (g *GetCandlesRequest) GetPath() string
- func (g *GetCandlesRequest) GetQueryParameters() (url.Values, error)
- func (g *GetCandlesRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetCandlesRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetCandlesRequest) InstrumentID(instrumentID string) *GetCandlesRequest
- func (g *GetCandlesRequest) Limit(limit int) *GetCandlesRequest
- type GetFundingRateRequest
- type GetInstrumentsInfoRequest
- func (g *GetInstrumentsInfoRequest) Do(ctx context.Context) ([]InstrumentInfo, error)
- func (g *GetInstrumentsInfoRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetInstrumentsInfoRequest) GetParametersJSON() ([]byte, error)
- func (g *GetInstrumentsInfoRequest) GetParametersQuery() (url.Values, error)
- func (g *GetInstrumentsInfoRequest) GetPath() string
- func (g *GetInstrumentsInfoRequest) GetQueryParameters() (url.Values, error)
- func (g *GetInstrumentsInfoRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetInstrumentsInfoRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetInstrumentsInfoRequest) InstId(instId string) *GetInstrumentsInfoRequest
- func (g *GetInstrumentsInfoRequest) InstType(instType InstrumentType) *GetInstrumentsInfoRequest
- type GetMaxAvailableSizeRequest
- func (g *GetMaxAvailableSizeRequest) Currency(currency string) *GetMaxAvailableSizeRequest
- func (g *GetMaxAvailableSizeRequest) Do(ctx context.Context) ([]MaxAvailableResponse, error)
- func (g *GetMaxAvailableSizeRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetMaxAvailableSizeRequest) GetParametersJSON() ([]byte, error)
- func (g *GetMaxAvailableSizeRequest) GetParametersQuery() (url.Values, error)
- func (g *GetMaxAvailableSizeRequest) GetPath() string
- func (g *GetMaxAvailableSizeRequest) GetQueryParameters() (url.Values, error)
- func (g *GetMaxAvailableSizeRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetMaxAvailableSizeRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetMaxAvailableSizeRequest) InstrumentID(instrumentID string) *GetMaxAvailableSizeRequest
- func (g *GetMaxAvailableSizeRequest) TdMode(tdMode TradeMode) *GetMaxAvailableSizeRequest
- type GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) After(after string) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Before(before string) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Begin(begin time.Time) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Category(category string) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Do(ctx context.Context) ([]OpenOrder, error)
- func (g *GetOpenOrdersRequest) End(end time.Time) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOpenOrdersRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOpenOrdersRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOpenOrdersRequest) GetPath() string
- func (g *GetOpenOrdersRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOpenOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOpenOrdersRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOpenOrdersRequest) InstrumentID(instrumentID string) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) InstrumentType(instrumentType InstrumentType) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) Limit(limit string) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) OrderType(orderType OrderType) *GetOpenOrdersRequest
- func (g *GetOpenOrdersRequest) State(state OrderState) *GetOpenOrdersRequest
- type GetOrderDetailsRequest
- func (r *GetOrderDetailsRequest) ClientOrderID(clientOrderID string) *GetOrderDetailsRequest
- func (r *GetOrderDetailsRequest) Do(ctx context.Context) (*OrderDetails, error)
- func (r *GetOrderDetailsRequest) InstrumentID(instId string) *GetOrderDetailsRequest
- func (r *GetOrderDetailsRequest) OrderID(orderID string) *GetOrderDetailsRequest
- func (r *GetOrderDetailsRequest) QueryParameters() url.Values
- type GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) After(after string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Before(before string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]OrderDetail, error)
- func (g *GetOrderHistoryRequest) EndTime(endTime time.Time) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetPath() string
- func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetOrderHistoryRequest) InstrumentFamily(instrumentFamily string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) InstrumentID(instrumentID string) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Limit(limit uint64) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) OrderType(orderType OrderType) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) StartTime(startTime time.Time) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) State(state OrderState) *GetOrderHistoryRequest
- func (g *GetOrderHistoryRequest) Underlying(underlying string) *GetOrderHistoryRequest
- type GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) After(after string) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) Before(before string) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) Do(ctx context.Context) ([]Trade, error)
- func (g *GetThreeDaysTransactionHistoryRequest) EndTime(endTime time.Time) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetThreeDaysTransactionHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetThreeDaysTransactionHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetThreeDaysTransactionHistoryRequest) GetPath() string
- func (g *GetThreeDaysTransactionHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetThreeDaysTransactionHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetThreeDaysTransactionHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetThreeDaysTransactionHistoryRequest) InstrumentFamily(instrumentFamily string) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) InstrumentID(instrumentID string) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) Limit(limit uint64) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) OrderID(orderID string) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) StartTime(startTime time.Time) *GetThreeDaysTransactionHistoryRequest
- func (g *GetThreeDaysTransactionHistoryRequest) Underlying(underlying string) *GetThreeDaysTransactionHistoryRequest
- type GetTickerRequest
- func (g *GetTickerRequest) Do(ctx context.Context) ([]MarketTicker, error)
- func (g *GetTickerRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetTickerRequest) GetParametersJSON() ([]byte, error)
- func (g *GetTickerRequest) GetParametersQuery() (url.Values, error)
- func (g *GetTickerRequest) GetPath() string
- func (g *GetTickerRequest) GetQueryParameters() (url.Values, error)
- func (g *GetTickerRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetTickerRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetTickerRequest) InstId(instId string) *GetTickerRequest
- type GetTickersRequest
- func (g *GetTickersRequest) Do(ctx context.Context) ([]MarketTicker, error)
- func (g *GetTickersRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetTickersRequest) GetParametersJSON() ([]byte, error)
- func (g *GetTickersRequest) GetParametersQuery() (url.Values, error)
- func (g *GetTickersRequest) GetPath() string
- func (g *GetTickersRequest) GetQueryParameters() (url.Values, error)
- func (g *GetTickersRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetTickersRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetTickersRequest) InstType(instType InstrumentType) *GetTickersRequest
- type GetTransactionDetailsRequest
- func (r *GetTransactionDetailsRequest) Do(ctx context.Context) ([]OrderDetails, error)
- func (r *GetTransactionDetailsRequest) InstrumentID(instId string) *GetTransactionDetailsRequest
- func (r *GetTransactionDetailsRequest) InstrumentType(instType InstrumentType) *GetTransactionDetailsRequest
- func (r *GetTransactionDetailsRequest) OrderID(orderID string) *GetTransactionDetailsRequest
- func (r *GetTransactionDetailsRequest) Parameters() map[string]interface{}
- type GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) After(after string) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) Before(before string) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) Do(ctx context.Context) ([]Trade, error)
- func (g *GetTransactionHistoryRequest) EndTime(endTime time.Time) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) GetParameters() (map[string]interface{}, error)
- func (g *GetTransactionHistoryRequest) GetParametersJSON() ([]byte, error)
- func (g *GetTransactionHistoryRequest) GetParametersQuery() (url.Values, error)
- func (g *GetTransactionHistoryRequest) GetPath() string
- func (g *GetTransactionHistoryRequest) GetQueryParameters() (url.Values, error)
- func (g *GetTransactionHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
- func (g *GetTransactionHistoryRequest) GetSlugsMap() (map[string]string, error)
- func (g *GetTransactionHistoryRequest) InstrumentFamily(instrumentFamily string) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) InstrumentID(instrumentID string) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) Limit(limit uint64) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) OrderID(orderID string) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) StartTime(startTime time.Time) *GetTransactionHistoryRequest
- func (g *GetTransactionHistoryRequest) Underlying(underlying string) *GetTransactionHistoryRequest
- type InstrumentInfo
- type InstrumentType
- type KLine
- type KLineSlice
- type LeverageInfo
- type LeverageResponse
- type LiquidityType
- type MarginEventType
- type MarginHistoryEntry
- type MarginMode
- type MarginSide
- type MarketTicker
- type MarketTickerRequest
- type MarketTickersRequest
- type MaxAvailableResponse
- type MaxLoanResponse
- type OpenOrder
- type OrderDetail
- type OrderDetails
- type OrderList
- type OrderResponse
- type OrderState
- type OrderType
- type PlaceOrderRequest
- func (r *PlaceOrderRequest) ClientOrderID(clientOrderID string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Currency(currency string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
- func (r *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
- func (r *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
- func (r *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
- func (r *PlaceOrderRequest) GetPath() string
- func (r *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
- func (r *PlaceOrderRequest) GetSlugParameters() (map[string]interface{}, error)
- func (r *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
- func (r *PlaceOrderRequest) InstrumentID(instrumentID string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Parameters() map[string]interface{}
- func (r *PlaceOrderRequest) PosSide(posSide PosSide) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) ReduceOnly(reduceOnly bool) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Side(side SideType) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Size(size string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) Tag(tag string) *PlaceOrderRequest
- func (r *PlaceOrderRequest) TargetCurrency(targetCurrency TargetCurrency) *PlaceOrderRequest
- func (r *PlaceOrderRequest) TradeMode(tradeMode TradeMode) *PlaceOrderRequest
- type PosSide
- type Position
- type PositionBalanceData
- type PositionData
- type PositionRiskResponse
- type RestClient
- func (c *RestClient) AssetBalances(ctx context.Context) (AssetBalanceList, error)
- func (c *RestClient) AssetCurrencies(ctx context.Context) ([]AssetCurrency, error)
- func (c *RestClient) Auth(key, secret, passphrase string)
- func (c *RestClient) NewAuthenticatedRequest(ctx context.Context, method, refURL string, params url.Values, ...) (*http.Request, error)
- func (c *RestClient) NewBatchCancelOrderRequest() *BatchCancelOrderRequest
- func (c *RestClient) NewBatchPlaceOrderRequest() *BatchPlaceOrderRequest
- func (c *RestClient) NewCancelOrderRequest() *CancelOrderRequest
- func (c *RestClient) NewGetAccountBalanceRequest() *GetAccountBalanceRequest
- func (c *RestClient) NewGetAccountConfigRequest() *GetAccountConfigRequest
- func (c *RestClient) NewGetAccountInterestLimitsRequest() *GetAccountInterestLimitsRequest
- func (c *RestClient) NewGetAccountLeverageInfoRequest() *GetAccountLeverageInfoRequest
- func (c *RestClient) NewGetAccountMaxLoanRequest() *GetAccountMaxLoanRequest
- func (c *RestClient) NewGetAccountPositionRiskRequest() *GetAccountPositionRiskRequest
- func (c *RestClient) NewGetAccountPositionsRequest() *GetAccountPositionsRequest
- func (c *RestClient) NewGetAccountRiskStateRequest() *GetAccountRiskStateRequest
- func (c *RestClient) NewGetAccountSpotBorrowRepayHistoryRequest() *GetAccountSpotBorrowRepayHistoryRequest
- func (c *RestClient) NewGetAssetDepositHistoryRequest() *GetAssetDepositHistoryRequest
- func (c *RestClient) NewGetCandlesRequest() *GetCandlesRequest
- func (s *RestClient) NewGetFundingRate() *GetFundingRateRequest
- func (c *RestClient) NewGetInstrumentsInfoRequest() *GetInstrumentsInfoRequest
- func (c *RestClient) NewGetMaxAvailableSizeRequest() *GetMaxAvailableSizeRequest
- func (c *RestClient) NewGetOpenOrdersRequest() *GetOpenOrdersRequest
- func (c *RestClient) NewGetOrderDetailsRequest() *GetOrderDetailsRequest
- func (c *RestClient) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
- func (c *RestClient) NewGetThreeDaysTransactionHistoryRequest() *GetThreeDaysTransactionHistoryRequest
- func (c *RestClient) NewGetTickerRequest() *GetTickerRequest
- func (c *RestClient) NewGetTickersRequest() *GetTickersRequest
- func (c *RestClient) NewGetTransactionDetailsRequest() *GetTransactionDetailsRequest
- func (c *RestClient) NewGetTransactionHistoryRequest() *GetTransactionHistoryRequest
- func (c *RestClient) NewMarketTickerRequest(instId string) *MarketTickerRequest
- func (c *RestClient) NewMarketTickersRequest(instType string) *MarketTickersRequest
- func (c *RestClient) NewPlaceOrderRequest() *PlaceOrderRequest
- func (c *RestClient) NewSetAccountLevelRequest() *SetAccountLevelRequest
- func (c *RestClient) NewSetAccountLeverageRequest() *SetAccountLeverageRequest
- func (c *RestClient) NewSetAutoRepayRequest() *SetAutoRepayRequest
- func (c *RestClient) NewSpotManualBorrowRepayRequest() *SpotManualBorrowRepayRequest
- type SetAccountLevelRequest
- func (s *SetAccountLevelRequest) AcctLv(acctLv string) *SetAccountLevelRequest
- func (s *SetAccountLevelRequest) Do(ctx context.Context) ([]AccountLevelResponse, error)
- func (s *SetAccountLevelRequest) GetParameters() (map[string]interface{}, error)
- func (s *SetAccountLevelRequest) GetParametersJSON() ([]byte, error)
- func (s *SetAccountLevelRequest) GetParametersQuery() (url.Values, error)
- func (s *SetAccountLevelRequest) GetPath() string
- func (s *SetAccountLevelRequest) GetQueryParameters() (url.Values, error)
- func (s *SetAccountLevelRequest) GetSlugParameters() (map[string]interface{}, error)
- func (s *SetAccountLevelRequest) GetSlugsMap() (map[string]string, error)
- type SetAccountLeverageRequest
- func (s *SetAccountLeverageRequest) Currency(currency string) *SetAccountLeverageRequest
- func (s *SetAccountLeverageRequest) Do(ctx context.Context) ([]LeverageResponse, error)
- func (s *SetAccountLeverageRequest) GetParameters() (map[string]interface{}, error)
- func (s *SetAccountLeverageRequest) GetParametersJSON() ([]byte, error)
- func (s *SetAccountLeverageRequest) GetParametersQuery() (url.Values, error)
- func (s *SetAccountLeverageRequest) GetPath() string
- func (s *SetAccountLeverageRequest) GetQueryParameters() (url.Values, error)
- func (s *SetAccountLeverageRequest) GetSlugParameters() (map[string]interface{}, error)
- func (s *SetAccountLeverageRequest) GetSlugsMap() (map[string]string, error)
- func (s *SetAccountLeverageRequest) InstrumentId(instrumentId string) *SetAccountLeverageRequest
- func (s *SetAccountLeverageRequest) Leverage(leverage int) *SetAccountLeverageRequest
- func (s *SetAccountLeverageRequest) MarginMode(marginMode MarginMode) *SetAccountLeverageRequest
- func (s *SetAccountLeverageRequest) PosSide(posSide string) *SetAccountLeverageRequest
- type SetAutoRepayRequest
- func (s *SetAutoRepayRequest) AutoRepay(autoRepay bool) *SetAutoRepayRequest
- func (s *SetAutoRepayRequest) Do(ctx context.Context) ([]AutoRepayResponse, error)
- func (s *SetAutoRepayRequest) GetParameters() (map[string]interface{}, error)
- func (s *SetAutoRepayRequest) GetParametersJSON() ([]byte, error)
- func (s *SetAutoRepayRequest) GetParametersQuery() (url.Values, error)
- func (s *SetAutoRepayRequest) GetPath() string
- func (s *SetAutoRepayRequest) GetQueryParameters() (url.Values, error)
- func (s *SetAutoRepayRequest) GetSlugParameters() (map[string]interface{}, error)
- func (s *SetAutoRepayRequest) GetSlugsMap() (map[string]string, error)
- type SideType
- type SpotBorrowRepayResponse
- type SpotManualBorrowRepayRequest
- func (s *SpotManualBorrowRepayRequest) Amount(amount string) *SpotManualBorrowRepayRequest
- func (s *SpotManualBorrowRepayRequest) Currency(currency string) *SpotManualBorrowRepayRequest
- func (s *SpotManualBorrowRepayRequest) Do(ctx context.Context) ([]SpotBorrowRepayResponse, error)
- func (s *SpotManualBorrowRepayRequest) GetParameters() (map[string]interface{}, error)
- func (s *SpotManualBorrowRepayRequest) GetParametersJSON() ([]byte, error)
- func (s *SpotManualBorrowRepayRequest) GetParametersQuery() (url.Values, error)
- func (s *SpotManualBorrowRepayRequest) GetPath() string
- func (s *SpotManualBorrowRepayRequest) GetQueryParameters() (url.Values, error)
- func (s *SpotManualBorrowRepayRequest) GetSlugParameters() (map[string]interface{}, error)
- func (s *SpotManualBorrowRepayRequest) GetSlugsMap() (map[string]string, error)
- func (s *SpotManualBorrowRepayRequest) Side(side MarginSide) *SpotManualBorrowRepayRequest
- type TargetCurrency
- type Trade
- type TradeMode
Constants ¶
const ( MarginModeIsolated = "isolated" MarginModeCross = "cross" )
const ( LiquidityTypeMaker = "M" LiquidityTypeTaker = "T" )
const PrivateWebSocketURL = "wss://ws.okx.com:8443/ws/v5/private"
const PublicBusinessWebSocketURL = "wss://ws.okx.com:8443/ws/v5/business"
const PublicWebSocketURL = "wss://ws.okx.com:8443/ws/v5/public"
const RestBaseURL = "https://www.okx.com"
Variables ¶
var GetAccountInterestLimitsRequestLimiter = rate.NewLimiter(10, 1)
var GetAccountLeverageInfoRequestLimiter = rate.NewLimiter(10, 1)
var GetAccountMaxLoanRequestLimiter = rate.NewLimiter(10, 1)
var GetMaxAvailableSizeRequestLimiter = rate.NewLimiter(10, 1)
var GetThreeDaysTransactionHistoryRequestLimiter = rate.NewLimiter(15.000000150000002, 1)
var GetTransactionHistoryRequestLimiter = rate.NewLimiter(2.5, 1)
var SpotManualBorrowRepayRequestLimiter = rate.NewLimiter(10, 1)
Functions ¶
Types ¶
type APIResponse ¶ added in v1.52.0
type APIResponse struct {
Code string `json:"code"`
Message string `json:"msg"`
Data json.RawMessage `json:"data"`
// InTime is the timestamp at REST gateway when the request is received, Unix timestamp format in microseconds, e.g. 1597026383085123
InTime strint.Int64 `json:"inTime"`
// OutTime is the timestamp at REST gateway when the response is sent, Unix timestamp format in microseconds, e.g. 1597026383085123
OutTime strint.Int64 `json:"outTime"`
}
func (APIResponse) Error ¶ added in v1.57.0
func (a APIResponse) Error() error
func (APIResponse) Validate ¶ added in v1.57.0
func (a APIResponse) Validate() error
type Account ¶
type Account struct {
TotalEquityInUSD fixedpoint.Value `json:"totalEq,omitempty"`
AdjustEquity fixedpoint.Value `json:"adjEq,omitempty"`
UpdateTime types.MillisecondTimestamp `json:"uTime,omitempty"`
MarginRatio fixedpoint.Value `json:"mgnRatio,omitempty"`
NotionalUsd fixedpoint.Value `json:"notionalUsd,omitempty"`
UnrealizedPnl fixedpoint.Value `json:"upl,omitempty"`
Details []BalanceDetail `json:"details"`
TotalInitialMargin fixedpoint.Value `json:"imr,omitempty"`
TotalMaintMargin fixedpoint.Value `json:"mmr,omitempty"`
TotalOpenOrderInitialMargin fixedpoint.Value `json:"ordFroz,omitempty"`
}
type AccountConfig ¶ added in v1.62.0
type AccountConfig struct {
AccountLevel strint.Int64 `json:"acctLv"`
AccountSelfTradePreventionMode string `json:"acctStpMode"`
AutoLoan bool `json:"autoLoan"`
ContractIsolationMode string `json:"ctIsoMode"`
EnableSpotBorrow bool `json:"enableSpotBorrow"`
GreeksType string `json:"greeksType"`
Ip string `json:"ip"`
Type string `json:"type"`
KycLv strint.Int64 `json:"kycLv"`
Label string `json:"label"`
Level string `json:"level"`
LevelTmp string `json:"levelTmp"`
LiquidationGear strint.Int64 `json:"liquidationGear"`
MainUid string `json:"mainUid"`
MarginIsoMode string `json:"mgnIsoMode"`
OpAuth string `json:"opAuth"`
Perm string `json:"perm"`
PosMode string `json:"posMode"`
RoleType strint.Int64 `json:"roleType"`
SpotBorrowAutoRepay bool `json:"spotBorrowAutoRepay"`
SpotOffsetType string `json:"spotOffsetType"`
SpotRoleType string `json:"spotRoleType"`
SpotTraderInsts []interface{} `json:"spotTraderInsts"`
TraderInsts []interface{} `json:"traderInsts"`
Uid string `json:"uid"`
}
type AccountLevelResponse ¶ added in v1.62.0
type AccountLevelResponse struct {
AcctLv string `json:"acctLv"`
}
type AccountRiskResponse ¶ added in v1.62.0
type AssetBalance ¶
type AssetBalance struct {
Currency string `json:"ccy"`
Balance fixedpoint.Value `json:"bal"`
Frozen fixedpoint.Value `json:"frozenBal,omitempty"`
Available fixedpoint.Value `json:"availBal,omitempty"`
}
type AssetBalanceList ¶
type AssetBalanceList []AssetBalance
type AssetCurrency ¶
type AssetCurrency struct {
Currency string `json:"ccy"`
Name string `json:"name"`
Chain string `json:"chain"`
CanDeposit bool `json:"canDep"`
CanWithdraw bool `json:"canWd"`
CanInternal bool `json:"canInternal"`
MinWithdrawalFee fixedpoint.Value `json:"minFee"`
MaxWithdrawalFee fixedpoint.Value `json:"maxFee"`
MinWithdrawalThreshold fixedpoint.Value `json:"minWd"`
}
type AutoRepayResponse ¶ added in v1.62.0
type AutoRepayResponse struct {
AutoRepay bool `json:"autoRepay"`
}
type BalanceDetail ¶
type BalanceDetail struct {
Available fixedpoint.Value `json:"availBal"`
AvailEquity fixedpoint.Value `json:"availEq"`
// BorrowFrozen is Potential borrowing IMR of the account in USD
BorrowFrozen fixedpoint.Value `json:"borrowFroz"`
CashBalance fixedpoint.Value `json:"cashBal"`
Currency string `json:"ccy"`
CrossLiab fixedpoint.Value `json:"crossLiab,omitempty"`
DisEquity fixedpoint.Value `json:"disEq,omitempty"`
Equity fixedpoint.Value `json:"eq,omitempty"`
EquityInUSD fixedpoint.Value `json:"eqUsd"`
SmtSyncEquity fixedpoint.Value `json:"smtSyncEq,omitempty"`
SpotCopyTradingEq fixedpoint.Value `json:"spotCopyTradingEq,omitempty"`
FixedBalance fixedpoint.Value `json:"fixedBal"`
FrozenBalance fixedpoint.Value `json:"frozenBal"`
Imr string `json:"imr,omitempty"`
Interest fixedpoint.Value `json:"interest"`
IsoEquity fixedpoint.Value `json:"isoEq,omitempty"`
IsoLiability fixedpoint.Value `json:"isoLiab,omitempty"`
IsoUpl fixedpoint.Value `json:"isoUpl,omitempty"`
Liability fixedpoint.Value `json:"liab,omitempty"`
MaxLoan fixedpoint.Value `json:"maxLoan,omitempty"`
MgnRatio fixedpoint.Value `json:"mgnRatio,omitempty"`
Mmr string `json:"mmr,omitempty"`
NotionalLever string `json:"notionalLever"`
// OrderFrozen is margin frozen for open orders
OrderFrozen fixedpoint.Value `json:"ordFrozen"`
RewardBal fixedpoint.Value `json:"rewardBal,omitempty"`
SpotInUseAmt fixedpoint.Value `json:"spotInUseAmt,omitempty"`
ClSpotInUseAmt fixedpoint.Value `json:"clSpotInUseAmt,omitempty"`
MaxSpotInUse fixedpoint.Value `json:"maxSpotInUse,omitempty"`
SpotIsoBal fixedpoint.Value `json:"spotIsoBal,omitempty"`
StgyEquity fixedpoint.Value `json:"stgyEq"`
Twap string `json:"twap,omitempty"`
UpdateTime types.MillisecondTimestamp `json:"uTime"`
UnrealizedProfitAndLoss fixedpoint.Value `json:"upl"`
UplLiab fixedpoint.Value `json:"uplLiab"`
SpotBal fixedpoint.Value `json:"spotBal"`
OpenAvgPx fixedpoint.Value `json:"openAvgPx,omitempty"`
AccAvgPx fixedpoint.Value `json:"accAvgPx,omitempty"`
SpotUpl fixedpoint.Value `json:"spotUpl,omitempty"`
SpotUplRatio fixedpoint.Value `json:"spotUplRatio,omitempty"`
TotalPnl fixedpoint.Value `json:"totalPnl,omitempty"`
TotalPnlRatio fixedpoint.Value `json:"totalPnlRatio,omitempty"`
}
type BatchCancelOrderRequest ¶
type BatchCancelOrderRequest struct {
// contains filtered or unexported fields
}
func (*BatchCancelOrderRequest) Add ¶
func (r *BatchCancelOrderRequest) Add(reqs ...*CancelOrderRequest) *BatchCancelOrderRequest
func (*BatchCancelOrderRequest) Do ¶
func (r *BatchCancelOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
type BatchPlaceOrderRequest ¶
type BatchPlaceOrderRequest struct {
// contains filtered or unexported fields
}
func (*BatchPlaceOrderRequest) Add ¶
func (r *BatchPlaceOrderRequest) Add(reqs ...*PlaceOrderRequest) *BatchPlaceOrderRequest
func (*BatchPlaceOrderRequest) Do ¶
func (r *BatchPlaceOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
type BorrowInterestLimit ¶ added in v1.62.0
type BorrowInterestLimit struct {
Debt fixedpoint.Value `json:"debt"`
Interest fixedpoint.Value `json:"interest"`
LoanAlloc fixedpoint.Value `json:"loanAlloc"`
NextDiscountTime types.MillisecondTimestamp `json:"nextDiscountTime"`
NextInterestTime types.MillisecondTimestamp `json:"nextInterestTime"`
Records []struct {
Currency string `json:"ccy"`
// AvailableLoad = Available amount for current account (Within the locked quota)
AvailLoan fixedpoint.Value `json:"availLoan"`
AvgRate fixedpoint.Value `json:"avgRate"`
Interest fixedpoint.Value `json:"interest"`
// LoanQuota = Borrow limit of master account
// If loan allocation has been assigned, then it is the borrow limit of the current trading account
LoanQuota fixedpoint.Value `json:"loanQuota"`
PosLoan fixedpoint.Value `json:"posLoan"`
Rate fixedpoint.Value `json:"rate"`
SurplusLimit fixedpoint.Value `json:"surplusLmt"`
SurplusLimitDetails struct {
AllAcctRemainingQuota fixedpoint.Value `json:"allAcctRemainingQuota"`
CurAcctRemainingQuota fixedpoint.Value `json:"curAcctRemainingQuota"`
PlatRemainingQuota fixedpoint.Value `json:"platRemainingQuota"`
} `json:"surplusLmtDetails"`
UsedLimit fixedpoint.Value `json:"usedLmt"`
UsedLoan fixedpoint.Value `json:"usedLoan"`
} `json:"records"`
}
type CancelOrderRequest ¶
type CancelOrderRequest struct {
// contains filtered or unexported fields
}
func (*CancelOrderRequest) ClientOrderID ¶
func (c *CancelOrderRequest) ClientOrderID(clientOrderID string) *CancelOrderRequest
func (*CancelOrderRequest) Do ¶
func (c *CancelOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*CancelOrderRequest) GetParameters ¶ added in v1.21.0
func (c *CancelOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*CancelOrderRequest) GetParametersJSON ¶ added in v1.21.0
func (c *CancelOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*CancelOrderRequest) GetParametersQuery ¶ added in v1.21.0
func (c *CancelOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*CancelOrderRequest) GetPath ¶ added in v1.56.0
func (c *CancelOrderRequest) GetPath() string
GetPath returns the request path of the API
func (*CancelOrderRequest) GetQueryParameters ¶ added in v1.56.0
func (c *CancelOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*CancelOrderRequest) GetSlugParameters ¶ added in v1.56.0
func (c *CancelOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*CancelOrderRequest) GetSlugsMap ¶ added in v1.56.0
func (c *CancelOrderRequest) GetSlugsMap() (map[string]string, error)
func (*CancelOrderRequest) InstrumentID ¶
func (c *CancelOrderRequest) InstrumentID(instrumentID string) *CancelOrderRequest
func (*CancelOrderRequest) OrderID ¶
func (c *CancelOrderRequest) OrderID(orderID string) *CancelOrderRequest
type DepositRecord ¶ added in v1.62.0
type DepositRecord struct {
ActualDepBlkConfirm strint.Int64 `json:"actualDepBlkConfirm"`
Amount fixedpoint.Value `json:"amt"`
AreaCodeFrom string `json:"areaCodeFrom"`
Currency string `json:"ccy"`
Chain string `json:"chain"`
DepId string `json:"depId"`
From string `json:"from"`
FromWdId string `json:"fromWdId"`
State strint.Int64 `json:"state"`
To string `json:"to"`
Ts types.MillisecondTimestamp `json:"ts"`
TxId string `json:"txId"`
}
type FundingRate ¶
type FundingRate struct {
InstrumentType string `json:"instType"`
InstrumentID string `json:"instId"`
FundingRate fixedpoint.Value `json:"fundingRate"`
NextFundingRate fixedpoint.Value `json:"nextFundingRate"`
FundingTime types.MillisecondTimestamp `json:"fundingTime"`
}
type GetAccountBalanceRequest ¶ added in v1.62.0
type GetAccountBalanceRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountBalanceRequest) Do ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) Do(ctx context.Context) ([]Account, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountBalanceRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountBalanceRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountBalanceRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountBalanceRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountBalanceRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountBalanceRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountBalanceRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountBalanceRequest) GetSlugsMap() (map[string]string, error)
type GetAccountConfigRequest ¶ added in v1.62.0
type GetAccountConfigRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountConfigRequest) Do ¶ added in v1.62.0
func (g *GetAccountConfigRequest) Do(ctx context.Context) ([]AccountConfig, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountConfigRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountConfigRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountConfigRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountConfigRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountConfigRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountConfigRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountConfigRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountConfigRequest) GetSlugsMap() (map[string]string, error)
type GetAccountInterestLimitsRequest ¶ added in v1.62.0
type GetAccountInterestLimitsRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountInterestLimitsRequest) Currency ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) Currency(currency string) *GetAccountInterestLimitsRequest
func (*GetAccountInterestLimitsRequest) Do ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) Do(ctx context.Context) ([]BorrowInterestLimit, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountInterestLimitsRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountInterestLimitsRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountInterestLimitsRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountInterestLimitsRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountInterestLimitsRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountInterestLimitsRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountInterestLimitsRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountInterestLimitsRequest) GetSlugsMap() (map[string]string, error)
type GetAccountLeverageInfoRequest ¶ added in v1.62.0
type GetAccountLeverageInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountLeverageInfoRequest) Currency ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) Currency(currency string) *GetAccountLeverageInfoRequest
func (*GetAccountLeverageInfoRequest) Do ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) Do(ctx context.Context) ([]LeverageInfo, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountLeverageInfoRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountLeverageInfoRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountLeverageInfoRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountLeverageInfoRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountLeverageInfoRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountLeverageInfoRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountLeverageInfoRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) GetSlugsMap() (map[string]string, error)
func (*GetAccountLeverageInfoRequest) InstrumentId ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) InstrumentId(instrumentId string) *GetAccountLeverageInfoRequest
func (*GetAccountLeverageInfoRequest) MarginMode ¶ added in v1.62.0
func (g *GetAccountLeverageInfoRequest) MarginMode(marginMode MarginMode) *GetAccountLeverageInfoRequest
type GetAccountMaxLoanRequest ¶ added in v1.62.0
type GetAccountMaxLoanRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountMaxLoanRequest) Currency ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) Currency(currency string) *GetAccountMaxLoanRequest
func (*GetAccountMaxLoanRequest) Do ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) Do(ctx context.Context) ([]MaxLoanResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountMaxLoanRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountMaxLoanRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountMaxLoanRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountMaxLoanRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountMaxLoanRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountMaxLoanRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountMaxLoanRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) GetSlugsMap() (map[string]string, error)
func (*GetAccountMaxLoanRequest) InstrumentId ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) InstrumentId(instrumentId string) *GetAccountMaxLoanRequest
func (*GetAccountMaxLoanRequest) MarginCurrency ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) MarginCurrency(marginCurrency string) *GetAccountMaxLoanRequest
func (*GetAccountMaxLoanRequest) MarginMode ¶ added in v1.62.0
func (g *GetAccountMaxLoanRequest) MarginMode(marginMode MarginMode) *GetAccountMaxLoanRequest
type GetAccountPositionRiskRequest ¶ added in v1.62.0
type GetAccountPositionRiskRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountPositionRiskRequest) Do ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) Do(ctx context.Context) ([]PositionRiskResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountPositionRiskRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountPositionRiskRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountPositionRiskRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountPositionRiskRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountPositionRiskRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountPositionRiskRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountPositionRiskRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) GetSlugsMap() (map[string]string, error)
func (*GetAccountPositionRiskRequest) InstType ¶ added in v1.62.0
func (g *GetAccountPositionRiskRequest) InstType(instType InstrumentType) *GetAccountPositionRiskRequest
type GetAccountPositionsRequest ¶ added in v1.62.0
type GetAccountPositionsRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountPositionsRequest) Do ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) Do(ctx context.Context) ([]Position, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountPositionsRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountPositionsRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountPositionsRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountPositionsRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountPositionsRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountPositionsRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountPositionsRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) GetSlugsMap() (map[string]string, error)
func (*GetAccountPositionsRequest) InstType ¶ added in v1.62.0
func (g *GetAccountPositionsRequest) InstType(instType InstrumentType) *GetAccountPositionsRequest
type GetAccountRiskStateRequest ¶ added in v1.62.0
type GetAccountRiskStateRequest struct {
// contains filtered or unexported fields
}
GetAccountRiskStateRequest gets the account risk state
Only applicable to Portfolio margin account
func (*GetAccountRiskStateRequest) Do ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) Do(ctx context.Context) ([]AccountRiskResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountRiskStateRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountRiskStateRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountRiskStateRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountRiskStateRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountRiskStateRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountRiskStateRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountRiskStateRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountRiskStateRequest) GetSlugsMap() (map[string]string, error)
type GetAccountSpotBorrowRepayHistoryRequest ¶ added in v1.62.0
type GetAccountSpotBorrowRepayHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetAccountSpotBorrowRepayHistoryRequest) After ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) After(after time.Time) *GetAccountSpotBorrowRepayHistoryRequest
func (*GetAccountSpotBorrowRepayHistoryRequest) Before ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) Before(before time.Time) *GetAccountSpotBorrowRepayHistoryRequest
func (*GetAccountSpotBorrowRepayHistoryRequest) Currency ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) Currency(currency string) *GetAccountSpotBorrowRepayHistoryRequest
func (*GetAccountSpotBorrowRepayHistoryRequest) Do ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) Do(ctx context.Context) ([]MarginHistoryEntry, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAccountSpotBorrowRepayHistoryRequest) EventType ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) EventType(eventType MarginEventType) *GetAccountSpotBorrowRepayHistoryRequest
func (*GetAccountSpotBorrowRepayHistoryRequest) GetParameters ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAccountSpotBorrowRepayHistoryRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAccountSpotBorrowRepayHistoryRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAccountSpotBorrowRepayHistoryRequest) GetPath ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAccountSpotBorrowRepayHistoryRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAccountSpotBorrowRepayHistoryRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAccountSpotBorrowRepayHistoryRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetAccountSpotBorrowRepayHistoryRequest) Limit ¶ added in v1.62.0
func (g *GetAccountSpotBorrowRepayHistoryRequest) Limit(limit uint64) *GetAccountSpotBorrowRepayHistoryRequest
type GetAssetDepositHistoryRequest ¶ added in v1.62.0
type GetAssetDepositHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetAssetDepositHistoryRequest) After ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) After(after time.Time) *GetAssetDepositHistoryRequest
func (*GetAssetDepositHistoryRequest) Before ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) Before(before time.Time) *GetAssetDepositHistoryRequest
func (*GetAssetDepositHistoryRequest) Currency ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) Currency(currency string) *GetAssetDepositHistoryRequest
func (*GetAssetDepositHistoryRequest) Do ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) Do(ctx context.Context) ([]DepositRecord, error)
Do generates the request object and send the request object to the API endpoint
func (*GetAssetDepositHistoryRequest) GetParameters ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetAssetDepositHistoryRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetAssetDepositHistoryRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetAssetDepositHistoryRequest) GetPath ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetPath() string
GetPath returns the request path of the API
func (*GetAssetDepositHistoryRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetAssetDepositHistoryRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetAssetDepositHistoryRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetAssetDepositHistoryRequest) Limit ¶ added in v1.62.0
func (g *GetAssetDepositHistoryRequest) Limit(limit uint64) *GetAssetDepositHistoryRequest
type GetCandlesRequest ¶ added in v1.57.0
type GetCandlesRequest struct {
// contains filtered or unexported fields
}
func (*GetCandlesRequest) After ¶ added in v1.57.0
func (g *GetCandlesRequest) After(after time.Time) *GetCandlesRequest
func (*GetCandlesRequest) Bar ¶ added in v1.57.0
func (g *GetCandlesRequest) Bar(bar string) *GetCandlesRequest
func (*GetCandlesRequest) Before ¶ added in v1.57.0
func (g *GetCandlesRequest) Before(before time.Time) *GetCandlesRequest
func (*GetCandlesRequest) Do ¶ added in v1.57.0
func (g *GetCandlesRequest) Do(ctx context.Context) (KLineSlice, error)
Do generates the request object and send the request object to the API endpoint
func (*GetCandlesRequest) GetParameters ¶ added in v1.57.0
func (g *GetCandlesRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetCandlesRequest) GetParametersJSON ¶ added in v1.57.0
func (g *GetCandlesRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetCandlesRequest) GetParametersQuery ¶ added in v1.57.0
func (g *GetCandlesRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetCandlesRequest) GetPath ¶ added in v1.57.0
func (g *GetCandlesRequest) GetPath() string
GetPath returns the request path of the API
func (*GetCandlesRequest) GetQueryParameters ¶ added in v1.57.0
func (g *GetCandlesRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetCandlesRequest) GetSlugParameters ¶ added in v1.57.0
func (g *GetCandlesRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetCandlesRequest) GetSlugsMap ¶ added in v1.57.0
func (g *GetCandlesRequest) GetSlugsMap() (map[string]string, error)
func (*GetCandlesRequest) InstrumentID ¶ added in v1.57.0
func (g *GetCandlesRequest) InstrumentID(instrumentID string) *GetCandlesRequest
func (*GetCandlesRequest) Limit ¶ added in v1.57.0
func (g *GetCandlesRequest) Limit(limit int) *GetCandlesRequest
type GetFundingRateRequest ¶
type GetFundingRateRequest struct {
// contains filtered or unexported fields
}
func (*GetFundingRateRequest) Do ¶
func (r *GetFundingRateRequest) Do(ctx context.Context) (*FundingRate, error)
func (*GetFundingRateRequest) InstrumentID ¶
func (r *GetFundingRateRequest) InstrumentID(instId string) *GetFundingRateRequest
type GetInstrumentsInfoRequest ¶ added in v1.56.0
type GetInstrumentsInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetInstrumentsInfoRequest) Do ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) Do(ctx context.Context) ([]InstrumentInfo, error)
Do generates the request object and send the request object to the API endpoint
func (*GetInstrumentsInfoRequest) GetParameters ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetInstrumentsInfoRequest) GetParametersJSON ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetInstrumentsInfoRequest) GetParametersQuery ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetInstrumentsInfoRequest) GetPath ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetPath() string
GetPath returns the request path of the API
func (*GetInstrumentsInfoRequest) GetQueryParameters ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetInstrumentsInfoRequest) GetSlugParameters ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetInstrumentsInfoRequest) GetSlugsMap ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) GetSlugsMap() (map[string]string, error)
func (*GetInstrumentsInfoRequest) InstId ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) InstId(instId string) *GetInstrumentsInfoRequest
func (*GetInstrumentsInfoRequest) InstType ¶ added in v1.56.0
func (g *GetInstrumentsInfoRequest) InstType(instType InstrumentType) *GetInstrumentsInfoRequest
type GetMaxAvailableSizeRequest ¶ added in v1.62.0
type GetMaxAvailableSizeRequest struct {
// contains filtered or unexported fields
}
func (*GetMaxAvailableSizeRequest) Currency ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) Currency(currency string) *GetMaxAvailableSizeRequest
func (*GetMaxAvailableSizeRequest) Do ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) Do(ctx context.Context) ([]MaxAvailableResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*GetMaxAvailableSizeRequest) GetParameters ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetMaxAvailableSizeRequest) GetParametersJSON ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetMaxAvailableSizeRequest) GetParametersQuery ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetMaxAvailableSizeRequest) GetPath ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetPath() string
GetPath returns the request path of the API
func (*GetMaxAvailableSizeRequest) GetQueryParameters ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetMaxAvailableSizeRequest) GetSlugParameters ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetMaxAvailableSizeRequest) GetSlugsMap ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) GetSlugsMap() (map[string]string, error)
func (*GetMaxAvailableSizeRequest) InstrumentID ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) InstrumentID(instrumentID string) *GetMaxAvailableSizeRequest
func (*GetMaxAvailableSizeRequest) TdMode ¶ added in v1.62.0
func (g *GetMaxAvailableSizeRequest) TdMode(tdMode TradeMode) *GetMaxAvailableSizeRequest
type GetOpenOrdersRequest ¶ added in v1.56.0
type GetOpenOrdersRequest struct {
// contains filtered or unexported fields
}
func (*GetOpenOrdersRequest) After ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) After(after string) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) Before ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) Before(before string) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) Begin ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) Begin(begin time.Time) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) Category ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) Category(category string) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) Do ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) Do(ctx context.Context) ([]OpenOrder, error)
Do generates the request object and send the request object to the API endpoint
func (*GetOpenOrdersRequest) End ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) End(end time.Time) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) GetParameters ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOpenOrdersRequest) GetParametersJSON ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOpenOrdersRequest) GetParametersQuery ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOpenOrdersRequest) GetPath ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetPath() string
GetPath returns the request path of the API
func (*GetOpenOrdersRequest) GetQueryParameters ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOpenOrdersRequest) GetSlugParameters ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOpenOrdersRequest) GetSlugsMap ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) GetSlugsMap() (map[string]string, error)
func (*GetOpenOrdersRequest) InstrumentID ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) InstrumentID(instrumentID string) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) InstrumentType ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) InstrumentType(instrumentType InstrumentType) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) Limit ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) Limit(limit string) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) OrderType ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) OrderType(orderType OrderType) *GetOpenOrdersRequest
func (*GetOpenOrdersRequest) State ¶ added in v1.56.0
func (g *GetOpenOrdersRequest) State(state OrderState) *GetOpenOrdersRequest
type GetOrderDetailsRequest ¶
type GetOrderDetailsRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderDetailsRequest) ClientOrderID ¶
func (r *GetOrderDetailsRequest) ClientOrderID(clientOrderID string) *GetOrderDetailsRequest
func (*GetOrderDetailsRequest) Do ¶
func (r *GetOrderDetailsRequest) Do(ctx context.Context) (*OrderDetails, error)
func (*GetOrderDetailsRequest) InstrumentID ¶
func (r *GetOrderDetailsRequest) InstrumentID(instId string) *GetOrderDetailsRequest
func (*GetOrderDetailsRequest) OrderID ¶
func (r *GetOrderDetailsRequest) OrderID(orderID string) *GetOrderDetailsRequest
func (*GetOrderDetailsRequest) QueryParameters ¶
func (r *GetOrderDetailsRequest) QueryParameters() url.Values
type GetOrderHistoryRequest ¶ added in v1.53.0
type GetOrderHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetOrderHistoryRequest) After ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) After(after string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Before ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) Before(before string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Do ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) Do(ctx context.Context) ([]OrderDetail, error)
Do generates the request object and send the request object to the API endpoint
func (*GetOrderHistoryRequest) EndTime ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) EndTime(endTime time.Time) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) GetParameters ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetParametersJSON ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetOrderHistoryRequest) GetParametersQuery ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetOrderHistoryRequest) GetPath ¶ added in v1.56.0
func (g *GetOrderHistoryRequest) GetPath() string
GetPath returns the request path of the API
func (*GetOrderHistoryRequest) GetQueryParameters ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetOrderHistoryRequest) GetSlugParameters ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetOrderHistoryRequest) GetSlugsMap ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetOrderHistoryRequest) InstrumentFamily ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) InstrumentFamily(instrumentFamily string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) InstrumentID ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) InstrumentID(instrumentID string) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) InstrumentType ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Limit ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) Limit(limit uint64) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) OrderType ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) OrderType(orderType OrderType) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) StartTime ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) StartTime(startTime time.Time) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) State ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) State(state OrderState) *GetOrderHistoryRequest
func (*GetOrderHistoryRequest) Underlying ¶ added in v1.53.0
func (g *GetOrderHistoryRequest) Underlying(underlying string) *GetOrderHistoryRequest
type GetThreeDaysTransactionHistoryRequest ¶ added in v1.58.0
type GetThreeDaysTransactionHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetThreeDaysTransactionHistoryRequest) After ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) After(after string) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) Before ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) Before(before string) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) Do ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) Do(ctx context.Context) ([]Trade, error)
Do generates the request object and send the request object to the API endpoint
func (*GetThreeDaysTransactionHistoryRequest) EndTime ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) EndTime(endTime time.Time) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) GetParameters ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetThreeDaysTransactionHistoryRequest) GetParametersJSON ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetThreeDaysTransactionHistoryRequest) GetParametersQuery ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetThreeDaysTransactionHistoryRequest) GetPath ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetPath() string
GetPath returns the request path of the API
func (*GetThreeDaysTransactionHistoryRequest) GetQueryParameters ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetThreeDaysTransactionHistoryRequest) GetSlugParameters ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetThreeDaysTransactionHistoryRequest) GetSlugsMap ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetThreeDaysTransactionHistoryRequest) InstrumentFamily ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) InstrumentFamily(instrumentFamily string) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) InstrumentID ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) InstrumentID(instrumentID string) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) InstrumentType ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) Limit ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) Limit(limit uint64) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) OrderID ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) OrderID(orderID string) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) StartTime ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) StartTime(startTime time.Time) *GetThreeDaysTransactionHistoryRequest
func (*GetThreeDaysTransactionHistoryRequest) Underlying ¶ added in v1.58.0
func (g *GetThreeDaysTransactionHistoryRequest) Underlying(underlying string) *GetThreeDaysTransactionHistoryRequest
type GetTickerRequest ¶ added in v1.56.0
type GetTickerRequest struct {
// contains filtered or unexported fields
}
func (*GetTickerRequest) Do ¶ added in v1.56.0
func (g *GetTickerRequest) Do(ctx context.Context) ([]MarketTicker, error)
Do generates the request object and send the request object to the API endpoint
func (*GetTickerRequest) GetParameters ¶ added in v1.56.0
func (g *GetTickerRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetTickerRequest) GetParametersJSON ¶ added in v1.56.0
func (g *GetTickerRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTickerRequest) GetParametersQuery ¶ added in v1.56.0
func (g *GetTickerRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTickerRequest) GetPath ¶ added in v1.56.0
func (g *GetTickerRequest) GetPath() string
GetPath returns the request path of the API
func (*GetTickerRequest) GetQueryParameters ¶ added in v1.56.0
func (g *GetTickerRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTickerRequest) GetSlugParameters ¶ added in v1.56.0
func (g *GetTickerRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetTickerRequest) GetSlugsMap ¶ added in v1.56.0
func (g *GetTickerRequest) GetSlugsMap() (map[string]string, error)
func (*GetTickerRequest) InstId ¶ added in v1.56.0
func (g *GetTickerRequest) InstId(instId string) *GetTickerRequest
type GetTickersRequest ¶ added in v1.56.0
type GetTickersRequest struct {
// contains filtered or unexported fields
}
func (*GetTickersRequest) Do ¶ added in v1.56.0
func (g *GetTickersRequest) Do(ctx context.Context) ([]MarketTicker, error)
Do generates the request object and send the request object to the API endpoint
func (*GetTickersRequest) GetParameters ¶ added in v1.56.0
func (g *GetTickersRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetTickersRequest) GetParametersJSON ¶ added in v1.56.0
func (g *GetTickersRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTickersRequest) GetParametersQuery ¶ added in v1.56.0
func (g *GetTickersRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTickersRequest) GetPath ¶ added in v1.56.0
func (g *GetTickersRequest) GetPath() string
GetPath returns the request path of the API
func (*GetTickersRequest) GetQueryParameters ¶ added in v1.56.0
func (g *GetTickersRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTickersRequest) GetSlugParameters ¶ added in v1.56.0
func (g *GetTickersRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetTickersRequest) GetSlugsMap ¶ added in v1.56.0
func (g *GetTickersRequest) GetSlugsMap() (map[string]string, error)
func (*GetTickersRequest) InstType ¶ added in v1.56.0
func (g *GetTickersRequest) InstType(instType InstrumentType) *GetTickersRequest
type GetTransactionDetailsRequest ¶
type GetTransactionDetailsRequest struct {
// contains filtered or unexported fields
}
func (*GetTransactionDetailsRequest) Do ¶
func (r *GetTransactionDetailsRequest) Do(ctx context.Context) ([]OrderDetails, error)
func (*GetTransactionDetailsRequest) InstrumentID ¶
func (r *GetTransactionDetailsRequest) InstrumentID(instId string) *GetTransactionDetailsRequest
func (*GetTransactionDetailsRequest) InstrumentType ¶
func (r *GetTransactionDetailsRequest) InstrumentType(instType InstrumentType) *GetTransactionDetailsRequest
func (*GetTransactionDetailsRequest) OrderID ¶
func (r *GetTransactionDetailsRequest) OrderID(orderID string) *GetTransactionDetailsRequest
func (*GetTransactionDetailsRequest) Parameters ¶
func (r *GetTransactionDetailsRequest) Parameters() map[string]interface{}
type GetTransactionHistoryRequest ¶ added in v1.53.0
type GetTransactionHistoryRequest struct {
// contains filtered or unexported fields
}
func (*GetTransactionHistoryRequest) After ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) After(after string) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) Before ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) Before(before string) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) Do ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) Do(ctx context.Context) ([]Trade, error)
Do generates the request object and send the request object to the API endpoint
func (*GetTransactionHistoryRequest) EndTime ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) EndTime(endTime time.Time) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) GetParameters ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*GetTransactionHistoryRequest) GetParametersJSON ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*GetTransactionHistoryRequest) GetParametersQuery ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*GetTransactionHistoryRequest) GetPath ¶ added in v1.56.0
func (g *GetTransactionHistoryRequest) GetPath() string
GetPath returns the request path of the API
func (*GetTransactionHistoryRequest) GetQueryParameters ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*GetTransactionHistoryRequest) GetSlugParameters ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*GetTransactionHistoryRequest) GetSlugsMap ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) GetSlugsMap() (map[string]string, error)
func (*GetTransactionHistoryRequest) InstrumentFamily ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) InstrumentFamily(instrumentFamily string) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) InstrumentID ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) InstrumentID(instrumentID string) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) InstrumentType ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) InstrumentType(instrumentType InstrumentType) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) Limit ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) Limit(limit uint64) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) OrderID ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) OrderID(orderID string) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) StartTime ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) StartTime(startTime time.Time) *GetTransactionHistoryRequest
func (*GetTransactionHistoryRequest) Underlying ¶ added in v1.53.0
func (g *GetTransactionHistoryRequest) Underlying(underlying string) *GetTransactionHistoryRequest
type InstrumentInfo ¶ added in v1.56.0
type InstrumentInfo struct {
InstrumentType string `json:"instType"`
InstrumentID string `json:"instId"`
BaseCurrency string `json:"baseCcy"`
QuoteCurrency string `json:"quoteCcy"`
SettleCurrency string `json:"settleCcy"`
ContractValue string `json:"ctVal"`
ContractMultiplier string `json:"ctMult"`
ContractValueCurrency string `json:"ctValCcy"`
ListTime types.MillisecondTimestamp `json:"listTime"`
ExpiryTime types.MillisecondTimestamp `json:"expTime"`
TickSize fixedpoint.Value `json:"tickSz"`
LotSize fixedpoint.Value `json:"lotSz"`
InstrumentFamily string `json:"instFamily"`
// MinSize = min order size
MinSize fixedpoint.Value `json:"minSz"`
// instrument status
State string `json:"state"`
}
type InstrumentType ¶
type InstrumentType string
const ( InstrumentTypeSpot InstrumentType = "SPOT" InstrumentTypeSwap InstrumentType = "SWAP" InstrumentTypeFutures InstrumentType = "FUTURES" InstrumentTypeOption InstrumentType = "OPTION" InstrumentTypeMargin InstrumentType = "MARGIN" )
type KLine ¶ added in v1.57.0
type KLine struct {
StartTime types.MillisecondTimestamp
OpenPrice fixedpoint.Value
HighestPrice fixedpoint.Value
LowestPrice fixedpoint.Value
ClosePrice fixedpoint.Value
// If it is a derivatives contract, the value is the number of contracts.
// If it is SPOT/MARGIN, the value is the quantity in base currency.
Volume fixedpoint.Value
// VolumeInCurrency trading volume, with a unit of currency.
// If it is a derivatives contract, the value is the number of base currency.
// If it is SPOT/MARGIN, the value is the quantity in quote currency.
VolumeInCurrency fixedpoint.Value
// VolumeInCurrencyQuote Trading volume, the value is the quantity in quote currency
// e.g. The unit is USDT for BTC-USDT and BTC-USDT-SWAP;
// The unit is USD for BTC-USD-SWAP
// ** REMARK: To prevent overflow, we need to avoid unmarshaling it. **
//VolumeInCurrencyQuote fixedpoint.Value
// The state of candlesticks.
// 0 represents that it is uncompleted, 1 represents that it is completed.
Confirm fixedpoint.Value
}
type KLineSlice ¶ added in v1.57.0
type KLineSlice []KLine
func (*KLineSlice) UnmarshalJSON ¶ added in v1.57.0
func (m *KLineSlice) UnmarshalJSON(b []byte) error
type LeverageInfo ¶ added in v1.62.0
type LeverageInfo struct {
Ccy string `json:"ccy"`
InstId string `json:"instId"`
MgnMode MarginMode `json:"mgnMode"`
PosSide string `json:"posSide"`
Lever fixedpoint.Value `json:"lever"`
}
type LeverageResponse ¶ added in v1.62.0
type LeverageResponse struct {
Leverage fixedpoint.Value `json:"lever"`
MarginMode MarginMode `json:"mgnMode"`
InstId string `json:"instId"`
PosSide string `json:"posSide"`
}
type LiquidityType ¶ added in v1.56.0
type LiquidityType string
type MarginEventType ¶ added in v1.62.0
type MarginEventType string
const ( MarginEventTypeAutoBorrow MarginEventType = "auto_borrow" MarginEventTypeAutoRepay MarginEventType = "auto_repay" MarginEventTypeManualBorrow MarginEventType = "manual_borrow" MarginEventTypeManualRepay MarginEventType = "manual_repay" )
type MarginHistoryEntry ¶ added in v1.62.0
type MarginHistoryEntry struct {
AccumulatedBorrowAmount fixedpoint.Value `json:"accBorrowed"`
Amount fixedpoint.Value `json:"amt"`
Currency string `json:"ccy"`
Ts types.MillisecondTimestamp `json:"ts"`
Type MarginEventType `json:"type"`
}
type MarginMode ¶ added in v1.62.0
type MarginMode string
type MarginSide ¶ added in v1.62.0
type MarginSide string
const ( MarginSideBorrow MarginSide = "borrow" MarginSideRepay MarginSide = "repay" )
type MarketTicker ¶
type MarketTicker struct {
InstrumentType string `json:"instType"`
InstrumentID string `json:"instId"`
// last traded price
Last fixedpoint.Value `json:"last"`
// last traded size
LastSize fixedpoint.Value `json:"lastSz"`
AskPrice fixedpoint.Value `json:"askPx"`
AskSize fixedpoint.Value `json:"askSz"`
BidPrice fixedpoint.Value `json:"bidPx"`
BidSize fixedpoint.Value `json:"bidSz"`
Open24H fixedpoint.Value `json:"open24h"`
High24H fixedpoint.Value `json:"high24H"`
Low24H fixedpoint.Value `json:"low24H"`
Volume24H fixedpoint.Value `json:"vol24h"`
VolumeCurrency24H fixedpoint.Value `json:"volCcy24h"`
// Millisecond timestamp
Timestamp types.MillisecondTimestamp `json:"ts"`
}
type MarketTickerRequest ¶
type MarketTickerRequest struct {
// contains filtered or unexported fields
}
func (*MarketTickerRequest) Do ¶
func (r *MarketTickerRequest) Do(ctx context.Context) (*MarketTicker, error)
func (*MarketTickerRequest) InstrumentID ¶
func (r *MarketTickerRequest) InstrumentID(instId string) *MarketTickerRequest
type MarketTickersRequest ¶
type MarketTickersRequest struct {
// contains filtered or unexported fields
}
func (*MarketTickersRequest) Do ¶
func (r *MarketTickersRequest) Do(ctx context.Context) ([]MarketTicker, error)
func (*MarketTickersRequest) InstrumentType ¶
func (r *MarketTickersRequest) InstrumentType(instType string) *MarketTickersRequest
type MaxAvailableResponse ¶ added in v1.62.0
type MaxAvailableResponse struct {
InstId string `json:"instId"`
AvailableBuy fixedpoint.Value `json:"availBuy"`
AvailableSell fixedpoint.Value `json:"availSell"`
}
type MaxLoanResponse ¶ added in v1.62.0
type MaxLoanResponse struct {
InstId string `json:"instId"`
MgnMode MarginMode `json:"mgnMode"`
MgnCcy string `json:"mgnCcy"`
MaxLoan fixedpoint.Value `json:"maxLoan"`
Ccy string `json:"ccy"`
Side MarginSide `json:"side"`
}
type OpenOrder ¶ added in v1.56.0
type OpenOrder struct {
OrderDetail
QuickMgnType string `json:"quickMgnType"`
}
type OrderDetail ¶ added in v1.56.0
type OrderDetail struct {
AccumulatedFillSize fixedpoint.Value `json:"accFillSz"`
// If none is filled, it will return "".
AvgPrice fixedpoint.Value `json:"avgPx"`
CreatedTime types.MillisecondTimestamp `json:"cTime"`
Category string `json:"category"`
ClientOrderId string `json:"clOrdId"`
Fee fixedpoint.Value `json:"fee"`
FeeCurrency string `json:"feeCcy"`
// Last filled time
FillTime types.MillisecondTimestamp `json:"fillTime"`
InstrumentID string `json:"instId"`
InstrumentType InstrumentType `json:"instType"`
OrderId strint.Int64 `json:"ordId"`
OrderType OrderType `json:"ordType"`
Price fixedpoint.Value `json:"px"`
Side SideType `json:"side"`
State OrderState `json:"state"`
Size fixedpoint.Value `json:"sz"`
TargetCurrency TargetCurrency `json:"tgtCcy"`
UpdatedTime types.MillisecondTimestamp `json:"uTime"`
// Margin currency
// Only applicable to cross MARGIN orders in Single-currency margin.
Currency string `json:"ccy"`
TradeId string `json:"tradeId"`
// Last filled price
FillPrice fixedpoint.Value `json:"fillPx"`
// Last filled quantity
FillSize fixedpoint.Value `json:"fillSz"`
// Leverage, from 0.01 to 125.
// Only applicable to MARGIN/FUTURES/SWAP
Lever string `json:"lever"`
// Profit and loss, Applicable to orders which have a trade and aim to close position. It always is 0 in other conditions
Pnl fixedpoint.Value `json:"pnl"`
PositionSide string `json:"posSide"`
// Options price in USDOnly applicable to options; return "" for other instrument types
PriceUsd fixedpoint.Value `json:"pxUsd"`
// Implied volatility of the options orderOnly applicable to options; return "" for other instrument types
PriceVol fixedpoint.Value `json:"pxVol"`
// Price type of options
PriceType string `json:"pxType"`
// Rebate amount, only applicable to spot and margin, the reward of placing orders from the platform (rebate)
// given to user who has reached the specified trading level. If there is no rebate, this field is "".
Rebate fixedpoint.Value `json:"rebate"`
RebateCcy string `json:"rebateCcy"`
// Client-supplied Algo ID when placing order attaching TP/SL.
AttachAlgoClOrdId string `json:"attachAlgoClOrdId"`
SlOrdPx fixedpoint.Value `json:"slOrdPx"`
SlTriggerPx fixedpoint.Value `json:"slTriggerPx"`
SlTriggerPxType string `json:"slTriggerPxType"`
AttachAlgoOrds []interface{} `json:"attachAlgoOrds"`
Source string `json:"source"`
// Self trade prevention ID. Return "" if self trade prevention is not applicable
StpId string `json:"stpId"`
// Self trade prevention mode. Return "" if self trade prevention is not applicable
StpMode string `json:"stpMode"`
Tag string `json:"tag"`
TradeMode TradeMode `json:"tdMode"`
TpOrdPx fixedpoint.Value `json:"tpOrdPx"`
TpTriggerPx fixedpoint.Value `json:"tpTriggerPx"`
TpTriggerPxType string `json:"tpTriggerPxType"`
ReduceOnly string `json:"reduceOnly"`
AlgoClOrdId string `json:"algoClOrdId"`
AlgoId string `json:"algoId"`
}
type OrderDetails ¶
type OrderDetails struct {
InstrumentType InstrumentType `json:"instType"`
InstrumentID string `json:"instId"`
Tag string `json:"tag"`
Price fixedpoint.Value `json:"px"`
Quantity fixedpoint.Value `json:"sz"`
OrderID string `json:"ordId"`
ClientOrderID string `json:"clOrdId"`
OrderType OrderType `json:"ordType"`
Side SideType `json:"side"`
// Accumulated fill quantity
FilledQuantity fixedpoint.Value `json:"accFillSz"`
FeeCurrency string `json:"feeCcy"`
Fee fixedpoint.Value `json:"fee"`
// trade related fields
LastTradeID string `json:"tradeId,omitempty"`
LastFilledPrice fixedpoint.Value `json:"fillPx"`
LastFilledQuantity fixedpoint.Value `json:"fillSz"`
LastFilledTime types.MillisecondTimestamp `json:"fillTime"`
LastFilledFee fixedpoint.Value `json:"fillFee"`
LastFilledFeeCurrency string `json:"fillFeeCcy"`
LastFilledPnl fixedpoint.Value `json:"fillPnl"`
BillID strint.Int64 `json:"billId"`
// ExecutionType = liquidity (M = maker or T = taker)
ExecutionType string `json:"execType"`
// Average filled price. If none is filled, it will return 0.
AveragePrice fixedpoint.Value `json:"avgPx"`
// Currency = Margin currency
// Only applicable to cross MARGIN orders in Single-currency margin.
Currency string `json:"ccy"`
// Leverage = from 0.01 to 125.
// Only applicable to MARGIN/FUTURES/SWAP
Leverage fixedpoint.Value `json:"lever"`
RebateCurrency string `json:"rebateCcy"`
Rebate fixedpoint.Value `json:"rebate"`
PnL fixedpoint.Value `json:"pnl"`
UpdateTime types.MillisecondTimestamp `json:"uTime"`
CreationTime types.MillisecondTimestamp `json:"cTime"`
State OrderState `json:"state"`
}
type OrderList ¶ added in v1.52.0
type OrderList []OrderDetails
type OrderResponse ¶
type OrderState ¶
type OrderState string
const ( OrderStateCanceled OrderState = "canceled" OrderStateLive OrderState = "live" OrderStatePartiallyFilled OrderState = "partially_filled" OrderStateFilled OrderState = "filled" )
func (OrderState) IsWorking ¶ added in v1.56.0
func (o OrderState) IsWorking() bool
type PlaceOrderRequest ¶
type PlaceOrderRequest struct {
// contains filtered or unexported fields
}
func (*PlaceOrderRequest) ClientOrderID ¶
func (r *PlaceOrderRequest) ClientOrderID(clientOrderID string) *PlaceOrderRequest
func (*PlaceOrderRequest) Currency ¶ added in v1.62.0
func (r *PlaceOrderRequest) Currency(currency string) *PlaceOrderRequest
func (*PlaceOrderRequest) Do ¶
func (r *PlaceOrderRequest) Do(ctx context.Context) ([]OrderResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*PlaceOrderRequest) GetParameters ¶ added in v1.21.0
func (r *PlaceOrderRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*PlaceOrderRequest) GetParametersJSON ¶ added in v1.21.0
func (r *PlaceOrderRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*PlaceOrderRequest) GetParametersQuery ¶ added in v1.21.0
func (r *PlaceOrderRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*PlaceOrderRequest) GetPath ¶ added in v1.56.0
func (r *PlaceOrderRequest) GetPath() string
GetPath returns the request path of the API
func (*PlaceOrderRequest) GetQueryParameters ¶ added in v1.56.0
func (r *PlaceOrderRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*PlaceOrderRequest) GetSlugParameters ¶ added in v1.56.0
func (r *PlaceOrderRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*PlaceOrderRequest) GetSlugsMap ¶ added in v1.56.0
func (r *PlaceOrderRequest) GetSlugsMap() (map[string]string, error)
func (*PlaceOrderRequest) InstrumentID ¶
func (r *PlaceOrderRequest) InstrumentID(instrumentID string) *PlaceOrderRequest
func (*PlaceOrderRequest) OrderType ¶
func (r *PlaceOrderRequest) OrderType(orderType OrderType) *PlaceOrderRequest
func (*PlaceOrderRequest) Parameters ¶
func (r *PlaceOrderRequest) Parameters() map[string]interface{}
func (*PlaceOrderRequest) PosSide ¶ added in v1.62.0
func (r *PlaceOrderRequest) PosSide(posSide PosSide) *PlaceOrderRequest
func (*PlaceOrderRequest) Price ¶
func (r *PlaceOrderRequest) Price(price string) *PlaceOrderRequest
func (*PlaceOrderRequest) ReduceOnly ¶ added in v1.62.0
func (r *PlaceOrderRequest) ReduceOnly(reduceOnly bool) *PlaceOrderRequest
func (*PlaceOrderRequest) Side ¶
func (r *PlaceOrderRequest) Side(side SideType) *PlaceOrderRequest
func (*PlaceOrderRequest) Size ¶ added in v1.56.0
func (r *PlaceOrderRequest) Size(size string) *PlaceOrderRequest
func (*PlaceOrderRequest) Tag ¶ added in v1.21.0
func (r *PlaceOrderRequest) Tag(tag string) *PlaceOrderRequest
func (*PlaceOrderRequest) TargetCurrency ¶ added in v1.56.0
func (r *PlaceOrderRequest) TargetCurrency(targetCurrency TargetCurrency) *PlaceOrderRequest
func (*PlaceOrderRequest) TradeMode ¶
func (r *PlaceOrderRequest) TradeMode(tradeMode TradeMode) *PlaceOrderRequest
type Position ¶ added in v1.62.0
type Position struct {
Adl fixedpoint.Value `json:"adl"`
AvailPos fixedpoint.Value `json:"availPos"`
AvgPx fixedpoint.Value `json:"avgPx"`
BaseBal fixedpoint.Value `json:"baseBal"`
BaseBorrowed fixedpoint.Value `json:"baseBorrowed"`
BaseInterest fixedpoint.Value `json:"baseInterest"`
BePx fixedpoint.Value `json:"bePx"`
BizRefId string `json:"bizRefId"`
BizRefType string `json:"bizRefType"`
Ccy string `json:"ccy"`
ClSpotInUseAmt string `json:"clSpotInUseAmt"`
CloseOrderAlgo []interface{} `json:"closeOrderAlgo"`
DeltaBS string `json:"deltaBS"`
DeltaPA string `json:"deltaPA"`
Fee fixedpoint.Value `json:"fee"`
FundingFee fixedpoint.Value `json:"fundingFee"`
GammaBS string `json:"gammaBS"`
GammaPA string `json:"gammaPA"`
IdxPx fixedpoint.Value `json:"idxPx"`
Imr string `json:"imr"`
InstId string `json:"instId"`
InstType string `json:"instType"`
Interest fixedpoint.Value `json:"interest"`
Last fixedpoint.Value `json:"last"`
Lever fixedpoint.Value `json:"lever"`
Liab fixedpoint.Value `json:"liab"`
LiabCcy string `json:"liabCcy"`
LiqPenalty string `json:"liqPenalty"`
LiqPx fixedpoint.Value `json:"liqPx"`
Margin fixedpoint.Value `json:"margin"`
MarkPx fixedpoint.Value `json:"markPx"`
MaxSpotInUseAmt string `json:"maxSpotInUseAmt"`
MgnMode string `json:"mgnMode"`
MgnRatio fixedpoint.Value `json:"mgnRatio"`
Mmr string `json:"mmr"`
NotionalUsd string `json:"notionalUsd"`
OptVal string `json:"optVal"`
PendingCloseOrdLiabVal string `json:"pendingCloseOrdLiabVal"`
Pnl fixedpoint.Value `json:"pnl"`
Pos fixedpoint.Value `json:"pos"`
PosCcy string `json:"posCcy"`
PosId string `json:"posId"`
PosSide string `json:"posSide"`
QuoteBal fixedpoint.Value `json:"quoteBal"`
QuoteBorrowed fixedpoint.Value `json:"quoteBorrowed"`
QuoteInterest fixedpoint.Value `json:"quoteInterest"`
RealizedPnl fixedpoint.Value `json:"realizedPnl"`
SpotInUseAmt string `json:"spotInUseAmt"`
SpotInUseCcy string `json:"spotInUseCcy"`
ThetaBS string `json:"thetaBS"`
ThetaPA string `json:"thetaPA"`
TradeId string `json:"tradeId"`
CreationTime types.MillisecondTimestamp `json:"cTime"`
UpdatedTime types.MillisecondTimestamp `json:"uTime"`
Upl string `json:"upl"`
UplLastPx fixedpoint.Value `json:"uplLastPx"`
UplRatio string `json:"uplRatio"`
UplRatioLastPx string `json:"uplRatioLastPx"`
UsdPx fixedpoint.Value `json:"usdPx"`
VegaBS string `json:"vegaBS"`
VegaPA string `json:"vegaPA"`
}
type PositionBalanceData ¶ added in v1.62.0
type PositionBalanceData struct {
Currency string `json:"ccy"`
DisEquity fixedpoint.Value `json:"disEq"`
Equity fixedpoint.Value `json:"eq"`
}
type PositionData ¶ added in v1.62.0
type PositionData struct {
Currency string `json:"ccy"`
InstId string `json:"instId"`
InstType string `json:"instType"`
MarginMode MarginMode `json:"mgnMode"`
NotionalCurrency fixedpoint.Value `json:"notionalCcy"`
NotionalUsd fixedpoint.Value `json:"notionalUsd"`
Pos fixedpoint.Value `json:"pos"`
PosCurrency string `json:"posCcy"`
PosId string `json:"posId"`
PosSide string `json:"posSide"`
BaseBal fixedpoint.Value `json:"baseBal"`
QuoteBal fixedpoint.Value `json:"quoteBal"`
}
type PositionRiskResponse ¶ added in v1.62.0
type PositionRiskResponse struct {
AdjEq fixedpoint.Value `json:"adjEq"`
BalData []PositionBalanceData `json:"balData"`
PosData []PositionData `json:"posData"`
Ts types.MillisecondTimestamp `json:"ts"`
}
type RestClient ¶
type RestClient struct {
requestgen.BaseAPIClient
Key, Secret, Passphrase string
}
func NewClient ¶
func NewClient() *RestClient
func (*RestClient) AssetBalances ¶
func (c *RestClient) AssetBalances(ctx context.Context) (AssetBalanceList, error)
func (*RestClient) AssetCurrencies ¶
func (c *RestClient) AssetCurrencies(ctx context.Context) ([]AssetCurrency, error)
func (*RestClient) Auth ¶
func (c *RestClient) Auth(key, secret, passphrase string)
func (*RestClient) NewAuthenticatedRequest ¶ added in v1.52.0
func (c *RestClient) NewAuthenticatedRequest( ctx context.Context, method, refURL string, params url.Values, payload interface{}, ) (*http.Request, error)
NewAuthenticatedRequest creates new http request for authenticated routes.
func (*RestClient) NewBatchCancelOrderRequest ¶ added in v1.52.0
func (c *RestClient) NewBatchCancelOrderRequest() *BatchCancelOrderRequest
func (*RestClient) NewBatchPlaceOrderRequest ¶ added in v1.52.0
func (c *RestClient) NewBatchPlaceOrderRequest() *BatchPlaceOrderRequest
func (*RestClient) NewCancelOrderRequest ¶ added in v1.52.0
func (c *RestClient) NewCancelOrderRequest() *CancelOrderRequest
func (*RestClient) NewGetAccountBalanceRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountBalanceRequest() *GetAccountBalanceRequest
func (*RestClient) NewGetAccountConfigRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountConfigRequest() *GetAccountConfigRequest
func (*RestClient) NewGetAccountInterestLimitsRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountInterestLimitsRequest() *GetAccountInterestLimitsRequest
func (*RestClient) NewGetAccountLeverageInfoRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountLeverageInfoRequest() *GetAccountLeverageInfoRequest
func (*RestClient) NewGetAccountMaxLoanRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountMaxLoanRequest() *GetAccountMaxLoanRequest
func (*RestClient) NewGetAccountPositionRiskRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountPositionRiskRequest() *GetAccountPositionRiskRequest
func (*RestClient) NewGetAccountPositionsRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountPositionsRequest() *GetAccountPositionsRequest
func (*RestClient) NewGetAccountRiskStateRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountRiskStateRequest() *GetAccountRiskStateRequest
func (*RestClient) NewGetAccountSpotBorrowRepayHistoryRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAccountSpotBorrowRepayHistoryRequest() *GetAccountSpotBorrowRepayHistoryRequest
func (*RestClient) NewGetAssetDepositHistoryRequest ¶ added in v1.62.0
func (c *RestClient) NewGetAssetDepositHistoryRequest() *GetAssetDepositHistoryRequest
func (*RestClient) NewGetCandlesRequest ¶ added in v1.57.0
func (c *RestClient) NewGetCandlesRequest() *GetCandlesRequest
func (*RestClient) NewGetFundingRate ¶ added in v1.52.0
func (s *RestClient) NewGetFundingRate() *GetFundingRateRequest
func (*RestClient) NewGetInstrumentsInfoRequest ¶ added in v1.56.0
func (c *RestClient) NewGetInstrumentsInfoRequest() *GetInstrumentsInfoRequest
func (*RestClient) NewGetMaxAvailableSizeRequest ¶ added in v1.62.0
func (c *RestClient) NewGetMaxAvailableSizeRequest() *GetMaxAvailableSizeRequest
func (*RestClient) NewGetOpenOrdersRequest ¶ added in v1.56.0
func (c *RestClient) NewGetOpenOrdersRequest() *GetOpenOrdersRequest
func (*RestClient) NewGetOrderDetailsRequest ¶ added in v1.52.0
func (c *RestClient) NewGetOrderDetailsRequest() *GetOrderDetailsRequest
func (*RestClient) NewGetOrderHistoryRequest ¶ added in v1.53.0
func (c *RestClient) NewGetOrderHistoryRequest() *GetOrderHistoryRequest
NewGetOrderHistoryRequest is descending order by createdTime
func (*RestClient) NewGetThreeDaysTransactionHistoryRequest ¶ added in v1.58.0
func (c *RestClient) NewGetThreeDaysTransactionHistoryRequest() *GetThreeDaysTransactionHistoryRequest
func (*RestClient) NewGetTickerRequest ¶ added in v1.56.0
func (c *RestClient) NewGetTickerRequest() *GetTickerRequest
func (*RestClient) NewGetTickersRequest ¶ added in v1.56.0
func (c *RestClient) NewGetTickersRequest() *GetTickersRequest
func (*RestClient) NewGetTransactionDetailsRequest ¶ added in v1.52.0
func (c *RestClient) NewGetTransactionDetailsRequest() *GetTransactionDetailsRequest
func (*RestClient) NewGetTransactionHistoryRequest ¶ added in v1.53.0
func (c *RestClient) NewGetTransactionHistoryRequest() *GetTransactionHistoryRequest
func (*RestClient) NewMarketTickerRequest ¶ added in v1.52.0
func (c *RestClient) NewMarketTickerRequest(instId string) *MarketTickerRequest
func (*RestClient) NewMarketTickersRequest ¶ added in v1.52.0
func (c *RestClient) NewMarketTickersRequest(instType string) *MarketTickersRequest
func (*RestClient) NewPlaceOrderRequest ¶ added in v1.52.0
func (c *RestClient) NewPlaceOrderRequest() *PlaceOrderRequest
func (*RestClient) NewSetAccountLevelRequest ¶ added in v1.62.0
func (c *RestClient) NewSetAccountLevelRequest() *SetAccountLevelRequest
func (*RestClient) NewSetAccountLeverageRequest ¶ added in v1.62.0
func (c *RestClient) NewSetAccountLeverageRequest() *SetAccountLeverageRequest
func (*RestClient) NewSetAutoRepayRequest ¶ added in v1.62.0
func (c *RestClient) NewSetAutoRepayRequest() *SetAutoRepayRequest
func (*RestClient) NewSpotManualBorrowRepayRequest ¶ added in v1.62.0
func (c *RestClient) NewSpotManualBorrowRepayRequest() *SpotManualBorrowRepayRequest
type SetAccountLevelRequest ¶ added in v1.62.0
type SetAccountLevelRequest struct {
// contains filtered or unexported fields
}
func (*SetAccountLevelRequest) AcctLv ¶ added in v1.62.0
func (s *SetAccountLevelRequest) AcctLv(acctLv string) *SetAccountLevelRequest
func (*SetAccountLevelRequest) Do ¶ added in v1.62.0
func (s *SetAccountLevelRequest) Do(ctx context.Context) ([]AccountLevelResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*SetAccountLevelRequest) GetParameters ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*SetAccountLevelRequest) GetParametersJSON ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*SetAccountLevelRequest) GetParametersQuery ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*SetAccountLevelRequest) GetPath ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetPath() string
GetPath returns the request path of the API
func (*SetAccountLevelRequest) GetQueryParameters ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*SetAccountLevelRequest) GetSlugParameters ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*SetAccountLevelRequest) GetSlugsMap ¶ added in v1.62.0
func (s *SetAccountLevelRequest) GetSlugsMap() (map[string]string, error)
type SetAccountLeverageRequest ¶ added in v1.62.0
type SetAccountLeverageRequest struct {
// contains filtered or unexported fields
}
func (*SetAccountLeverageRequest) Currency ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) Currency(currency string) *SetAccountLeverageRequest
func (*SetAccountLeverageRequest) Do ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) Do(ctx context.Context) ([]LeverageResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*SetAccountLeverageRequest) GetParameters ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*SetAccountLeverageRequest) GetParametersJSON ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*SetAccountLeverageRequest) GetParametersQuery ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*SetAccountLeverageRequest) GetPath ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetPath() string
GetPath returns the request path of the API
func (*SetAccountLeverageRequest) GetQueryParameters ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*SetAccountLeverageRequest) GetSlugParameters ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*SetAccountLeverageRequest) GetSlugsMap ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) GetSlugsMap() (map[string]string, error)
func (*SetAccountLeverageRequest) InstrumentId ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) InstrumentId(instrumentId string) *SetAccountLeverageRequest
func (*SetAccountLeverageRequest) Leverage ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) Leverage(leverage int) *SetAccountLeverageRequest
func (*SetAccountLeverageRequest) MarginMode ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) MarginMode(marginMode MarginMode) *SetAccountLeverageRequest
func (*SetAccountLeverageRequest) PosSide ¶ added in v1.62.0
func (s *SetAccountLeverageRequest) PosSide(posSide string) *SetAccountLeverageRequest
type SetAutoRepayRequest ¶ added in v1.62.0
type SetAutoRepayRequest struct {
// contains filtered or unexported fields
}
func (*SetAutoRepayRequest) AutoRepay ¶ added in v1.62.0
func (s *SetAutoRepayRequest) AutoRepay(autoRepay bool) *SetAutoRepayRequest
func (*SetAutoRepayRequest) Do ¶ added in v1.62.0
func (s *SetAutoRepayRequest) Do(ctx context.Context) ([]AutoRepayResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*SetAutoRepayRequest) GetParameters ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*SetAutoRepayRequest) GetParametersJSON ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*SetAutoRepayRequest) GetParametersQuery ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*SetAutoRepayRequest) GetPath ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetPath() string
GetPath returns the request path of the API
func (*SetAutoRepayRequest) GetQueryParameters ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*SetAutoRepayRequest) GetSlugParameters ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*SetAutoRepayRequest) GetSlugsMap ¶ added in v1.62.0
func (s *SetAutoRepayRequest) GetSlugsMap() (map[string]string, error)
type SpotBorrowRepayResponse ¶ added in v1.62.0
type SpotBorrowRepayResponse struct {
Currency string `json:"ccy"`
Side MarginSide `json:"side"`
Amount fixedpoint.Value `json:"amt"`
}
type SpotManualBorrowRepayRequest ¶ added in v1.62.0
type SpotManualBorrowRepayRequest struct {
// contains filtered or unexported fields
}
func (*SpotManualBorrowRepayRequest) Amount ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) Amount(amount string) *SpotManualBorrowRepayRequest
func (*SpotManualBorrowRepayRequest) Currency ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) Currency(currency string) *SpotManualBorrowRepayRequest
func (*SpotManualBorrowRepayRequest) Do ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) Do(ctx context.Context) ([]SpotBorrowRepayResponse, error)
Do generates the request object and send the request object to the API endpoint
func (*SpotManualBorrowRepayRequest) GetParameters ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetParameters() (map[string]interface{}, error)
GetParameters builds and checks the parameters and return the result in a map object
func (*SpotManualBorrowRepayRequest) GetParametersJSON ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetParametersJSON() ([]byte, error)
GetParametersJSON converts the parameters from GetParameters into the JSON format
func (*SpotManualBorrowRepayRequest) GetParametersQuery ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetParametersQuery() (url.Values, error)
GetParametersQuery converts the parameters from GetParameters into the url.Values format
func (*SpotManualBorrowRepayRequest) GetPath ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetPath() string
GetPath returns the request path of the API
func (*SpotManualBorrowRepayRequest) GetQueryParameters ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetQueryParameters() (url.Values, error)
GetQueryParameters builds and checks the query parameters and returns url.Values
func (*SpotManualBorrowRepayRequest) GetSlugParameters ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetSlugParameters() (map[string]interface{}, error)
GetSlugParameters builds and checks the slug parameters and return the result in a map object
func (*SpotManualBorrowRepayRequest) GetSlugsMap ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) GetSlugsMap() (map[string]string, error)
func (*SpotManualBorrowRepayRequest) Side ¶ added in v1.62.0
func (s *SpotManualBorrowRepayRequest) Side(side MarginSide) *SpotManualBorrowRepayRequest
type TargetCurrency ¶ added in v1.56.0
type TargetCurrency string
const ( TargetCurrencyBase TargetCurrency = "base_ccy" TargetCurrencyQuote TargetCurrency = "quote_ccy" )
type Trade ¶ added in v1.56.0
type Trade struct {
InstrumentType InstrumentType `json:"instType"`
InstrumentId string `json:"instId"`
TradeId strint.Int64 `json:"tradeId"`
OrderId strint.Int64 `json:"ordId"`
ClientOrderId string `json:"clOrdId"`
// Data generation time, Unix timestamp format in milliseconds, e.g. 1597026383085.
Timestamp types.MillisecondTimestamp `json:"ts"`
FillTime types.MillisecondTimestamp `json:"fillTime"`
FeeCurrency string `json:"feeCcy"`
Fee fixedpoint.Value `json:"fee"`
BillId strint.Int64 `json:"billId"`
Side SideType `json:"side"`
ExecutionType LiquidityType `json:"execType"`
Tag string `json:"tag"`
// Last filled price
FillPrice fixedpoint.Value `json:"fillPx"`
// Last filled quantity
FillSize fixedpoint.Value `json:"fillSz"`
// Index price at the moment of trade execution
// For cross currency spot pairs, it returns baseCcy-USDT index price. For example, for LTC-ETH, this field returns the index price of LTC-USDT.
FillIndexPrice fixedpoint.Value `json:"fillIdxPx"`
FillPnl string `json:"fillPnl"`
// Only applicable to options; return "" for other instrument types
FillPriceVolume fixedpoint.Value `json:"fillPxVol"`
FillPriceUsd fixedpoint.Value `json:"fillPxUsd"`
FillMarkVolume fixedpoint.Value `json:"fillMarkVol"`
FillForwardPrice fixedpoint.Value `json:"fillFwdPx"`
FillMarkPrice fixedpoint.Value `json:"fillMarkPx"`
PosSide string `json:"posSide"`
}
Source Files
¶
- cancel_order_request.go
- cancel_order_request_requestgen.go
- client.go
- constants.go
- get_account_balance_request.go
- get_account_balance_request_requestgen.go
- get_account_config_request.go
- get_account_config_request_requestgen.go
- get_account_interest_limits_request.go
- get_account_interest_limits_request_requestgen.go
- get_account_leverage_info.go
- get_account_leverage_info_request_requestgen.go
- get_account_max_loan_request.go
- get_account_max_loan_request_requestgen.go
- get_account_position_risk_request.go
- get_account_position_risk_request_requestgen.go
- get_account_positions_request.go
- get_account_positions_request_requestgen.go
- get_account_risk_state_request.go
- get_account_risk_state_request_requestgen.go
- get_account_spot_borrow_repay_history_request.go
- get_account_spot_borrow_repay_history_request_requestgen.go
- get_asset_deposit_history_request.go
- get_asset_deposit_history_request_requestgen.go
- get_candles_request.go
- get_candles_request_requestgen.go
- get_instruments_info_request.go
- get_instruments_info_request_requestgen.go
- get_max_available_size_request.go
- get_max_available_size_request_requestgen.go
- get_open_orders_request.go
- get_open_orders_request_requestgen.go
- get_order_history_request.go
- get_order_history_request_requestgen.go
- get_three_days_transaction_history_request.go
- get_three_days_transaction_history_request_requestgen.go
- get_ticker_request.go
- get_ticker_request_requestgen.go
- get_tickers_request.go
- get_tickers_request_requestgen.go
- get_transaction_history_request.go
- get_transaction_history_request_requestgen.go
- market.go
- place_order_request.go
- place_order_request_requestgen.go
- public.go
- set_account_level_request.go
- set_account_level_request_requestgen.go
- set_account_leverage_request.go
- set_account_leverage_request_requestgen.go
- set_auto_repay_request.go
- set_auto_repay_request_requestgen.go
- spot_manual_borrow_repay.go
- spot_manual_borrow_repay_request_requestgen.go
- trade.go