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/okx.py
CHANGED
@@ -1153,7 +1153,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1153
1153
|
def fetch_status(self, params={}):
|
1154
1154
|
"""
|
1155
1155
|
the latest known information on the availability of the exchange API
|
1156
|
-
see https://www.okx.com/docs-v5/en/#status-get-status
|
1156
|
+
:see: https://www.okx.com/docs-v5/en/#status-get-status
|
1157
1157
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1158
1158
|
:returns dict: a `status structure <https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure>`
|
1159
1159
|
"""
|
@@ -1198,7 +1198,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1198
1198
|
def fetch_time(self, params={}):
|
1199
1199
|
"""
|
1200
1200
|
fetches the current integer timestamp in milliseconds from the exchange server
|
1201
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
|
1201
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-system-time
|
1202
1202
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1203
1203
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
1204
1204
|
"""
|
@@ -1219,7 +1219,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1219
1219
|
def fetch_accounts(self, params={}):
|
1220
1220
|
"""
|
1221
1221
|
fetch all the accounts associated with a profile
|
1222
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
1222
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-account-configuration
|
1223
1223
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1224
1224
|
:returns dict: a dictionary of `account structures <https://github.com/ccxt/ccxt/wiki/Manual#account-structure>` indexed by the account type
|
1225
1225
|
"""
|
@@ -1261,7 +1261,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1261
1261
|
def fetch_markets(self, params={}):
|
1262
1262
|
"""
|
1263
1263
|
retrieves data on all markets for okx
|
1264
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
|
1264
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-instruments
|
1265
1265
|
:param dict [params]: extra parameters specific to the exchange api endpoint
|
1266
1266
|
:returns dict[]: an array of objects representing market data
|
1267
1267
|
"""
|
@@ -1488,7 +1488,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1488
1488
|
def fetch_currencies(self, params={}):
|
1489
1489
|
"""
|
1490
1490
|
fetches all available currencies on an exchange
|
1491
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
1491
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
1492
1492
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1493
1493
|
:returns dict: an associative dictionary of currencies
|
1494
1494
|
"""
|
@@ -1621,7 +1621,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1621
1621
|
def fetch_order_book(self, symbol: str, limit: Optional[int] = None, params={}):
|
1622
1622
|
"""
|
1623
1623
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1624
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
1624
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-order-book
|
1625
1625
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1626
1626
|
:param int [limit]: the maximum amount of order book entries to return
|
1627
1627
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -1720,7 +1720,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1720
1720
|
def fetch_ticker(self, symbol: str, params={}):
|
1721
1721
|
"""
|
1722
1722
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
1723
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
|
1723
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-ticker
|
1724
1724
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1725
1725
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1726
1726
|
:returns dict: a `ticker structure <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
|
@@ -1806,7 +1806,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1806
1806
|
def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
|
1807
1807
|
"""
|
1808
1808
|
fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
1809
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
1809
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-get-tickers
|
1810
1810
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1811
1811
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
1812
1812
|
:returns dict: a dictionary of `ticker structures <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
|
@@ -1913,8 +1913,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1913
1913
|
def fetch_trades(self, symbol: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1914
1914
|
"""
|
1915
1915
|
get the list of most recent trades for a particular symbol
|
1916
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
|
1917
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
|
1916
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-trades
|
1917
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-option-trades
|
1918
1918
|
:param str symbol: unified symbol of the market to fetch trades for
|
1919
1919
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1920
1920
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -2009,12 +2009,12 @@ class okx(Exchange, ImplicitAPI):
|
|
2009
2009
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
2010
2010
|
"""
|
2011
2011
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
2012
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
|
2013
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
|
2014
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
|
2015
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
|
2016
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
|
2017
|
-
see https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
|
2012
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks
|
2013
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-candlesticks-history
|
2014
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks
|
2015
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-mark-price-candlesticks-history
|
2016
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks
|
2017
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-market-data-get-index-candlesticks-history
|
2018
2018
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
2019
2019
|
:param str timeframe: the length of time each candle represents
|
2020
2020
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -2101,7 +2101,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2101
2101
|
def fetch_funding_rate_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
2102
2102
|
"""
|
2103
2103
|
fetches historical funding rate prices
|
2104
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
|
2104
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate-history
|
2105
2105
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
2106
2106
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
2107
2107
|
:param int [limit]: the maximum amount of `funding rate structures <https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure>` to fetch
|
@@ -2233,7 +2233,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2233
2233
|
def fetch_trading_fee(self, symbol: str, params={}):
|
2234
2234
|
"""
|
2235
2235
|
fetch the trading fees for a market
|
2236
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
|
2236
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-fee-rates
|
2237
2237
|
:param str symbol: unified market symbol
|
2238
2238
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
2239
2239
|
:returns dict: a `fee structure <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
|
@@ -2278,8 +2278,8 @@ class okx(Exchange, ImplicitAPI):
|
|
2278
2278
|
def fetch_balance(self, params={}):
|
2279
2279
|
"""
|
2280
2280
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
2281
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
2282
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
2281
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
2282
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
2283
2283
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
2284
2284
|
:returns dict: a `balance structure <https://github.com/ccxt/ccxt/wiki/Manual#balance-structure>`
|
2285
2285
|
"""
|
@@ -2592,9 +2592,9 @@ class okx(Exchange, ImplicitAPI):
|
|
2592
2592
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2593
2593
|
"""
|
2594
2594
|
create a trade order
|
2595
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
2596
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
|
2597
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
|
2595
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
2596
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-multiple-orders
|
2597
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-place-algo-order
|
2598
2598
|
:param str symbol: unified symbol of the market to create an order in
|
2599
2599
|
:param str type: 'market' or 'limit'
|
2600
2600
|
:param str side: 'buy' or 'sell'
|
@@ -2687,7 +2687,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2687
2687
|
def edit_order(self, id: str, symbol, type, side, amount=None, price=None, params={}):
|
2688
2688
|
"""
|
2689
2689
|
edit a trade order
|
2690
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trade-amend-order
|
2690
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trade-amend-order
|
2691
2691
|
:param str id: order id
|
2692
2692
|
:param str symbol: unified symbol of the market to create an order in
|
2693
2693
|
:param str type: 'market' or 'limit'
|
@@ -2741,7 +2741,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2741
2741
|
def cancel_order(self, id: str, symbol: Optional[str] = None, params={}):
|
2742
2742
|
"""
|
2743
2743
|
cancels an open order
|
2744
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
|
2744
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-order
|
2745
2745
|
:param str id: order id
|
2746
2746
|
:param str symbol: unified symbol of the market the order was made in
|
2747
2747
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -2786,8 +2786,8 @@ class okx(Exchange, ImplicitAPI):
|
|
2786
2786
|
def cancel_orders(self, ids, symbol: Optional[str] = None, params={}):
|
2787
2787
|
"""
|
2788
2788
|
cancel multiple orders
|
2789
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
|
2790
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
|
2789
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-cancel-multiple-orders
|
2790
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-post-cancel-algo-order
|
2791
2791
|
:param str[] ids: order ids
|
2792
2792
|
:param str symbol: unified market symbol
|
2793
2793
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -3070,8 +3070,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3070
3070
|
def fetch_order(self, id: str, symbol: Optional[str] = None, params={}):
|
3071
3071
|
"""
|
3072
3072
|
fetch an order by the id
|
3073
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
|
3074
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
|
3073
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-details
|
3074
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-details
|
3075
3075
|
:param str id: the order id
|
3076
3076
|
:param str symbol: unified market symbol
|
3077
3077
|
:param dict [params]: extra and exchange specific parameters
|
@@ -3209,8 +3209,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3209
3209
|
"""
|
3210
3210
|
Fetch orders that are still open
|
3211
3211
|
fetch all unfilled currently open orders
|
3212
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
|
3213
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
|
3212
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-list
|
3213
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-list
|
3214
3214
|
:param str symbol: unified market symbol
|
3215
3215
|
:param int [since]: the earliest time in ms to fetch open orders for
|
3216
3216
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -3357,8 +3357,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3357
3357
|
def fetch_canceled_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3358
3358
|
"""
|
3359
3359
|
fetches information on multiple canceled orders made by the user
|
3360
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3361
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3360
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3361
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3362
3362
|
:param str symbol: unified market symbol of the market orders were made in
|
3363
3363
|
:param int [since]: timestamp in ms of the earliest order, default is None
|
3364
3364
|
:param int [limit]: max number of orders to return, default is None
|
@@ -3522,8 +3522,8 @@ class okx(Exchange, ImplicitAPI):
|
|
3522
3522
|
def fetch_closed_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3523
3523
|
"""
|
3524
3524
|
fetches information on multiple closed orders made by the user
|
3525
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3526
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3525
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-order-history-last-7-days
|
3526
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-algo-trading-get-algo-order-history
|
3527
3527
|
:param str symbol: unified market symbol of the market orders were made in
|
3528
3528
|
:param int [since]: the earliest time in ms to fetch orders for
|
3529
3529
|
:param int [limit]: the maximum number of orde structures to retrieve
|
@@ -3684,7 +3684,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3684
3684
|
def fetch_my_trades(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3685
3685
|
"""
|
3686
3686
|
fetch all trades made by the user
|
3687
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3687
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3688
3688
|
:param str symbol: unified market symbol
|
3689
3689
|
:param int [since]: the earliest time in ms to fetch trades for
|
3690
3690
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -3748,7 +3748,7 @@ class okx(Exchange, ImplicitAPI):
|
|
3748
3748
|
def fetch_order_trades(self, id: str, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3749
3749
|
"""
|
3750
3750
|
fetch all the trades made from a single order
|
3751
|
-
see https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3751
|
+
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-get-transaction-details-last-3-months
|
3752
3752
|
:param str id: order id
|
3753
3753
|
:param str symbol: unified market symbol
|
3754
3754
|
:param int [since]: the earliest time in ms to fetch trades for
|
@@ -3768,9 +3768,9 @@ class okx(Exchange, ImplicitAPI):
|
|
3768
3768
|
def fetch_ledger(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
3769
3769
|
"""
|
3770
3770
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
3771
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
|
3772
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
|
3773
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
|
3771
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-7-days
|
3772
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-bills-details-last-3-months
|
3773
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-asset-bills-details
|
3774
3774
|
:param str code: unified currency code, default is None
|
3775
3775
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
3776
3776
|
:param int [limit]: max number of ledger entrys to return, default is None
|
@@ -4061,7 +4061,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4061
4061
|
def fetch_deposit_addresses_by_network(self, code: str, params={}):
|
4062
4062
|
"""
|
4063
4063
|
fetch a dictionary of addresses for a currency, indexed by network
|
4064
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4064
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4065
4065
|
:param str code: unified currency code of the currency for the deposit address
|
4066
4066
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4067
4067
|
:returns dict: a dictionary of `address structures <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>` indexed by the network
|
@@ -4101,7 +4101,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4101
4101
|
def fetch_deposit_address(self, code: str, params={}):
|
4102
4102
|
"""
|
4103
4103
|
fetch the deposit address for a currency associated with self account
|
4104
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4104
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-deposit-address
|
4105
4105
|
:param str code: unified currency code
|
4106
4106
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4107
4107
|
:returns dict: an `address structure <https://github.com/ccxt/ccxt/wiki/Manual#address-structure>`
|
@@ -4134,7 +4134,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4134
4134
|
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4135
4135
|
"""
|
4136
4136
|
make a withdrawal
|
4137
|
-
see https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
4137
|
+
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
4138
4138
|
:param str code: unified currency code
|
4139
4139
|
:param float amount: the amount to withdraw
|
4140
4140
|
:param str address: the address to withdraw to
|
@@ -4202,7 +4202,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4202
4202
|
def fetch_deposits(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
4203
4203
|
"""
|
4204
4204
|
fetch all deposits made to an account
|
4205
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4205
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4206
4206
|
:param str code: unified currency code
|
4207
4207
|
:param int [since]: the earliest time in ms to fetch deposits for
|
4208
4208
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -4277,7 +4277,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4277
4277
|
def fetch_deposit(self, id: str, code: Optional[str] = None, params={}):
|
4278
4278
|
"""
|
4279
4279
|
fetch data on a currency deposit via the deposit id
|
4280
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4280
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-deposit-history
|
4281
4281
|
:param str id: deposit id
|
4282
4282
|
:param str code: filter by currency code
|
4283
4283
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4299,7 +4299,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4299
4299
|
def fetch_withdrawals(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
4300
4300
|
"""
|
4301
4301
|
fetch all withdrawals made from an account
|
4302
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4302
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4303
4303
|
:param str code: unified currency code
|
4304
4304
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
4305
4305
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -4366,7 +4366,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4366
4366
|
def fetch_withdrawal(self, id: str, code: Optional[str] = None, params={}):
|
4367
4367
|
"""
|
4368
4368
|
fetch data on a currency withdrawal via the withdrawal id
|
4369
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4369
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-withdrawal-history
|
4370
4370
|
:param str id: withdrawal id
|
4371
4371
|
:param str code: unified currency code of the currency withdrawn, default is None
|
4372
4372
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4537,7 +4537,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4537
4537
|
def fetch_leverage(self, symbol: str, params={}):
|
4538
4538
|
"""
|
4539
4539
|
fetch the set leverage for a market
|
4540
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
|
4540
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-leverage
|
4541
4541
|
:param str symbol: unified market symbol
|
4542
4542
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4543
4543
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
@@ -4575,7 +4575,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4575
4575
|
def fetch_position(self, symbol: str, params={}):
|
4576
4576
|
"""
|
4577
4577
|
fetch data on a single open contract trade position
|
4578
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4578
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4579
4579
|
:param str symbol: unified market symbol of the market the position is held in, default is None
|
4580
4580
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
4581
4581
|
:param str [params.instType]: MARGIN, SWAP, FUTURES, OPTION
|
@@ -4646,7 +4646,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4646
4646
|
|
4647
4647
|
def fetch_positions(self, symbols: Optional[List[str]] = None, params={}):
|
4648
4648
|
"""
|
4649
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4649
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
4650
4650
|
fetch all open positions
|
4651
4651
|
:param str[]|None symbols: list of unified market symbols
|
4652
4652
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -4858,7 +4858,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4858
4858
|
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
4859
4859
|
"""
|
4860
4860
|
transfer currency internally between wallets on the same account
|
4861
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
4861
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
4862
4862
|
:param str code: unified currency code
|
4863
4863
|
:param float amount: amount to transfer
|
4864
4864
|
:param str fromAccount: account to transfer from
|
@@ -5028,7 +5028,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5028
5028
|
def fetch_transfers(self, code: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5029
5029
|
"""
|
5030
5030
|
fetch a history of internal transfers made on an account
|
5031
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5031
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5032
5032
|
:param str code: unified currency code of the currency transferred
|
5033
5033
|
:param int [since]: the earliest time in ms to fetch transfers for
|
5034
5034
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -5177,7 +5177,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5177
5177
|
def fetch_funding_rate(self, symbol: str, params={}):
|
5178
5178
|
"""
|
5179
5179
|
fetch the current funding rate
|
5180
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
|
5180
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-funding-rate
|
5181
5181
|
:param str symbol: unified market symbol
|
5182
5182
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5183
5183
|
:returns dict: a `funding rate structure <https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure>`
|
@@ -5213,7 +5213,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5213
5213
|
def fetch_funding_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5214
5214
|
"""
|
5215
5215
|
fetch the history of funding payments paid and received on self account
|
5216
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5216
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
5217
5217
|
:param str symbol: unified market symbol
|
5218
5218
|
:param int [since]: the earliest time in ms to fetch funding history for
|
5219
5219
|
:param int [limit]: the maximum number of funding history structures to retrieve
|
@@ -5363,7 +5363,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5363
5363
|
def set_leverage(self, leverage, symbol: Optional[str] = None, params={}):
|
5364
5364
|
"""
|
5365
5365
|
set the level of leverage for a market
|
5366
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
5366
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
5367
5367
|
:param float leverage: the rate of leverage
|
5368
5368
|
:param str symbol: unified market symbol
|
5369
5369
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5416,7 +5416,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5416
5416
|
def set_position_mode(self, hedged, symbol: Optional[str] = None, params={}):
|
5417
5417
|
"""
|
5418
5418
|
set hedged to True or False for a market
|
5419
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
|
5419
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-position-mode
|
5420
5420
|
:param bool hedged: set to True to use long_short_mode, False for net_mode
|
5421
5421
|
:param str symbol: not used by okx setPositionMode
|
5422
5422
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5447,7 +5447,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5447
5447
|
def set_margin_mode(self, marginMode, symbol: Optional[str] = None, params={}):
|
5448
5448
|
"""
|
5449
5449
|
set margin mode to 'cross' or 'isolated'
|
5450
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
|
5450
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-set-leverage
|
5451
5451
|
:param str marginMode: 'cross' or 'isolated'
|
5452
5452
|
:param str symbol: unified market symbol
|
5453
5453
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5492,7 +5492,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5492
5492
|
def fetch_borrow_rates(self, params={}):
|
5493
5493
|
"""
|
5494
5494
|
fetch the borrow interest rates of all currencies
|
5495
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5495
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5496
5496
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5497
5497
|
:returns dict: a list of `borrow rate structures <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>`
|
5498
5498
|
"""
|
@@ -5529,7 +5529,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5529
5529
|
def fetch_borrow_rate(self, code: str, params={}):
|
5530
5530
|
"""
|
5531
5531
|
fetch the rate of interest to borrow a currency for margin trading
|
5532
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5532
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-interest-rate
|
5533
5533
|
:param str code: unified currency code
|
5534
5534
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5535
5535
|
:returns dict: a `borrow rate structure <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>`
|
@@ -5616,7 +5616,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5616
5616
|
def fetch_borrow_rate_histories(self, codes=None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5617
5617
|
"""
|
5618
5618
|
retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is None
|
5619
|
-
see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5619
|
+
:see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5620
5620
|
:param str[]|None codes: list of unified currency codes, default is None
|
5621
5621
|
:param int [since]: timestamp in ms of the earliest borrowRate, default is None
|
5622
5622
|
:param int [limit]: max number of borrow rate prices to return, default is None
|
@@ -5655,7 +5655,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5655
5655
|
def fetch_borrow_rate_history(self, code: str, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5656
5656
|
"""
|
5657
5657
|
retrieves a history of a currencies borrow interest rate at specific time slots
|
5658
|
-
see https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5658
|
+
:see: https://www.okx.com/docs-v5/en/#financial-product-savings-get-public-borrow-history-public
|
5659
5659
|
:param str code: unified currency code
|
5660
5660
|
:param int [since]: timestamp for the earliest borrow rate
|
5661
5661
|
:param int [limit]: the maximum number of `borrow rate structures <https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure>` to retrieve
|
@@ -5743,7 +5743,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5743
5743
|
def reduce_margin(self, symbol: str, amount, params={}):
|
5744
5744
|
"""
|
5745
5745
|
remove margin from a position
|
5746
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5746
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5747
5747
|
:param str symbol: unified market symbol
|
5748
5748
|
:param float amount: the amount of margin to remove
|
5749
5749
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5754,7 +5754,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5754
5754
|
def add_margin(self, symbol: str, amount, params={}):
|
5755
5755
|
"""
|
5756
5756
|
add margin
|
5757
|
-
see https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5757
|
+
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-increase-decrease-margin
|
5758
5758
|
:param str symbol: unified market symbol
|
5759
5759
|
:param float amount: amount of margin to add
|
5760
5760
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
@@ -5765,7 +5765,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5765
5765
|
def fetch_market_leverage_tiers(self, symbol: str, params={}):
|
5766
5766
|
"""
|
5767
5767
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
|
5768
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
|
5768
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-position-tiers
|
5769
5769
|
:param str symbol: unified market symbol
|
5770
5770
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
5771
5771
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
@@ -5855,7 +5855,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5855
5855
|
def fetch_borrow_interest(self, code: Optional[str] = None, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
5856
5856
|
"""
|
5857
5857
|
fetch the interest owed by the user for borrowing currency for margin trading
|
5858
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
|
5858
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-get-interest-accrued-data
|
5859
5859
|
:param str code: the unified currency code for the currency of the interest
|
5860
5860
|
:param str symbol: the market symbol of an isolated margin market, if None, the interest for cross margin markets is returned
|
5861
5861
|
:param int [since]: timestamp in ms of the earliest time to receive interest records for
|
@@ -5928,7 +5928,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5928
5928
|
def borrow_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
|
5929
5929
|
"""
|
5930
5930
|
create a loan to borrow margin
|
5931
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5931
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5932
5932
|
:param str code: unified currency code of the currency to borrow
|
5933
5933
|
:param float amount: the amount to borrow
|
5934
5934
|
:param str symbol: not used by okx.borrowMargin()
|
@@ -5970,7 +5970,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5970
5970
|
def repay_margin(self, code: str, amount, symbol: Optional[str] = None, params={}):
|
5971
5971
|
"""
|
5972
5972
|
repay borrowed margin and interest
|
5973
|
-
see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5973
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
5974
5974
|
:param str code: unified currency code of the currency to repay
|
5975
5975
|
:param float amount: the amount to repay
|
5976
5976
|
:param str symbol: not used by okx.repayMargin()
|
@@ -6035,7 +6035,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6035
6035
|
def fetch_open_interest(self, symbol: str, params={}):
|
6036
6036
|
"""
|
6037
6037
|
Retrieves the open interest of a currency
|
6038
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
|
6038
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-open-interest
|
6039
6039
|
:param str symbol: Unified CCXT market symbol
|
6040
6040
|
:param dict [params]: exchange specific parameters
|
6041
6041
|
:returns dict} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure:
|
@@ -6073,8 +6073,8 @@ class okx(Exchange, ImplicitAPI):
|
|
6073
6073
|
def fetch_open_interest_history(self, symbol: str, timeframe='1d', since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
6074
6074
|
"""
|
6075
6075
|
Retrieves the open interest history of a currency
|
6076
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
|
6077
|
-
see https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
|
6076
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-contracts-open-interest-and-volume
|
6077
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-trading-data-get-options-open-interest-and-volume
|
6078
6078
|
:param str symbol: Unified CCXT currency code or unified symbol
|
6079
6079
|
:param str timeframe: "5m", "1h", or "1d" for option only "1d" or "8h"
|
6080
6080
|
:param int [since]: The time in ms of the earliest record to retrieve unix timestamp
|
@@ -6194,7 +6194,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6194
6194
|
def fetch_deposit_withdraw_fees(self, codes: Optional[List[str]] = None, params={}):
|
6195
6195
|
"""
|
6196
6196
|
fetch deposit and withdraw fees
|
6197
|
-
see https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
6197
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-get-currencies
|
6198
6198
|
:param str[]|None codes: list of unified currency codes
|
6199
6199
|
:param dict [params]: extra parameters specific to the okx api endpoint
|
6200
6200
|
:returns dict[]: a list of `fees structures <https://github.com/ccxt/ccxt/wiki/Manual#fee-structure>`
|
@@ -6307,7 +6307,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6307
6307
|
def fetch_settlement_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
6308
6308
|
"""
|
6309
6309
|
fetches historical settlement records
|
6310
|
-
see https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
|
6310
|
+
:see: https://www.okx.com/docs-v5/en/#rest-api-public-data-get-delivery-exercise-history
|
6311
6311
|
:param str symbol: unified market symbol to fetch the settlement history for
|
6312
6312
|
:param int [since]: timestamp in ms
|
6313
6313
|
:param int [limit]: number of records
|
@@ -6399,7 +6399,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6399
6399
|
def fetch_underlying_assets(self, params={}):
|
6400
6400
|
"""
|
6401
6401
|
fetches the market ids of underlying assets for a specific contract market type
|
6402
|
-
see https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
|
6402
|
+
:see: https://www.okx.com/docs-v5/en/#public-data-rest-api-get-underlying
|
6403
6403
|
:param dict [params]: exchange specific params
|
6404
6404
|
:param str [params.type]: the contract market type, 'option', 'swap' or 'future', the default is 'option'
|
6405
6405
|
:returns dict[]: a list of `underlying assets <https://github.com/ccxt/ccxt/wiki/Manual#underlying-assets-structure>`
|
ccxt/paymium.py
CHANGED
@@ -134,7 +134,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
134
134
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|