Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amir-the-h/okex
/ functions
Functions
179 in github.com/amir-the-h/okex
⨍
Functions
179
◇
Types & classes
320
↓ 114 callers
Function
S2M
(i interface{})
definitions.go:461
↓ 83 callers
Method
Do
Do the http request to the server
api/rest/client.go:56
↓ 18 callers
Method
Subscribe
Subscribe Users can choose to subscribe to one or more channels, and the total length of multiple channels cannot exceed 4096 bytes. https://www.okex
api/ws/client.go:135
↓ 18 callers
Method
Unsubscribe
Unsubscribe into channel(s) https://www.okex.com/docs-v5/en/#websocket-api-unsubscribe
api/ws/client.go:159
↓ 6 callers
Method
Send
Send message through either connections
api/ws/client.go:172
↓ 3 callers
Method
Get
(k string)
events/events.go:55
↓ 3 callers
Method
handleCancel
(msg string)
api/ws/client.go:367
↓ 2 callers
Method
Login
Login https://www.okex.com/docs-v5/en/#websocket-api-login
api/ws/client.go:108
↓ 2 callers
Method
Process
(data []byte, e *events.Basic)
api/ws/public.go:373
↓ 2 callers
Method
dial
(p bool)
api/ws/client.go:241
↓ 1 callers
Method
Connect
Connect into the server https://www.okex.com/docs-v5/en/#websocket-api-connect
api/ws/client.go:82
↓ 1 callers
Function
NewAccount
NewAccount returns a pointer to a fresh Account
api/rest/account.go:20
↓ 1 callers
Function
NewClient
NewClient returns a pointer to a fresh Client
api/api.go:18
↓ 1 callers
Function
NewClient
NewClient returns a pointer to a fresh ClientRest
api/rest/client.go:36
↓ 1 callers
Function
NewClient
NewClient returns a pointer to a fresh ClientWs
api/ws/client.go:57
↓ 1 callers
Function
NewFunding
NewFunding returns a pointer to a fresh Funding
api/rest/funding.go:20
↓ 1 callers
Function
NewMarket
NewMarket returns a pointer to a fresh Market
api/rest/market.go:19
↓ 1 callers
Function
NewPrivate
NewPrivate returns a pointer to a fresh Private
api/ws/private.go:23
↓ 1 callers
Function
NewPublic
NewPublic returns a pointer to a fresh Public
api/ws/public.go:35
↓ 1 callers
Function
NewPublicData
NewPublicData returns a pointer to a fresh PublicData
api/rest/public_data.go:19
↓ 1 callers
Function
NewSubAccount
NewSubAccount returns a pointer to a fresh SubAccount
api/rest/sub_account.go:20
↓ 1 callers
Function
NewTrade
NewTrade returns a pointer to a fresh Trade
api/rest/trade.go:19
↓ 1 callers
Function
NewTrade
NewTrade returns a pointer to a fresh Trade
api/ws/trade.go:16
↓ 1 callers
Function
NewTradeData
NewTradeData returns a pointer to a fresh TradeData
api/rest/trade_data.go:19
↓ 1 callers
Method
OrderBook
OrderBook Retrieve order book data for multiple instruments. Use books for 400 depth levels, book5 for 5 depth levels, books50-l2-tbt tick-by-tick 50
api/ws/public.go:256
↓ 1 callers
Method
SetDialer
SetDialer sets a custom dialer for the WebSocket connection.
api/ws/client.go:214
↓ 1 callers
Method
WaitForAuthorization
WaitForAuthorization waits for the auth response and try to log in if it was needed
api/ws/client.go:224
↓ 1 callers
Method
process
(data []byte, e *events.Basic)
api/ws/client.go:374
↓ 1 callers
Method
receiver
(p bool)
api/ws/client.go:319
↓ 1 callers
Method
sender
(p bool)
api/ws/client.go:276
↓ 1 callers
Method
sign
(method, path, body string)
api/rest/client.go:128
↓ 1 callers
Method
sign
(method, path string)
api/ws/client.go:357
Method
Account
Account Retrieve account information. Data will be pushed when triggered by events such as placing/canceling order, and will also be pushed in regular
api/ws/private.go:31
Method
AmendOrder
AmendOrder Amend an incomplete order. https://www.okex.com/docs-v5/en/#rest-api-trade-amend-order Amend incomplete orders in batches. Maximum 20 ord
api/rest/trade.go:100
Method
AmendOrder
AmendOrder Amend an incomplete order. https://www.okex.com/docs-v5/en/#websocket-api-trade-place-order Amend incomplete orders in batches. Maximum 2
api/ws/trade.go:68
Method
AssetBillsDetails
AssetBillsDetails Query the billing record, you can get the latest 1 month historical data. https://www.okex.com/docs-v5/en/#rest-api-funding-asset-b
api/rest/funding.go:84
Method
BalanceAndPosition
BalanceAndPosition Retrieve account balance and position information. Data will be pushed when triggered by events such as filled order, funding trans
api/ws/private.go:77
Method
CancelAdvanceAlgoOrder
CancelAdvanceAlgoOrder Cancel unfilled algo orders(iceberg order and twap order). A maximum of 10 orders can be canceled at a time. Request parameters
api/rest/trade.go:261
Method
CancelAlgoOrder
CancelAlgoOrder Cancel unfilled algo orders(trigger order, oco order, conditional order). A maximum of 10 orders can be canceled at a time. Request pa
api/rest/trade.go:241
Method
CancelOrder
CancelOrder Cancel an incomplete order https://www.okex.com/docs-v5/en/#websocket-api-trade-place-order Cancel incomplete orders in batches. Maximum
api/ws/trade.go:48
Method
CandleOrder
CandleOrder Cancel an incomplete order. https://www.okex.com/docs-v5/en/#rest-api-trade-cancel-order Cancel incomplete orders in batches. Maximum 20
api/rest/trade.go:73
Method
Candlesticks
Candlesticks Retrieve the open interest. Data will be pushed every 3 seconds. https://www.okex.com/docs-v5/en/#websocket-api-public-channels-candlest
api/ws/public.go:112
Method
ClosePosition
ClosePosition Close all positions of an instrument via a market order. https://www.okex.com/docs-v5/en/#rest-api-trade-close-positions
api/rest/trade.go:123
Method
CreateAPIKey
CreateAPIKey applies to master accounts only https://www.okex.com/docs-v5/en/#rest-api-subaccount-create-an-apikey-for-a-sub-account
api/rest/sub_account.go:45
Method
DeleteAPIKey
DeleteAPIKey applies to master accounts only https://www.okex.com/docs-v5/en/#rest-api-subaccount-delete-the-apikey-of-sub-accounts
api/rest/sub_account.go:102
Method
Duration
()
definitions.go:422
Method
EstimatedDeliveryExercisePrice
EstimatedDeliveryExercisePrice Retrieve the estimated delivery/exercise price of FUTURES contracts and OPTION. Only the estimated delivery/exercise p
api/ws/public.go:160
Method
FundingRate
FundingRate Retrieve funding rate. Data will be pushed every minute. https://www.okex.com/docs-v5/en/#websocket-api-public-channels-funding-rate-chan
api/ws/public.go:306
Method
FundsTransfer
FundsTransfer This endpoint supports the transfer of funds between your funding account and trading account, and from the master account to sub-accoun
api/rest/funding.go:67
Method
Get24HTotalVolume
Get24HTotalVolume The 24-hour trading volume is calculated on a rolling basis, using USD as the pricing unit. https://www.okex.com/docs-v5/en/#rest-a
api/rest/market.go:180
Method
GetAccountAndPositionRisk
GetAccountAndPositionRisk Get account and position risk https://www.okex.com/docs-v5/en/#rest-api-account-get-account-and-position-risk
api/rest/account.go:73
Method
GetAlgoOrderList
GetAlgoOrderList Retrieve a list of untriggered Algo orders under the current account. `iceberg` order and `twap` order just supported on demo tradin
api/rest/trade.go:287
Method
GetBalance
GetBalance Retrieve a list of assets (with non-zero balance), remaining balance, and available amount in the account. https://www.okex.com/docs-v5/en
api/rest/account.go:28
Method
GetBalance
GetBalance Query detailed balance info of Trading Account of a sub-account via the master account (applies to master accounts only) https://www.okex.
api/rest/sub_account.go:120
Method
GetBalance
GetBalance Retrieve the balances of all the assets, and the amount that is available or on hold. https://www.okex.com/docs-v5/en/#rest-api-funding-ge
api/rest/funding.go:47
Method
GetBills
GetBills Retrieve the bills of the account. The bill refers to all transaction records that result in changing the balance of an account. Pagination i
api/rest/account.go:95
Method
GetCandlesticks
GetCandlesticks Retrieve the candlestick charts. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in groups based on the
api/rest/market.go:95
Method
GetCandlesticksHistory
GetCandlesticksHistory Retrieve history candlestick charts from recent years. https://www.okex.com/docs-v5/en/#rest-api-market-data-get-candlesticks
api/rest/market.go:112
Method
GetConfig
GetConfig Retrieve current account configuration. https://www.okex.com/docs-v5/en/#rest-api-account-get-account-configuration
api/rest/account.go:116
Method
GetContractsOpenInterestAndVolume
GetContractsOpenInterestAndVolume Open interest is the sum of all long and short futures and perpetual swap positions. https://www.okex.com/docs-v5/e
api/rest/trade_data.go:94
Method
GetCurrencies
GetCurrencies Retrieve a list of all currencies. Not all currencies can be traded. Currencies that have not been defined in ISO 4217 may use a custom
api/rest/funding.go:28
Method
GetDeliveryExerciseHistory
GetDeliveryExerciseHistory Retrieve the estimated delivery price, which will only have a return value one hour before the delivery/exercise. https://
api/rest/public_data.go:44
Method
GetDepositAddress
GetDepositAddress Retrieve the deposit addresses of currencies, including previously-used addresses. https://www.okex.com/docs-v5/en/#rest-api-fundin
api/rest/funding.go:101
Method
GetDepositHistory
GetDepositHistory Retrieve the deposit history of all currencies, up to 100 recent records in a year. https://www.okex.com/docs-v5/en/#rest-api-fundi
api/rest/funding.go:118
Method
GetDiscountRateAndInterestFreeQuota
GetDiscountRateAndInterestFreeQuota Retrieve discount rate level and interest-free quota. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-d
api/rest/public_data.go:129
Method
GetEstimatedDeliveryExercisePrice
GetEstimatedDeliveryExercisePrice Retrieve the estimated delivery price which will only have a return value one hour before the delivery/exercise. ht
api/rest/public_data.go:112
Method
GetFeeRates
GetFeeRates https://www.okex.com/docs-v5/en/#rest-api-account-get-fee-rates
api/rest/account.go:267
Method
GetIndexCandlesticks
GetIndexCandlesticks Retrieve the candlestick charts of the index. This endpoint can retrieve the latest 1,440 data entries. Charts are returned in gr
api/rest/market.go:129
Method
GetIndexComponents
GetIndexComponents Get the index component information data on the market https://www.okex.com/docs-v5/en/#rest-api-market-data-get-index-components
api/rest/market.go:196
Method
GetIndexTickers
GetIndexTickers Retrieve index tickers. https://www.okex.com/docs-v5/en/#rest-api-market-data-get-index-tickers
api/rest/market.go:61
Method
GetInstruments
GetInstruments Retrieve a list of instruments with open contracts. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-instruments
api/rest/public_data.go:27
Method
GetInterestAccrued
GetInterestAccrued https://www.okex.com/docs-v5/en/#rest-api-account-get-interest-accrued
api/rest/account.go:284
Method
GetInterestRateAndLoanQuota
GetInterestRateAndLoanQuota Get margin interest rate https://www.okex.com/docs-v5/en/#rest-api-public-data-get-position-tiers
api/rest/public_data.go:215
Method
GetInterestRates
GetInterestRates Get the user's current leveraged currency borrowing interest rate https://www.okex.com/docs-v5/en/#rest-api-account-get-interest-rat
api/rest/account.go:302
Method
GetLeverage
GetLeverage https://www.okex.com/docs-v5/en/#rest-api-account-get-leverage
api/rest/account.go:230
Method
GetLimitPrice
GetLimitPrice Retrieve the highest buy limit and lowest sell limit of the instrument. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-limit
api/rest/public_data.go:78
Method
GetLiquidationOrders
GetLiquidationOrders Retrieve information on liquidation orders in the last 7 days. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-liquida
api/rest/public_data.go:162
Method
GetLongShortRatio
GetLongShortRatio This is the ratio of users with net long vs short positions. It includes data from futures and perpetual swaps. https://www.okex.co
api/rest/trade_data.go:77
Method
GetMarginLendingRatio
GetMarginLendingRatio This indicator shows the ratio of cumulative data value between currency pair leverage quote currency and underlying asset over
api/rest/trade_data.go:60
Method
GetMarkPrice
GetMarkPrice Retrieve mark price. We set the mark price based on the SPOT index and at a reasonable basis to prevent individual users from manipulati
api/rest/public_data.go:181
Method
GetMarkPriceCandlesticks
GetMarkPriceCandlesticks Retrieve the candlestick charts of mark price. This endpoint can retrieve the latest 1,440 data entries. Charts are returned
api/rest/market.go:146
Method
GetMaxAvailableTradeAmount
GetMaxAvailableTradeAmount https://www.okex.com/docs-v5/en/#rest-api-account-get-maximum-available-tradable-amount
api/rest/account.go:195
Method
GetMaxBuySellAmount
GetMaxBuySellAmount https://www.okex.com/docs-v5/en/#rest-api-account-get-maximum-buy-sell-amount-or-open-amount
api/rest/account.go:175
Method
GetMaxLoan
GetMaxLoan https://www.okex.com/docs-v5/en/#rest-api-account-get-the-maximum-loan-of-instrument
api/rest/account.go:250
Method
GetMaxWithdrawals
GetMaxWithdrawals https://www.okex.com/docs-v5/en/#rest-api-account-get-maximum-withdrawals
api/rest/account.go:340
Method
GetOpenInterest
GetOpenInterest Retrieve the total open interest for contracts on OKEx. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-open-interest
api/rest/public_data.go:61
Method
GetOpenInterestAndVolumeExpiry
GetOpenInterestAndVolumeExpiry This shows the volume and open interest for each upcoming expiration. You can use this to see which expirations are cur
api/rest/trade_data.go:145
Method
GetOpenInterestAndVolumeStrike
GetOpenInterestAndVolumeStrike This shows what option strikes are the most popular for each expiration. https://www.okex.com/docs-v5/en/#rest-api-tra
api/rest/trade_data.go:162
Method
GetOptionMarketData
GetOptionMarketData Retrieve option market data. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-option-market-data
api/rest/public_data.go:95
Method
GetOptionsOpenInterestAndVolume
GetOptionsOpenInterestAndVolume This shows the sum of all open positions and how much total trading volume has taken place. https://www.okex.com/docs
api/rest/trade_data.go:111
Method
GetOrderBook
GetOrderBook Retrieve a instrument is order book. https://www.okex.com/docs-v5/en/#rest-api-market-data-get-order-book
api/rest/market.go:78
Method
GetOrderDetail
GetOrderDetail Retrieve order details. https://www.okex.com/docs-v5/en/#rest-api-trade-get-order-details
api/rest/trade.go:140
Method
GetOrderHistory
GetOrderHistory Retrieve the completed order data for the last 7 days, and the incomplete orders that have been cancelled are only reserved for 2 hour
api/rest/trade.go:177
Method
GetOrderList
GetOrderList Retrieve all incomplete orders under the current account. https://www.okex.com/docs-v5/en/#rest-api-trade-get-order-list
api/rest/trade.go:157
Method
GetPiggyBankBalance
GetPiggyBankBalance https://www.okex.com/docs-v5/en/#rest-api-funding-get-piggybank-balance
api/rest/funding.go:184
Method
GetPositionTiers
GetPositionTiers Position information,Maximum leverage depends on your borrowings and margin ratio. https://www.okex.com/docs-v5/en/#rest-api-public-
api/rest/public_data.go:198
Method
GetPositions
GetPositions Retrieve information on your positions. When the account is in net mode, net positions will be displayed, and when the account is in long
api/rest/account.go:49
Method
GetPutCallRatio
GetPutCallRatio This shows the relative buy/sell volume for calls and puts. It shows whether traders are bullish or bearish on price and volatility.
api/rest/trade_data.go:128
Method
GetSupportCoin
GetSupportCoin Get the currency supported by the transaction big data interface https://www.okex.com/docs-v5/en/#rest-api-trading-data-get-support-co
api/rest/trade_data.go:27
Method
GetSystemTime
GetSystemTime Retrieve API server time. https://www.okex.com/docs-v5/en/#rest-api-public-data-get-system-time
api/rest/public_data.go:146
next →
1–100 of 179, ranked by callers