ccxt 4.4.29__py2.py3-none-any.whl → 4.4.31__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/alpaca.py +1 -0
- ccxt/abstract/binance.py +9 -0
- ccxt/abstract/binancecoinm.py +9 -0
- ccxt/abstract/binanceus.py +9 -0
- ccxt/abstract/binanceusdm.py +9 -0
- ccxt/ace.py +36 -12
- ccxt/alpaca.py +113 -28
- ccxt/ascendex.py +65 -30
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +36 -12
- ccxt/async_support/alpaca.py +113 -28
- ccxt/async_support/ascendex.py +65 -30
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bigone.py +71 -27
- ccxt/async_support/binance.py +564 -323
- ccxt/async_support/bingx.py +208 -108
- ccxt/async_support/bit2c.py +34 -12
- ccxt/async_support/bitbank.py +42 -14
- ccxt/async_support/bitbns.py +29 -21
- ccxt/async_support/bitfinex.py +77 -33
- ccxt/async_support/bitfinex2.py +116 -44
- ccxt/async_support/bitflyer.py +54 -18
- ccxt/async_support/bitget.py +277 -145
- ccxt/async_support/bithumb.py +39 -14
- ccxt/async_support/bitmart.py +198 -132
- ccxt/async_support/bitmex.py +90 -30
- ccxt/async_support/bitopro.py +66 -22
- ccxt/async_support/bitrue.py +109 -57
- ccxt/async_support/bitso.py +55 -19
- ccxt/async_support/bitstamp.py +84 -36
- ccxt/async_support/bitteam.py +51 -17
- ccxt/async_support/bitvavo.py +57 -19
- ccxt/async_support/bl3p.py +26 -10
- ccxt/async_support/blockchaincom.py +63 -21
- ccxt/async_support/blofin.py +95 -38
- ccxt/async_support/btcalpha.py +48 -16
- ccxt/async_support/btcbox.py +27 -9
- ccxt/async_support/btcmarkets.py +57 -19
- ccxt/async_support/btcturk.py +36 -12
- ccxt/async_support/bybit.py +251 -95
- ccxt/async_support/cex.py +65 -22
- ccxt/async_support/coinbase.py +138 -56
- ccxt/async_support/coinbaseexchange.py +76 -28
- ccxt/async_support/coinbaseinternational.py +75 -27
- ccxt/async_support/coincatch.py +191 -97
- ccxt/async_support/coincheck.py +33 -11
- ccxt/async_support/coinex.py +212 -101
- ccxt/async_support/coinlist.py +87 -30
- ccxt/async_support/coinmate.py +55 -24
- ccxt/async_support/coinmetro.py +52 -18
- ccxt/async_support/coinone.py +27 -10
- ccxt/async_support/coinsph.py +73 -27
- ccxt/async_support/coinspot.py +25 -9
- ccxt/async_support/cryptocom.py +103 -38
- ccxt/async_support/currencycom.py +70 -23
- ccxt/async_support/delta.py +90 -30
- ccxt/async_support/deribit.py +138 -53
- ccxt/async_support/digifinex.py +114 -51
- ccxt/async_support/exmo.py +104 -45
- ccxt/async_support/gate.py +298 -155
- ccxt/async_support/gemini.py +57 -20
- ccxt/async_support/hashkey.py +151 -66
- ccxt/async_support/hitbtc.py +156 -73
- ccxt/async_support/hollaex.py +76 -25
- ccxt/async_support/htx.py +297 -240
- ccxt/async_support/huobijp.py +1 -0
- ccxt/async_support/hyperliquid.py +203 -42
- ccxt/async_support/idex.py +73 -24
- ccxt/async_support/independentreserve.py +12 -5
- ccxt/async_support/indodax.py +53 -16
- ccxt/async_support/kraken.py +107 -35
- ccxt/async_support/krakenfutures.py +88 -34
- ccxt/async_support/kucoin.py +211 -109
- ccxt/async_support/kucoinfutures.py +119 -42
- ccxt/async_support/kuna.py +80 -39
- ccxt/async_support/latoken.py +70 -33
- ccxt/async_support/lbank.py +90 -39
- ccxt/async_support/luno.py +54 -19
- ccxt/async_support/lykke.py +54 -19
- ccxt/async_support/mercado.py +1 -0
- ccxt/async_support/mexc.py +226 -108
- ccxt/async_support/ndax.py +58 -19
- ccxt/async_support/novadax.py +67 -22
- ccxt/async_support/oceanex.py +58 -19
- ccxt/async_support/okcoin.py +81 -38
- ccxt/async_support/okx.py +270 -109
- ccxt/async_support/onetrading.py +3 -1
- ccxt/async_support/oxfun.py +95 -36
- ccxt/async_support/p2b.py +49 -23
- ccxt/async_support/paradex.py +75 -27
- ccxt/async_support/paymium.py +31 -11
- ccxt/async_support/phemex.py +91 -41
- ccxt/async_support/poloniex.py +80 -30
- ccxt/async_support/poloniexfutures.py +72 -30
- ccxt/async_support/probit.py +64 -22
- ccxt/async_support/timex.py +58 -19
- ccxt/async_support/tokocrypto.py +63 -22
- ccxt/async_support/tradeogre.py +7 -2
- ccxt/async_support/upbit.py +72 -25
- ccxt/async_support/vertex.py +74 -28
- ccxt/async_support/wavesexchange.py +29 -8
- ccxt/async_support/wazirx.py +51 -17
- ccxt/async_support/whitebit.py +105 -41
- ccxt/async_support/woo.py +162 -65
- ccxt/async_support/woofipro.py +118 -49
- ccxt/async_support/xt.py +150 -73
- ccxt/async_support/yobit.py +49 -16
- ccxt/async_support/zaif.py +30 -10
- ccxt/async_support/zonda.py +46 -16
- ccxt/base/exchange.py +34 -34
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +71 -27
- ccxt/binance.py +564 -323
- ccxt/bingx.py +208 -108
- ccxt/bit2c.py +34 -12
- ccxt/bitbank.py +42 -14
- ccxt/bitbns.py +29 -21
- ccxt/bitfinex.py +77 -33
- ccxt/bitfinex2.py +116 -44
- ccxt/bitflyer.py +54 -18
- ccxt/bitget.py +277 -145
- ccxt/bithumb.py +39 -14
- ccxt/bitmart.py +198 -132
- ccxt/bitmex.py +90 -30
- ccxt/bitopro.py +66 -22
- ccxt/bitrue.py +109 -57
- ccxt/bitso.py +55 -19
- ccxt/bitstamp.py +84 -36
- ccxt/bitteam.py +51 -17
- ccxt/bitvavo.py +57 -19
- ccxt/bl3p.py +26 -10
- ccxt/blockchaincom.py +63 -21
- ccxt/blofin.py +95 -38
- ccxt/btcalpha.py +48 -16
- ccxt/btcbox.py +27 -9
- ccxt/btcmarkets.py +57 -19
- ccxt/btcturk.py +36 -12
- ccxt/bybit.py +251 -95
- ccxt/cex.py +65 -22
- ccxt/coinbase.py +138 -56
- ccxt/coinbaseexchange.py +76 -28
- ccxt/coinbaseinternational.py +75 -27
- ccxt/coincatch.py +191 -97
- ccxt/coincheck.py +33 -11
- ccxt/coinex.py +212 -101
- ccxt/coinlist.py +87 -30
- ccxt/coinmate.py +55 -24
- ccxt/coinmetro.py +52 -18
- ccxt/coinone.py +27 -10
- ccxt/coinsph.py +73 -27
- ccxt/coinspot.py +25 -9
- ccxt/cryptocom.py +103 -38
- ccxt/currencycom.py +70 -23
- ccxt/delta.py +90 -30
- ccxt/deribit.py +138 -53
- ccxt/digifinex.py +114 -51
- ccxt/exmo.py +104 -45
- ccxt/gate.py +298 -155
- ccxt/gemini.py +57 -20
- ccxt/hashkey.py +151 -66
- ccxt/hitbtc.py +156 -73
- ccxt/hollaex.py +76 -25
- ccxt/htx.py +297 -240
- ccxt/huobijp.py +1 -0
- ccxt/hyperliquid.py +203 -42
- ccxt/idex.py +73 -24
- ccxt/independentreserve.py +12 -5
- ccxt/indodax.py +53 -16
- ccxt/kraken.py +107 -35
- ccxt/krakenfutures.py +88 -34
- ccxt/kucoin.py +211 -109
- ccxt/kucoinfutures.py +119 -42
- ccxt/kuna.py +80 -39
- ccxt/latoken.py +70 -33
- ccxt/lbank.py +90 -39
- ccxt/luno.py +54 -19
- ccxt/lykke.py +54 -19
- ccxt/mercado.py +1 -0
- ccxt/mexc.py +226 -108
- ccxt/ndax.py +58 -19
- ccxt/novadax.py +67 -22
- ccxt/oceanex.py +58 -19
- ccxt/okcoin.py +81 -38
- ccxt/okx.py +270 -109
- ccxt/onetrading.py +3 -1
- ccxt/oxfun.py +95 -36
- ccxt/p2b.py +49 -23
- ccxt/paradex.py +75 -27
- ccxt/paymium.py +31 -11
- ccxt/phemex.py +91 -41
- ccxt/poloniex.py +80 -30
- ccxt/poloniexfutures.py +72 -30
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +15 -5
- ccxt/pro/ascendex.py +18 -6
- ccxt/pro/binance.py +200 -119
- ccxt/pro/bingx.py +44 -24
- ccxt/pro/bitfinex.py +13 -5
- ccxt/pro/bitget.py +75 -36
- ccxt/pro/bithumb.py +12 -4
- ccxt/pro/bitmart.py +44 -20
- ccxt/pro/bitmex.py +42 -14
- ccxt/pro/bitopro.py +15 -5
- ccxt/pro/bitrue.py +7 -3
- ccxt/pro/bitvavo.py +51 -17
- ccxt/pro/blockchaincom.py +18 -6
- ccxt/pro/blofin.py +38 -13
- ccxt/pro/bybit.py +100 -42
- ccxt/pro/cex.py +48 -16
- ccxt/pro/coinbase.py +32 -12
- ccxt/pro/coinbaseexchange.py +1 -1
- ccxt/pro/coinbaseinternational.py +34 -14
- ccxt/pro/coincatch.py +54 -19
- ccxt/pro/coincheck.py +6 -2
- ccxt/pro/coinex.py +40 -20
- ccxt/pro/coinone.py +9 -3
- ccxt/pro/cryptocom.py +70 -26
- ccxt/pro/deribit.py +36 -12
- ccxt/pro/exmo.py +10 -4
- ccxt/pro/gate.py +64 -30
- ccxt/pro/gemini.py +21 -7
- ccxt/pro/hashkey.py +26 -8
- ccxt/pro/hitbtc.py +61 -37
- ccxt/pro/hollaex.py +15 -5
- ccxt/pro/htx.py +39 -21
- ccxt/pro/hyperliquid.py +41 -14
- ccxt/pro/kraken.py +49 -17
- ccxt/pro/krakenfutures.py +47 -24
- ccxt/pro/kucoin.py +60 -31
- ccxt/pro/kucoinfutures.py +41 -19
- ccxt/pro/lbank.py +27 -9
- ccxt/pro/luno.py +3 -1
- ccxt/pro/mexc.py +35 -17
- ccxt/pro/ndax.py +12 -4
- ccxt/pro/okcoin.py +18 -6
- ccxt/pro/okx.py +76 -28
- ccxt/pro/onetrading.py +21 -7
- ccxt/pro/oxfun.py +54 -20
- ccxt/pro/p2b.py +23 -11
- ccxt/pro/paradex.py +12 -4
- ccxt/pro/phemex.py +31 -19
- ccxt/pro/poloniex.py +50 -22
- ccxt/pro/poloniexfutures.py +17 -7
- ccxt/pro/probit.py +18 -6
- ccxt/pro/upbit.py +25 -9
- ccxt/pro/vertex.py +20 -6
- ccxt/pro/wazirx.py +21 -7
- ccxt/pro/whitebit.py +25 -9
- ccxt/pro/woo.py +32 -12
- ccxt/pro/woofipro.py +35 -13
- ccxt/pro/xt.py +46 -26
- ccxt/probit.py +64 -22
- ccxt/test/tests_helpers.py +2 -2
- ccxt/timex.py +58 -19
- ccxt/tokocrypto.py +63 -22
- ccxt/tradeogre.py +7 -2
- ccxt/upbit.py +72 -25
- ccxt/vertex.py +74 -28
- ccxt/wavesexchange.py +29 -8
- ccxt/wazirx.py +51 -17
- ccxt/whitebit.py +105 -41
- ccxt/woo.py +162 -65
- ccxt/woofipro.py +118 -49
- ccxt/xt.py +150 -73
- ccxt/yobit.py +49 -16
- ccxt/zaif.py +30 -10
- ccxt/zonda.py +46 -16
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/METADATA +5 -5
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/RECORD +273 -273
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/WHEEL +0 -0
- {ccxt-4.4.29.dist-info → ccxt-4.4.31.dist-info}/top_level.txt +0 -0
ccxt/coinex.py
CHANGED
@@ -535,6 +535,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
535
535
|
'3008': RequestTimeout, # Service busy, please try again later.
|
536
536
|
'3109': InsufficientFunds, # {"code":3109,"data":{},"message":"balance not enough"}
|
537
537
|
'3127': InvalidOrder, # The order quantity is below the minimum requirement. Please adjust the order quantity.
|
538
|
+
'3600': OrderNotFound, # {"code":3600,"data":{},"message":"Order not found"}
|
538
539
|
'3606': InvalidOrder, # The price difference between the order price and the latest price is too large. Please adjust the order amount accordingly.
|
539
540
|
'3610': ExchangeError, # Order cancellation prohibited during the Call Auction period.
|
540
541
|
'3612': InvalidOrder, # The est. ask price is lower than the current bottom ask price. Please reduce the amount.
|
@@ -585,7 +586,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
585
586
|
def fetch_currencies(self, params={}) -> Currencies:
|
586
587
|
"""
|
587
588
|
fetches all available currencies on an exchange
|
588
|
-
|
589
|
+
|
590
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-all-deposit-withdrawal-config
|
591
|
+
|
589
592
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
590
593
|
:returns dict: an associative dictionary of currencies
|
591
594
|
"""
|
@@ -707,8 +710,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
707
710
|
def fetch_markets(self, params={}) -> List[Market]:
|
708
711
|
"""
|
709
712
|
retrieves data on all markets for coinex
|
710
|
-
|
711
|
-
|
713
|
+
|
714
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market
|
715
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market
|
716
|
+
|
712
717
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
713
718
|
:returns dict[]: an array of objects representing market data
|
714
719
|
"""
|
@@ -967,8 +972,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
967
972
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
968
973
|
"""
|
969
974
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
970
|
-
|
971
|
-
|
975
|
+
|
976
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
977
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
978
|
+
|
972
979
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
973
980
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
974
981
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1037,8 +1044,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1037
1044
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
1038
1045
|
"""
|
1039
1046
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
1040
|
-
|
1041
|
-
|
1047
|
+
|
1048
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market-ticker
|
1049
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-ticker
|
1050
|
+
|
1042
1051
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1043
1052
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1044
1053
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1108,7 +1117,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
1108
1117
|
def fetch_time(self, params={}):
|
1109
1118
|
"""
|
1110
1119
|
fetches the current integer timestamp in milliseconds from the exchange server
|
1111
|
-
|
1120
|
+
|
1121
|
+
https://docs.coinex.com/api/v2/common/http/time
|
1122
|
+
|
1112
1123
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1113
1124
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
1114
1125
|
"""
|
@@ -1128,8 +1139,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1128
1139
|
def fetch_order_book(self, symbol: str, limit: Int = 20, params={}):
|
1129
1140
|
"""
|
1130
1141
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
1131
|
-
|
1132
|
-
|
1142
|
+
|
1143
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market-depth
|
1144
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-depth
|
1145
|
+
|
1133
1146
|
:param str symbol: unified symbol of the market to fetch the order book for
|
1134
1147
|
:param int [limit]: the maximum amount of order book entries to return
|
1135
1148
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1278,8 +1291,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1278
1291
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
1279
1292
|
"""
|
1280
1293
|
get the list of the most recent trades for a particular symbol
|
1281
|
-
|
1282
|
-
|
1294
|
+
|
1295
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market-deals
|
1296
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-deals
|
1297
|
+
|
1283
1298
|
:param str symbol: unified symbol of the market to fetch trades for
|
1284
1299
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
1285
1300
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -1321,8 +1336,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1321
1336
|
def fetch_trading_fee(self, symbol: str, params={}) -> TradingFeeInterface:
|
1322
1337
|
"""
|
1323
1338
|
fetch the trading fees for a market
|
1324
|
-
|
1325
|
-
|
1339
|
+
|
1340
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market
|
1341
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market
|
1342
|
+
|
1326
1343
|
:param str symbol: unified market symbol
|
1327
1344
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1328
1345
|
:returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -1385,8 +1402,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1385
1402
|
def fetch_trading_fees(self, params={}) -> TradingFees:
|
1386
1403
|
"""
|
1387
1404
|
fetch the trading fees for multiple markets
|
1388
|
-
|
1389
|
-
|
1405
|
+
|
1406
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market
|
1407
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market
|
1408
|
+
|
1390
1409
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1391
1410
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
1392
1411
|
"""
|
@@ -1486,8 +1505,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1486
1505
|
def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
1487
1506
|
"""
|
1488
1507
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1489
|
-
|
1490
|
-
|
1508
|
+
|
1509
|
+
https://docs.coinex.com/api/v2/spot/market/http/list-market-kline
|
1510
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-kline
|
1511
|
+
|
1491
1512
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1492
1513
|
:param str timeframe: the length of time each candle represents
|
1493
1514
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -1674,10 +1695,12 @@ class coinex(Exchange, ImplicitAPI):
|
|
1674
1695
|
def fetch_balance(self, params={}) -> Balances:
|
1675
1696
|
"""
|
1676
1697
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1698
|
+
|
1699
|
+
https://docs.coinex.com/api/v2/assets/balance/http/get-spot-balance # spot
|
1700
|
+
https://docs.coinex.com/api/v2/assets/balance/http/get-futures-balance # swap
|
1701
|
+
https://docs.coinex.com/api/v2/assets/balance/http/get-marigin-balance # margin
|
1702
|
+
https://docs.coinex.com/api/v2/assets/balance/http/get-financial-balance # financial
|
1703
|
+
|
1681
1704
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1682
1705
|
:param str [params.type]: 'margin', 'swap', 'financial', or 'spot'
|
1683
1706
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
@@ -1973,8 +1996,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
1973
1996
|
def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
|
1974
1997
|
"""
|
1975
1998
|
create a market buy order by providing the symbol and cost
|
1976
|
-
|
1977
|
-
|
1999
|
+
|
2000
|
+
https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade003_market_order
|
2001
|
+
https://docs.coinex.com/api/v2/spot/order/http/put-order
|
2002
|
+
|
1978
2003
|
:param str symbol: unified symbol of the market to create an order in
|
1979
2004
|
:param float cost: how much you want to trade in units of the quote currency
|
1980
2005
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2072,13 +2097,15 @@ class coinex(Exchange, ImplicitAPI):
|
|
2072
2097
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
2073
2098
|
"""
|
2074
2099
|
create a trade order
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2100
|
+
|
2101
|
+
https://docs.coinex.com/api/v2/spot/order/http/put-order
|
2102
|
+
https://docs.coinex.com/api/v2/spot/order/http/put-stop-order
|
2103
|
+
https://docs.coinex.com/api/v2/futures/order/http/put-order
|
2104
|
+
https://docs.coinex.com/api/v2/futures/order/http/put-stop-order
|
2105
|
+
https://docs.coinex.com/api/v2/futures/position/http/close-position
|
2106
|
+
https://docs.coinex.com/api/v2/futures/position/http/set-position-stop-loss
|
2107
|
+
https://docs.coinex.com/api/v2/futures/position/http/set-position-take-profit
|
2108
|
+
|
2082
2109
|
:param str symbol: unified symbol of the market to create an order in
|
2083
2110
|
:param str type: 'market' or 'limit'
|
2084
2111
|
:param str side: 'buy' or 'sell'
|
@@ -2308,10 +2335,12 @@ class coinex(Exchange, ImplicitAPI):
|
|
2308
2335
|
def create_orders(self, orders: List[OrderRequest], params={}) -> List[Order]:
|
2309
2336
|
"""
|
2310
2337
|
create a list of trade orders(all orders should be of the same symbol)
|
2311
|
-
|
2312
|
-
|
2313
|
-
|
2314
|
-
|
2338
|
+
|
2339
|
+
https://docs.coinex.com/api/v2/spot/order/http/put-multi-order
|
2340
|
+
https://docs.coinex.com/api/v2/spot/order/http/put-multi-stop-order
|
2341
|
+
https://docs.coinex.com/api/v2/futures/order/http/put-multi-order
|
2342
|
+
https://docs.coinex.com/api/v2/futures/order/http/put-multi-stop-order
|
2343
|
+
|
2315
2344
|
:param Array orders: list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
|
2316
2345
|
:param dict [params]: extra parameters specific to the api endpoint
|
2317
2346
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2493,10 +2522,12 @@ class coinex(Exchange, ImplicitAPI):
|
|
2493
2522
|
def cancel_orders(self, ids, symbol: Str = None, params={}):
|
2494
2523
|
"""
|
2495
2524
|
cancel multiple orders
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2499
|
-
|
2525
|
+
|
2526
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-order
|
2527
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-batch-stop-order
|
2528
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-order
|
2529
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-batch-stop-order
|
2530
|
+
|
2500
2531
|
:param str[] ids: order ids
|
2501
2532
|
:param str symbol: unified market symbol
|
2502
2533
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -2513,10 +2544,13 @@ class coinex(Exchange, ImplicitAPI):
|
|
2513
2544
|
stop = self.safe_bool_2(params, 'stop', 'trigger')
|
2514
2545
|
params = self.omit(params, ['stop', 'trigger'])
|
2515
2546
|
response = None
|
2547
|
+
requestIds = []
|
2548
|
+
for i in range(0, len(ids)):
|
2549
|
+
requestIds.append(int(ids[i]))
|
2516
2550
|
if stop:
|
2517
|
-
request['stop_ids'] =
|
2551
|
+
request['stop_ids'] = requestIds
|
2518
2552
|
else:
|
2519
|
-
request['order_ids'] =
|
2553
|
+
request['order_ids'] = requestIds
|
2520
2554
|
if market['spot']:
|
2521
2555
|
if stop:
|
2522
2556
|
response = self.v2PrivatePostSpotCancelBatchStopOrder(self.extend(request, params))
|
@@ -2664,10 +2698,12 @@ class coinex(Exchange, ImplicitAPI):
|
|
2664
2698
|
def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
|
2665
2699
|
"""
|
2666
2700
|
edit a trade order
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
|
2701
|
+
|
2702
|
+
https://docs.coinex.com/api/v2/spot/order/http/edit-order
|
2703
|
+
https://docs.coinex.com/api/v2/spot/order/http/edit-stop-order
|
2704
|
+
https://docs.coinex.com/api/v2/futures/order/http/edit-order
|
2705
|
+
https://docs.coinex.com/api/v2/futures/order/http/edit-stop-order
|
2706
|
+
|
2671
2707
|
:param str id: order id
|
2672
2708
|
:param str symbol: unified symbol of the market to create an order in
|
2673
2709
|
:param str type: 'market' or 'limit'
|
@@ -2797,14 +2833,16 @@ class coinex(Exchange, ImplicitAPI):
|
|
2797
2833
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
2798
2834
|
"""
|
2799
2835
|
cancels an open order
|
2800
|
-
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2836
|
+
|
2837
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-order
|
2838
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order
|
2839
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-order-by-client-id
|
2840
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-stop-order-by-client-id
|
2841
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-order
|
2842
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order
|
2843
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-order-by-client-id
|
2844
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-stop-order-by-client-id
|
2845
|
+
|
2808
2846
|
:param str id: order id
|
2809
2847
|
:param str symbol: unified symbol of the market the order was made in
|
2810
2848
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3078,8 +3116,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
3078
3116
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
3079
3117
|
"""
|
3080
3118
|
cancel all open orders in a market
|
3081
|
-
|
3082
|
-
|
3119
|
+
|
3120
|
+
https://docs.coinex.com/api/v2/spot/order/http/cancel-all-order
|
3121
|
+
https://docs.coinex.com/api/v2/futures/order/http/cancel-all-order
|
3122
|
+
|
3083
3123
|
:param str symbol: unified market symbol of the market to cancel orders in
|
3084
3124
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3085
3125
|
:param str [params.marginMode]: 'cross' or 'isolated' for canceling spot margin orders
|
@@ -3119,8 +3159,11 @@ class coinex(Exchange, ImplicitAPI):
|
|
3119
3159
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
3120
3160
|
"""
|
3121
3161
|
fetches information on an order made by the user
|
3122
|
-
|
3123
|
-
|
3162
|
+
|
3163
|
+
https://docs.coinex.com/api/v2/spot/order/http/get-order-status
|
3164
|
+
https://docs.coinex.com/api/v2/futures/order/http/get-order-status
|
3165
|
+
|
3166
|
+
:param str id: order id
|
3124
3167
|
:param str symbol: unified symbol of the market the order was made in
|
3125
3168
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3126
3169
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -3203,13 +3246,17 @@ class coinex(Exchange, ImplicitAPI):
|
|
3203
3246
|
def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3204
3247
|
"""
|
3205
3248
|
fetch a list of orders
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3249
|
+
|
3250
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
3251
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
3252
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
3253
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
3254
|
+
|
3255
|
+
@param status
|
3210
3256
|
:param str symbol: unified market symbol of the market orders were made in
|
3211
3257
|
:param int [since]: the earliest time in ms to fetch orders for
|
3212
3258
|
:param int [limit]: the maximum number of order structures to retrieve
|
3259
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3213
3260
|
:param boolean [params.trigger]: set to True for fetching trigger orders
|
3214
3261
|
:param str [params.marginMode]: 'cross' or 'isolated' for fetching spot margin orders
|
3215
3262
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -3503,10 +3550,12 @@ class coinex(Exchange, ImplicitAPI):
|
|
3503
3550
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
3504
3551
|
"""
|
3505
3552
|
fetch all unfilled currently open orders
|
3506
|
-
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3553
|
+
|
3554
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-pending-order
|
3555
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-pending-stop-order
|
3556
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-pending-order
|
3557
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-pending-stop-order
|
3558
|
+
|
3510
3559
|
:param str symbol: unified market symbol
|
3511
3560
|
:param int [since]: the earliest time in ms to fetch open orders for
|
3512
3561
|
:param int [limit]: the maximum number of open order structures to retrieve
|
@@ -3523,13 +3572,16 @@ class coinex(Exchange, ImplicitAPI):
|
|
3523
3572
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
3524
3573
|
"""
|
3525
3574
|
fetches information on multiple closed orders made by the user
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3529
|
-
|
3575
|
+
|
3576
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-finished-order
|
3577
|
+
https://docs.coinex.com/api/v2/spot/order/http/list-finished-stop-order
|
3578
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-finished-order
|
3579
|
+
https://docs.coinex.com/api/v2/futures/order/http/list-finished-stop-order
|
3580
|
+
|
3530
3581
|
:param str symbol: unified market symbol of the market orders were made in
|
3531
3582
|
:param int [since]: the earliest time in ms to fetch orders for
|
3532
3583
|
:param int [limit]: the maximum number of order structures to retrieve
|
3584
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3533
3585
|
:param boolean [params.trigger]: set to True for fetching trigger orders
|
3534
3586
|
:param str [params.marginMode]: 'cross' or 'isolated' for fetching spot margin orders
|
3535
3587
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -3539,7 +3591,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3539
3591
|
def create_deposit_address(self, code: str, params={}):
|
3540
3592
|
"""
|
3541
3593
|
create a currency deposit address
|
3542
|
-
|
3594
|
+
|
3595
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/update-deposit-address
|
3596
|
+
|
3543
3597
|
:param str code: unified currency code of the currency for the deposit address
|
3544
3598
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3545
3599
|
:param str [params.network]: the blockchain network to create a deposit address on
|
@@ -3572,7 +3626,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3572
3626
|
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3573
3627
|
"""
|
3574
3628
|
fetch the deposit address for a currency associated with self account
|
3575
|
-
|
3629
|
+
|
3630
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-address
|
3631
|
+
|
3576
3632
|
:param str code: unified currency code
|
3577
3633
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3578
3634
|
:param str [params.network]: the blockchain network to create a deposit address on
|
@@ -3630,8 +3686,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
3630
3686
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3631
3687
|
"""
|
3632
3688
|
fetch all trades made by the user
|
3633
|
-
|
3634
|
-
|
3689
|
+
|
3690
|
+
https://docs.coinex.com/api/v2/spot/deal/http/list-user-deals
|
3691
|
+
https://docs.coinex.com/api/v2/futures/deal/http/list-user-deals
|
3692
|
+
|
3635
3693
|
:param str symbol: unified market symbol
|
3636
3694
|
:param int [since]: the earliest time in ms to fetch trades for
|
3637
3695
|
:param int [limit]: the maximum number of trade structures to retrieve
|
@@ -3711,8 +3769,10 @@ class coinex(Exchange, ImplicitAPI):
|
|
3711
3769
|
def fetch_positions(self, symbols: Strings = None, params={}):
|
3712
3770
|
"""
|
3713
3771
|
fetch all open positions
|
3714
|
-
|
3715
|
-
|
3772
|
+
|
3773
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
3774
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
3775
|
+
|
3716
3776
|
:param str[] [symbols]: list of unified market symbols
|
3717
3777
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3718
3778
|
:param str [params.method]: the method to use 'v2PrivateGetFuturesPendingPosition' or 'v2PrivateGetFuturesFinishedPosition' default is 'v2PrivateGetFuturesPendingPosition'
|
@@ -3794,7 +3854,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3794
3854
|
def fetch_position(self, symbol: str, params={}):
|
3795
3855
|
"""
|
3796
3856
|
fetch data on a single open contract trade position
|
3797
|
-
|
3857
|
+
|
3858
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-pending-position
|
3859
|
+
|
3798
3860
|
:param str symbol: unified market symbol of the market the position is held in
|
3799
3861
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3800
3862
|
:returns dict: a `position structure <https://docs.ccxt.com/#/?id=position-structure>`
|
@@ -3924,7 +3986,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3924
3986
|
def set_margin_mode(self, marginMode: str, symbol: Str = None, params={}):
|
3925
3987
|
"""
|
3926
3988
|
set margin mode to 'cross' or 'isolated'
|
3927
|
-
|
3989
|
+
|
3990
|
+
https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
3991
|
+
|
3928
3992
|
:param str marginMode: 'cross' or 'isolated'
|
3929
3993
|
:param str symbol: unified market symbol
|
3930
3994
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -3966,7 +4030,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
3966
4030
|
|
3967
4031
|
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
3968
4032
|
"""
|
3969
|
-
|
4033
|
+
|
4034
|
+
https://docs.coinex.com/api/v2/futures/position/http/adjust-position-leverage
|
4035
|
+
|
3970
4036
|
set the level of leverage for a market
|
3971
4037
|
:param float leverage: the rate of leverage
|
3972
4038
|
:param str symbol: unified market symbol
|
@@ -4007,7 +4073,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4007
4073
|
def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
|
4008
4074
|
"""
|
4009
4075
|
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
4010
|
-
|
4076
|
+
|
4077
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-position-level
|
4078
|
+
|
4011
4079
|
:param str[]|None symbols: list of unified market symbols
|
4012
4080
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4013
4081
|
:returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`, indexed by market symbols
|
@@ -4057,6 +4125,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4057
4125
|
maxNotional = self.safe_number(tier, 'amount')
|
4058
4126
|
tiers.append({
|
4059
4127
|
'tier': self.sum(i, 1),
|
4128
|
+
'symbol': self.safe_symbol(marketId, market, None, 'swap'),
|
4060
4129
|
'currency': market['base'] if market['linear'] else market['quote'],
|
4061
4130
|
'minNotional': minNotional,
|
4062
4131
|
'maxNotional': maxNotional,
|
@@ -4200,7 +4269,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4200
4269
|
def add_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
4201
4270
|
"""
|
4202
4271
|
add margin
|
4203
|
-
|
4272
|
+
|
4273
|
+
https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
4274
|
+
|
4204
4275
|
:param str symbol: unified market symbol
|
4205
4276
|
:param float amount: amount of margin to add
|
4206
4277
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4211,7 +4282,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4211
4282
|
def reduce_margin(self, symbol: str, amount: float, params={}) -> MarginModification:
|
4212
4283
|
"""
|
4213
4284
|
remove margin from a position
|
4214
|
-
|
4285
|
+
|
4286
|
+
https://docs.coinex.com/api/v2/futures/position/http/adjust-position-margin
|
4287
|
+
|
4215
4288
|
:param str symbol: unified market symbol
|
4216
4289
|
:param float amount: the amount of margin to remove
|
4217
4290
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -4222,7 +4295,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4222
4295
|
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4223
4296
|
"""
|
4224
4297
|
fetch the history of funding fee payments paid and received on self account
|
4225
|
-
|
4298
|
+
|
4299
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-position-funding-history
|
4300
|
+
|
4226
4301
|
:param str symbol: unified market symbol
|
4227
4302
|
:param int [since]: the earliest time in ms to fetch funding history for
|
4228
4303
|
:param int [limit]: the maximum number of funding history structures to retrieve
|
@@ -4285,7 +4360,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4285
4360
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
4286
4361
|
"""
|
4287
4362
|
fetch the current funding rate
|
4288
|
-
|
4363
|
+
|
4364
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
4365
|
+
|
4289
4366
|
:param str symbol: unified market symbol
|
4290
4367
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4291
4368
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -4323,7 +4400,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4323
4400
|
def fetch_funding_interval(self, symbol: str, params={}) -> FundingRate:
|
4324
4401
|
"""
|
4325
4402
|
fetch the current funding rate interval
|
4326
|
-
|
4403
|
+
|
4404
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
4405
|
+
|
4327
4406
|
:param str symbol: unified market symbol
|
4328
4407
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4329
4408
|
:returns dict: a `funding rate structure <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -4385,7 +4464,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4385
4464
|
def fetch_funding_rates(self, symbols: Strings = None, params={}) -> FundingRates:
|
4386
4465
|
"""
|
4387
4466
|
fetch the current funding rates for multiple markets
|
4388
|
-
|
4467
|
+
|
4468
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate
|
4469
|
+
|
4389
4470
|
:param str[] symbols: unified market symbols
|
4390
4471
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4391
4472
|
:returns dict[]: an array of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-structure>`
|
@@ -4427,7 +4508,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4427
4508
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4428
4509
|
"""
|
4429
4510
|
make a withdrawal
|
4430
|
-
|
4511
|
+
|
4512
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/withdrawal
|
4513
|
+
|
4431
4514
|
:param str code: unified currency code
|
4432
4515
|
:param float amount: the amount to withdraw
|
4433
4516
|
:param str address: the address to withdraw to
|
@@ -4498,7 +4581,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4498
4581
|
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
4499
4582
|
"""
|
4500
4583
|
fetches historical funding rate prices
|
4501
|
-
|
4584
|
+
|
4585
|
+
https://docs.coinex.com/api/v2/futures/market/http/list-market-funding-rate-history
|
4586
|
+
|
4502
4587
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
4503
4588
|
:param int [since]: timestamp in ms of the earliest funding rate to fetch
|
4504
4589
|
:param int [limit]: the maximum amount of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>` to fetch
|
@@ -4660,7 +4745,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4660
4745
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
4661
4746
|
"""
|
4662
4747
|
transfer currency internally between wallets on the same account
|
4663
|
-
|
4748
|
+
|
4749
|
+
https://docs.coinex.com/api/v2/assets/transfer/http/transfer
|
4750
|
+
|
4664
4751
|
:param str code: unified currency code
|
4665
4752
|
:param float amount: amount to transfer
|
4666
4753
|
:param str fromAccount: account to transfer from
|
@@ -4733,7 +4820,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4733
4820
|
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
4734
4821
|
"""
|
4735
4822
|
fetch a history of internal transfers made on an account
|
4736
|
-
|
4823
|
+
|
4824
|
+
https://docs.coinex.com/api/v2/assets/transfer/http/list-transfer-history
|
4825
|
+
|
4737
4826
|
:param str code: unified currency code of the currency transferred
|
4738
4827
|
:param int [since]: the earliest time in ms to fetch transfers for
|
4739
4828
|
:param int [limit]: the maximum number of transfer structures to retrieve
|
@@ -4786,7 +4875,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4786
4875
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
4787
4876
|
"""
|
4788
4877
|
fetch all withdrawals made from an account
|
4789
|
-
|
4878
|
+
|
4879
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-withdrawal-history
|
4880
|
+
|
4790
4881
|
:param str [code]: unified currency code
|
4791
4882
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
4792
4883
|
:param int [limit]: the maximum number of withdrawal structures to retrieve
|
@@ -4840,7 +4931,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4840
4931
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
4841
4932
|
"""
|
4842
4933
|
fetch all deposits made to an account
|
4843
|
-
|
4934
|
+
|
4935
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/list-deposit-history
|
4936
|
+
|
4844
4937
|
:param str [code]: unified currency code
|
4845
4938
|
:param int [since]: the earliest time in ms to fetch deposits for
|
4846
4939
|
:param int [limit]: the maximum number of deposit structures to retrieve
|
@@ -4924,7 +5017,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4924
5017
|
def fetch_isolated_borrow_rate(self, symbol: str, params={}) -> IsolatedBorrowRate:
|
4925
5018
|
"""
|
4926
5019
|
fetch the rate of interest to borrow a currency for margin trading
|
4927
|
-
|
5020
|
+
|
5021
|
+
https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
5022
|
+
|
4928
5023
|
:param str symbol: unified symbol of the market to fetch the borrow rate for
|
4929
5024
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4930
5025
|
:param str params['code']: unified currency code
|
@@ -4962,7 +5057,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
4962
5057
|
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[BorrowInterest]:
|
4963
5058
|
"""
|
4964
5059
|
fetch the interest owed by the user for borrowing currency for margin trading
|
4965
|
-
|
5060
|
+
|
5061
|
+
https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-borrow-history
|
5062
|
+
|
4966
5063
|
:param str [code]: unified currency code
|
4967
5064
|
:param str [symbol]: unified market symbol when fetch interest in isolated markets
|
4968
5065
|
:param int [since]: the earliest time in ms to fetch borrrow interest for
|
@@ -5040,7 +5137,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5040
5137
|
def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
5041
5138
|
"""
|
5042
5139
|
create a loan to borrow margin
|
5043
|
-
|
5140
|
+
|
5141
|
+
https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-borrow
|
5142
|
+
|
5044
5143
|
:param str symbol: unified market symbol, required for coinex
|
5045
5144
|
:param str code: unified currency code of the currency to borrow
|
5046
5145
|
:param float amount: the amount to borrow
|
@@ -5086,7 +5185,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5086
5185
|
def repay_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
5087
5186
|
"""
|
5088
5187
|
repay borrowed margin and interest
|
5089
|
-
|
5188
|
+
|
5189
|
+
https://docs.coinex.com/api/v2/assets/loan-flat/http/margin-repay
|
5190
|
+
|
5090
5191
|
:param str symbol: unified market symbol, required for coinex
|
5091
5192
|
:param str code: unified currency code of the currency to repay
|
5092
5193
|
:param float amount: the amount to repay
|
@@ -5146,7 +5247,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5146
5247
|
def fetch_deposit_withdraw_fee(self, code: str, params={}):
|
5147
5248
|
"""
|
5148
5249
|
fetch the fee for deposits and withdrawals
|
5149
|
-
|
5250
|
+
|
5251
|
+
https://docs.coinex.com/api/v2/assets/deposit-withdrawal/http/get-deposit-withdrawal-config
|
5252
|
+
|
5150
5253
|
:param str code: unified currency code
|
5151
5254
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5152
5255
|
:returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -5261,7 +5364,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5261
5364
|
def fetch_leverage(self, symbol: str, params={}) -> Leverage:
|
5262
5365
|
"""
|
5263
5366
|
fetch the set leverage for a market
|
5264
|
-
|
5367
|
+
|
5368
|
+
https://docs.coinex.com/api/v2/assets/loan-flat/http/list-margin-interest-limit
|
5369
|
+
|
5265
5370
|
:param str symbol: unified market symbol
|
5266
5371
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5267
5372
|
:param str params['code']: unified currency code
|
@@ -5320,7 +5425,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5320
5425
|
def fetch_position_history(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Position]:
|
5321
5426
|
"""
|
5322
5427
|
fetches historical positions
|
5323
|
-
|
5428
|
+
|
5429
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-finished-position
|
5430
|
+
|
5324
5431
|
:param str symbol: unified contract symbol
|
5325
5432
|
:param int [since]: the earliest time in ms to fetch positions for
|
5326
5433
|
:param int [limit]: the maximum amount of records to fetch, default is 10
|
@@ -5390,7 +5497,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5390
5497
|
def close_position(self, symbol: str, side: OrderSide = None, params={}) -> Order:
|
5391
5498
|
"""
|
5392
5499
|
closes an open position for a market
|
5393
|
-
|
5500
|
+
|
5501
|
+
https://docs.coinex.com/api/v2/futures/position/http/close-position
|
5502
|
+
|
5394
5503
|
:param str symbol: unified CCXT market symbol
|
5395
5504
|
:param str [side]: buy or sell, not used by coinex
|
5396
5505
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -5446,7 +5555,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
5446
5555
|
|
5447
5556
|
def handle_margin_mode_and_params(self, methodName, params={}, defaultValue=None):
|
5448
5557
|
"""
|
5449
|
-
|
5558
|
+
@ignore
|
5450
5559
|
marginMode specified by params["marginMode"], self.options["marginMode"], self.options["defaultMarginMode"], params["margin"] = True or self.options["defaultType"] = 'margin'
|
5451
5560
|
:param dict params: extra parameters specific to the exchange api endpoint
|
5452
5561
|
:returns Array: the marginMode in lowercase
|
@@ -5572,7 +5681,9 @@ class coinex(Exchange, ImplicitAPI):
|
|
5572
5681
|
def fetch_margin_adjustment_history(self, symbol: Str = None, type: Str = None, since: Num = None, limit: Num = None, params={}) -> List[MarginModification]:
|
5573
5682
|
"""
|
5574
5683
|
fetches the history of margin added or reduced from contract isolated positions
|
5575
|
-
|
5684
|
+
|
5685
|
+
https://docs.coinex.com/api/v2/futures/position/http/list-position-margin-history
|
5686
|
+
|
5576
5687
|
:param str symbol: unified market symbol
|
5577
5688
|
:param str [type]: not used by coinex fetchMarginAdjustmentHistory
|
5578
5689
|
:param int [since]: timestamp in ms of the earliest change to fetch
|