ccxt 4.1.19__py2.py3-none-any.whl → 4.1.22__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/okcoin.py +70 -206
- ccxt/ace.py +12 -12
- ccxt/ascendex.py +5 -5
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +12 -12
- ccxt/async_support/ascendex.py +5 -5
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +2 -2
- ccxt/async_support/binance.py +184 -184
- ccxt/async_support/bingx.py +48 -48
- ccxt/async_support/bitbank.py +14 -14
- ccxt/async_support/bitbns.py +7 -7
- ccxt/async_support/bitfinex.py +2 -2
- ccxt/async_support/bitfinex2.py +35 -35
- ccxt/async_support/bitflyer.py +17 -17
- ccxt/async_support/bitforex.py +9 -9
- ccxt/async_support/bitget.py +433 -215
- ccxt/async_support/bitmart.py +39 -39
- ccxt/async_support/bitmex.py +7 -7
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitpanda.py +1 -1
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +2 -2
- ccxt/async_support/bitstamp.py +3 -3
- ccxt/async_support/bitvavo.py +2 -2
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/btcalpha.py +7 -7
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +58 -58
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +13 -13
- ccxt/async_support/coinbasepro.py +15 -15
- ccxt/async_support/coinex.py +19 -19
- ccxt/async_support/coinone.py +2 -2
- ccxt/async_support/coinsph.py +4 -4
- ccxt/async_support/coinspot.py +2 -2
- ccxt/async_support/cryptocom.py +28 -28
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +26 -26
- ccxt/async_support/deribit.py +9 -9
- ccxt/async_support/digifinex.py +38 -38
- ccxt/async_support/exmo.py +18 -18
- ccxt/async_support/gate.py +59 -59
- ccxt/async_support/gemini.py +4 -4
- ccxt/async_support/hitbtc.py +6 -6
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/huobi.py +70 -70
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +33 -33
- ccxt/async_support/krakenfutures.py +6 -5
- ccxt/async_support/kucoin.py +74 -74
- ccxt/async_support/kucoinfutures.py +8 -8
- ccxt/async_support/latoken.py +14 -14
- ccxt/async_support/lbank2.py +33 -33
- ccxt/async_support/mexc.py +22 -22
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +22 -22
- ccxt/async_support/oceanex.py +18 -18
- ccxt/async_support/okcoin.py +1950 -2758
- ccxt/async_support/okx.py +73 -73
- ccxt/async_support/paymium.py +11 -11
- ccxt/async_support/phemex.py +26 -26
- ccxt/async_support/poloniex.py +30 -30
- ccxt/async_support/poloniexfutures.py +25 -25
- ccxt/async_support/probit.py +21 -21
- ccxt/async_support/tokocrypto.py +22 -22
- ccxt/async_support/upbit.py +21 -21
- ccxt/async_support/wavesexchange.py +2 -2
- ccxt/async_support/wazirx.py +14 -14
- ccxt/async_support/whitebit.py +6 -6
- ccxt/async_support/woo.py +21 -21
- ccxt/async_support/yobit.py +16 -16
- ccxt/async_support/zaif.py +10 -10
- ccxt/async_support/zonda.py +15 -15
- ccxt/base/exchange.py +2 -1
- ccxt/bigone.py +2 -2
- ccxt/binance.py +184 -184
- ccxt/bingx.py +48 -48
- ccxt/bitbank.py +14 -14
- ccxt/bitbns.py +7 -7
- ccxt/bitfinex.py +2 -2
- ccxt/bitfinex2.py +35 -35
- ccxt/bitflyer.py +17 -17
- ccxt/bitforex.py +9 -9
- ccxt/bitget.py +433 -215
- ccxt/bitmart.py +39 -39
- ccxt/bitmex.py +7 -7
- ccxt/bitopro.py +1 -1
- ccxt/bitpanda.py +1 -1
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +2 -2
- ccxt/bitstamp.py +3 -3
- ccxt/bitvavo.py +2 -2
- ccxt/bl3p.py +1 -1
- ccxt/btcalpha.py +7 -7
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +58 -58
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +13 -13
- ccxt/coinbasepro.py +15 -15
- ccxt/coinex.py +19 -19
- ccxt/coinone.py +2 -2
- ccxt/coinsph.py +4 -4
- ccxt/coinspot.py +2 -2
- ccxt/cryptocom.py +28 -28
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +26 -26
- ccxt/deribit.py +9 -9
- ccxt/digifinex.py +38 -38
- ccxt/exmo.py +18 -18
- ccxt/gate.py +59 -59
- ccxt/gemini.py +4 -4
- ccxt/hitbtc.py +6 -6
- ccxt/hollaex.py +2 -2
- ccxt/huobi.py +70 -70
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +33 -33
- ccxt/krakenfutures.py +6 -5
- ccxt/kucoin.py +74 -74
- ccxt/kucoinfutures.py +8 -8
- ccxt/latoken.py +14 -14
- ccxt/lbank2.py +33 -33
- ccxt/mexc.py +22 -22
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +22 -22
- ccxt/oceanex.py +18 -18
- ccxt/okcoin.py +1950 -2758
- ccxt/okx.py +73 -73
- ccxt/paymium.py +11 -11
- ccxt/phemex.py +26 -26
- ccxt/poloniex.py +30 -30
- ccxt/poloniexfutures.py +25 -25
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/ascendex.py +1 -1
- ccxt/pro/binance.py +9 -9
- ccxt/pro/bingx.py +12 -12
- ccxt/pro/bitget.py +2 -2
- ccxt/pro/bitpanda.py +7 -7
- ccxt/pro/bitrue.py +2 -2
- ccxt/pro/blockchaincom.py +6 -6
- ccxt/pro/bybit.py +15 -15
- ccxt/pro/cex.py +8 -8
- ccxt/pro/coinbase.py +6 -6
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/coinex.py +8 -8
- ccxt/pro/cryptocom.py +12 -12
- ccxt/pro/deribit.py +7 -7
- ccxt/pro/gemini.py +4 -4
- ccxt/pro/hitbtc.py +17 -17
- ccxt/pro/huobi.py +3 -3
- ccxt/pro/kraken.py +6 -6
- ccxt/pro/krakenfutures.py +10 -10
- ccxt/pro/kucoin.py +85 -42
- ccxt/pro/kucoinfutures.py +5 -5
- ccxt/pro/luno.py +1 -1
- ccxt/pro/mexc.py +7 -7
- ccxt/pro/okx.py +16 -15
- ccxt/pro/phemex.py +15 -15
- ccxt/pro/poloniex.py +9 -9
- ccxt/pro/poloniexfutures.py +5 -5
- ccxt/pro/probit.py +5 -5
- ccxt/pro/wazirx.py +5 -5
- ccxt/pro/woo.py +1 -1
- ccxt/probit.py +21 -21
- ccxt/test/base/test_shared_methods.py +1 -1
- ccxt/tokocrypto.py +22 -22
- ccxt/upbit.py +21 -21
- ccxt/wavesexchange.py +2 -2
- ccxt/wazirx.py +14 -14
- ccxt/whitebit.py +6 -6
- ccxt/woo.py +21 -21
- ccxt/yobit.py +16 -16
- ccxt/zaif.py +10 -10
- ccxt/zonda.py +15 -15
- {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/METADATA +5 -9
- {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/RECORD +179 -179
- {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/WHEEL +0 -0
- {ccxt-4.1.19.dist-info → ccxt-4.1.22.dist-info}/top_level.txt +0 -0
ccxt/async_support/okx.py
CHANGED
@@ -1154,7 +1154,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1154
1154
|
async def fetch_status(self, params={}):
|
1155
1155
|
"""
|
1156
1156
|
the latest known information on the availability of the exchange API
|
1157
|
-
see https://www.okx.com/docs-v5/en/#status-get-status
|
1157
|
+
:see: https://www.okx.com/docs-v5/en/#status-get-status
|
1158
1158
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1159
1159
|
:returns dict: a `status structure <https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure>`
|
1160
1160
|
"""
|
@@ -1199,7 +1199,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1199
1199
|
async def fetch_time(self, params={}):
|
1200
1200
|
"""
|
1201
1201
|
fetches the current integer timestamp in milliseconds from the exchange server
|
1202
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
|
1202
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
|
1203
1203
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1204
1204
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
1205
1205
|
"""
|
@@ -1220,7 +1220,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1220
1220
|
async def fetch_accounts(self, params={}):
|
1221
1221
|
"""
|
1222
1222
|
fetch all the accounts associated with a profile
|
1223
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
1223
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
1224
1224
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1225
1225
|
:returns dict: a dictionary of `account structures <https://github.com/ccxt/ccxt/wiki/Manual#account-structure>` indexed by the account type
|
1226
1226
|
"""
|
@@ -1262,7 +1262,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1262
1262
|
async def fetch_markets(self, params={}):
|
1263
1263
|
"""
|
1264
1264
|
retrieves data on all markets for okx
|
1265
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
|
1265
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
|
1266
1266
|
:param dict [params]: extra parameters specific to the exchange api endpoint
|
1267
1267
|
:returns dict[]: an array of objects representing market data
|
1268
1268
|
"""
|
@@ -1489,7 +1489,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1489
1489
|
async def fetch_currencies(self, params={}):
|
1490
1490
|
"""
|
1491
1491
|
fetches all available currencies on an exchange
|
1492
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
1492
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
1493
1493
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1494
1494
|
:returns dict: an associative dictionary of currencies
|
1495
1495
|
"""
|
@@ -1622,7 +1622,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1622
1622
|
async def fetch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
1623
1623
|
"""
|
1624
1624
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1625
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
1625
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
1626
1626
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1627
1627
|
:param int [limit]: the maximum amount of order book entries to return
|
1628
1628
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -1721,7 +1721,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1721
1721
|
async def fetch_ticker(self, symbol: str, params={}):
|
1722
1722
|
"""
|
1723
1723
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
1724
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
|
1724
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
|
1725
1725
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1726
1726
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1727
1727
|
:returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
|
@@ -1807,7 +1807,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1807
1807
|
async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
|
1808
1808
|
"""
|
1809
1809
|
fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
1810
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
1810
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
1811
1811
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1812
1812
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1813
1813
|
:returns dict: a dictionary of `ticker structures <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
|
@@ -1914,8 +1914,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1914
1914
|
async def fetch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1915
1915
|
"""
|
1916
1916
|
get the list of most recent trades for a particular symbol
|
1917
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
|
1918
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
|
1917
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
|
1918
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
|
1919
1919
|
:param str symbol: unified symbol of the market to fetch trades for
|
1920
1920
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1921
1921
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -2010,12 +2010,12 @@ class okx(Exchange, ImplicitAPI):
|
|
2010
2010
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
2011
2011
|
"""
|
2012
2012
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
2013
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
|
2014
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
|
2015
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
|
2016
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
|
2017
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
|
2018
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
|
2013
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
|
2014
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
|
2015
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
|
2016
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
|
2017
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
|
2018
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
|
2019
2019
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
2020
2020
|
:param str timeframe: the length of time each candle represents
|
2021
2021
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -2102,7 +2102,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2102
2102
|
async def fetch_funding_rate_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
2103
2103
|
"""
|
2104
2104
|
fetches historical funding rate prices
|
2105
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
|
2105
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
|
2106
2106
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
2107
2107
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
2108
2108
|
:param int [limit]: the maximum amount of `funding rate structures <https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure>` to fetch
|
@@ -2234,7 +2234,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2234
2234
|
async def fetch_trading_fee(self, symbol: str, params={}):
|
2235
2235
|
"""
|
2236
2236
|
fetch the trading fees for a market
|
2237
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
|
2237
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
|
2238
2238
|
:param str symbol: unified market symbol
|
2239
2239
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
2240
2240
|
:returns dict: a `fee structure <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
|
@@ -2279,8 +2279,8 @@ class okx(Exchange, ImplicitAPI):
|
|
2279
2279
|
async def fetch_balance(self, params={}):
|
2280
2280
|
"""
|
2281
2281
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
2282
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
2283
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
2282
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
2283
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
2284
2284
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
2285
2285
|
:returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
|
2286
2286
|
"""
|
@@ -2593,9 +2593,9 @@ class okx(Exchange, ImplicitAPI):
|
|
2593
2593
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2594
2594
|
"""
|
2595
2595
|
create a trade order
|
2596
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
2597
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
|
2598
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
|
2596
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
2597
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
|
2598
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
|
2599
2599
|
:param str symbol: unified symbol of the market to create an order in
|
2600
2600
|
:param str type: 'market' or 'limit'
|
2601
2601
|
:param str side: 'buy' or 'sell'
|
@@ -2688,7 +2688,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2688
2688
|
async def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
2689
2689
|
"""
|
2690
2690
|
edit a trade order
|
2691
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trade-amend-order
|
2691
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trade-amend-order
|
2692
2692
|
:param str id: order id
|
2693
2693
|
:param str symbol: unified symbol of the market to create an order in
|
2694
2694
|
:param str type: 'market' or 'limit'
|
@@ -2742,7 +2742,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2742
2742
|
async def cancel_order(self, id: str, symbol: Optional[str] = None, params={}):
|
2743
2743
|
"""
|
2744
2744
|
cancels an open order
|
2745
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
|
2745
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
|
2746
2746
|
:param str id: order id
|
2747
2747
|
:param str symbol: unified symbol of the market the order was made in
|
2748
2748
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -2787,8 +2787,8 @@ class okx(Exchange, ImplicitAPI):
|
|
2787
2787
|
async def cancel_orders(self, ids, symbol: Optional[str] = None, params={}):
|
2788
2788
|
"""
|
2789
2789
|
cancel multiple orders
|
2790
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
|
2791
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
|
2790
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
|
2791
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
|
2792
2792
|
:param str[] ids: order ids
|
2793
2793
|
:param str symbol: unified market symbol
|
2794
2794
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -3071,8 +3071,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3071
3071
|
async def fetch_order(self, id: str, symbol: Optional[str] = None, params={}):
|
3072
3072
|
"""
|
3073
3073
|
fetch an order by the id
|
3074
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
|
3075
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
|
3074
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
|
3075
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
|
3076
3076
|
:param str id: the order id
|
3077
3077
|
:param str symbol: unified market symbol
|
3078
3078
|
:param dict [params]: extra and exchange specific parameters
|
@@ -3210,8 +3210,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3210
3210
|
"""
|
3211
3211
|
Fetch orders that are still open
|
3212
3212
|
fetch all unfilled currently open orders
|
3213
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
|
3214
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
|
3213
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
|
3214
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
|
3215
3215
|
:param str symbol: unified market symbol
|
3216
3216
|
:param int [since]: the earliest time in ms to fetch open orders for
|
3217
3217
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -3358,8 +3358,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3358
3358
|
async def fetch_canceled_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3359
3359
|
"""
|
3360
3360
|
fetches information on multiple canceled orders made by the user
|
3361
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3362
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3361
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3362
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3363
3363
|
:param str symbol: unified market symbol of the market orders were made in
|
3364
3364
|
:param int [since]: timestamp in ms of the earliest order, default is None
|
3365
3365
|
:param int [limit]: max number of orders to return, default is None
|
@@ -3523,8 +3523,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3523
3523
|
async def fetch_closed_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3524
3524
|
"""
|
3525
3525
|
fetches information on multiple closed orders made by the user
|
3526
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3527
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3526
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3527
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3528
3528
|
:param str symbol: unified market symbol of the market orders were made in
|
3529
3529
|
:param int [since]: the earliest time in ms to fetch orders for
|
3530
3530
|
:param int [limit]: the maximum number of orde structures to retrieve
|
@@ -3685,7 +3685,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3685
3685
|
async def fetch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3686
3686
|
"""
|
3687
3687
|
fetch all trades made by the user
|
3688
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3688
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3689
3689
|
:param str symbol: unified market symbol
|
3690
3690
|
:param int [since]: the earliest time in ms to fetch trades for
|
3691
3691
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -3749,7 +3749,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3749
3749
|
async def fetch_order_trades(self, id: str, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3750
3750
|
"""
|
3751
3751
|
fetch all the trades made from a single order
|
3752
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3752
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3753
3753
|
:param str id: order id
|
3754
3754
|
:param str symbol: unified market symbol
|
3755
3755
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -3769,9 +3769,9 @@ class okx(Exchange, ImplicitAPI):
|
|
3769
3769
|
async def fetch_ledger(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3770
3770
|
"""
|
3771
3771
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
3772
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
|
3773
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
|
3774
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
|
3772
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
|
3773
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
|
3774
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
|
3775
3775
|
:param str code: unified currency code, default is None
|
3776
3776
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
3777
3777
|
:param int [limit]: max number of ledger entrys to return, default is None
|
@@ -4062,7 +4062,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4062
4062
|
async def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
4063
4063
|
"""
|
4064
4064
|
fetch a dictionary of addresses for a currency, indexed by network
|
4065
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4065
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4066
4066
|
:param str code: unified currency code of the currency for the deposit address
|
4067
4067
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4068
4068
|
:returns dict: a dictionary of `address structures <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>` indexed by the network
|
@@ -4102,7 +4102,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4102
4102
|
async def fetch_deposit_address(self, code: str, params={}):
|
4103
4103
|
"""
|
4104
4104
|
fetch the deposit address for a currency associated with self account
|
4105
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4105
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4106
4106
|
:param str code: unified currency code
|
4107
4107
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4108
4108
|
:returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
|
@@ -4135,7 +4135,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4135
4135
|
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4136
4136
|
"""
|
4137
4137
|
make a withdrawal
|
4138
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
4138
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
4139
4139
|
:param str code: unified currency code
|
4140
4140
|
:param float amount: the amount to withdraw
|
4141
4141
|
:param str address: the address to withdraw to
|
@@ -4203,7 +4203,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4203
4203
|
async def fetch_deposits(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
4204
4204
|
"""
|
4205
4205
|
fetch all deposits made to an account
|
4206
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4206
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4207
4207
|
:param str code: unified currency code
|
4208
4208
|
:param int [since]: the earliest time in ms to fetch deposits for
|
4209
4209
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -4278,7 +4278,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4278
4278
|
async def fetch_deposit(self, id: str, code: Optional[str] = None, params={}):
|
4279
4279
|
"""
|
4280
4280
|
fetch data on a currency deposit via the deposit id
|
4281
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4281
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4282
4282
|
:param str id: deposit id
|
4283
4283
|
:param str code: filter by currency code
|
4284
4284
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4300,7 +4300,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4300
4300
|
async def fetch_withdrawals(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
4301
4301
|
"""
|
4302
4302
|
fetch all withdrawals made from an account
|
4303
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4303
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4304
4304
|
:param str code: unified currency code
|
4305
4305
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
4306
4306
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -4367,7 +4367,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4367
4367
|
async def fetch_withdrawal(self, id: str, code: Optional[str] = None, params={}):
|
4368
4368
|
"""
|
4369
4369
|
fetch data on a currency withdrawal via the withdrawal id
|
4370
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4370
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4371
4371
|
:param str id: withdrawal id
|
4372
4372
|
:param str code: unified currency code of the currency withdrawn, default is None
|
4373
4373
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4538,7 +4538,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4538
4538
|
async def fetch_leverage(self, symbol: str, params={}):
|
4539
4539
|
"""
|
4540
4540
|
fetch the set leverage for a market
|
4541
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
|
4541
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
|
4542
4542
|
:param str symbol: unified market symbol
|
4543
4543
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4544
4544
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
@@ -4576,7 +4576,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4576
4576
|
async def fetch_position(self, symbol: str, params={}):
|
4577
4577
|
"""
|
4578
4578
|
fetch data on a single open contract trade position
|
4579
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4579
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4580
4580
|
:param str symbol: unified market symbol of the market the position is held in, default is None
|
4581
4581
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4582
4582
|
:param str [params.instType]: MARGIN, SWAP, FUTURES, OPTION
|
@@ -4647,7 +4647,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4647
4647
|
|
4648
4648
|
async def fetch_positions(self, symbols: Optional[List[str]] = None, params={}):
|
4649
4649
|
"""
|
4650
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4650
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4651
4651
|
fetch all open positions
|
4652
4652
|
:param str[]|None symbols: list of unified market symbols
|
4653
4653
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4859,7 +4859,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4859
4859
|
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
4860
4860
|
"""
|
4861
4861
|
transfer currency internally between wallets on the same account
|
4862
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
4862
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
4863
4863
|
:param str code: unified currency code
|
4864
4864
|
:param float amount: amount to transfer
|
4865
4865
|
:param str fromAccount: account to transfer from
|
@@ -5029,7 +5029,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5029
5029
|
async def fetch_transfers(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5030
5030
|
"""
|
5031
5031
|
fetch a history of internal transfers made on an account
|
5032
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5032
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5033
5033
|
:param str code: unified currency code of the currency transferred
|
5034
5034
|
:param int [since]: the earliest time in ms to fetch transfers for
|
5035
5035
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -5178,7 +5178,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5178
5178
|
async def fetch_funding_rate(self, symbol: str, params={}):
|
5179
5179
|
"""
|
5180
5180
|
fetch the current funding rate
|
5181
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
|
5181
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
|
5182
5182
|
:param str symbol: unified market symbol
|
5183
5183
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5184
5184
|
:returns dict: a `funding rate structure <https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure>`
|
@@ -5214,7 +5214,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5214
5214
|
async def fetch_funding_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5215
5215
|
"""
|
5216
5216
|
fetch the history of funding payments paid and received on self account
|
5217
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5217
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5218
5218
|
:param str symbol: unified market symbol
|
5219
5219
|
:param int [since]: the earliest time in ms to fetch funding history for
|
5220
5220
|
:param int [limit]: the maximum number of funding history structures to retrieve
|
@@ -5364,7 +5364,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5364
5364
|
async def set_leverage(self, leverage, symbol: Optional[str] = None, params={}):
|
5365
5365
|
"""
|
5366
5366
|
set the level of leverage for a market
|
5367
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
5367
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
5368
5368
|
:param float leverage: the rate of leverage
|
5369
5369
|
:param str symbol: unified market symbol
|
5370
5370
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5417,7 +5417,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5417
5417
|
async def set_position_mode(self, hedged, symbol: Optional[str] = None, params={}):
|
5418
5418
|
"""
|
5419
5419
|
set hedged to True or False for a market
|
5420
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
|
5420
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
|
5421
5421
|
:param bool hedged: set to True to use long_short_mode, False for net_mode
|
5422
5422
|
:param str symbol: not used by okx setPositionMode
|
5423
5423
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5448,7 +5448,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5448
5448
|
async def set_margin_mode(self, marginMode, symbol: Optional[str] = None, params={}):
|
5449
5449
|
"""
|
5450
5450
|
set margin mode to 'cross' or 'isolated'
|
5451
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
|
5451
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
|
5452
5452
|
:param str marginMode: 'cross' or 'isolated'
|
5453
5453
|
:param str symbol: unified market symbol
|
5454
5454
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5493,7 +5493,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5493
5493
|
async def fetch_borrow_rates(self, params={}):
|
5494
5494
|
"""
|
5495
5495
|
fetch the borrow interest rates of all currencies
|
5496
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5496
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5497
5497
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5498
5498
|
:returns dict: a list of `borrow rate structures <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>`
|
5499
5499
|
"""
|
@@ -5530,7 +5530,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5530
5530
|
async def fetch_borrow_rate(self, code: str, params={}):
|
5531
5531
|
"""
|
5532
5532
|
fetch the rate of interest to borrow a currency for margin trading
|
5533
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5533
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5534
5534
|
:param str code: unified currency code
|
5535
5535
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5536
5536
|
:returns dict: a `borrow rate structure <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>`
|
@@ -5617,7 +5617,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5617
5617
|
async def fetch_borrow_rate_histories(self, codes=None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5618
5618
|
"""
|
5619
5619
|
retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is None
|
5620
|
-
see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5620
|
+
:see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5621
5621
|
:param str[]|None codes: list of unified currency codes, default is None
|
5622
5622
|
:param int [since]: timestamp in ms of the earliest borrowRate, default is None
|
5623
5623
|
:param int [limit]: max number of borrow rate prices to return, default is None
|
@@ -5656,7 +5656,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5656
5656
|
async def fetch_borrow_rate_history(self, code: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5657
5657
|
"""
|
5658
5658
|
retrieves a history of a currencies borrow interest rate at specific time slots
|
5659
|
-
see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5659
|
+
:see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5660
5660
|
:param str code: unified currency code
|
5661
5661
|
:param int [since]: timestamp for the earliest borrow rate
|
5662
5662
|
:param int [limit]: the maximum number of `borrow rate structures <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>` to retrieve
|
@@ -5744,7 +5744,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5744
5744
|
async def reduce_margin(self, symbol: str, amount, params={}):
|
5745
5745
|
"""
|
5746
5746
|
remove margin from a position
|
5747
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5747
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5748
5748
|
:param str symbol: unified market symbol
|
5749
5749
|
:param float amount: the amount of margin to remove
|
5750
5750
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5755,7 +5755,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5755
5755
|
async def add_margin(self, symbol: str, amount, params={}):
|
5756
5756
|
"""
|
5757
5757
|
add margin
|
5758
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5758
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5759
5759
|
:param str symbol: unified market symbol
|
5760
5760
|
:param float amount: amount of margin to add
|
5761
5761
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5766,7 +5766,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5766
5766
|
async def fetch_market_leverage_tiers(self, symbol: str, params={}):
|
5767
5767
|
"""
|
5768
5768
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
5769
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
|
5769
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
|
5770
5770
|
:param str symbol: unified market symbol
|
5771
5771
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5772
5772
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
@@ -5856,7 +5856,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5856
5856
|
async def fetch_borrow_interest(self, code: Optional[str] = None, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5857
5857
|
"""
|
5858
5858
|
fetch the interest owed by the user for borrowing currency for margin trading
|
5859
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
|
5859
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
|
5860
5860
|
:param str code: the unified currency code for the currency of the interest
|
5861
5861
|
:param str symbol: the market symbol of an isolated margin market, if None, the interest for cross margin markets is returned
|
5862
5862
|
:param int [since]: timestamp in ms of the earliest time to receive interest records for
|
@@ -5929,7 +5929,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5929
5929
|
async def borrow_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
|
5930
5930
|
"""
|
5931
5931
|
create a loan to borrow margin
|
5932
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5932
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5933
5933
|
:param str code: unified currency code of the currency to borrow
|
5934
5934
|
:param float amount: the amount to borrow
|
5935
5935
|
:param str symbol: not used by okx.borrowMargin()
|
@@ -5971,7 +5971,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5971
5971
|
async def repay_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
|
5972
5972
|
"""
|
5973
5973
|
repay borrowed margin and interest
|
5974
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5974
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5975
5975
|
:param str code: unified currency code of the currency to repay
|
5976
5976
|
:param float amount: the amount to repay
|
5977
5977
|
:param str symbol: not used by okx.repayMargin()
|
@@ -6036,7 +6036,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6036
6036
|
async def fetch_open_interest(self, symbol: str, params={}):
|
6037
6037
|
"""
|
6038
6038
|
Retrieves the open interest of a currency
|
6039
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
|
6039
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
|
6040
6040
|
:param str symbol: Unified CCXT market symbol
|
6041
6041
|
:param dict [params]: exchange specific parameters
|
6042
6042
|
:returns dict} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure:
|
@@ -6074,8 +6074,8 @@ class okx(Exchange, ImplicitAPI):
|
|
6074
6074
|
async def fetch_open_interest_history(self, symbol: str, timeframe='1d', since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
6075
6075
|
"""
|
6076
6076
|
Retrieves the open interest history of a currency
|
6077
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
|
6078
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
|
6077
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
|
6078
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
|
6079
6079
|
:param str symbol: Unified CCXT currency code or unified symbol
|
6080
6080
|
:param str timeframe: "5m", "1h", or "1d" for option only "1d" or "8h"
|
6081
6081
|
:param int [since]: The time in ms of the earliest record to retrieve unix timestamp
|
@@ -6195,7 +6195,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6195
6195
|
async def fetch_deposit_withdraw_fees(self, codes: Optional[List[str]] = None, params={}):
|
6196
6196
|
"""
|
6197
6197
|
fetch deposit and withdraw fees
|
6198
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
6198
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
6199
6199
|
:param str[]|None codes: list of unified currency codes
|
6200
6200
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
6201
6201
|
:returns dict[]: a list of `fees structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
|
@@ -6308,7 +6308,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6308
6308
|
async def fetch_settlement_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
6309
6309
|
"""
|
6310
6310
|
fetches historical settlement records
|
6311
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
|
6311
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
|
6312
6312
|
:param str symbol: unified market symbol to fetch the settlement history for
|
6313
6313
|
:param int [since]: timestamp in ms
|
6314
6314
|
:param int [limit]: number of records
|
@@ -6400,7 +6400,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6400
6400
|
async def fetch_underlying_assets(self, params={}):
|
6401
6401
|
"""
|
6402
6402
|
fetches the market ids of underlying assets for a specific contract market type
|
6403
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
|
6403
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
|
6404
6404
|
:param dict [params]: exchange specific params
|
6405
6405
|
:param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
|
6406
6406
|
:returns dict[]: a list of `underlying assets <https://github.com/ccxt/ccxt/wiki/Manual#underlying-assets-structure>`
|
ccxt/async_support/paymium.py
CHANGED
@@ -134,7 +134,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
134
134
|
async def fetch_balance(self, params={}):
|
135
135
|
"""
|
136
136
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
137
|
-
see https://paymium.github.io/api-documentation/#tag/User/paths/~1user/get
|
137
|
+
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user/get
|
138
138
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
139
139
|
:returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
|
140
140
|
"""
|
@@ -145,7 +145,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
145
145
|
async def fetch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
146
146
|
"""
|
147
147
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
148
|
-
see https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1depth/get
|
148
|
+
:see: https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1depth/get
|
149
149
|
:param str symbol: unified symbol of the market to fetch the order book for
|
150
150
|
:param int [limit]: the maximum amount of order book entries to return
|
151
151
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
@@ -210,7 +210,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
210
210
|
async def fetch_ticker(self, symbol: str, params={}):
|
211
211
|
"""
|
212
212
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
213
|
-
see https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1ticker/get
|
213
|
+
:see: https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1ticker/get
|
214
214
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
215
215
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
216
216
|
:returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
|
@@ -268,7 +268,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
268
268
|
async def fetch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
269
269
|
"""
|
270
270
|
get the list of most recent trades for a particular symbol
|
271
|
-
see https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1trades/get
|
271
|
+
:see: https://paymium.github.io/api-documentation/#tag/Public-data/paths/~1data~1%7Bcurrency%7D~1trades/get
|
272
272
|
:param str symbol: unified symbol of the market to fetch trades for
|
273
273
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
274
274
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -286,7 +286,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
286
286
|
async def create_deposit_address(self, code: str, params={}):
|
287
287
|
"""
|
288
288
|
create a currency deposit address
|
289
|
-
see https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/post
|
289
|
+
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/post
|
290
290
|
:param str code: unified currency code of the currency for the deposit address
|
291
291
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
292
292
|
:returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
|
@@ -306,7 +306,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
306
306
|
async def fetch_deposit_address(self, code: str, params={}):
|
307
307
|
"""
|
308
308
|
fetch the deposit address for a currency associated with self account
|
309
|
-
see https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses~1%7Baddress%7D/get
|
309
|
+
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses~1%7Baddress%7D/get
|
310
310
|
:param str code: unified currency code
|
311
311
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
312
312
|
:returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
|
@@ -329,7 +329,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
329
329
|
async def fetch_deposit_addresses(self, codes=None, params={}):
|
330
330
|
"""
|
331
331
|
fetch deposit addresses for multiple currencies and chain types
|
332
|
-
see https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/get
|
332
|
+
:see: https://paymium.github.io/api-documentation/#tag/User/paths/~1user~1addresses/get
|
333
333
|
:param str[]|None codes: list of unified currency codes, default is None
|
334
334
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
335
335
|
:returns dict: a list of `address structures <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
|
@@ -370,7 +370,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
370
370
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
371
371
|
"""
|
372
372
|
create a trade order
|
373
|
-
see https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post
|
373
|
+
:see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post
|
374
374
|
:param str symbol: unified symbol of the market to create an order in
|
375
375
|
:param str type: 'market' or 'limit'
|
376
376
|
:param str side: 'buy' or 'sell'
|
@@ -398,8 +398,8 @@ class paymium(Exchange, ImplicitAPI):
|
|
398
398
|
async def cancel_order(self, id: str, symbol: Optional[str] = None, params={}):
|
399
399
|
"""
|
400
400
|
cancels an open order
|
401
|
-
see https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders~1%7Buuid%7D/delete
|
402
|
-
see https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders~1%7Buuid%7D~1cancel/delete
|
401
|
+
:see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders~1%7Buuid%7D/delete
|
402
|
+
:see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders~1%7Buuid%7D~1cancel/delete
|
403
403
|
:param str id: order id
|
404
404
|
:param str symbol: not used by paymium cancelOrder()
|
405
405
|
:param dict [params]: extra parameters specific to the paymium api endpoint
|
@@ -413,7 +413,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
413
413
|
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
414
414
|
"""
|
415
415
|
transfer currency internally between wallets on the same account
|
416
|
-
see https://paymium.github.io/api-documentation/#tag/Transfer/paths/~1user~1email_transfers/post
|
416
|
+
:see: https://paymium.github.io/api-documentation/#tag/Transfer/paths/~1user~1email_transfers/post
|
417
417
|
:param str code: unified currency code
|
418
418
|
:param float amount: amount to transfer
|
419
419
|
:param str fromAccount: account to transfer from
|