Versions in this module Expand all Collapse all v1 v1.0.4 Jul 24, 2020 v1.0.3 Jun 11, 2020 Changes in this version type FuturesGetOrderResult + ClientOId string v1.0.2 May 26, 2020 v1.0.1 May 25, 2020 v1.0.0 Apr 22, 2020 Changes in this version + const ACCEPT + const ACCOUNT_CURRENCIES + const ACCOUNT_DEPOSIT_ADDRESS + const ACCOUNT_DEPOSIT_HISTORY + const ACCOUNT_DEPOSIT_HISTORY_CURRENCY + const ACCOUNT_LEDGER + const ACCOUNT_TRANSFER + const ACCOUNT_WALLET + const ACCOUNT_WALLET_CURRENCY + const ACCOUNT_WITHRAWAL + const ACCOUNT_WITHRAWAL_FEE + const ACCOUNT_WITHRAWAL_HISTORY + const ACCOUNT_WITHRAWAL_HISTORY_CURRENCY + const APPLICATION_JSON + const APPLICATION_JSON_UTF8 + const ActionDepthL2Partial + const ActionDepthL2Update + const BCH + const BTC + const BTG + const CANDLES_12HOUR + const CANDLES_15MIN + const CANDLES_1DAY + const CANDLES_1HOUR + const CANDLES_1MIN + const CANDLES_1WEEK + const CANDLES_2HOUR + const CANDLES_30MIN + const CANDLES_3MIN + const CANDLES_4HOUR + const CANDLES_5MIN + const CANDLES_6HOUR + const CLOSE_LONG + const CLOSE_SHORT + const CONTENT_TYPE + const COOKIE + const CROSS + const DELETE + const ENGLISH + const EOS + const ETC + const ETH + const FIXED + const FUTURES_ACCOUNTS + const FUTURES_ACCOUNT_CURRENCY_INFO + const FUTURES_ACCOUNT_CURRENCY_LEDGER + const FUTURES_ACCOUNT_CURRENCY_LEVERAGE + const FUTURES_ACCOUNT_INSTRUMENT_HOLDS + const FUTURES_ACCOUNT_MARGIN_MODE + const FUTURES_CURRENCIES + const FUTURES_FILLS + const FUTURES_INSTRUMENTS + const FUTURES_INSTRUMENT_BOOK + const FUTURES_INSTRUMENT_CANDLES + const FUTURES_INSTRUMENT_ESTIMATED_PRICE + const FUTURES_INSTRUMENT_INDEX + const FUTURES_INSTRUMENT_LIQUIDATION + const FUTURES_INSTRUMENT_MARK_PRICE + const FUTURES_INSTRUMENT_OPEN_INTEREST + const FUTURES_INSTRUMENT_ORDER_BATCH_CANCEL + const FUTURES_INSTRUMENT_ORDER_CANCEL + const FUTURES_INSTRUMENT_ORDER_INFO + const FUTURES_INSTRUMENT_ORDER_LIST + const FUTURES_INSTRUMENT_POSITION + const FUTURES_INSTRUMENT_PRICE_LIMIT + const FUTURES_INSTRUMENT_TICKER + const FUTURES_INSTRUMENT_TRADES + const FUTURES_ORDER + const FUTURES_ORDERS + const FUTURES_POSITION + const FUTURES_RATE + const FUTURES_TICKERS + const GET + const INDEX_CONSTITUENTS + const LOCALE + const LTC + const MARGIN_ACCOUNTS + const MARGIN_ACCOUNTS_AVAILABILITY + const MARGIN_ACCOUNTS_BORROW + const MARGIN_ACCOUNTS_BORROWED + const MARGIN_ACCOUNTS_INSTRUMENT + const MARGIN_ACCOUNTS_INSTRUMENT_AVAILABILITY + const MARGIN_ACCOUNTS_INSTRUMENT_BORROWED + const MARGIN_ACCOUNTS_INSTRUMENT_LEDGER + const MARGIN_ACCOUNTS_REPAYMENT + const MARGIN_BATCH_ORDERS + const MARGIN_CANCEL_BATCH_ORDERS + const MARGIN_CANCEL_ORDERS_BY_ID + const MARGIN_FILLS + const MARGIN_ORDERS + const MARGIN_ORDERS_BY_ID + const MARGIN_ORDERS_PENDING + const OKEX_TIME_URI + const OK_ACCESS_KEY + const OK_ACCESS_PASSPHRASE + const OK_ACCESS_SIGN + const OK_ACCESS_TIMESTAMP + const OK_FROM + const OK_LIMIT + const OK_TO + const OPEN_LONG + const OPEN_SHORT + const POST + const ResultDataJsonString + const ResultPageJsonString + const SIMPLIFIED_CHINESE + const SPOT_ACCOUNTS + const SPOT_ACCOUNTS_CURRENCY + const SPOT_ACCOUNTS_CURRENCY_LEDGER + const SPOT_BATCH_ORDERS + const SPOT_CANCEL_BATCH_ORDERS + const SPOT_CANCEL_ORDERS_BY_ID + const SPOT_FILLS + const SPOT_INSTRUMENTS + const SPOT_INSTRUMENTS_TICKER + const SPOT_INSTRUMENT_BOOK + const SPOT_INSTRUMENT_CANDLES + const SPOT_INSTRUMENT_TICKER + const SPOT_INSTRUMENT_TRADES + const SPOT_ORDERS + const SPOT_ORDERS_BY_ID + const SPOT_ORDERS_PENDING + const SWAP_ACCOUNTS + const SWAP_ACCOUNTS_HOLDS + const SWAP_ACCOUNTS_LEDGER + const SWAP_ACCOUNTS_LEVERAGE + const SWAP_ACCOUNTS_SETTINGS + const SWAP_CANCEL_BATCH_ORDERS + const SWAP_CANCEL_ORDER + const SWAP_FILLS + const SWAP_INSTRUMENTS + const SWAP_INSTRUMENTS_TICKER + const SWAP_INSTRUMENT_ACCOUNT + const SWAP_INSTRUMENT_CANDLES + const SWAP_INSTRUMENT_DEPTH + const SWAP_INSTRUMENT_FUNDING_TIME + const SWAP_INSTRUMENT_HISTORICAL_FUNDING_RATE + const SWAP_INSTRUMENT_INDEX + const SWAP_INSTRUMENT_LIQUIDATION + const SWAP_INSTRUMENT_MARK_PRICE + const SWAP_INSTRUMENT_OPEN_INTEREST + const SWAP_INSTRUMENT_ORDER_BY_ID + const SWAP_INSTRUMENT_ORDER_LIST + const SWAP_INSTRUMENT_POSITION + const SWAP_INSTRUMENT_PRICE_LIMIT + const SWAP_INSTRUMENT_TICKER + const SWAP_INSTRUMENT_TRADES + const SWAP_ORDER + const SWAP_ORDERS + const SWAP_POSITION + const SWAP_RATE + const TRADITIONAL_CHINESE + const TableFuturesAccount + const TableFuturesDepthL2Tbt + const TableFuturesOrder + const TableFuturesPosition + const TableFuturesTicker + const TableFuturesTrade + const TableSwapAccount + const TableSwapDepthL2Tbt + const TableSwapOrder + const TableSwapPosition + const TableSwapTicker + const TableSwapTrade + const XRP + var ERR_WS_CACHE_NOT_MATCH = errors.New(`ws hot cache not matched`) + var ERR_WS_SUBSCRIOTION_PARAMS = errors.New(`ws subscription parameter error`) + func BuildAPIV1Params(requestPath string, params map[string]string, config Config) string + func BuildOrderParams(params map[string]string) string + func BuildParams(requestPath string, params map[string]string) string + func EpochTime() string + func FlateUnCompress(data []byte) ([]byte, error) + func FmtPrintln(flag string, info interface{}) + func GetCurrencyUri(uri, currency string) string + func GetInstrumentIdOrdersUri(uri, instrumentId string, orderId string) string + func GetInstrumentIdUri(uri, instrumentId string) string + func GetResponseDataJsonString(response *http.Response) string + func GetResponsePageJsonString(response *http.Response) string + func GetUnderlyingUri(uri, underlying string) string + func Headers(request *http.Request, config Config, timestamp string, sign string) + func HmacSha256Base64Signer(message string, secretKey string) (string, error) + func Int2String(arg int) string + func Int642String(arg int64) string + func Int64ToString(arg int64) string + func IntToString(arg int) string + func IsoTime() string + func IsoToTime(iso string) (time.Time, error) + func JsonBytes2Struct(jsonBytes []byte, result interface{}) error + func JsonString2Struct(jsonString string, result interface{}) error + func LongTimeToUTC8(longTime int64) time.Time + func LongTimeToUTC8Format(longTime int64) string + func Md5Signer(message string) string + func NewParams() map[string]string + func ParseProxy(proxyURL string) (res func(*http.Request) (*url.URL, error), err error) + func ParseRequestParams(params interface{}) (string, *bytes.Reader, error) + func PreHashString(timestamp string, method string, requestPath string, body string) string + func StringToInt(arg string) int + func StringToInt64(arg string) int64 + func Struct2JsonString(structt interface{}) (jsonString string, err error) + func T3O(condition bool, trueValue, falseValue interface{}) interface + func T3Ox(err error, value interface{}) (interface{}, error) + type ApiMessage struct + Code int + Message string + type BaseCandleInfo []string + type BaseFillInfo struct + ExecType string + Fee string + InstrumentId string + OrderId string + OrderQty string + Price string + Side string + Timestamp string + TradeId string + type BaseHistoricalFundingRate struct + FundingRate string + FundingTime string + InstrumentId string + InterestRate string + RealizedRate string + type BaseInstrumentAmount struct + Amount string + InstrumentId string + Timestamp string + type BaseInstrumentInfo struct + Coin string + ContractVal string + Delivery string + InstrumentId string + Listing string + QuoteCurrency string + SizeIncrement string + TickSize string + UnderlyingIndex string + type BaseLedgerInfo struct + Amount string + Fee string + InstrumentId string + LedgerId string + Timestamp string + Type string + type BaseLiquidationInfo struct + CreatedAt string + InstrumentId string + Loss string + Price string + Size string + Type string + type BaseOp struct + Args []string + Op string + type BaseOrderInfo struct + ContractVal string + Fee float64 + FilledQty float64 + InstrumentId string + OrderId string + OrderType string + Price float64 + PriceAvg float64 + Size int64 + State int + Status string + Timestamp string + Type float64 + type BasePlaceOrderInfo struct + ClientOid string + MatchPrice string + OrderType string + Price string + Size string + Type string + type BaseSwapOrderResult struct + ClientOid string + ErrorCode string + ErrorMessage string + OrderId string + Result string + type BaseTickerInfo struct + High24h string + InstrumentId string + Last string + Low24h string + Timestamp string + Volume24h string + type BaseTradeInfo struct + Price string + Side string + Size string + Timestamp string + TradeId string + type BizWarmTips struct + Code int + Message string + Msg string + type Client struct + Config Config + HttpClient *http.Client + func NewClient(config Config) *Client + func NewTestClient() *Client + func (client *Client) BatchCancelFuturesInstrumentOrders(InstrumentId, orderIds string) ([]byte, FuturesBatchCancelInstrumentOrdersResult, error) + func (client *Client) CancelFuturesInstrumentOrder(InstrumentId string, orderId string) ([]byte, FuturesCancelInstrumentOrderResult, error) + func (client *Client) FuturesOrder(newOrderParams FuturesNewOrderParams) ([]byte, FuturesNewOrderResult, error) + func (client *Client) FuturesOrders(batchNewOrder FuturesBatchNewOrderParams) ([]byte, FuturesBatchNewOrderResult, error) + func (client *Client) GetAccountCurrencies() (*[]map[string]interface{}, error) + func (client *Client) GetAccountDepositAddress(currency string) (*[]map[string]interface{}, error) + func (client *Client) GetAccountDepositHistory() (*[]map[string]interface{}, error) + func (client *Client) GetAccountDepositHistoryByCurrency(currency string) (*[]map[string]interface{}, error) + func (client *Client) GetAccountLeger(optionalParams *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetAccountWallet() (*[]map[string]interface{}, error) + func (client *Client) GetAccountWalletByCurrency(currency string) (*[]map[string]interface{}, error) + func (client *Client) GetAccountWithdrawalFeeByCurrency(currency *string) (*[]map[string]interface{}, error) + func (client *Client) GetAccountWithdrawalHistory() (*[]map[string]interface{}, error) + func (client *Client) GetAccountWithdrawalHistoryByCurrency(currency string) (*[]map[string]interface{}, error) + func (client *Client) GetFinancialRates() (FinancialRatesResult, error) + func (client *Client) GetFuturesAccounts() (GetFuturesAccountsResult, error) + func (client *Client) GetFuturesAccountsByCurrency(currency string) (result FuturesCurrencyAccount, err error) + func (client *Client) GetFuturesAccountsHoldsByInstrumentId(InstrumentId string) (FuturesAccountsHolds, error) + func (client *Client) GetFuturesAccountsLedgerByCurrency(currency string, from, to, limit int) ([]FuturesCurrencyLedger, error) + func (client *Client) GetFuturesAccountsLeverage(currency string) (map[string]interface{}, error) + func (client *Client) GetFuturesExchangeRate() (ExchangeRate, error) + func (client *Client) GetFuturesFills(InstrumentId string, orderId int64, optionalParams map[string]int) ([]FuturesFillResult, error) + func (client *Client) GetFuturesInstrumentAllTicker() ([]FuturesInstrumentTickerResult, error) + func (client *Client) GetFuturesInstrumentBook(InstrumentId string, optionalParams map[string]string) (FuturesInstrumentBookResult, error) + func (client *Client) GetFuturesInstrumentCandles(InstrumentId string, optionalParams map[string]string) ([][]string, error) + func (client *Client) GetFuturesInstrumentCurrencies() ([]FuturesInstrumentCurrenciesResult, error) + func (client *Client) GetFuturesInstrumentEstimatedPrice(InstrumentId string) (FuturesInstrumentEstimatedPriceResult, error) + func (client *Client) GetFuturesInstrumentIndex(InstrumentId string) (FuturesInstrumentIndexResult, error) + func (client *Client) GetFuturesInstrumentLiquidation(InstrumentId string, status, from, to, limit int) (FuturesInstrumentLiquidationListResult, error) + func (client *Client) GetFuturesInstrumentOpenInterest(InstrumentId string) (FuturesInstrumentOpenInterestResult, error) + func (client *Client) GetFuturesInstrumentPosition(InstrumentId string) (FuturesPosition, error) + func (client *Client) GetFuturesInstrumentPriceLimit(InstrumentId string) (FuturesInstrumentPriceLimitResult, error) + func (client *Client) GetFuturesInstrumentTicker(InstrumentId string) (FuturesInstrumentTickerResult, error) + func (client *Client) GetFuturesInstrumentTrades(InstrumentId string) ([]FuturesInstrumentTradesResult, error) + func (client *Client) GetFuturesInstruments() ([]FuturesInstrumentsResult, error) + func (client *Client) GetFuturesOrder(InstrumentId string, orderId string) (FuturesGetOrderResult, error) + func (client *Client) GetFuturesOrders(InstrumentId string, status int, after string, before string, limit int) (FuturesGetOrdersResult, error) + func (client *Client) GetFuturesPositions() (FuturesPosition, error) + func (client *Client) GetIndexConstituents(instrumentID string) (IndexConstituentsResult, error) + func (client *Client) GetInstrumentMarkPrice(instrumentId string) (*FuturesMarkdown, error) + func (client *Client) GetMarginAccounts() (GetMarginAccountsResult, error) + func (client *Client) GetMarginAccountsAvailability() (*[]map[string]interface{}, error) + func (client *Client) GetMarginAccountsAvailabilityByInstrumentId(instrumentId string) (GetMarginAccountsAvailabilityByInstrumentIdResult, error) + func (client *Client) GetMarginAccountsBorrowed(optionalParams *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetMarginAccountsBorrowedByInstrumentId(instrumentId string, optionalParams *map[string]string) (GetMarginAccountsBorrowedByInstrumentIdResult, error) + func (client *Client) GetMarginAccountsByInstrument(instrumentId string) (GetMarginAccountsByInstrumentResult, error) + func (client *Client) GetMarginAccountsLegerByInstrument(instrumentId string, optionalParams *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetMarginFills(instrumentId, orderId string, optionalParams map[string]string) ([]FillItem, error) + func (client *Client) GetMarginOrders(instrumentId string, optionalParams map[string]string) ([]map[string]interface{}, error) + func (client *Client) GetMarginOrdersById(instrumentId, orderOrClientId string) (MarginGetOrderResult, error) + func (client *Client) GetMarginOrdersPending(optionalParams map[string]string) ([]map[string]interface{}, error) + func (client *Client) GetServerTime() (ServerTime, error) + func (client *Client) GetSpotAccounts() (GetSpotAccountsResult, error) + func (client *Client) GetSpotAccountsCurrency(currency string) (GetSpotAccountsCurrencyResult, error) + func (client *Client) GetSpotAccountsCurrencyLeger(currency string, optionalParams *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetSpotFills(order_id, instrument_id string, options *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetSpotInstrumentBook(instrumentId string, optionalParams map[string]string) (SpotInstrumentBookResult, error) + func (client *Client) GetSpotInstrumentCandles(instrumentID string, options *map[string]string) ([]byte, *[]interface{}, error) + func (client *Client) GetSpotInstrumentTicker(instrument_id string) (*map[string]interface{}, error) + func (client *Client) GetSpotInstrumentTrade(instrument_id string, options *map[string]string) ([]byte, *[]map[string]interface{}, error) + func (client *Client) GetSpotInstruments() (*[]map[string]interface{}, error) + func (client *Client) GetSpotInstrumentsTicker() (*[]map[string]interface{}, error) + func (client *Client) GetSpotOrders(status, instrument_id string, options *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetSpotOrdersById(instrumentId, orderOrClientId string) (SpotGetOrderResult, error) + func (client *Client) GetSpotOrdersPending(options *map[string]string) (*[]map[string]interface{}, error) + func (client *Client) GetSwapAccount(instrumentId string) (SwapAccount, error) + func (client *Client) GetSwapAccountLedger(instrumentId string, optionalParams map[string]string) (*SwapAccountsLedgerList, error) + func (client *Client) GetSwapAccounts() (SwapAccounts, error) + func (client *Client) GetSwapAccountsHoldsByInstrument(instrumentId string) (*SwapAccountHolds, error) + func (client *Client) GetSwapAccountsSettingsByInstrument(instrumentId string) (SwapAccountsSetting, error) + func (client *Client) GetSwapCandlesByInstrument(instrumentId string, optionalParams map[string]string) (*SwapCandleList, error) + func (client *Client) GetSwapDepthByInstrumentId(instrumentId string, optionalParams map[string]string) (SwapInstrumentDepth, error) + func (client *Client) GetSwapFills(instrumentId string, orderId string, options map[string]string) (interface{}, error) + func (client *Client) GetSwapFundingTimeByInstrument(instrumentId string) (*SwapFundingTime, error) + func (client *Client) GetSwapHistoricalFundingRateByInstrument(instrumentId string, optionalParams map[string]string) (*SwapHistoricalFundingRateList, error) + func (client *Client) GetSwapIndexByInstrument(instrumentId string) (*SwapIndexInfo, error) + func (client *Client) GetSwapInstruments() (SwapInstrumentList, error) + func (client *Client) GetSwapInstrumentsTicker() (*SwapTickerList, error) + func (client *Client) GetSwapLiquidationByInstrument(instrumentId string, status string, optionalParams map[string]string) (*SwapLiquidationList, error) + func (client *Client) GetSwapMarkPriceByInstrument(instrumentId string) (*SwapMarkPrice, error) + func (client *Client) GetSwapOpenInterestByInstrument(instrumentId string) (*SwapOpenInterest, error) + func (client *Client) GetSwapOrderById(instrumentId, orderOrClientId string) (BaseOrderInfo, error) + func (client *Client) GetSwapOrderByInstrumentId(instrumentId string, paramMap map[string]string) (*SwapOrdersInfo, error) + func (client *Client) GetSwapOrderByOrderId(instrumentId string, orderId string) (BaseOrderInfo, error) + func (client *Client) GetSwapPositionByInstrument(instrumentId string) (SwapPosition, error) + func (client *Client) GetSwapPositions() (*SwapPositionList, error) + func (client *Client) GetSwapPriceLimitByInstrument(instrumentId string) (*SwapPriceLimit, error) + func (client *Client) GetSwapRate() (*SwapRate, error) + func (client *Client) GetSwapTickerByInstrument(instrumentId string) (*BaseTickerInfo, error) + func (client *Client) GetSwapTradesByInstrument(instrumentId string, optionalParams map[string]string) (*SwapTradeList, error) + func (client *Client) PostAccountTransfer(currency string, from, to int32, amount float32, ...) ([]byte, *map[string]interface{}, error) + func (client *Client) PostAccountWithdrawal(currency, to_address, trade_pwd string, destination int32, amount, fee float32) ([]byte, *map[string]interface{}, error) + func (client *Client) PostFuturesAccountsLeverage(currency string, leverage int, optionalParams map[string]string) (map[string]interface{}, error) + func (client *Client) PostFuturesAccountsMarginNode(underlying string, marginMode string) (map[string]interface{}, error) + func (client *Client) PostMarginAccountsBorrow(instrumentId, currency, amount string) ([]byte, PostMarginAccountsBorrowResult, error) + func (client *Client) PostMarginAccountsRepayment(instrumentId, currency, amount string, optionalBorrowId *string) ([]byte, PostMarginAccountsRepaymentResult, error) + func (client *Client) PostMarginBatchOrders(orderInfos *[]map[string]string) ([]byte, *map[string]interface{}, error) + func (client *Client) PostMarginCancelBatchOrders(orderInfos *[]map[string]string) ([]byte, *map[string]interface{}, error) + func (client *Client) PostMarginCancelOrdersById(instrumentId, orderOrClientId string) ([]byte, MarginNewOrderResult, error) + func (client *Client) PostMarginOrders(side, instrument_id string, optionalOrderInfo map[string]string) ([]byte, MarginNewOrderResult, error) + func (client *Client) PostSpotBatchOrders(orderInfos *[]map[string]string) ([]byte, *map[string]interface{}, error) + func (client *Client) PostSpotCancelBatchOrders(orderInfos *[]map[string]interface{}) ([]byte, *map[string]interface{}, error) + func (client *Client) PostSpotCancelOrders(instrumentId, orderOrClientId string) ([]byte, *map[string]interface{}, error) + func (client *Client) PostSpotOrders(side, instrumentID string, optionalOrderInfo *map[string]string) (respBody []byte, result SpotNewOrderResult, err error) + func (client *Client) PostSwapAccountsLeverage(instrumentId string, leverage string, side string) ([]byte, SwapAccountsSetting, error) + func (client *Client) PostSwapBatchCancelOrders(instrumentId string, orderIds []string) ([]byte, *SwapCancelOrderResult, error) + func (client *Client) PostSwapCancelOrder(instrumentId string, orderId string) ([]byte, SwapCancelOrderResult, error) + func (client *Client) PostSwapOrder(instrumentId string, order BasePlaceOrderInfo) ([]byte, SwapOrderResult, error) + func (client *Client) PostSwapOrders(instrumentId string, orders []*BasePlaceOrderInfo) ([]byte, *SwapOrdersResult, error) + func (client *Client) Request(method string, requestPath string, params, result interface{}) (respBody []byte, response *http.Response, err error) + type ClosePositionData struct + InstrumentId string + LeverRate string + Type string + type ClosePositionInfo struct + InstrumentId string + type CodeMessage struct + ErrorCode int64 + ErrorMessage string + type Config struct + ApiKey string + Endpoint string + HTTPClient *http.Client + I18n string + IsPrint bool + Passphrase string + ProxyURL string + SecretKey string + TimeoutSecond int + WSEndpoint string + func GetDefaultConfig() *Config + type Constituent struct + Exchange string + OriginalPrice float64 + Symbol string + UsdPrice float64 + Weight float64 + type CursorPage struct + After int + Before int + Limit int + type DepthOrderBook struct + func NewDepthOrderBook(instrumentID string) *DepthOrderBook + func (d *DepthOrderBook) GetInstrumentID() string + func (d *DepthOrderBook) GetOrderBook(depth int) (result OrderBook) + func (d *DepthOrderBook) Update(action string, data *WSDepthL2Tbt) + type ExchangeRate struct + InstrumentId string + Rate float64 + Timestamp string + type FillItem struct + CreatedAt string + ExecType string + Fee float64 + InstrumentID string + LedgerID string + Liquidity string + OrderID string + Price string + ProductID string + Side string + Size float64 + Timestamp string + type FinancialRate struct + ID int + Rate string + Symbol string + type FinancialRates struct + Date int64 + Rates []FinancialRate + type FinancialRatesResult struct + Code int + Data FinancialRates + DetailMsg string + Msg string + type FuturesAccount struct + CrossAccount map[string]FuturesCrossAccount + FixedAccount map[string]FuturesFixedAccount + MarginMode string + type FuturesAccountsContract struct + AutoMargin string + AvailableQty string + CanWithdraw string + Equity string + FixedBalance string + InstrumentID string + MaintMarginRatio string + MarginForUnfilled string + MarginFrozen string + MarginMode string + MarginRatio string + RealizedPnl string + TotalAvailBalance float64 + Underlying string + UnrealizedPnl string + type FuturesAccountsHolds struct + Amount float64 + InstrumentId string + Timestamp string + type FuturesBatchCancelInstrumentOrdersResult struct + InstrumentId string + OrderIds []string + type FuturesBatchNewOrderItem struct + ClientOid string + MatchPrice string + OrderType string + Price string + Size string + Type string + type FuturesBatchNewOrderParams struct + InstrumentId string + Leverage string + OrdersData string + type FuturesBatchNewOrderResult struct + OrderInfo []OrderInfo + type FuturesCancelInstrumentOrderResult struct + ClientOid string + ErrorCode int + ErrorMessage string + InstrumentId string + OrderId string + type FuturesClosePositionParams struct + ClosePositionData []ClosePositionData + type FuturesClosePositionResult struct + ClosePositionInfo []ClosePositionInfo + type FuturesCrossAccount struct + Equity float64 + Margin float64 + MarginMode string + MarginRatio float64 + RealizedPnl float64 + TotalAvailBalance float64 + UnrealizedPnl float64 + type FuturesCrossAccountInfo struct + Info map[string]FuturesCrossAccount + type FuturesCrossPosition struct + CrossPosition []FuturesCrossPositionHolding + MarginMode string + type FuturesCrossPositionHolding struct + Leverage float64 + LiquidationPrice float64 + type FuturesCurrencyAccount struct + AutoMargin int + CanWithdraw float64 + Contracts []FuturesFixedAccountContracts + Equity float64 + LiquiMode string + Margin float64 + MarginMode string + RealizedPnl float64 + TotalAvailBalance float64 + UnRealizedPnl float64 + type FuturesCurrencyAccountV0 struct + CrossAccount FuturesCrossAccount + FixedAccount FuturesFixedAccount + MarginMode string + type FuturesCurrencyLedger struct + Amount float64 + Balance float64 + Currency string + Details FuturesCurrencyLedgerDetails + LedgerId int64 + Timestamp string + Type string + type FuturesCurrencyLedgerDetails struct + InstrumentId string + OrderId string + type FuturesFillResult struct + CreatedAt string + ExecType string + Fee float64 + InstrumentId string + OrderId string + OrderQty float64 + Price float64 + Side string + TradeId int64 + type FuturesFillsParams struct + InstrumentId string + OrderId string + type FuturesFixedAccount struct + Contracts []FuturesFixedAccountContracts + Equity float64 + MarginMode string + TotalAvailBalance float64 + type FuturesFixedAccountContracts struct + AvailableQty float64 + FixedBalance float64 + InstrumentId string + MarginFixed float64 + MarginForUnfilled float64 + MarginFrozen float64 + RealizedPnl float64 + UnrealizedPnl float64 + type FuturesFixedAccountInfo struct + Info map[string]FuturesFixedAccount + type FuturesFixedPosition struct + FixedPosition []FuturesFixedPositionHolding + MarginMode string + type FuturesFixedPositionHolding struct + LongLeverage float64 + LongLiquiPrice float64 + LongMargin float64 + LongPnlRatio float64 + ShortLeverage float64 + ShortLiquiPrice float64 + ShortMargin float64 + ShortPnlRatio float64 + type FuturesGetOrderResult struct + ContractVal float64 + Fee float64 + FilledQty float64 + InstrumentId string + Leverage float64 + OrderId string + OrderType int + Price float64 + PriceAvg float64 + Size int64 + State int + Status string + Timestamp string + Type int + type FuturesGetOrdersResult struct + Orders []FuturesGetOrderResult + type FuturesInstrumentBookResult struct + Asks [][]string + Bids [][]string + Timestamp string + type FuturesInstrumentCurrenciesResult struct + Id int64 + MinSize float64 + Name string + type FuturesInstrumentEstimatedPriceResult struct + InstrumentId string + SettlementPrice float64 + Timestamp string + type FuturesInstrumentIndexResult struct + Index float64 + InstrumentId string + Timestamp string + type FuturesInstrumentLiquidationListResult struct + LiquidationList []FuturesInstrumentLiquidationResult + Page PageResult + type FuturesInstrumentLiquidationResult struct + CreatedAt string + InstrumentId string + Loss float64 + Price float64 + Size int64 + type FuturesInstrumentOpenInterestResult struct + Amount int64 + InstrumentId string + Timestamp string + type FuturesInstrumentPriceLimitResult struct + Highest float64 + InstrumentId string + Lowest float64 + Timestamp string + type FuturesInstrumentTickerResult struct + BestAsk float64 + BestBid float64 + High24h float64 + InstrumentId string + Last float64 + Low24h float64 + Timestamp string + Volume24h float64 + type FuturesInstrumentTradesResult struct + Price float64 + Qty float64 + Side string + Timestamp string + TradeId string + type FuturesInstrumentsResult struct + Alias string + BaseCurrency string + ContractVal float64 + ContractValCurrency string + Delivery string + InstrumentId string + IsInverse bool + Listing string + QuoteCurrency string + SettlementCurrency string + TickSize float64 + TradeIncrement float64 + Underlying string + UnderlyingIndex string + type FuturesMarkdown struct + InstrumentId string + MarkPrice float32 + Timestamp string + type FuturesNewOrderParams struct + InstrumentId string + Leverage string + type FuturesNewOrderResult struct + ClientOid string + OrderId string + type FuturesOrdersParams struct + Currency string + Status int + type FuturesPosition struct + CrossPosition []FuturesCrossPositionHolding + FixedPosition []FuturesFixedPositionHolding + MarginMode string + type FuturesPositionBase struct + CreatedAt string + InstrumentId string + LongAvailQty float64 + LongAvgCost float64 + LongQty float64 + LongSettlementPrice float64 + RealizedPnl float64 + ShortAvailQty float64 + ShortAvgCost float64 + ShortQty float64 + ShortSettlementPrice float64 + UpdatedAt string + type FuturesUsersSelfTrailingVolumeResult struct + ExchangeVolume float64 + InstrumentId string + RecordedAt string + Volume float64 + type FuturesUsersSelfTrailingVolumesResult struct + FuturesUsersSelfTrailingVolumeResult []FuturesUsersSelfTrailingVolumeResult + type FuturesWS struct + func NewFuturesWS(wsURL string, accessKey string, secretKey string, passphrase string, ...) *FuturesWS + func (ws *FuturesWS) Login() error + func (ws *FuturesWS) SetAccountCallback(callback func(accounts []WSAccount)) + func (ws *FuturesWS) SetDepth20SnapshotCallback(callback func(ob *OrderBook)) + func (ws *FuturesWS) SetDepthL2TbtCallback(callback func(action string, data []WSDepthL2Tbt)) + func (ws *FuturesWS) SetOrderCallback(callback func(orders []WSOrder)) + func (ws *FuturesWS) SetPositionCallback(callback func(positions []WSFuturesPosition)) + func (ws *FuturesWS) SetProxy(proxyURL string) (err error) + func (ws *FuturesWS) SetTickerCallback(callback func(tickers []WSTicker)) + func (ws *FuturesWS) SetTradeCallback(callback func(trades []WSTrade)) + func (ws *FuturesWS) Start() + func (ws *FuturesWS) Subscribe(id string, args []string) error + func (ws *FuturesWS) SubscribeAccount(id string, symbol string) error + func (ws *FuturesWS) SubscribeDepthL2Tbt(id string, symbol string) error + func (ws *FuturesWS) SubscribeOrder(id string, symbol string) error + func (ws *FuturesWS) SubscribePosition(id string, symbol string) error + func (ws *FuturesWS) SubscribeTicker(id string, symbol string) error + func (ws *FuturesWS) SubscribeTrade(id string, symbol string) error + func (ws *FuturesWS) Unsubscribe(id string) error + type GetFuturesAccountsResult struct + Info struct{ ... } + type GetMarginAccountsAvailabilityByInstrumentIdItem struct + Available float64 + Leverage float64 + LeverageRatio float64 + Rate float64 + type GetMarginAccountsAvailabilityByInstrumentIdResult []struct + type GetMarginAccountsBorrowedByInstrumentIdItem struct + Amount float64 + BorrowID string + CreatedAt time.Time + Currency string + ForceRepayTime time.Time + InstrumentID string + Interest float64 + LastInterestTime time.Time + PaidInterest float64 + ProductID string + Rate float64 + RepayAmount float64 + RepayInterest float64 + ReturnedAmount float64 + Timestamp time.Time + type GetMarginAccountsBorrowedByInstrumentIdResult []GetMarginAccountsBorrowedByInstrumentIdItem + type GetMarginAccountsByInstrumentItem struct + Available float64 + Balance float64 + Borrowed float64 + CanWithdraw float64 + Frozen float64 + Hold float64 + Holds float64 + LendingFee float64 + type GetMarginAccountsByInstrumentResult struct + CurrencyBCH GetMarginAccountsByInstrumentItem + CurrencyBTC GetMarginAccountsByInstrumentItem + CurrencyEOS GetMarginAccountsByInstrumentItem + CurrencyETC GetMarginAccountsByInstrumentItem + CurrencyETH GetMarginAccountsByInstrumentItem + CurrencyLTC GetMarginAccountsByInstrumentItem + CurrencyUSDT GetMarginAccountsByInstrumentItem + CurrencyXRP GetMarginAccountsByInstrumentItem + LiquidationPrice float64 + MarginRatio string + RiskRate string + type GetMarginAccountsItem struct + CurrencyBCH MarginCurrency + CurrencyBSV MarginCurrency + CurrencyBTC MarginCurrency + CurrencyDASH MarginCurrency + CurrencyEOS MarginCurrency + CurrencyETC MarginCurrency + CurrencyETH MarginCurrency + CurrencyIOST MarginCurrency + CurrencyLTC MarginCurrency + CurrencyNEO MarginCurrency + CurrencyQTUM MarginCurrency + CurrencyTRX MarginCurrency + CurrencyUSDT MarginCurrency + CurrencyXRP MarginCurrency + InstrumentID string + LiquidationPrice string + MarginRatio string + ProductID string + RiskRate string + type GetMarginAccountsResult []GetMarginAccountsItem + type GetSpotAccountsCurrencyResult struct + Available string + Balance string + Currency string + Frozen string + Hold string + Holds string + ID string + type GetSpotAccountsResult []GetSpotAccountsResultItem + type GetSpotAccountsResultItem struct + Available float64 + Balance float64 + Currency string + Frozen string + Hold string + Holds string + ID string + type IndexConstituents struct + Constituents []Constituent + InstrumentID string + Last string + Timestamp time.Time + type IndexConstituentsResult struct + Code int + Data IndexConstituents + DetailMsg string + Msg string + type Item struct + Amount float64 + Price float64 + func (e Item) ExtractKey() float64 + func (e Item) String() string + type MarginCurrency struct + Available string + Balance string + Borrowed string + CanWithdraw string + Frozen string + Hold string + Holds string + LendingFee string + type MarginGetOrderResult struct + ClientOid string + CreatedAt time.Time + FilledNotional sjson.Number + FilledSize sjson.Number + Funds string + InstrumentID string + Notional string + OrderID string + OrderType sjson.Number + Price sjson.Number + PriceAvg sjson.Number + ProductID string + Side string + Size sjson.Number + State sjson.Number + Status string + Timestamp time.Time + Type string + func (r *MarginGetOrderResult) GetState() int64 + type MarginNewOrderResult struct + ClientOid string + ErrorCode string + ErrorMessage string + OrderID string + Result bool + type OrderBook struct + Asks []Item + Bids []Item + InstrumentID string + type OrderInfo struct + ClientOid string + OrderId string + type PageResult struct + From int + Limit int + To int + type PlaceOrderInfo struct + InstrumentId string + type PlaceOrdersInfo struct + InstrumentId string + OrderData []*BasePlaceOrderInfo + type PostMarginAccountsBorrowResult struct + BorrowID string + ClientOid string + Result bool + type PostMarginAccountsRepaymentResult struct + ClientOid string + RepaymentID string + Result bool + type ReceivedDataCallback func(interface{}) error + type Result struct + Result bool + type ServerTime struct + Epoch string + Iso string + type SpotGetOrderResult struct + ClientOid string + CreatedAt time.Time + FilledNotional float64 + FilledSize float64 + Funds string + InstrumentID string + Notional string + OrderID string + OrderType string + Price string + ProductID string + Side string + Size string + State int + Status string + Timestamp time.Time + Type string + type SpotInstrumentBookResult struct + Asks [][]string + Bids [][]string + Timestamp string + type SpotNewOrderResult struct + ClientOid string + ErrorCode string + ErrorMessage string + OrderID string + Result bool + type SubscriptionTopic struct + func (st *SubscriptionTopic) ToString() (topic string, err error) + type SwapAccount struct + Info SwapAccountInfo + type SwapAccountHolds BaseInstrumentAmount + type SwapAccountInfo struct + Equity string + FixedBalance string + InstrumentId string + Margin string + MarginFrozen string + MarginMode string + MarginRatio string + RealizedPnl string + Timestamp string + TotalAvailBalance string + UnrealizedPnl string + type SwapAccounts struct + Info []SwapAccountInfo + type SwapAccountsLedgerList []BaseLedgerInfo + type SwapAccountsSetting struct + InstrumentId string + LongLeverage string + MarginMode string + ShortLeverage string + type SwapBatchCancelOrderResult struct + Ids []string + InstrumentId string + Result string + type SwapCancelOrderResult struct + ErrorCode string + ErrorMessage string + OrderId string + Result string + type SwapCandleList []BaseCandleInfo + type SwapFillsInfo []BaseFillInfo + type SwapFundingTime struct + FundingTime string + InstrumentId string + type SwapHistoricalFundingRateList []BaseHistoricalFundingRate + type SwapIndexInfo struct + Index string + InstrumentId string + Timestamp string + type SwapInstrumentDepth struct + Asks [][]string + Bids [][]string + Time string + Timestamp string + type SwapInstrumentList []BaseInstrumentInfo + type SwapLiquidationList []BaseLiquidationInfo + type SwapMarkPrice struct + InstrumentId string + MarkPrice string + Timestamp string + type SwapOpenInterest BaseInstrumentAmount + type SwapOrderResult struct + type SwapOrdersInfo struct + OrderInfo []BaseOrderInfo + type SwapOrdersResult struct + OrderInfo []BaseSwapOrderResult + type SwapPosition struct + Holding []SwapPositionHolding + MarginMode string + type SwapPositionHolding struct + AvailPosition string + AvgCost string + InstrumentId string + Leverage string + LiquidationPrice string + Margin string + Position string + RealizedPnl string + SettlementPrice string + Side string + Timestamp string + type SwapPositionList []SwapPosition + type SwapPriceLimit struct + Highest string + InstrumentId string + Lowest string + Timestamp string + type SwapRate struct + InstrumentId string + Rate string + Timestamp string + type SwapTickerList []BaseTickerInfo + type SwapTradeList []BaseTradeInfo + type SwapWS struct + func NewSwapWS(wsURL string, accessKey string, secretKey string, passphrase string, ...) *SwapWS + func (ws *SwapWS) Login() error + func (ws *SwapWS) SetAccountCallback(callback func(accounts []WSAccount)) + func (ws *SwapWS) SetDepth20SnapshotCallback(callback func(ob *OrderBook)) + func (ws *SwapWS) SetDepthL2TbtCallback(callback func(action string, data []WSDepthL2Tbt)) + func (ws *SwapWS) SetOrderCallback(callback func(orders []WSOrder)) + func (ws *SwapWS) SetPositionCallback(callback func(position []WSSwapPositionData)) + func (ws *SwapWS) SetProxy(proxyURL string) (err error) + func (ws *SwapWS) SetTickerCallback(callback func(tickers []WSTicker)) + func (ws *SwapWS) SetTradeCallback(callback func(trades []WSTrade)) + func (ws *SwapWS) Start() + func (ws *SwapWS) Subscribe(id string, args []string) error + func (ws *SwapWS) SubscribeAccount(id string, symbol string) error + func (ws *SwapWS) SubscribeDepthL2Tbt(id string, symbol string) error + func (ws *SwapWS) SubscribeOrder(id string, symbol string) error + func (ws *SwapWS) SubscribePosition(id string, symbol string) error + func (ws *SwapWS) SubscribeTicker(id string, symbol string) error + func (ws *SwapWS) SubscribeTrade(id string, symbol string) error + func (ws *SwapWS) Unsubscribe(id string) error + type WSAccount struct + Available string + CanWithdraw string + Currency string + Equity string + LiquiMode string + MaintMarginRatio string + Margin string + MarginForUnfilled string + MarginFrozen string + MarginMode string + MarginRatio string + OpenMax string + RealizedPnl string + Timestamp time.Time + TotalAvailBalance string + Underlying string + UnrealizedPnl string + type WSAccountData struct + BCH *WSAccount + BSV *WSAccount + BTC *WSAccount + EOS *WSAccount + ETC *WSAccount + ETH *WSAccount + LTC *WSAccount + TRX *WSAccount + XRP *WSAccount + type WSAccountResult struct + Data []WSAccountData + Table string + type WSDepthItem struct + Asks [][4]interface{} + Bids [][4]interface{} + Checksum int32 + InstrumentId string + Timestamp string + type WSDepthL2Tbt struct + Asks [][]string + Bids [][]string + Checksum int + InstrumentID string + Timestamp time.Time + type WSDepthL2TbtResult struct + Action string + Data []WSDepthL2Tbt + Table string + type WSDepthTableResponse struct + Action string + Data []WSDepthItem + Table string + func (r *WSDepthTableResponse) Valid() bool + type WSErrorResponse struct + ErrorCode int + Event string + Message string + func (r *WSErrorResponse) Valid() bool + type WSEventResponse struct + Channel string + Event string + Success string + func (r *WSEventResponse) Valid() bool + type WSFuturesPosition struct + CreatedAt time.Time + InstrumentID string + Last string + LongAvailQty string + LongAvgCost string + LongLeverage string + LongLiquiPrice string + LongMaintMarginRatio string + LongMargin string + LongMarginRatio string + LongOpenOutstanding string + LongPnl string + LongPnlRatio string + LongQty string + LongSettledPnl string + LongSettlementPrice string + LongUnrealisedPnl string + MarginMode string + RealisedPnl string + ShortAvailQty string + ShortAvgCost string + ShortLeverage string + ShortLiquiPrice string + ShortMaintMarginRatio string + ShortMargin string + ShortMarginRatio string + ShortOpenOutstanding string + ShortPnl string + ShortPnlRatio string + ShortQty string + ShortSettledPnl string + ShortSettlementPrice string + ShortUnrealisedPnl string + Timestamp time.Time + UpdatedAt time.Time + type WSFuturesPositionResult struct + Data []WSFuturesPosition + Table string + type WSHotDepths struct + DepthMap map[string]*WSDepthItem + Table string + func NewWSHotDepths(tb string) *WSHotDepths + type WSOrder struct + ClientOid string + ContractVal string + ErrorCode string + Fee string + FilledQty string + InstrumentID string + LastFillID string + LastFillPx string + LastFillQty string + LastFillTime time.Time + Leverage string + OrderID string + OrderType string + Pnl string + Price string + PriceAvg string + Size string + State string + Status string + Timestamp time.Time + Type string + type WSOrderResult struct + Data []WSOrder + Table string + type WSSwapPositionData struct + Holding []WSSwapPositionHolding + InstrumentID string + MarginMode string + Timestamp time.Time + type WSSwapPositionHolding struct + AvailPosition string + AvgCost string + Last string + Leverage string + LiquidationPrice string + MaintMarginRatio string + Margin string + Position string + RealizedPnl string + SettledPnl string + SettlementPrice string + Side string + Timestamp time.Time + type WSSwapPositionResult struct + Data []WSSwapPositionData + Table string + type WSTableResponse struct + Action string + Data []interface{} + Table string + func (r *WSTableResponse) Valid() bool + type WSTicker struct + BestAsk string + BestAskSize string + BestBid string + BestBidSize string + High24H string + InstrumentID string + Last string + LastQty string + Low24H string + Open24H string + OpenInterest string + Timestamp time.Time + Volume24H string + VolumeToken24H string + type WSTickerResult struct + Data []WSTicker + Table string + type WSTrade struct + InstrumentID string + Price string + Qty string + Side string + Timestamp time.Time + TradeID string + type WSTradeResult struct + Data []WSTrade + Table string