ccxt 4.3.54__py2.py3-none-any.whl → 4.3.56__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bingx.py +16 -0
- ccxt/abstract/kucoin.py +3 -0
- ccxt/abstract/kucoinfutures.py +3 -0
- ccxt/ace.py +1 -1
- ccxt/alpaca.py +1 -1
- ccxt/ascendex.py +6 -4
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +1 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +6 -4
- ccxt/async_support/base/exchange.py +19 -3
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +13 -13
- ccxt/async_support/bingx.py +36 -3
- ccxt/async_support/bit2c.py +1 -1
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bitflyer.py +8 -2
- ccxt/async_support/bitget.py +2 -2
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +3 -3
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/bitopro.py +19 -4
- ccxt/async_support/bitrue.py +1 -1
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.py +2 -2
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/blockchaincom.py +28 -28
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/btcalpha.py +4 -11
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +28 -27
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +10 -7
- ccxt/async_support/cex.py +2 -2
- ccxt/async_support/coinbase.py +33 -33
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +2 -2
- ccxt/async_support/coinlist.py +2 -2
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinmetro.py +1 -1
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/coinspot.py +1 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +7 -3
- ccxt/async_support/deribit.py +4 -4
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +3 -2
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +3 -3
- ccxt/async_support/huobijp.py +1 -1
- ccxt/async_support/hyperliquid.py +3 -3
- ccxt/async_support/idex.py +1 -1
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +2 -2
- ccxt/async_support/kucoin.py +127 -46
- ccxt/async_support/kucoinfutures.py +1 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/latoken.py +1 -1
- ccxt/async_support/lbank.py +28 -7
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +3 -3
- ccxt/async_support/onetrading.py +1 -1
- ccxt/async_support/oxfun.py +2 -2
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paymium.py +1 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +4 -3
- ccxt/async_support/poloniexfutures.py +1 -1
- ccxt/async_support/probit.py +1 -1
- ccxt/async_support/timex.py +1 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/tradeogre.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +2 -2
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/wazirx.py +1 -1
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +5 -5
- ccxt/async_support/woofipro.py +3 -3
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +19 -3
- ccxt/base/types.py +4 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +13 -13
- ccxt/bingx.py +36 -3
- ccxt/bit2c.py +1 -1
- ccxt/bitbank.py +1 -1
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex2.py +1 -1
- ccxt/bitflyer.py +8 -2
- ccxt/bitget.py +2 -2
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +3 -3
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +19 -4
- ccxt/bitrue.py +1 -1
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +2 -2
- ccxt/bl3p.py +1 -1
- ccxt/blockchaincom.py +28 -28
- ccxt/blofin.py +1 -1
- ccxt/btcalpha.py +4 -11
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +28 -27
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +10 -7
- ccxt/cex.py +2 -2
- ccxt/coinbase.py +33 -33
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +2 -2
- ccxt/coinlist.py +2 -2
- ccxt/coinmate.py +1 -1
- ccxt/coinmetro.py +1 -1
- ccxt/coinone.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/coinspot.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +7 -3
- ccxt/deribit.py +4 -4
- ccxt/digifinex.py +2 -2
- ccxt/exmo.py +2 -2
- ccxt/gate.py +3 -2
- ccxt/gemini.py +1 -1
- ccxt/hitbtc.py +1 -1
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +3 -3
- ccxt/huobijp.py +1 -1
- ccxt/hyperliquid.py +3 -3
- ccxt/idex.py +1 -1
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +2 -2
- ccxt/kucoin.py +127 -46
- ccxt/kucoinfutures.py +1 -1
- ccxt/kuna.py +1 -1
- ccxt/latoken.py +1 -1
- ccxt/lbank.py +28 -7
- ccxt/luno.py +1 -1
- ccxt/lykke.py +1 -1
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +3 -3
- ccxt/onetrading.py +1 -1
- ccxt/oxfun.py +2 -2
- ccxt/p2b.py +1 -1
- ccxt/paymium.py +1 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +4 -3
- ccxt/poloniexfutures.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -2
- ccxt/pro/bitvavo.py +2 -2
- ccxt/pro/bybit.py +2 -2
- ccxt/pro/cex.py +3 -3
- ccxt/pro/coinbase.py +22 -1
- ccxt/pro/cryptocom.py +1 -1
- ccxt/pro/gate.py +2 -2
- ccxt/pro/hitbtc.py +1 -1
- ccxt/pro/kraken.py +2 -2
- ccxt/pro/kucoin.py +2 -2
- ccxt/pro/okx.py +2 -2
- ccxt/pro/oxfun.py +2 -2
- ccxt/pro/poloniex.py +1 -1
- ccxt/pro/vertex.py +1 -1
- ccxt/probit.py +1 -1
- ccxt/test/{test_async.py → tests_async.py} +27 -280
- ccxt/test/tests_helpers.py +284 -0
- ccxt/test/tests_init.py +35 -0
- ccxt/test/{test_sync.py → tests_sync.py} +27 -282
- ccxt/timex.py +1 -1
- ccxt/tokocrypto.py +1 -1
- ccxt/tradeogre.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +2 -2
- ccxt/wavesexchange.py +1 -1
- ccxt/wazirx.py +1 -1
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +5 -5
- ccxt/woofipro.py +3 -3
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.3.54.dist-info → ccxt-4.3.56.dist-info}/METADATA +5 -7
- {ccxt-4.3.54.dist-info → ccxt-4.3.56.dist-info}/RECORD +220 -253
- ccxt/test/base/__init__.py +0 -29
- ccxt/test/base/test_account.py +0 -26
- ccxt/test/base/test_balance.py +0 -56
- ccxt/test/base/test_borrow_interest.py +0 -35
- ccxt/test/base/test_borrow_rate.py +0 -32
- ccxt/test/base/test_calculate_fee.py +0 -51
- ccxt/test/base/test_crypto.py +0 -127
- ccxt/test/base/test_currency.py +0 -76
- ccxt/test/base/test_datetime.py +0 -109
- ccxt/test/base/test_decimal_to_precision.py +0 -392
- ccxt/test/base/test_deep_extend.py +0 -68
- ccxt/test/base/test_deposit_withdrawal.py +0 -50
- ccxt/test/base/test_exchange_datetime_functions.py +0 -76
- ccxt/test/base/test_funding_rate_history.py +0 -29
- ccxt/test/base/test_last_price.py +0 -31
- ccxt/test/base/test_ledger_entry.py +0 -45
- ccxt/test/base/test_ledger_item.py +0 -48
- ccxt/test/base/test_leverage_tier.py +0 -33
- ccxt/test/base/test_liquidation.py +0 -50
- ccxt/test/base/test_margin_mode.py +0 -24
- ccxt/test/base/test_margin_modification.py +0 -35
- ccxt/test/base/test_market.py +0 -193
- ccxt/test/base/test_number.py +0 -411
- ccxt/test/base/test_ohlcv.py +0 -33
- ccxt/test/base/test_open_interest.py +0 -32
- ccxt/test/base/test_order.py +0 -64
- ccxt/test/base/test_order_book.py +0 -69
- ccxt/test/base/test_position.py +0 -60
- ccxt/test/base/test_shared_methods.py +0 -353
- ccxt/test/base/test_status.py +0 -24
- ccxt/test/base/test_throttle.py +0 -126
- ccxt/test/base/test_ticker.py +0 -92
- ccxt/test/base/test_trade.py +0 -47
- ccxt/test/base/test_trading_fee.py +0 -26
- ccxt/test/base/test_transaction.py +0 -39
- {ccxt-4.3.54.dist-info → ccxt-4.3.56.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.54.dist-info → ccxt-4.3.56.dist-info}/WHEEL +0 -0
- {ccxt-4.3.54.dist-info → ccxt-4.3.56.dist-info}/top_level.txt +0 -0
@@ -593,7 +593,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
593
593
|
'limits': {
|
594
594
|
'leverage': {
|
595
595
|
'min': None,
|
596
|
-
'max':
|
596
|
+
'max': self.safe_integer(market, 'maxLeverage'),
|
597
597
|
},
|
598
598
|
'amount': {
|
599
599
|
'min': None,
|
@@ -996,7 +996,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
996
996
|
:param str type: 'market' or 'limit'
|
997
997
|
:param str side: 'buy' or 'sell'
|
998
998
|
:param float amount: how much of currency you want to trade in units of base currency
|
999
|
-
:param float [price]: the price at which the order is to be
|
999
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1000
1000
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1001
1001
|
:param str [params.timeInForce]: 'Gtc', 'Ioc', 'Alo'
|
1002
1002
|
:param bool [params.postOnly]: True or False whether the order is post-only
|
@@ -1368,7 +1368,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1368
1368
|
:param str type: 'market' or 'limit'
|
1369
1369
|
:param str side: 'buy' or 'sell'
|
1370
1370
|
:param float amount: how much of currency you want to trade in units of base currency
|
1371
|
-
:param float [price]: the price at which the order is to be
|
1371
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1372
1372
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1373
1373
|
:param str [params.timeInForce]: 'Gtc', 'Ioc', 'Alo'
|
1374
1374
|
:param bool [params.postOnly]: True or False whether the order is post-only
|
ccxt/async_support/idex.py
CHANGED
@@ -1117,7 +1117,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1117
1117
|
:param str type: 'market' or 'limit'
|
1118
1118
|
:param str side: 'buy' or 'sell'
|
1119
1119
|
:param float amount: how much of currency you want to trade in units of base currency
|
1120
|
-
:param float [price]: the price at which the order is to be
|
1120
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1121
1121
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1122
1122
|
:param bool [params.test]: set to True to test an order, no order will be created but the request will be validated
|
1123
1123
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -653,7 +653,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
653
653
|
:param str type: 'market' or 'limit'
|
654
654
|
:param str side: 'buy' or 'sell'
|
655
655
|
:param float amount: how much of currency you want to trade in units of base currency
|
656
|
-
:param float [price]: the price at which the order is to be
|
656
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
657
657
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
658
658
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
659
659
|
"""
|
ccxt/async_support/indodax.py
CHANGED
@@ -797,7 +797,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
797
797
|
:param str type: 'market' or 'limit'
|
798
798
|
:param str side: 'buy' or 'sell'
|
799
799
|
:param float amount: how much of currency you want to trade in units of base currency
|
800
|
-
:param float [price]: the price at which the order is to be
|
800
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
801
801
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
802
802
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
803
803
|
"""
|
ccxt/async_support/kraken.py
CHANGED
@@ -1343,7 +1343,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
1343
1343
|
:param str type: 'market' or 'limit'
|
1344
1344
|
:param str side: 'buy' or 'sell'
|
1345
1345
|
:param float amount: how much of currency you want to trade in units of base currency
|
1346
|
-
:param float [price]: the price at which the order is to be
|
1346
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1347
1347
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1348
1348
|
:param bool [params.postOnly]: if True, the order will only be posted to the order book and not executed immediately
|
1349
1349
|
:param bool [params.reduceOnly]: *margin only* indicates if self order is to reduce the size of a position
|
@@ -1737,7 +1737,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
1737
1737
|
:param str type: 'market' or 'limit'
|
1738
1738
|
:param str side: 'buy' or 'sell'
|
1739
1739
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
1740
|
-
:param float [price]: the price at which the order is to be
|
1740
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1741
1741
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1742
1742
|
:param float [params.stopLossPrice]: *margin only* the price that a stop loss order is triggered at
|
1743
1743
|
:param float [params.takeProfitPrice]: *margin only* the price that a take profit order is triggered at
|
ccxt/async_support/kucoin.py
CHANGED
@@ -124,7 +124,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
124
124
|
'fetchWithdrawals': True,
|
125
125
|
'repayCrossMargin': True,
|
126
126
|
'repayIsolatedMargin': True,
|
127
|
-
'setLeverage':
|
127
|
+
'setLeverage': True,
|
128
128
|
'setMarginMode': False,
|
129
129
|
'setPositionMode': False,
|
130
130
|
'signIn': False,
|
@@ -220,6 +220,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
220
220
|
'market/orderbook/level3': 3, # 3SW
|
221
221
|
'hf/orders/active': 2, # 2SW
|
222
222
|
'hf/orders/active/symbols': 2, # 2SW
|
223
|
+
'hf/margin/order/active/symbols': 2, # 2SW
|
223
224
|
'hf/orders/done': 2, # 2SW
|
224
225
|
'hf/orders/{orderId}': 2, # 2SW
|
225
226
|
'hf/orders/client-order/{clientOid}': 2, # 2SW
|
@@ -248,6 +249,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
248
249
|
'margin/currencies': 20, # 20SW
|
249
250
|
'risk/limit/strategy': 20, # 20SW(Deprecate)
|
250
251
|
'isolated/symbols': 20, # 20SW
|
252
|
+
'margin/symbols': 5,
|
251
253
|
'isolated/account/{symbol}': 50, # 50SW
|
252
254
|
'margin/borrow': 15, # 15SW
|
253
255
|
'margin/repay': 15, # 15SW
|
@@ -297,6 +299,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
297
299
|
'lend/purchase/update': 10, # 10SW
|
298
300
|
# ws
|
299
301
|
'bullet-private': 10, # 10SW
|
302
|
+
'position/update-user-leverage': 5,
|
300
303
|
},
|
301
304
|
'delete': {
|
302
305
|
# account
|
@@ -683,6 +686,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
683
686
|
'oco/orders': 'v3',
|
684
687
|
# margin trading
|
685
688
|
'hf/margin/orders/active': 'v3',
|
689
|
+
'hf/margin/order/active/symbols': 'v3',
|
686
690
|
'hf/margin/orders/done': 'v3',
|
687
691
|
'hf/margin/orders/{orderId}': 'v3',
|
688
692
|
'hf/margin/orders/client-order/{clientOid}': 'v3',
|
@@ -696,6 +700,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
696
700
|
'project/marketInterestRate': 'v3',
|
697
701
|
'redeem/orders': 'v3',
|
698
702
|
'purchase/orders': 'v3',
|
703
|
+
'margin/symbols': 'v3',
|
699
704
|
},
|
700
705
|
'POST': {
|
701
706
|
# account
|
@@ -715,6 +720,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
715
720
|
'purchase': 'v3',
|
716
721
|
'redeem': 'v3',
|
717
722
|
'lend/purchase/update': 'v3',
|
723
|
+
'position/update-user-leverage': 'v3',
|
718
724
|
},
|
719
725
|
'DELETE': {
|
720
726
|
# account
|
@@ -1031,7 +1037,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1031
1037
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1032
1038
|
:returns dict[]: an array of objects representing market data
|
1033
1039
|
"""
|
1034
|
-
|
1040
|
+
fetchTickersFees = None
|
1041
|
+
fetchTickersFees, params = self.handle_option_and_params(params, 'fetchMarkets', 'fetchTickersFees', True)
|
1042
|
+
promises = []
|
1043
|
+
promises.append(self.publicGetSymbols(params))
|
1035
1044
|
#
|
1036
1045
|
# {
|
1037
1046
|
# "code": "200000",
|
@@ -1054,59 +1063,98 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1054
1063
|
# "isMarginEnabled": True,
|
1055
1064
|
# "enableTrading": True
|
1056
1065
|
# },
|
1057
|
-
# ]
|
1058
|
-
# }
|
1059
1066
|
#
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1067
|
+
requestMarginables = self.check_required_credentials(False)
|
1068
|
+
if requestMarginables:
|
1069
|
+
promises.append(self.privateGetMarginSymbols(params)) # cross margin symbols
|
1070
|
+
#
|
1071
|
+
# {
|
1072
|
+
# "code": "200000",
|
1073
|
+
# "data": {
|
1074
|
+
# "timestamp": 1719393213421,
|
1075
|
+
# "items": [
|
1076
|
+
# {
|
1077
|
+
# # same object market, with one additional field:
|
1078
|
+
# "minFunds": "0.1"
|
1079
|
+
# },
|
1080
|
+
#
|
1081
|
+
promises.append(self.privateGetIsolatedSymbols(params)) # isolated margin symbols
|
1082
|
+
#
|
1083
|
+
# {
|
1084
|
+
# "code": "200000",
|
1085
|
+
# "data": [
|
1086
|
+
# {
|
1087
|
+
# "symbol": "NKN-USDT",
|
1088
|
+
# "symbolName": "NKN-USDT",
|
1089
|
+
# "baseCurrency": "NKN",
|
1090
|
+
# "quoteCurrency": "USDT",
|
1091
|
+
# "maxLeverage": 5,
|
1092
|
+
# "flDebtRatio": "0.97",
|
1093
|
+
# "tradeEnable": True,
|
1094
|
+
# "autoRenewMaxDebtRatio": "0.96",
|
1095
|
+
# "baseBorrowEnable": True,
|
1096
|
+
# "quoteBorrowEnable": True,
|
1097
|
+
# "baseTransferInEnable": True,
|
1098
|
+
# "quoteTransferInEnable": True,
|
1099
|
+
# "baseBorrowCoefficient": "1",
|
1100
|
+
# "quoteBorrowCoefficient": "1"
|
1101
|
+
# },
|
1102
|
+
#
|
1064
1103
|
if fetchTickersFees:
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1104
|
+
promises.append(self.publicGetMarketAllTickers(params))
|
1105
|
+
#
|
1106
|
+
# {
|
1107
|
+
# "code": "200000",
|
1108
|
+
# "data": {
|
1109
|
+
# "time":1602832092060,
|
1110
|
+
# "ticker":[
|
1111
|
+
# {
|
1112
|
+
# "symbol": "BTC-USDT", # symbol
|
1113
|
+
# "symbolName":"BTC-USDT", # Name of trading pairs, it would change after renaming
|
1114
|
+
# "buy": "11328.9", # bestAsk
|
1115
|
+
# "sell": "11329", # bestBid
|
1116
|
+
# "changeRate": "-0.0055", # 24h change rate
|
1117
|
+
# "changePrice": "-63.6", # 24h change price
|
1118
|
+
# "high": "11610", # 24h highest price
|
1119
|
+
# "low": "11200", # 24h lowest price
|
1120
|
+
# "vol": "2282.70993217", # 24h volume,the aggregated trading volume in BTC
|
1121
|
+
# "volValue": "25984946.157790431", # 24h total, the trading volume in quote currency of last 24 hours
|
1122
|
+
# "last": "11328.9", # last price
|
1123
|
+
# "averagePrice": "11360.66065903", # 24h average transaction price yesterday
|
1124
|
+
# "takerFeeRate": "0.001", # Basic Taker Fee
|
1125
|
+
# "makerFeeRate": "0.001", # Basic Maker Fee
|
1126
|
+
# "takerCoefficient": "1", # Taker Fee Coefficient
|
1127
|
+
# "makerCoefficient": "1" # Maker Fee Coefficient
|
1128
|
+
# }
|
1129
|
+
#
|
1130
|
+
responses = await asyncio.gather(*promises)
|
1131
|
+
symbolsData = self.safe_list(responses[0], 'data')
|
1132
|
+
crossData = self.safe_dict(responses[1], 'data', {}) if requestMarginables else {}
|
1133
|
+
crossItems = self.safe_list(crossData, 'items', [])
|
1134
|
+
crossById = self.index_by(crossItems, 'symbol')
|
1135
|
+
isolatedData = responses[2] if requestMarginables else {}
|
1136
|
+
isolatedItems = self.safe_list(isolatedData, 'data', [])
|
1137
|
+
isolatedById = self.index_by(isolatedItems, 'symbol')
|
1138
|
+
tickersIdx = 3 if requestMarginables else 1
|
1139
|
+
tickersResponse = self.safe_dict(responses, tickersIdx, {})
|
1140
|
+
tickerItems = self.safe_list(self.safe_dict(tickersResponse, 'data', {}), 'ticker', [])
|
1141
|
+
tickersById = self.index_by(tickerItems, 'symbol')
|
1097
1142
|
result = []
|
1098
|
-
for i in range(0, len(
|
1099
|
-
market =
|
1143
|
+
for i in range(0, len(symbolsData)):
|
1144
|
+
market = symbolsData[i]
|
1100
1145
|
id = self.safe_string(market, 'symbol')
|
1101
1146
|
baseId, quoteId = id.split('-')
|
1102
1147
|
base = self.safe_currency_code(baseId)
|
1103
1148
|
quote = self.safe_currency_code(quoteId)
|
1104
1149
|
# quoteIncrement = self.safe_number(market, 'quoteIncrement')
|
1105
|
-
ticker = self.safe_dict(
|
1150
|
+
ticker = self.safe_dict(tickersById, id, {})
|
1106
1151
|
makerFeeRate = self.safe_string(ticker, 'makerFeeRate')
|
1107
1152
|
takerFeeRate = self.safe_string(ticker, 'takerFeeRate')
|
1108
1153
|
makerCoefficient = self.safe_string(ticker, 'makerCoefficient')
|
1109
1154
|
takerCoefficient = self.safe_string(ticker, 'takerCoefficient')
|
1155
|
+
hasCrossMargin = (id in crossById)
|
1156
|
+
hasIsolatedMargin = (id in isolatedById)
|
1157
|
+
isMarginable = self.safe_bool(market, 'isMarginEnabled', False) or hasCrossMargin or hasIsolatedMargin
|
1110
1158
|
result.append({
|
1111
1159
|
'id': id,
|
1112
1160
|
'symbol': base + '/' + quote,
|
@@ -1118,7 +1166,11 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1118
1166
|
'settleId': None,
|
1119
1167
|
'type': 'spot',
|
1120
1168
|
'spot': True,
|
1121
|
-
'margin':
|
1169
|
+
'margin': isMarginable,
|
1170
|
+
'marginMode': {
|
1171
|
+
'cross': hasCrossMargin,
|
1172
|
+
'isolated': hasIsolatedMargin,
|
1173
|
+
},
|
1122
1174
|
'swap': False,
|
1123
1175
|
'future': False,
|
1124
1176
|
'option': False,
|
@@ -1945,7 +1997,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1945
1997
|
:param str type: 'limit' or 'market'
|
1946
1998
|
:param str side: 'buy' or 'sell'
|
1947
1999
|
:param float amount: the amount of currency to trade
|
1948
|
-
:param float [price]:
|
2000
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1949
2001
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1950
2002
|
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
1951
2003
|
:param str [params.marginMode]: 'cross', # cross(cross mode) and isolated(isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned
|
@@ -2198,7 +2250,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2198
2250
|
:param str type: not used
|
2199
2251
|
:param str side: not used
|
2200
2252
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
2201
|
-
:param float [price]: the price at which the order is to be
|
2253
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2202
2254
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2203
2255
|
:param str [params.clientOrderId]: client order id, defaults to id if not passed
|
2204
2256
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -4515,6 +4567,35 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4515
4567
|
data = self.safe_list(response, 'data', [])
|
4516
4568
|
return self.parse_deposit_withdraw_fees(data, codes, 'currency')
|
4517
4569
|
|
4570
|
+
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
4571
|
+
"""
|
4572
|
+
set the level of leverage for a market
|
4573
|
+
:see: https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
|
4574
|
+
:param str symbol: unified market symbol
|
4575
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4576
|
+
:returns dict: response from the exchange
|
4577
|
+
"""
|
4578
|
+
await self.load_markets()
|
4579
|
+
market = None
|
4580
|
+
marketType: Str = None
|
4581
|
+
marketType, params = self.handle_market_type_and_params('setLeverage', None, params)
|
4582
|
+
if (symbol is not None) or marketType != 'spot':
|
4583
|
+
market = self.market(symbol)
|
4584
|
+
if market['contract']:
|
4585
|
+
raise NotSupported(self.id + ' setLeverage currently supports only spot margin')
|
4586
|
+
marginMode: Str = None
|
4587
|
+
marginMode, params = self.handle_margin_mode_and_params('setLeverage', params)
|
4588
|
+
if marginMode is None:
|
4589
|
+
raise ArgumentsRequired(self.id + ' setLeverage requires a marginMode parameter')
|
4590
|
+
request: dict = {}
|
4591
|
+
if marginMode == 'isolated' and symbol is None:
|
4592
|
+
raise ArgumentsRequired(self.id + ' setLeverage requires a symbol parameter for isolated margin')
|
4593
|
+
if symbol is not None:
|
4594
|
+
request['symbol'] = market['id']
|
4595
|
+
request['leverage'] = str(leverage)
|
4596
|
+
request['isIsolated'] = (marginMode == 'isolated')
|
4597
|
+
return await self.privatePostPositionUpdateUserLeverage(self.extend(request, params))
|
4598
|
+
|
4518
4599
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
4519
4600
|
#
|
4520
4601
|
# the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint
|
@@ -1309,7 +1309,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1309
1309
|
:param str type: 'limit' or 'market'
|
1310
1310
|
:param str side: 'buy' or 'sell'
|
1311
1311
|
:param float amount: the amount of currency to trade
|
1312
|
-
:param float [price]:
|
1312
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1313
1313
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1314
1314
|
:param float [params.triggerPrice]: The price a trigger order is triggered at
|
1315
1315
|
:param float [params.stopLossPrice]: price to trigger stop-loss orders
|
ccxt/async_support/kuna.py
CHANGED
@@ -924,7 +924,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
924
924
|
:param str type: 'market' or 'limit'
|
925
925
|
:param str side: 'buy' or 'sell'
|
926
926
|
:param float amount: how much of currency you want to trade in units of base currency
|
927
|
-
:param float [price]: the price at which the order is to be
|
927
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
928
928
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
929
929
|
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
|
930
930
|
*
|
ccxt/async_support/latoken.py
CHANGED
@@ -1225,7 +1225,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1225
1225
|
:param str type: 'market' or 'limit'
|
1226
1226
|
:param str side: 'buy' or 'sell'
|
1227
1227
|
:param float amount: how much of currency you want to trade in units of base currency
|
1228
|
-
:param float [price]: the price at which the order is to be
|
1228
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1229
1229
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1230
1230
|
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
|
1231
1231
|
*
|
ccxt/async_support/lbank.py
CHANGED
@@ -1258,7 +1258,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1258
1258
|
:param str type: 'market' or 'limit'
|
1259
1259
|
:param str side: 'buy' or 'sell'
|
1260
1260
|
:param float amount: how much of currency you want to trade in units of base currency
|
1261
|
-
:param float [price]: the price at which the order is to be
|
1261
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1262
1262
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1263
1263
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1264
1264
|
"""
|
@@ -1417,6 +1417,27 @@ class lbank(Exchange, ImplicitAPI):
|
|
1417
1417
|
# "status":-1
|
1418
1418
|
# }
|
1419
1419
|
#
|
1420
|
+
# cancelOrder
|
1421
|
+
#
|
1422
|
+
# {
|
1423
|
+
# "executedQty":0.0,
|
1424
|
+
# "price":0.05,
|
1425
|
+
# "origQty":100.0,
|
1426
|
+
# "tradeType":"buy",
|
1427
|
+
# "status":0
|
1428
|
+
# }
|
1429
|
+
#
|
1430
|
+
# cancelAllOrders
|
1431
|
+
#
|
1432
|
+
# {
|
1433
|
+
# "executedQty":0.00000000000000000000,
|
1434
|
+
# "orderId":"293ef71b-3e67-4962-af93-aa06990a045f",
|
1435
|
+
# "price":0.05000000000000000000,
|
1436
|
+
# "origQty":100.00000000000000000000,
|
1437
|
+
# "tradeType":"buy",
|
1438
|
+
# "status":0
|
1439
|
+
# }
|
1440
|
+
#
|
1420
1441
|
id = self.safe_string_2(order, 'orderId', 'order_id')
|
1421
1442
|
clientOrderId = self.safe_string_2(order, 'clientOrderId', 'custom_id')
|
1422
1443
|
timestamp = self.safe_integer_2(order, 'time', 'create_time')
|
@@ -1426,7 +1447,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1426
1447
|
timeInForce = None
|
1427
1448
|
postOnly = False
|
1428
1449
|
type = 'limit'
|
1429
|
-
rawType = self.
|
1450
|
+
rawType = self.safe_string_2(order, 'type', 'tradeType') # buy, sell, buy_market, sell_market, buy_maker,sell_maker,buy_ioc,sell_ioc, buy_fok, sell_fok
|
1430
1451
|
parts = rawType.split('_')
|
1431
1452
|
side = self.safe_string(parts, 0)
|
1432
1453
|
typePart = self.safe_string(parts, 1) # market, maker, ioc, fok or None(limit)
|
@@ -1760,12 +1781,12 @@ class lbank(Exchange, ImplicitAPI):
|
|
1760
1781
|
# "origQty":100.0,
|
1761
1782
|
# "tradeType":"buy",
|
1762
1783
|
# "status":0
|
1763
|
-
#
|
1784
|
+
# },
|
1764
1785
|
# "error_code":0,
|
1765
1786
|
# "ts":1648501286196
|
1766
1787
|
# }
|
1767
|
-
|
1768
|
-
return
|
1788
|
+
data = self.safe_dict(response, 'data', {})
|
1789
|
+
return self.parse_order(data)
|
1769
1790
|
|
1770
1791
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1771
1792
|
"""
|
@@ -1800,8 +1821,8 @@ class lbank(Exchange, ImplicitAPI):
|
|
1800
1821
|
# "ts":1648506641469
|
1801
1822
|
# }
|
1802
1823
|
#
|
1803
|
-
|
1804
|
-
return
|
1824
|
+
data = self.safe_list(response, 'data', [])
|
1825
|
+
return self.parse_orders(data)
|
1805
1826
|
|
1806
1827
|
def get_network_code_for_currency(self, currencyCode, params):
|
1807
1828
|
defaultNetworks = self.safe_value(self.options, 'defaultNetworks')
|
ccxt/async_support/luno.py
CHANGED
@@ -856,7 +856,7 @@ class luno(Exchange, ImplicitAPI):
|
|
856
856
|
:param str type: 'market' or 'limit'
|
857
857
|
:param str side: 'buy' or 'sell'
|
858
858
|
:param float amount: how much of currency you want to trade in units of base currency
|
859
|
-
:param float [price]: the price at which the order is to be
|
859
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
860
860
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
861
861
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
862
862
|
"""
|
ccxt/async_support/lykke.py
CHANGED
@@ -777,7 +777,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
777
777
|
:param str type: 'market' or 'limit'
|
778
778
|
:param str side: 'buy' or 'sell'
|
779
779
|
:param float amount: how much of currency you want to trade in units of base currency
|
780
|
-
:param float [price]: the price at which the order is to be
|
780
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
781
781
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
782
782
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
783
783
|
"""
|
ccxt/async_support/mercado.py
CHANGED
@@ -425,7 +425,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
425
425
|
:param str type: 'market' or 'limit'
|
426
426
|
:param str side: 'buy' or 'sell'
|
427
427
|
:param float amount: how much of currency you want to trade in units of base currency
|
428
|
-
:param float [price]: the price at which the order is to be
|
428
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
429
429
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
430
430
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
431
431
|
"""
|
ccxt/async_support/mexc.py
CHANGED
@@ -2124,7 +2124,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
2124
2124
|
:param str type: 'market' or 'limit'
|
2125
2125
|
:param str side: 'buy' or 'sell'
|
2126
2126
|
:param float amount: how much of currency you want to trade in units of base currency
|
2127
|
-
:param float [price]: the price at which the order is to be
|
2127
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2128
2128
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2129
2129
|
:param str [params.marginMode]: only 'isolated' is supported for spot-margin trading
|
2130
2130
|
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
ccxt/async_support/ndax.py
CHANGED
@@ -1296,7 +1296,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1296
1296
|
:param str type: 'market' or 'limit'
|
1297
1297
|
:param str side: 'buy' or 'sell'
|
1298
1298
|
:param float amount: how much of currency you want to trade in units of base currency
|
1299
|
-
:param float [price]: the price at which the order is to be
|
1299
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1300
1300
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1301
1301
|
:param float [params.triggerPrice]: the price at which a trigger order would be triggered
|
1302
1302
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/novadax.py
CHANGED
@@ -727,7 +727,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
727
727
|
:param str type: 'market' or 'limit'
|
728
728
|
:param str side: 'buy' or 'sell'
|
729
729
|
:param float amount: how much you want to trade in units of the base currency
|
730
|
-
:param float [price]: the price at which the order is to be
|
730
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
731
731
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
732
732
|
:param float [params.cost]: for spot market buy orders, the quote quantity that can be used alternative for the amount
|
733
733
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/oceanex.py
CHANGED
@@ -605,7 +605,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
605
605
|
:param str type: 'market' or 'limit'
|
606
606
|
:param str side: 'buy' or 'sell'
|
607
607
|
:param float amount: how much of currency you want to trade in units of base currency
|
608
|
-
:param float [price]: the price at which the order is to be
|
608
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
609
609
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
610
610
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
611
611
|
"""
|
ccxt/async_support/okcoin.py
CHANGED
@@ -1299,7 +1299,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
1299
1299
|
:param str type: 'market' or 'limit'
|
1300
1300
|
:param str side: 'buy' or 'sell'
|
1301
1301
|
:param float amount: how much of currency you want to trade in units of base currency
|
1302
|
-
:param float price: the price at which the order is to be
|
1302
|
+
:param float price: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1303
1303
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1304
1304
|
:param bool [params.reduceOnly]: MARGIN orders only, or swap/future orders in net mode
|
1305
1305
|
:param bool [params.postOnly]: True to place a post only order
|
ccxt/async_support/okx.py
CHANGED
@@ -2770,7 +2770,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2770
2770
|
:param str type: 'market' or 'limit'
|
2771
2771
|
:param str side: 'buy' or 'sell'
|
2772
2772
|
:param float amount: how much of currency you want to trade in units of base currency
|
2773
|
-
:param float [price]: the price at which the order is to be
|
2773
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2774
2774
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2775
2775
|
:param bool [params.reduceOnly]: a mark to reduce the position size for margin, swap and future orders
|
2776
2776
|
:param bool [params.postOnly]: True to place a post only order
|
@@ -2948,7 +2948,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2948
2948
|
:param str type: 'market' or 'limit'
|
2949
2949
|
:param str side: 'buy' or 'sell'
|
2950
2950
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
2951
|
-
:param float [price]: the price at which the order is to be
|
2951
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2952
2952
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2953
2953
|
:param str [params.clientOrderId]: client order id, uses id if not passed
|
2954
2954
|
:param float [params.stopLossPrice]: stop loss trigger price
|
@@ -5174,7 +5174,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5174
5174
|
result = []
|
5175
5175
|
for i in range(0, len(positions)):
|
5176
5176
|
result.append(self.parse_position(positions[i]))
|
5177
|
-
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
5177
|
+
return self.filter_by_array_positions(result, 'symbol', self.market_symbols(symbols), False)
|
5178
5178
|
|
5179
5179
|
async def fetch_positions_for_symbol(self, symbol: str, params={}):
|
5180
5180
|
"""
|
ccxt/async_support/onetrading.py
CHANGED
@@ -1454,7 +1454,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1454
1454
|
:param str type: 'market' or 'limit'
|
1455
1455
|
:param str side: 'buy' or 'sell'
|
1456
1456
|
:param float amount: how much of currency you want to trade in units of base currency
|
1457
|
-
:param float [price]: the price at which the order is to be
|
1457
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1458
1458
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1459
1459
|
:param float [params.triggerPrice]: onetrading only does stop limit orders and does not do stop market
|
1460
1460
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
ccxt/async_support/oxfun.py
CHANGED
@@ -2141,7 +2141,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2141
2141
|
:param str type: 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
|
2142
2142
|
:param str side: 'buy' or 'sell'
|
2143
2143
|
:param float amount: how much of currency you want to trade in units of base currency
|
2144
|
-
:param float [price]: the price at which the order is to be
|
2144
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2145
2145
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2146
2146
|
:param int [params.clientOrderId]: a unique id for the order
|
2147
2147
|
:param int [params.timestamp]: in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
|
@@ -2327,7 +2327,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2327
2327
|
:param str type: 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
|
2328
2328
|
:param str side: 'buy' or 'sell'
|
2329
2329
|
:param float amount: how much of currency you want to trade in units of base currency
|
2330
|
-
:param float [price]: the price at which the order is to be
|
2330
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2331
2331
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2332
2332
|
:param int [params.clientOrderId]: a unique id for the order
|
2333
2333
|
:param float [params.cost]: the quote quantity that can be used alternative for the amount for market buy orders
|
ccxt/async_support/p2b.py
CHANGED
@@ -771,7 +771,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
771
771
|
:param str type: must be 'limit'
|
772
772
|
:param str side: 'buy' or 'sell'
|
773
773
|
:param float amount: how much of currency you want to trade in units of base currency
|
774
|
-
:param float price: the price at which the order is to be
|
774
|
+
:param float price: the price at which the order is to be fulfilled, in units of the quote currency
|
775
775
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
776
776
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
777
777
|
"""
|
ccxt/async_support/paymium.py
CHANGED
@@ -374,7 +374,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
374
374
|
:param str type: 'market' or 'limit'
|
375
375
|
:param str side: 'buy' or 'sell'
|
376
376
|
:param float amount: how much of currency you want to trade in units of base currency
|
377
|
-
:param float [price]: the price at which the order is to be
|
377
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
378
378
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
379
379
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
380
380
|
"""
|