Documentation ¶
Index ¶
- type AllFuturesInfo
- type AssetHisotryResp
- type AvailableSymbols
- type Balance
- type CancelOrderByClientOrderIDParam
- type CancelOrderParam
- type CancelOrderResp
- type CancelOrdersParam
- type FundingRate
- type FundingRates
- type FuturesInfo
- type GetAccountInfo
- type GetAllV3PositionInfo
- type GetAssetHisotryParam
- type GetKlineParam
- type GetMarketTradesParam
- type GetOnePositionInfo
- type GetOrder
- type GetOrderbookParam
- type GetOrders
- type GetOrdersParam
- type GetTrade
- type GetTradeHistory
- type GetTradeHistoryParam
- type GetTrades
- type HTTPRequest
- type Hisotry
- type IPRestriction
- type Kline
- type MarketTrade
- type OneFuturesInfo
- type Order
- type Orderbook
- type Response
- type SendOrderReq
- type SendOrderResp
- type SubAccounts
- type SymbolFundingRate
- type SymbolInfo
- type Tokens
- type Trade
- type TransferAssetParam
- type TransferAssetResp
- type UpdateAccountModeParam
- type UpdateLeverageSettingParam
- type V1Position
- type V3Position
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllFuturesInfo ¶
type AllFuturesInfo struct { Success bool `json:"success"` Rows []FuturesInfo `json:"rows"` Timestamp int64 `json:"timestamp"` }
type AssetHisotryResp ¶
type AvailableSymbols ¶
type AvailableSymbols struct { Response Rows []struct { Symbol string `json:"symbol"` QuoteMin float64 `json:"quote_min"` QuoteMax float64 `json:"quote_max"` QuoteTick float64 `json:"quote_tick"` BaseMin float64 `json:"base_min"` BaseMax float64 `json:"base_max"` BaseTick float64 `json:"base_tick"` MinNotional float64 `json:"min_notional"` PriceRange float64 `json:"price_range"` PriceScope float64 `json:"price_scope"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` IsStable int `json:"is_stable"` } `json:"rows"` }
type Balance ¶
type Balance struct { Response Data struct { Holding []struct { Token string `json:"token"` Holding float64 `json:"holding"` Frozen float64 `json:"frozen"` Staked float64 `json:"staked"` Unbonding float64 `json:"unbonding"` Vault float64 `json:"vault"` Interest float64 `json:"interest"` PendingShortQty float64 `json:"pendingShortQty"` PendingLongQty float64 `json:"pendingLongQty"` AvailableBalance float64 `json:"availableBalance"` UpdatedTime float64 `json:"updatedTime"` } `json:"holding"` } `json:"data"` Timestamp int64 `json:"timestamp"` }
type CancelOrderParam ¶
type CancelOrderResp ¶
type CancelOrdersParam ¶
type CancelOrdersParam struct {
Symbol string `url:"symbol" validate:"required"`
}
type FundingRate ¶
type FundingRate struct { Response SymbolFundingRate Timestamp int64 `json:"timestamp"` }
type FundingRates ¶
type FundingRates struct { Success bool `json:"success"` Rows []SymbolFundingRate `json:"rows"` Timestamp int64 `json:"timestamp"` }
type FuturesInfo ¶
type FuturesInfo struct { Symbol string `json:"symbol"` IndexPrice float64 `json:"index_price"` MarkPrice float64 `json:"mark_price"` EstFundingRate float64 `json:"est_funding_rate"` LastFundingRate float64 `json:"last_funding_rate"` NextFundingTime int64 `json:"next_funding_time"` OpenInterest float64 `json:"open_interest"` Two4HOpen float64 `json:"24h_open"` Two4HClose float64 `json:"24h_close"` Two4HHigh float64 `json:"24h_high"` Two4HLow float64 `json:"24h_low"` Two4HVolume float64 `json:"24h_volume"` Two4HAmount float64 `json:"24h_amount"` }
type GetAccountInfo ¶
type GetAccountInfo struct { Response Data struct { ApplicationID string `json:"applicationId"` Account string `json:"account"` Alias string `json:"alias"` AccountMode string `json:"accountMode"` Leverage int `json:"leverage"` TakerFeeRate float64 `json:"takerFeeRate"` MakerFeeRate float64 `json:"makerFeeRate"` InterestRate float64 `json:"interestRate"` FuturesTakerFeeRate float64 `json:"futuresTakerFeeRate"` FuturesMakerFeeRate float64 `json:"futuresMakerFeeRate"` Otpauth bool `json:"otpauth"` MarginRatio float64 `json:"marginRatio"` OpenMarginRatio float64 `json:"openMarginRatio"` InitialMarginRatio float64 `json:"initialMarginRatio"` MaintenanceMarginRatio float64 `json:"maintenanceMarginRatio"` TotalCollateral float64 `json:"totalCollateral"` FreeCollateral float64 `json:"freeCollateral"` TotalAccountValue float64 `json:"totalAccountValue"` TotalVaultValue float64 `json:"totalVaultValue"` TotalStakingValue float64 `json:"totalStakingValue"` } `json:"data"` Timestamp int64 `json:"timestamp"` }
type GetAllV3PositionInfo ¶
type GetAllV3PositionInfo struct { Response Data struct { Positions []V3Position `json:"positions"` } `json:"data"` Timestamp int64 `json:"timestamp"` }
type GetAssetHisotryParam ¶
type GetAssetHisotryParam struct { Token string `url:"token,omitempty"` BalanceToken string `url:"balance_token,omitempty"` Type string `url:"type,omitempty"` TokenSide string `url:"token_side,omitempty"` Status string `url:"status,omitempty"` StartTime int64 `url:"start_t,omitempty" validate:"omitempty,gt=999999999999"` EndTime int64 `url:"end_t,omitempty" validate:"omitempty,gt=999999999999"` Page int64 `url:"page,omitempty"` Size int64 `url:"size,omitempty"` }
type GetKlineParam ¶
type GetMarketTradesParam ¶
type GetOnePositionInfo ¶
type GetOnePositionInfo struct { Response V1Position }
type GetOrderbookParam ¶
type GetOrderbookParam struct {
MaxLevel int `url:"max_level,omitempty"`
}
type GetOrdersParam ¶
type GetOrdersParam struct { Symbol string `url:"symbol,omitempty"` Side string `url:"side,omitempty" validate:"omitempty,oneof=SELL BUY"` Size int64 `url:"size,omitempty" validate:"omitempty,max=500"` OrderType string `url:"order_type,omitempty" validate:"omitempty,oneof=LIMIT MARKET IOC FOK POST_ONLY LIQUIDATE"` OrderTag string `url:"order_tag,omitempty" validate:"omitempty"` Status string `url:"status,omitempty" validate:"omitempty,oneof=NEW CANCELLED PARTIAL_FILLED FILLED REJECTED INCOMPLETE COMPLETED"` StartTime int64 `url:"start_t,omitempty" validate:"omitempty,gt=999999999999"` EndTime int64 `url:"end_t,omitempty" validate:"omitempty,gt=999999999999"` Page int64 `url:"page,omitempty" validate:"omitempty"` }
type GetTradeHistory ¶
type GetTradeHistoryParam ¶
type GetTradeHistoryParam struct { Symbol string `url:"symbol,omitempty"` OrderTag string `url:"order_tag,omitempty" validate:"omitempty"` StartTime int64 `url:"start_t,omitempty" validate:"omitempty,gt=999999999999"` EndTime int64 `url:"end_t,omitempty" validate:"omitempty,gt=999999999999"` Page int64 `url:"page,omitempty" validate:"omitempty"` Size int64 `url:"size,omitempty" validate:"omitempty"` }
type HTTPRequest ¶
type Hisotry ¶
type Hisotry struct { CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` ID string `json:"id"` ExternalID string `json:"external_id"` ApplicationID string `json:"application_id"` Token string `json:"token"` TargetAddress string `json:"target_address"` SourceAddress string `json:"source_address"` ConfirmingThreshold int `json:"confirming_threshold"` ConfirmedNumber int `json:"confirmed_number"` Extra string `json:"extra"` Type string `json:"type"` TokenSide string `json:"token_side"` Amount float64 `json:"amount"` TxID string `json:"tx_id"` FeeToken string `json:"fee_token"` FeeAmount float64 `json:"fee_amount"` Status string `json:"status"` }
type IPRestriction ¶
type IPRestriction struct { Response Rows []struct { IPList string `json:"ip_list"` APIKey string `json:"api_key"` UpdateTime string `json:"update_time"` Restrict bool `json:"restrict"` } `json:"rows"` Meta struct { Total int `json:"total"` RecordsPerPage int `json:"records_per_page"` CurrentPage int `json:"current_page"` } `json:"meta"` }
type Kline ¶
type Kline struct { Response Rows []struct { Open float64 `json:"open"` Close float64 `json:"close"` Low float64 `json:"low"` High float64 `json:"high"` Volume float64 `json:"volume"` Amount float64 `json:"amount"` Symbol string `json:"symbol"` Type string `json:"type"` StartTimestamp int64 `json:"start_timestamp"` EndTimestamp int64 `json:"end_timestamp"` } `json:"rows"` }
type MarketTrade ¶
type MarketTrade struct { Response Rows []struct { Symbol string `json:"symbol"` Side string `json:"side"` ExecutedPrice float64 `json:"executed_price"` ExecutedQuantity float64 `json:"executed_quantity"` ExecutedTimestamp string `json:"executed_timestamp"` Source int `json:"source"` } `json:"rows"` }
type OneFuturesInfo ¶
type OneFuturesInfo struct { Response Info FuturesInfo `json:"info"` Timestamp int64 `json:"timestamp"` }
type Order ¶
type Order struct { Side string `json:"side"` Status string `json:"status"` Symbol string `json:"symbol"` ClientOrderID int `json:"client_order_id"` ReduceOnly bool `json:"reduce_only"` OrderID int `json:"order_id"` OrderTag string `json:"order_tag"` Type string `json:"type"` Price float64 `json:"price"` Quantity float64 `json:"quantity"` Amount float64 `json:"amount"` Visible float64 `json:"visible"` Executed float64 `json:"executed"` TotalFee float64 `json:"total_fee"` FeeAsset string `json:"fee_asset"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` AverageExecutedPrice float64 `json:"average_executed_price"` RealizedPnl float64 `json:"realized_pnl"` }
type SendOrderReq ¶
type SendOrderReq struct { Symbol string `url:"symbol" validate:"required"` ClientOrderID int64 `url:"client_order_id,omitempty"` OrderTag string `url:"order_tag,omitempty"` OrderType string `url:"order_type" validate:"required,oneof=LIMIT MARKET IOC FOK POST_ONLY ASK BID"` OrderPrice float64 `url:"order_price,omitempty"` OrderQuantity float64 `url:"order_quantity,omitempty"` OrderAmount float64 `url:"order_amount,omitempty"` ReduceOnly bool `url:"reduce_only,omitempty"` VisibleQuantity float64 `url:"visible_quantity,omitempty"` Side string `url:"side" validate:"required,oneof=SELL BUY"` }
type SendOrderResp ¶
type SendOrderResp struct { Response OrderID int `json:"order_id"` ClientOrderID int `json:"client_order_id"` OrderType string `json:"order_type"` OrderPrice float64 `json:"order_price"` OrderQuantity float64 `json:"order_quantity"` OrderAmount float64 `json:"order_amount"` ReduceOnly bool `json:"reduce_only"` Timestamp string `json:"timestamp"` }
type SubAccounts ¶
type SymbolFundingRate ¶
type SymbolFundingRate struct { Symbol string `json:"symbol"` EstFundingRate float64 `json:"est_funding_rate"` EstFundingRateTimestamp int64 `json:"est_funding_rate_timestamp"` LastFundingRate float64 `json:"last_funding_rate"` LastFundingRateTimestamp int64 `json:"last_funding_rate_timestamp"` NextFundingTime int64 `json:"next_funding_time"` LastFundingRateInterval int `json:"last_funding_rate_interval"` EstFundingRateInterval int `json:"est_funding_rate_interval"` }
type SymbolInfo ¶
type SymbolInfo struct { Response Info struct { Symbol string `json:"symbol"` QuoteMin float64 `json:"quote_min"` QuoteMax float64 `json:"quote_max"` QuoteTick float64 `json:"quote_tick"` BaseMin float64 `json:"base_min"` BaseMax float64 `json:"base_max"` BaseTick float64 `json:"base_tick"` MinNotional float64 `json:"min_notional"` PriceRange float64 `json:"price_range"` PriceScope float64 `json:"price_scope"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` IsStable int `json:"is_stable"` } `json:"info"` }
type Tokens ¶
type Tokens struct { Response Rows []struct { Token string `json:"token"` Fullname string `json:"fullname"` Decimals int `json:"decimals"` BalanceToken string `json:"balance_token"` CreatedTime string `json:"created_time"` UpdatedTime string `json:"updated_time"` CanCollateral bool `json:"can_collateral"` CanShort bool `json:"can_short"` } `json:"rows"` }
type Trade ¶
type Trade struct { ID int `json:"id"` Symbol string `json:"symbol"` OrderID int `json:"order_id"` OrderTag string `json:"order_tag"` ExecutedPrice float64 `json:"executed_price"` ExecutedQuantity float64 `json:"executed_quantity"` IsMaker int `json:"is_maker"` Side string `json:"side"` Fee float64 `json:"fee"` FeeAsset string `json:"fee_asset"` ExecutedTimestamp string `json:"executed_timestamp"` }
type TransferAssetParam ¶
type TransferAssetResp ¶
type UpdateAccountModeParam ¶
type UpdateAccountModeParam struct {
AccountMode string `url:"account_mode" json:"account_mode" validate:"required,oneof=PURE_SPOT MARGIN FUTURES"`
}
type UpdateLeverageSettingParam ¶
type UpdateLeverageSettingParam struct {
Leverage int64 `url:"leverage" validate:"required,oneof=1 2 3 4 5 10 15 20"`
}
type V1Position ¶
type V1Position struct { Symbol string `json:"symbol"` Holding float64 `json:"holding"` PendingLongQty float64 `json:"pending_long_qty"` PendingShortQty float64 `json:"pending_short_qty"` SettlePrice float64 `json:"settle_price"` AverageOpenPrice float64 `json:"average_open_price"` Pnl24H float64 `json:"pnl_24_h"` Fee24H float64 `json:"fee_24_h"` MarkPrice float64 `json:"mark_price"` EstLiqPrice float64 `json:"est_liq_price"` Timestamp string `json:"timestamp"` }
type V3Position ¶
type V3Position struct { Symbol string `json:"symbol"` Holding float64 `json:"holding"` PendingLongQty float64 `json:"pending_long_qty"` PendingShortQty float64 `json:"pending_short_qty"` SettlePrice float64 `json:"settle_price"` AverageOpenPrice float64 `json:"average_open_price"` Pnl24H float64 `json:"pnl_24_h"` Fee24H float64 `json:"fee_24_h"` MarkPrice float64 `json:"mark_price"` EstLiqPrice float64 `json:"est_liq_price"` Timestamp float64 `json:"timestamp"` }
Source Files ¶
- private_account_info.go
- private_account_mode.go
- private_asset_history.go
- private_balances.go
- private_ip_restriction.go
- private_leverage.go
- private_order_cancel.go
- private_order_get.go
- private_order_send.go
- private_position.go
- private_subaccount.go
- private_trade.go
- private_transfer_asset.go
- public_funding_rate.go
- public_futures_info.go
- public_info.go
- public_kline.go
- public_market_trades.go
- public_orderbook.go
- public_token.go
- types.go
Click to show internal directories.
Click to hide internal directories.