Documentation ¶
Index ¶
- Constants
- type OKEX
- func (o *OKEX) CancelETTOrder(orderID string) (resp okgroup.PlaceETTOrderResponse, _ error)
- func (o *OKEX) CancelFuturesOrder(request okgroup.CancelFuturesOrderRequest) (resp okgroup.CancelFuturesOrderResponse, _ error)
- func (o *OKEX) CancelFuturesOrderBatch(request okgroup.CancelMultipleSpotOrdersRequest) (resp okgroup.CancelMultipleSpotOrdersResponse, _ error)
- func (o *OKEX) CancelMultipleSwapOrders(request okgroup.CancelMultipleSwapOrdersRequest) (resp okgroup.CancelMultipleSwapOrdersResponse, _ error)
- func (o *OKEX) CancelSwapOrder(request okgroup.CancelSwapOrderRequest) (resp okgroup.CancelSwapOrderResponse, _ error)
- func (o *OKEX) GetAllFuturesTokenInfo() (resp []okgroup.GetFuturesTokenInfoResponse, _ error)
- func (o *OKEX) GetAllSwapTokensInformation() (resp []okgroup.GetAllSwapTokensInformationResponse, _ error)
- func (o *OKEX) GetETT() (resp []okgroup.GetETTResponse, _ error)
- func (o *OKEX) GetETTAccountInformationForCurrency(currency string) (resp okgroup.GetETTResponse, _ error)
- func (o *OKEX) GetETTBillsDetails(currency string) (resp []okgroup.GetETTBillsDetailsResponse, _ error)
- func (o *OKEX) GetETTConstituents(ett string) (resp okgroup.GetETTConstituentsResponse, _ error)
- func (o *OKEX) GetETTOrderDetails(orderID string) (resp okgroup.GetETTOrderListResponse, _ error)
- func (o *OKEX) GetETTOrderList(request okgroup.GetETTOrderListRequest) (resp []okgroup.GetETTOrderListResponse, _ error)
- func (o *OKEX) GetETTSettlementPriceHistory(ett string) (resp []okgroup.GetETTSettlementPriceHistoryResponse, _ error)
- func (o *OKEX) GetFuturesAccountOfACurrency(instrumentID string) (resp okgroup.FuturesCurrencyData, _ error)
- func (o *OKEX) GetFuturesAccountOfAllCurrencies() (resp okgroup.FuturesAccountForAllCurrenciesResponse, _ error)
- func (o *OKEX) GetFuturesBillDetails(request okgroup.GetSpotBillDetailsForCurrencyRequest) (resp []okgroup.GetSpotBillDetailsForCurrencyResponse, _ error)
- func (o *OKEX) GetFuturesContractInformation() (resp []okgroup.GetFuturesContractInformationResponse, _ error)
- func (o *OKEX) GetFuturesCurrentMarkPrice(instrumentID string) (resp okgroup.GetFuturesCurrentMarkPriceResponse, _ error)
- func (o *OKEX) GetFuturesCurrentPriceLimit(instrumentID string) (resp okgroup.GetFuturesCurrentPriceLimitResponse, _ error)
- func (o *OKEX) GetFuturesEstimatedDeliveryPrice(instrumentID string) (resp okgroup.GetFuturesEstimatedDeliveryPriceResponse, _ error)
- func (o *OKEX) GetFuturesExchangeRates() (resp okgroup.GetFuturesExchangeRatesResponse, _ error)
- func (o *OKEX) GetFuturesFilledOrder(request okgroup.GetFuturesFilledOrderRequest) (resp []okgroup.GetFuturesFilledOrdersResponse, _ error)
- func (o *OKEX) GetFuturesForceLiquidatedOrders(request okgroup.GetFuturesForceLiquidatedOrdersRequest) (resp []okgroup.GetFuturesForceLiquidatedOrdersResponse, _ error)
- func (o *OKEX) GetFuturesHoldAmount(instrumentID string) (resp okgroup.GetFuturesHoldAmountResponse, _ error)
- func (o *OKEX) GetFuturesIndices(instrumentID string) (resp okgroup.GetFuturesIndicesResponse, _ error)
- func (o *OKEX) GetFuturesLeverage(instrumentID string) (resp okgroup.GetFuturesLeverageResponse, _ error)
- func (o *OKEX) GetFuturesMarketData(request okgroup.GetFuturesMarketDateRequest) (resp okgroup.GetFuturesMarketDataResponse, _ error)
- func (o *OKEX) GetFuturesOpenInterests(instrumentID string) (resp okgroup.GetFuturesOpenInterestsResponse, _ error)
- func (o *OKEX) GetFuturesOrderBook(request okgroup.GetFuturesOrderBookRequest) (resp okgroup.GetFuturesOrderBookResponse, err error)
- func (o *OKEX) GetFuturesOrderDetails(request okgroup.GetFuturesOrderDetailsRequest) (resp okgroup.GetFuturesOrderDetailsResponseData, _ error)
- func (o *OKEX) GetFuturesOrderList(request okgroup.GetFuturesOrdersListRequest) (resp okgroup.GetFuturesOrderListResponse, _ error)
- func (o *OKEX) GetFuturesPostions() (resp okgroup.GetFuturesPositionsResponse, _ error)
- func (o *OKEX) GetFuturesPostionsForCurrency(instrumentID string) (resp okgroup.GetFuturesPositionsForCurrencyResponse, _ error)
- func (o *OKEX) GetFuturesTagPrice(instrumentID string) (resp okgroup.GetFuturesTagPriceResponse, _ error)
- func (o *OKEX) GetFuturesTokenInfoForCurrency(instrumentID string) (resp okgroup.GetFuturesTokenInfoResponse, _ error)
- func (o *OKEX) GetFuturesTransactionDetails(request okgroup.GetFuturesTransactionDetailsRequest) (resp []okgroup.GetFuturesTransactionDetailsResponse, _ error)
- func (o *OKEX) GetSwapAccountOfAllCurrency() (resp okgroup.GetSwapAccountOfAllCurrencyResponse, _ error)
- func (o *OKEX) GetSwapAccountSettingsOfAContract(instrumentID string) (resp okgroup.GetSwapAccountSettingsOfAContractResponse, _ error)
- func (o *OKEX) GetSwapBillDetails(request okgroup.GetSpotBillDetailsForCurrencyRequest) (resp []okgroup.GetSwapBillDetailsResponse, _ error)
- func (o *OKEX) GetSwapContractInformation() (resp []okgroup.GetSwapContractInformationResponse, _ error)
- func (o *OKEX) GetSwapCurrentPriceLimits(instrumentID string) (resp okgroup.GetSwapCurrentPriceLimitsResponse, _ error)
- func (o *OKEX) GetSwapExchangeRates() (resp okgroup.GetSwapExchangeRatesResponse, _ error)
- func (o *OKEX) GetSwapFilledOrdersData(request *okgroup.GetSwapFilledOrdersDataRequest) (resp []okgroup.GetSwapFilledOrdersDataResponse, _ error)
- func (o *OKEX) GetSwapForceLiquidatedOrders(request okgroup.GetSwapForceLiquidatedOrdersRequest) (resp []okgroup.GetSwapForceLiquidatedOrdersResponse, _ error)
- func (o *OKEX) GetSwapFundingRateHistory(request okgroup.GetSwapFundingRateHistoryRequest) (resp []okgroup.GetSwapFundingRateHistoryResponse, _ error)
- func (o *OKEX) GetSwapIndices(instrumentID string) (resp okgroup.GetSwapIndecesResponse, _ error)
- func (o *OKEX) GetSwapMarkPrice(instrumentID string) (resp okgroup.GetSwapMarkPriceResponse, _ error)
- func (o *OKEX) GetSwapMarketData(request okgroup.GetSwapMarketDataRequest) (resp []okgroup.GetSwapMarketDataResponse, _ error)
- func (o *OKEX) GetSwapNextSettlementTime(instrumentID string) (resp okgroup.GetSwapNextSettlementTimeResponse, _ error)
- func (o *OKEX) GetSwapOnHoldAmountForOpenOrders(instrumentID string) (resp okgroup.GetSwapOnHoldAmountForOpenOrdersResponse, _ error)
- func (o *OKEX) GetSwapOpenInterest(instrumentID string) (resp okgroup.GetSwapExchangeRatesResponse, _ error)
- func (o *OKEX) GetSwapOrderBook(request okgroup.GetSwapOrderBookRequest) (resp okgroup.GetSwapOrderBookResponse, _ error)
- func (o *OKEX) GetSwapOrderDetails(request okgroup.GetSwapOrderDetailsRequest) (resp okgroup.GetSwapOrderListResponseData, _ error)
- func (o *OKEX) GetSwapOrderList(request okgroup.GetSwapOrderListRequest) (resp okgroup.GetSwapOrderListResponse, _ error)
- func (o *OKEX) GetSwapPostions() (resp []okgroup.GetSwapPostionsResponse, _ error)
- func (o *OKEX) GetSwapPostionsForContract(instrumentID string) (resp okgroup.GetSwapPostionsResponse, _ error)
- func (o *OKEX) GetSwapTokensInformationForCurrency(instrumentID string) (resp okgroup.GetAllSwapTokensInformationResponse, _ error)
- func (o *OKEX) GetSwapTransactionDetails(request okgroup.GetSwapTransactionDetailsRequest) (resp []okgroup.GetSwapTransactionDetailsResponse, _ error)
- func (o *OKEX) PlaceETTOrder(request *okgroup.PlaceETTOrderRequest) (resp okgroup.PlaceETTOrderResponse, _ error)
- func (o *OKEX) PlaceFuturesOrder(request okgroup.PlaceFuturesOrderRequest) (resp okgroup.PlaceFuturesOrderResponse, _ error)
- func (o *OKEX) PlaceFuturesOrderBatch(request okgroup.PlaceFuturesOrderBatchRequest) (resp okgroup.PlaceFuturesOrderBatchResponse, _ error)
- func (o *OKEX) PlaceMultipleSwapOrders(request okgroup.PlaceMultipleSwapOrdersRequest) (resp okgroup.PlaceMultipleSwapOrdersResponse, _ error)
- func (o *OKEX) PlaceSwapOrder(request okgroup.PlaceSwapOrderRequest) (resp okgroup.PlaceSwapOrderResponse, _ error)
- func (o *OKEX) SetDefaults()
- func (o *OKEX) SetFuturesLeverage(request okgroup.SetFuturesLeverageRequest) (resp okgroup.SetFuturesLeverageResponse, _ error)
- func (o *OKEX) SetSwapLeverageLevelOfAContract(request okgroup.SetSwapLeverageLevelOfAContractRequest) (resp okgroup.SetSwapLeverageLevelOfAContractResponse, _ error)
Constants ¶
const (
// OkExWebsocketURL WebsocketURL
OkExWebsocketURL = "wss://real.okex.com:10442/ws/v3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OKEX ¶
OKEX bases all account, spot and margin methods off okgroup implementation
func (*OKEX) CancelETTOrder ¶
func (o *OKEX) CancelETTOrder(orderID string) (resp okgroup.PlaceETTOrderResponse, _ error)
CancelETTOrder Cancel an unfilled order.
func (*OKEX) CancelFuturesOrder ¶
func (o *OKEX) CancelFuturesOrder(request okgroup.CancelFuturesOrderRequest) (resp okgroup.CancelFuturesOrderResponse, _ error)
CancelFuturesOrder Cancelling an unfilled order.
func (*OKEX) CancelFuturesOrderBatch ¶
func (o *OKEX) CancelFuturesOrderBatch(request okgroup.CancelMultipleSpotOrdersRequest) (resp okgroup.CancelMultipleSpotOrdersResponse, _ error)
CancelFuturesOrderBatch With best effort, cancel all open orders.
func (*OKEX) CancelMultipleSwapOrders ¶
func (o *OKEX) CancelMultipleSwapOrders(request okgroup.CancelMultipleSwapOrdersRequest) (resp okgroup.CancelMultipleSwapOrdersResponse, _ error)
CancelMultipleSwapOrders With best effort, cancel all open orders.
func (*OKEX) CancelSwapOrder ¶
func (o *OKEX) CancelSwapOrder(request okgroup.CancelSwapOrderRequest) (resp okgroup.CancelSwapOrderResponse, _ error)
CancelSwapOrder Cancelling an unfilled order
func (*OKEX) GetAllFuturesTokenInfo ¶
func (o *OKEX) GetAllFuturesTokenInfo() (resp []okgroup.GetFuturesTokenInfoResponse, _ error)
GetAllFuturesTokenInfo Get the last traded price, best bid/ask price, 24 hour trading volume and more info of all contracts.
func (*OKEX) GetAllSwapTokensInformation ¶
func (o *OKEX) GetAllSwapTokensInformation() (resp []okgroup.GetAllSwapTokensInformationResponse, _ error)
GetAllSwapTokensInformation Get the last traded price, best bid/ask price, 24 hour trading volume and more info of all contracts.
func (*OKEX) GetETT ¶
func (o *OKEX) GetETT() (resp []okgroup.GetETTResponse, _ error)
GetETT List the assets in ETT account. Get information such as balance, amount on hold/ available.
func (*OKEX) GetETTAccountInformationForCurrency ¶
func (o *OKEX) GetETTAccountInformationForCurrency(currency string) (resp okgroup.GetETTResponse, _ error)
GetETTAccountInformationForCurrency Getting the balance, amount available/on hold of a token in ETT account.
func (*OKEX) GetETTBillsDetails ¶
func (o *OKEX) GetETTBillsDetails(currency string) (resp []okgroup.GetETTBillsDetailsResponse, _ error)
GetETTBillsDetails Bills details. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first
func (*OKEX) GetETTConstituents ¶
func (o *OKEX) GetETTConstituents(ett string) (resp okgroup.GetETTConstituentsResponse, _ error)
GetETTConstituents Get ETT Constituents.This is a public endpoint, no identity verification is needed.
func (*OKEX) GetETTOrderDetails ¶
func (o *OKEX) GetETTOrderDetails(orderID string) (resp okgroup.GetETTOrderListResponse, _ error)
GetETTOrderDetails Get order details by order ID.
func (*OKEX) GetETTOrderList ¶
func (o *OKEX) GetETTOrderList(request okgroup.GetETTOrderListRequest) (resp []okgroup.GetETTOrderListResponse, _ error)
GetETTOrderList List your orders. Cursor pagination is used. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetETTSettlementPriceHistory ¶
func (o *OKEX) GetETTSettlementPriceHistory(ett string) (resp []okgroup.GetETTSettlementPriceHistoryResponse, _ error)
GetETTSettlementPriceHistory Get ETT settlement price history. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesAccountOfACurrency ¶
func (o *OKEX) GetFuturesAccountOfACurrency(instrumentID string) (resp okgroup.FuturesCurrencyData, _ error)
GetFuturesAccountOfACurrency Get the futures account info of a token.
func (*OKEX) GetFuturesAccountOfAllCurrencies ¶
func (o *OKEX) GetFuturesAccountOfAllCurrencies() (resp okgroup.FuturesAccountForAllCurrenciesResponse, _ error)
GetFuturesAccountOfAllCurrencies Get the futures account info of all token. Due to high energy consumption, you are advised to capture data with the "Futures Account of a Currency" API instead.
func (*OKEX) GetFuturesBillDetails ¶
func (o *OKEX) GetFuturesBillDetails(request okgroup.GetSpotBillDetailsForCurrencyRequest) (resp []okgroup.GetSpotBillDetailsForCurrencyResponse, _ error)
GetFuturesBillDetails Shows the account’s historical coin in flow and out flow. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetFuturesContractInformation ¶
func (o *OKEX) GetFuturesContractInformation() (resp []okgroup.GetFuturesContractInformationResponse, _ error)
GetFuturesContractInformation Get market data. This endpoint provides the snapshots of market data and can be used without verifications.
func (*OKEX) GetFuturesCurrentMarkPrice ¶
func (o *OKEX) GetFuturesCurrentMarkPrice(instrumentID string) (resp okgroup.GetFuturesCurrentMarkPriceResponse, _ error)
GetFuturesCurrentMarkPrice The maximum buying price and the minimum selling price of the contract. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesCurrentPriceLimit ¶
func (o *OKEX) GetFuturesCurrentPriceLimit(instrumentID string) (resp okgroup.GetFuturesCurrentPriceLimitResponse, _ error)
GetFuturesCurrentPriceLimit The maximum buying price and the minimum selling price of the contract. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesEstimatedDeliveryPrice ¶
func (o *OKEX) GetFuturesEstimatedDeliveryPrice(instrumentID string) (resp okgroup.GetFuturesEstimatedDeliveryPriceResponse, _ error)
GetFuturesEstimatedDeliveryPrice the estimated delivery price. It is available 3 hours before delivery. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesExchangeRates ¶
func (o *OKEX) GetFuturesExchangeRates() (resp okgroup.GetFuturesExchangeRatesResponse, _ error)
GetFuturesExchangeRates Get the fiat exchange rates. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesFilledOrder ¶
func (o *OKEX) GetFuturesFilledOrder(request okgroup.GetFuturesFilledOrderRequest) (resp []okgroup.GetFuturesFilledOrdersResponse, _ error)
GetFuturesFilledOrder Get the recent 300 transactions of all contracts. Pagination is not supported here. The whole book will be returned for one request. Websocket is recommended here.
func (*OKEX) GetFuturesForceLiquidatedOrders ¶
func (o *OKEX) GetFuturesForceLiquidatedOrders(request okgroup.GetFuturesForceLiquidatedOrdersRequest) (resp []okgroup.GetFuturesForceLiquidatedOrdersResponse, _ error)
GetFuturesForceLiquidatedOrders Get force liquidated orders. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesHoldAmount ¶
func (o *OKEX) GetFuturesHoldAmount(instrumentID string) (resp okgroup.GetFuturesHoldAmountResponse, _ error)
GetFuturesHoldAmount Get the number of futures with hold.
func (*OKEX) GetFuturesIndices ¶
func (o *OKEX) GetFuturesIndices(instrumentID string) (resp okgroup.GetFuturesIndicesResponse, _ error)
GetFuturesIndices Get Indices of tokens. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesLeverage ¶
func (o *OKEX) GetFuturesLeverage(instrumentID string) (resp okgroup.GetFuturesLeverageResponse, _ error)
GetFuturesLeverage Get the leverage of the futures account
func (*OKEX) GetFuturesMarketData ¶
func (o *OKEX) GetFuturesMarketData(request okgroup.GetFuturesMarketDateRequest) (resp okgroup.GetFuturesMarketDataResponse, _ error)
GetFuturesMarketData Get the charts of the trading pairs. Charts are returned in grouped buckets based on requested granularity.
func (*OKEX) GetFuturesOpenInterests ¶
func (o *OKEX) GetFuturesOpenInterests(instrumentID string) (resp okgroup.GetFuturesOpenInterestsResponse, _ error)
GetFuturesOpenInterests Get the open interest of a contract. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesOrderBook ¶
func (o *OKEX) GetFuturesOrderBook(request okgroup.GetFuturesOrderBookRequest) (resp okgroup.GetFuturesOrderBookResponse, err error)
GetFuturesOrderBook List all contracts. This request does not support pagination. The full list will be returned for a request.
func (*OKEX) GetFuturesOrderDetails ¶
func (o *OKEX) GetFuturesOrderDetails(request okgroup.GetFuturesOrderDetailsRequest) (resp okgroup.GetFuturesOrderDetailsResponseData, _ error)
GetFuturesOrderDetails Get order details by order ID.
func (*OKEX) GetFuturesOrderList ¶
func (o *OKEX) GetFuturesOrderList(request okgroup.GetFuturesOrdersListRequest) (resp okgroup.GetFuturesOrderListResponse, _ error)
GetFuturesOrderList List your orders. Cursor pagination is used. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetFuturesPostions ¶
func (o *OKEX) GetFuturesPostions() (resp okgroup.GetFuturesPositionsResponse, _ error)
GetFuturesPostions Get the information of all holding positions in futures trading. Due to high energy consumption, you are advised to capture data with the "Futures Account of a Currency" API instead.
func (*OKEX) GetFuturesPostionsForCurrency ¶
func (o *OKEX) GetFuturesPostionsForCurrency(instrumentID string) (resp okgroup.GetFuturesPositionsForCurrencyResponse, _ error)
GetFuturesPostionsForCurrency Get the information of holding positions of a contract.
func (*OKEX) GetFuturesTagPrice ¶
func (o *OKEX) GetFuturesTagPrice(instrumentID string) (resp okgroup.GetFuturesTagPriceResponse, _ error)
GetFuturesTagPrice Get the tag price. This is a public endpoint, no identity verification is needed.
func (*OKEX) GetFuturesTokenInfoForCurrency ¶
func (o *OKEX) GetFuturesTokenInfoForCurrency(instrumentID string) (resp okgroup.GetFuturesTokenInfoResponse, _ error)
GetFuturesTokenInfoForCurrency Get the last traded price, best bid/ask price, 24 hour trading volume and more info of a contract.
func (*OKEX) GetFuturesTransactionDetails ¶
func (o *OKEX) GetFuturesTransactionDetails(request okgroup.GetFuturesTransactionDetailsRequest) (resp []okgroup.GetFuturesTransactionDetailsResponse, _ error)
GetFuturesTransactionDetails Get details of the recent filled orders. Cursor pagination is used. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetSwapAccountOfAllCurrency ¶
func (o *OKEX) GetSwapAccountOfAllCurrency() (resp okgroup.GetSwapAccountOfAllCurrencyResponse, _ error)
GetSwapAccountOfAllCurrency Get the perpetual swap account info of a token. Margin ratio set as 10,000 when users have no open position.
func (*OKEX) GetSwapAccountSettingsOfAContract ¶
func (o *OKEX) GetSwapAccountSettingsOfAContract(instrumentID string) (resp okgroup.GetSwapAccountSettingsOfAContractResponse, _ error)
GetSwapAccountSettingsOfAContract Get leverage level and margin mode of a contract.
func (*OKEX) GetSwapBillDetails ¶
func (o *OKEX) GetSwapBillDetails(request okgroup.GetSpotBillDetailsForCurrencyRequest) (resp []okgroup.GetSwapBillDetailsResponse, _ error)
GetSwapBillDetails Shows the account’s historical coin in flow and out flow. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetSwapContractInformation ¶
func (o *OKEX) GetSwapContractInformation() (resp []okgroup.GetSwapContractInformationResponse, _ error)
GetSwapContractInformation Get market data.
func (*OKEX) GetSwapCurrentPriceLimits ¶
func (o *OKEX) GetSwapCurrentPriceLimits(instrumentID string) (resp okgroup.GetSwapCurrentPriceLimitsResponse, _ error)
GetSwapCurrentPriceLimits Get the open interest of a contract.
func (*OKEX) GetSwapExchangeRates ¶
func (o *OKEX) GetSwapExchangeRates() (resp okgroup.GetSwapExchangeRatesResponse, _ error)
GetSwapExchangeRates Get the fiat exchange rates.
func (*OKEX) GetSwapFilledOrdersData ¶
func (o *OKEX) GetSwapFilledOrdersData(request *okgroup.GetSwapFilledOrdersDataRequest) (resp []okgroup.GetSwapFilledOrdersDataResponse, _ error)
GetSwapFilledOrdersData Get details of the recent filled orders
func (*OKEX) GetSwapForceLiquidatedOrders ¶
func (o *OKEX) GetSwapForceLiquidatedOrders(request okgroup.GetSwapForceLiquidatedOrdersRequest) (resp []okgroup.GetSwapForceLiquidatedOrdersResponse, _ error)
GetSwapForceLiquidatedOrders Get force liquidated orders.
func (*OKEX) GetSwapFundingRateHistory ¶
func (o *OKEX) GetSwapFundingRateHistory(request okgroup.GetSwapFundingRateHistoryRequest) (resp []okgroup.GetSwapFundingRateHistoryResponse, _ error)
GetSwapFundingRateHistory Get Funding Rate History.
func (*OKEX) GetSwapIndices ¶
func (o *OKEX) GetSwapIndices(instrumentID string) (resp okgroup.GetSwapIndecesResponse, _ error)
GetSwapIndices Get Indices of tokens.
func (*OKEX) GetSwapMarkPrice ¶
func (o *OKEX) GetSwapMarkPrice(instrumentID string) (resp okgroup.GetSwapMarkPriceResponse, _ error)
GetSwapMarkPrice Get the time of next settlement.
func (*OKEX) GetSwapMarketData ¶
func (o *OKEX) GetSwapMarketData(request okgroup.GetSwapMarketDataRequest) (resp []okgroup.GetSwapMarketDataResponse, _ error)
GetSwapMarketData Get the charts of the trading pairs.
func (*OKEX) GetSwapNextSettlementTime ¶
func (o *OKEX) GetSwapNextSettlementTime(instrumentID string) (resp okgroup.GetSwapNextSettlementTimeResponse, _ error)
GetSwapNextSettlementTime Get the time of next settlement.
func (*OKEX) GetSwapOnHoldAmountForOpenOrders ¶
func (o *OKEX) GetSwapOnHoldAmountForOpenOrders(instrumentID string) (resp okgroup.GetSwapOnHoldAmountForOpenOrdersResponse, _ error)
GetSwapOnHoldAmountForOpenOrders Get On Hold Amount for Open Orders.
func (*OKEX) GetSwapOpenInterest ¶
func (o *OKEX) GetSwapOpenInterest(instrumentID string) (resp okgroup.GetSwapExchangeRatesResponse, _ error)
GetSwapOpenInterest Get the open interest of a contract.
func (*OKEX) GetSwapOrderBook ¶
func (o *OKEX) GetSwapOrderBook(request okgroup.GetSwapOrderBookRequest) (resp okgroup.GetSwapOrderBookResponse, _ error)
GetSwapOrderBook Get the charts of the trading pairs.
func (*OKEX) GetSwapOrderDetails ¶
func (o *OKEX) GetSwapOrderDetails(request okgroup.GetSwapOrderDetailsRequest) (resp okgroup.GetSwapOrderListResponseData, _ error)
GetSwapOrderDetails Get order details by order ID.
func (*OKEX) GetSwapOrderList ¶
func (o *OKEX) GetSwapOrderList(request okgroup.GetSwapOrderListRequest) (resp okgroup.GetSwapOrderListResponse, _ error)
GetSwapOrderList List your orders. Cursor pagination is used. All paginated requests return the latest information (newest) as the first page sorted by newest (in chronological time) first.
func (*OKEX) GetSwapPostions ¶
func (o *OKEX) GetSwapPostions() (resp []okgroup.GetSwapPostionsResponse, _ error)
GetSwapPostions Get the information of all holding positions in swap trading. Due to high energy consumption, you are advised to capture data with the "Swap Account of a Currency" API instead.
func (*OKEX) GetSwapPostionsForContract ¶
func (o *OKEX) GetSwapPostionsForContract(instrumentID string) (resp okgroup.GetSwapPostionsResponse, _ error)
GetSwapPostionsForContract Get the information of holding positions of a contract.
func (*OKEX) GetSwapTokensInformationForCurrency ¶
func (o *OKEX) GetSwapTokensInformationForCurrency(instrumentID string) (resp okgroup.GetAllSwapTokensInformationResponse, _ error)
GetSwapTokensInformationForCurrency Get the last traded price, best bid/ask price, 24 hour trading volume and more info of all contracts.
func (*OKEX) GetSwapTransactionDetails ¶
func (o *OKEX) GetSwapTransactionDetails(request okgroup.GetSwapTransactionDetailsRequest) (resp []okgroup.GetSwapTransactionDetailsResponse, _ error)
GetSwapTransactionDetails Get details of the recent filled orders
func (*OKEX) PlaceETTOrder ¶
func (o *OKEX) PlaceETTOrder(request *okgroup.PlaceETTOrderRequest) (resp okgroup.PlaceETTOrderResponse, _ error)
PlaceETTOrder You can place subscription or redemption orders under ETT trading. You can place an order only if you have enough funds. Once your order is placed, the amount will be put on hold in the order lifecycle. The assets and amount on hold depends on the order's specific type and parameters.
func (*OKEX) PlaceFuturesOrder ¶
func (o *OKEX) PlaceFuturesOrder(request okgroup.PlaceFuturesOrderRequest) (resp okgroup.PlaceFuturesOrderResponse, _ error)
PlaceFuturesOrder OKEx futures trading only supports limit orders. You can place an order only if you have enough funds. Once your order is placed, the amount will be put on hold in the order lifecycle. The assets and amount on hold depends on the order's specific type and parameters.
func (*OKEX) PlaceFuturesOrderBatch ¶
func (o *OKEX) PlaceFuturesOrderBatch(request okgroup.PlaceFuturesOrderBatchRequest) (resp okgroup.PlaceFuturesOrderBatchResponse, _ error)
PlaceFuturesOrderBatch Batch contract placing order operation.
func (*OKEX) PlaceMultipleSwapOrders ¶
func (o *OKEX) PlaceMultipleSwapOrders(request okgroup.PlaceMultipleSwapOrdersRequest) (resp okgroup.PlaceMultipleSwapOrdersResponse, _ error)
PlaceMultipleSwapOrders Batch contract placing order operation.
func (*OKEX) PlaceSwapOrder ¶
func (o *OKEX) PlaceSwapOrder(request okgroup.PlaceSwapOrderRequest) (resp okgroup.PlaceSwapOrderResponse, _ error)
PlaceSwapOrder OKEx perpetual swap trading only supports limit orders,USD as quote currency for orders. You can place an order only if you have enough funds. Once your order is placed, the amount will be put on hold in the order lifecycle. The assets and amount on hold depends on the order's specific type and parameters.
func (*OKEX) SetDefaults ¶
func (o *OKEX) SetDefaults()
SetDefaults method assignes the default values for OKEX
func (*OKEX) SetFuturesLeverage ¶
func (o *OKEX) SetFuturesLeverage(request okgroup.SetFuturesLeverageRequest) (resp okgroup.SetFuturesLeverageResponse, _ error)
SetFuturesLeverage Adjusting the leverage for futures account。 Cross margin request requirements: {"leverage":"10"} Fixed margin request requirements: {"instrument_id":"BTC-USD-180213","direction":"long","leverage":"10"}
func (*OKEX) SetSwapLeverageLevelOfAContract ¶
func (o *OKEX) SetSwapLeverageLevelOfAContract(request okgroup.SetSwapLeverageLevelOfAContractRequest) (resp okgroup.SetSwapLeverageLevelOfAContractResponse, _ error)
SetSwapLeverageLevelOfAContract Setting the leverage level of a contract TODO this returns invalid parameters, but matches spec. Unsure how to fix