ccxt 4.3.53__py2.py3-none-any.whl → 4.3.55__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/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 +1 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +6 -6
- ccxt/async_support/bingx.py +4 -4
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +2 -2
- 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 +2 -2
- 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 +2 -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 +2 -2
- 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 +1 -1
- 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 +30 -3
- ccxt/async_support/poloniex.py +6 -4
- 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 +31 -23
- 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 +1 -1
- ccxt/base/types.py +4 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +6 -6
- ccxt/bingx.py +4 -4
- 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 +1 -1
- ccxt/bitget.py +2 -2
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +3 -3
- ccxt/bitmex.py +1 -1
- ccxt/bitopro.py +1 -1
- 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 +1 -1
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +2 -2
- 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 +2 -2
- ccxt/deribit.py +4 -4
- ccxt/digifinex.py +2 -2
- ccxt/exmo.py +2 -2
- ccxt/gate.py +2 -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 +2 -2
- 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 +1 -1
- 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 +30 -3
- ccxt/poloniex.py +6 -4
- ccxt/poloniexfutures.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +3 -3
- ccxt/pro/bitvavo.py +2 -2
- ccxt/pro/bybit.py +20 -14
- 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 +65 -28
- ccxt/pro/okx.py +2 -2
- ccxt/pro/oxfun.py +2 -2
- ccxt/pro/poloniex.py +1 -1
- ccxt/pro/vertex.py +2 -2
- 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 +31 -23
- ccxt/woofipro.py +3 -3
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.3.53.dist-info → ccxt-4.3.55.dist-info}/METADATA +5 -5
- {ccxt-4.3.53.dist-info → ccxt-4.3.55.dist-info}/RECORD +219 -252
- 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.53.dist-info → ccxt-4.3.55.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.53.dist-info → ccxt-4.3.55.dist-info}/WHEEL +0 -0
- {ccxt-4.3.53.dist-info → ccxt-4.3.55.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py
CHANGED
@@ -123,7 +123,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
123
123
|
'fetchWithdrawals': True,
|
124
124
|
'repayCrossMargin': True,
|
125
125
|
'repayIsolatedMargin': True,
|
126
|
-
'setLeverage':
|
126
|
+
'setLeverage': True,
|
127
127
|
'setMarginMode': False,
|
128
128
|
'setPositionMode': False,
|
129
129
|
'signIn': False,
|
@@ -219,6 +219,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
219
219
|
'market/orderbook/level3': 3, # 3SW
|
220
220
|
'hf/orders/active': 2, # 2SW
|
221
221
|
'hf/orders/active/symbols': 2, # 2SW
|
222
|
+
'hf/margin/order/active/symbols': 2, # 2SW
|
222
223
|
'hf/orders/done': 2, # 2SW
|
223
224
|
'hf/orders/{orderId}': 2, # 2SW
|
224
225
|
'hf/orders/client-order/{clientOid}': 2, # 2SW
|
@@ -247,6 +248,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
247
248
|
'margin/currencies': 20, # 20SW
|
248
249
|
'risk/limit/strategy': 20, # 20SW(Deprecate)
|
249
250
|
'isolated/symbols': 20, # 20SW
|
251
|
+
'margin/symbols': 5,
|
250
252
|
'isolated/account/{symbol}': 50, # 50SW
|
251
253
|
'margin/borrow': 15, # 15SW
|
252
254
|
'margin/repay': 15, # 15SW
|
@@ -296,6 +298,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
296
298
|
'lend/purchase/update': 10, # 10SW
|
297
299
|
# ws
|
298
300
|
'bullet-private': 10, # 10SW
|
301
|
+
'position/update-user-leverage': 5,
|
299
302
|
},
|
300
303
|
'delete': {
|
301
304
|
# account
|
@@ -682,6 +685,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
682
685
|
'oco/orders': 'v3',
|
683
686
|
# margin trading
|
684
687
|
'hf/margin/orders/active': 'v3',
|
688
|
+
'hf/margin/order/active/symbols': 'v3',
|
685
689
|
'hf/margin/orders/done': 'v3',
|
686
690
|
'hf/margin/orders/{orderId}': 'v3',
|
687
691
|
'hf/margin/orders/client-order/{clientOid}': 'v3',
|
@@ -695,6 +699,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
695
699
|
'project/marketInterestRate': 'v3',
|
696
700
|
'redeem/orders': 'v3',
|
697
701
|
'purchase/orders': 'v3',
|
702
|
+
'margin/symbols': 'v3',
|
698
703
|
},
|
699
704
|
'POST': {
|
700
705
|
# account
|
@@ -714,6 +719,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
714
719
|
'purchase': 'v3',
|
715
720
|
'redeem': 'v3',
|
716
721
|
'lend/purchase/update': 'v3',
|
722
|
+
'position/update-user-leverage': 'v3',
|
717
723
|
},
|
718
724
|
'DELETE': {
|
719
725
|
# account
|
@@ -1030,7 +1036,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1030
1036
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1031
1037
|
:returns dict[]: an array of objects representing market data
|
1032
1038
|
"""
|
1033
|
-
|
1039
|
+
fetchTickersFees = None
|
1040
|
+
fetchTickersFees, params = self.handle_option_and_params(params, 'fetchMarkets', 'fetchTickersFees', True)
|
1041
|
+
promises = []
|
1042
|
+
promises.append(self.publicGetSymbols(params))
|
1034
1043
|
#
|
1035
1044
|
# {
|
1036
1045
|
# "code": "200000",
|
@@ -1053,59 +1062,98 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1053
1062
|
# "isMarginEnabled": True,
|
1054
1063
|
# "enableTrading": True
|
1055
1064
|
# },
|
1056
|
-
# ]
|
1057
|
-
# }
|
1058
1065
|
#
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1066
|
+
requestMarginables = self.check_required_credentials(False)
|
1067
|
+
if requestMarginables:
|
1068
|
+
promises.append(self.privateGetMarginSymbols(params)) # cross margin symbols
|
1069
|
+
#
|
1070
|
+
# {
|
1071
|
+
# "code": "200000",
|
1072
|
+
# "data": {
|
1073
|
+
# "timestamp": 1719393213421,
|
1074
|
+
# "items": [
|
1075
|
+
# {
|
1076
|
+
# # same object market, with one additional field:
|
1077
|
+
# "minFunds": "0.1"
|
1078
|
+
# },
|
1079
|
+
#
|
1080
|
+
promises.append(self.privateGetIsolatedSymbols(params)) # isolated margin symbols
|
1081
|
+
#
|
1082
|
+
# {
|
1083
|
+
# "code": "200000",
|
1084
|
+
# "data": [
|
1085
|
+
# {
|
1086
|
+
# "symbol": "NKN-USDT",
|
1087
|
+
# "symbolName": "NKN-USDT",
|
1088
|
+
# "baseCurrency": "NKN",
|
1089
|
+
# "quoteCurrency": "USDT",
|
1090
|
+
# "maxLeverage": 5,
|
1091
|
+
# "flDebtRatio": "0.97",
|
1092
|
+
# "tradeEnable": True,
|
1093
|
+
# "autoRenewMaxDebtRatio": "0.96",
|
1094
|
+
# "baseBorrowEnable": True,
|
1095
|
+
# "quoteBorrowEnable": True,
|
1096
|
+
# "baseTransferInEnable": True,
|
1097
|
+
# "quoteTransferInEnable": True,
|
1098
|
+
# "baseBorrowCoefficient": "1",
|
1099
|
+
# "quoteBorrowCoefficient": "1"
|
1100
|
+
# },
|
1101
|
+
#
|
1063
1102
|
if fetchTickersFees:
|
1064
|
-
|
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
|
-
|
1103
|
+
promises.append(self.publicGetMarketAllTickers(params))
|
1104
|
+
#
|
1105
|
+
# {
|
1106
|
+
# "code": "200000",
|
1107
|
+
# "data": {
|
1108
|
+
# "time":1602832092060,
|
1109
|
+
# "ticker":[
|
1110
|
+
# {
|
1111
|
+
# "symbol": "BTC-USDT", # symbol
|
1112
|
+
# "symbolName":"BTC-USDT", # Name of trading pairs, it would change after renaming
|
1113
|
+
# "buy": "11328.9", # bestAsk
|
1114
|
+
# "sell": "11329", # bestBid
|
1115
|
+
# "changeRate": "-0.0055", # 24h change rate
|
1116
|
+
# "changePrice": "-63.6", # 24h change price
|
1117
|
+
# "high": "11610", # 24h highest price
|
1118
|
+
# "low": "11200", # 24h lowest price
|
1119
|
+
# "vol": "2282.70993217", # 24h volume,the aggregated trading volume in BTC
|
1120
|
+
# "volValue": "25984946.157790431", # 24h total, the trading volume in quote currency of last 24 hours
|
1121
|
+
# "last": "11328.9", # last price
|
1122
|
+
# "averagePrice": "11360.66065903", # 24h average transaction price yesterday
|
1123
|
+
# "takerFeeRate": "0.001", # Basic Taker Fee
|
1124
|
+
# "makerFeeRate": "0.001", # Basic Maker Fee
|
1125
|
+
# "takerCoefficient": "1", # Taker Fee Coefficient
|
1126
|
+
# "makerCoefficient": "1" # Maker Fee Coefficient
|
1127
|
+
# }
|
1128
|
+
#
|
1129
|
+
responses = promises
|
1130
|
+
symbolsData = self.safe_list(responses[0], 'data')
|
1131
|
+
crossData = self.safe_dict(responses[1], 'data', {}) if requestMarginables else {}
|
1132
|
+
crossItems = self.safe_list(crossData, 'items', [])
|
1133
|
+
crossById = self.index_by(crossItems, 'symbol')
|
1134
|
+
isolatedData = responses[2] if requestMarginables else {}
|
1135
|
+
isolatedItems = self.safe_list(isolatedData, 'data', [])
|
1136
|
+
isolatedById = self.index_by(isolatedItems, 'symbol')
|
1137
|
+
tickersIdx = 3 if requestMarginables else 1
|
1138
|
+
tickersResponse = self.safe_dict(responses, tickersIdx, {})
|
1139
|
+
tickerItems = self.safe_list(self.safe_dict(tickersResponse, 'data', {}), 'ticker', [])
|
1140
|
+
tickersById = self.index_by(tickerItems, 'symbol')
|
1096
1141
|
result = []
|
1097
|
-
for i in range(0, len(
|
1098
|
-
market =
|
1142
|
+
for i in range(0, len(symbolsData)):
|
1143
|
+
market = symbolsData[i]
|
1099
1144
|
id = self.safe_string(market, 'symbol')
|
1100
1145
|
baseId, quoteId = id.split('-')
|
1101
1146
|
base = self.safe_currency_code(baseId)
|
1102
1147
|
quote = self.safe_currency_code(quoteId)
|
1103
1148
|
# quoteIncrement = self.safe_number(market, 'quoteIncrement')
|
1104
|
-
ticker = self.safe_dict(
|
1149
|
+
ticker = self.safe_dict(tickersById, id, {})
|
1105
1150
|
makerFeeRate = self.safe_string(ticker, 'makerFeeRate')
|
1106
1151
|
takerFeeRate = self.safe_string(ticker, 'takerFeeRate')
|
1107
1152
|
makerCoefficient = self.safe_string(ticker, 'makerCoefficient')
|
1108
1153
|
takerCoefficient = self.safe_string(ticker, 'takerCoefficient')
|
1154
|
+
hasCrossMargin = (id in crossById)
|
1155
|
+
hasIsolatedMargin = (id in isolatedById)
|
1156
|
+
isMarginable = self.safe_bool(market, 'isMarginEnabled', False) or hasCrossMargin or hasIsolatedMargin
|
1109
1157
|
result.append({
|
1110
1158
|
'id': id,
|
1111
1159
|
'symbol': base + '/' + quote,
|
@@ -1117,7 +1165,11 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1117
1165
|
'settleId': None,
|
1118
1166
|
'type': 'spot',
|
1119
1167
|
'spot': True,
|
1120
|
-
'margin':
|
1168
|
+
'margin': isMarginable,
|
1169
|
+
'marginMode': {
|
1170
|
+
'cross': hasCrossMargin,
|
1171
|
+
'isolated': hasIsolatedMargin,
|
1172
|
+
},
|
1121
1173
|
'swap': False,
|
1122
1174
|
'future': False,
|
1123
1175
|
'option': False,
|
@@ -1944,7 +1996,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1944
1996
|
:param str type: 'limit' or 'market'
|
1945
1997
|
:param str side: 'buy' or 'sell'
|
1946
1998
|
:param float amount: the amount of currency to trade
|
1947
|
-
:param float [price]:
|
1999
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1948
2000
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1949
2001
|
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
1950
2002
|
: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
|
@@ -2197,7 +2249,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2197
2249
|
:param str type: not used
|
2198
2250
|
:param str side: not used
|
2199
2251
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
2200
|
-
:param float [price]: the price at which the order is to be
|
2252
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2201
2253
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2202
2254
|
:param str [params.clientOrderId]: client order id, defaults to id if not passed
|
2203
2255
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -4514,6 +4566,35 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4514
4566
|
data = self.safe_list(response, 'data', [])
|
4515
4567
|
return self.parse_deposit_withdraw_fees(data, codes, 'currency')
|
4516
4568
|
|
4569
|
+
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
4570
|
+
"""
|
4571
|
+
set the level of leverage for a market
|
4572
|
+
:see: https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
|
4573
|
+
:param str symbol: unified market symbol
|
4574
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4575
|
+
:returns dict: response from the exchange
|
4576
|
+
"""
|
4577
|
+
self.load_markets()
|
4578
|
+
market = None
|
4579
|
+
marketType: Str = None
|
4580
|
+
marketType, params = self.handle_market_type_and_params('setLeverage', None, params)
|
4581
|
+
if (symbol is not None) or marketType != 'spot':
|
4582
|
+
market = self.market(symbol)
|
4583
|
+
if market['contract']:
|
4584
|
+
raise NotSupported(self.id + ' setLeverage currently supports only spot margin')
|
4585
|
+
marginMode: Str = None
|
4586
|
+
marginMode, params = self.handle_margin_mode_and_params('setLeverage', params)
|
4587
|
+
if marginMode is None:
|
4588
|
+
raise ArgumentsRequired(self.id + ' setLeverage requires a marginMode parameter')
|
4589
|
+
request: dict = {}
|
4590
|
+
if marginMode == 'isolated' and symbol is None:
|
4591
|
+
raise ArgumentsRequired(self.id + ' setLeverage requires a symbol parameter for isolated margin')
|
4592
|
+
if symbol is not None:
|
4593
|
+
request['symbol'] = market['id']
|
4594
|
+
request['leverage'] = str(leverage)
|
4595
|
+
request['isIsolated'] = (marginMode == 'isolated')
|
4596
|
+
return self.privatePostPositionUpdateUserLeverage(self.extend(request, params))
|
4597
|
+
|
4517
4598
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
4518
4599
|
#
|
4519
4600
|
# the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint
|
ccxt/kucoinfutures.py
CHANGED
@@ -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/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/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/lbank.py
CHANGED
@@ -1257,7 +1257,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1257
1257
|
:param str type: 'market' or 'limit'
|
1258
1258
|
:param str side: 'buy' or 'sell'
|
1259
1259
|
:param float amount: how much of currency you want to trade in units of base currency
|
1260
|
-
:param float [price]: the price at which the order is to be
|
1260
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1261
1261
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1262
1262
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1263
1263
|
"""
|
ccxt/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/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/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/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/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/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/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/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/okx.py
CHANGED
@@ -2769,7 +2769,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2769
2769
|
:param str type: 'market' or 'limit'
|
2770
2770
|
:param str side: 'buy' or 'sell'
|
2771
2771
|
:param float amount: how much of currency you want to trade in units of base currency
|
2772
|
-
:param float [price]: the price at which the order is to be
|
2772
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2773
2773
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2774
2774
|
:param bool [params.reduceOnly]: a mark to reduce the position size for margin, swap and future orders
|
2775
2775
|
:param bool [params.postOnly]: True to place a post only order
|
@@ -2947,7 +2947,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2947
2947
|
:param str type: 'market' or 'limit'
|
2948
2948
|
:param str side: 'buy' or 'sell'
|
2949
2949
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
2950
|
-
:param float [price]: the price at which the order is to be
|
2950
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2951
2951
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2952
2952
|
:param str [params.clientOrderId]: client order id, uses id if not passed
|
2953
2953
|
:param float [params.stopLossPrice]: stop loss trigger price
|
@@ -5173,7 +5173,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5173
5173
|
result = []
|
5174
5174
|
for i in range(0, len(positions)):
|
5175
5175
|
result.append(self.parse_position(positions[i]))
|
5176
|
-
return self.filter_by_array_positions(result, 'symbol', symbols, False)
|
5176
|
+
return self.filter_by_array_positions(result, 'symbol', self.market_symbols(symbols), False)
|
5177
5177
|
|
5178
5178
|
def fetch_positions_for_symbol(self, symbol: str, params={}):
|
5179
5179
|
"""
|
ccxt/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/oxfun.py
CHANGED
@@ -2140,7 +2140,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2140
2140
|
:param str type: 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
|
2141
2141
|
:param str side: 'buy' or 'sell'
|
2142
2142
|
:param float amount: how much of currency you want to trade in units of base currency
|
2143
|
-
:param float [price]: the price at which the order is to be
|
2143
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2144
2144
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2145
2145
|
:param int [params.clientOrderId]: a unique id for the order
|
2146
2146
|
: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.
|
@@ -2326,7 +2326,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2326
2326
|
:param str type: 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
|
2327
2327
|
:param str side: 'buy' or 'sell'
|
2328
2328
|
:param float amount: how much of currency you want to trade in units of base currency
|
2329
|
-
:param float [price]: the price at which the order is to be
|
2329
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2330
2330
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2331
2331
|
:param int [params.clientOrderId]: a unique id for the order
|
2332
2332
|
:param float [params.cost]: the quote quantity that can be used alternative for the amount for market buy orders
|
ccxt/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/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
|
"""
|
ccxt/phemex.py
CHANGED
@@ -2395,7 +2395,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2395
2395
|
:param str type: 'market' or 'limit'
|
2396
2396
|
:param str side: 'buy' or 'sell'
|
2397
2397
|
:param float amount: how much of currency you want to trade in units of base currency
|
2398
|
-
:param float [price]: the price at which the order is to be
|
2398
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2399
2399
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2400
2400
|
:param float [params.trigger]: trigger price for conditional orders
|
2401
2401
|
:param dict [params.takeProfit]: *swap only* *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered(perpetual swap markets only)
|
@@ -2651,7 +2651,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
2651
2651
|
:param str type: 'market' or 'limit'
|
2652
2652
|
:param str side: 'buy' or 'sell'
|
2653
2653
|
:param float amount: how much of currency you want to trade in units of base currency
|
2654
|
-
:param float [price]: the price at which the order is to be
|
2654
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2655
2655
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2656
2656
|
:param str [params.posSide]: either 'Merged' or 'Long' or 'Short'
|
2657
2657
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2763,11 +2763,38 @@ class phemex(Exchange, ImplicitAPI):
|
|
2763
2763
|
response = None
|
2764
2764
|
if market['settle'] == 'USDT':
|
2765
2765
|
response = self.privateDeleteGOrdersAll(self.extend(request, params))
|
2766
|
+
#
|
2767
|
+
# {
|
2768
|
+
# code: '0',
|
2769
|
+
# msg: '',
|
2770
|
+
# data: '1'
|
2771
|
+
# }
|
2772
|
+
#
|
2766
2773
|
elif market['swap']:
|
2767
2774
|
response = self.privateDeleteOrdersAll(self.extend(request, params))
|
2775
|
+
#
|
2776
|
+
# {
|
2777
|
+
# code: '0',
|
2778
|
+
# msg: '',
|
2779
|
+
# data: '1'
|
2780
|
+
# }
|
2781
|
+
#
|
2768
2782
|
else:
|
2769
2783
|
response = self.privateDeleteSpotOrdersAll(self.extend(request, params))
|
2770
|
-
|
2784
|
+
#
|
2785
|
+
# {
|
2786
|
+
# code: '0',
|
2787
|
+
# msg: '',
|
2788
|
+
# data: {
|
2789
|
+
# total: '1'
|
2790
|
+
# }
|
2791
|
+
# }
|
2792
|
+
#
|
2793
|
+
return [
|
2794
|
+
self.safe_order({
|
2795
|
+
'info': response,
|
2796
|
+
}),
|
2797
|
+
]
|
2771
2798
|
|
2772
2799
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
2773
2800
|
"""
|
ccxt/poloniex.py
CHANGED
@@ -1224,7 +1224,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1224
1224
|
:param str type: 'market' or 'limit'
|
1225
1225
|
:param str side: 'buy' or 'sell'
|
1226
1226
|
:param float amount: how much of currency you want to trade in units of base currency
|
1227
|
-
:param float [price]: the price at which the order is to be
|
1227
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1228
1228
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1229
1229
|
:param float [params.triggerPrice]: *spot only* The price at which a trigger order is triggered at
|
1230
1230
|
:param float [params.cost]: *spot market buy only* the quote quantity that can be used alternative for the amount
|
@@ -1255,7 +1255,8 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1255
1255
|
# }
|
1256
1256
|
#
|
1257
1257
|
response = self.extend(response, {
|
1258
|
-
'type':
|
1258
|
+
'type': type,
|
1259
|
+
'side': side,
|
1259
1260
|
})
|
1260
1261
|
return self.parse_order(response, market)
|
1261
1262
|
|
@@ -1313,7 +1314,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1313
1314
|
:param str type: 'market' or 'limit'
|
1314
1315
|
:param str side: 'buy' or 'sell'
|
1315
1316
|
:param float [amount]: how much of the currency you want to trade in units of the base currency
|
1316
|
-
:param float [price]: the price at which the order is to be
|
1317
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1317
1318
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1318
1319
|
:param float [params.triggerPrice]: The price at which a trigger order is triggered at
|
1319
1320
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1340,7 +1341,8 @@ class poloniex(Exchange, ImplicitAPI):
|
|
1340
1341
|
# }
|
1341
1342
|
#
|
1342
1343
|
response = self.extend(response, {
|
1343
|
-
'
|
1344
|
+
'side': side,
|
1345
|
+
'type': type,
|
1344
1346
|
})
|
1345
1347
|
return self.parse_order(response, market)
|
1346
1348
|
|
ccxt/poloniexfutures.py
CHANGED
@@ -802,7 +802,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
|
|
802
802
|
:param str type: 'limit' or 'market'
|
803
803
|
:param str side: 'buy' or 'sell'
|
804
804
|
:param float amount: the amount of currency to trade
|
805
|
-
:param float [price]:
|
805
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
806
806
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
807
807
|
:param float [params.leverage]: Leverage size of the order
|
808
808
|
:param float [params.stopPrice]: The price at which a trigger order is triggered at
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/binance.py
CHANGED
@@ -2145,7 +2145,7 @@ class binance(ccxt.async_support.binance):
|
|
2145
2145
|
:param str type: 'market' or 'limit'
|
2146
2146
|
:param str side: 'buy' or 'sell'
|
2147
2147
|
:param float amount: how much of currency you want to trade in units of base currency
|
2148
|
-
:param float|None [price]: the price at which the order is to be
|
2148
|
+
:param float|None [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2149
2149
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2150
2150
|
:param boolean params['test']: test order, default False
|
2151
2151
|
:param boolean params['returnRateLimits']: set to True to return rate limit information, default False
|
@@ -2288,7 +2288,7 @@ class binance(ccxt.async_support.binance):
|
|
2288
2288
|
:param str type: 'market' or 'limit'
|
2289
2289
|
:param str side: 'buy' or 'sell'
|
2290
2290
|
:param float amount: how much of the currency you want to trade in units of the base currency
|
2291
|
-
:param float|None [price]: the price at which the order is to be
|
2291
|
+
:param float|None [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
2292
2292
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2293
2293
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
2294
2294
|
"""
|
@@ -3409,7 +3409,7 @@ class binance(ccxt.async_support.binance):
|
|
3409
3409
|
rejected = True
|
3410
3410
|
# private endpoint uses id
|
3411
3411
|
client.reject(e, id)
|
3412
|
-
# public endpoint stores messageHash in
|
3412
|
+
# public endpoint stores messageHash in subscriptions
|
3413
3413
|
subscriptionKeys = list(client.subscriptions.keys())
|
3414
3414
|
for i in range(0, len(subscriptionKeys)):
|
3415
3415
|
subscriptionHash = subscriptionKeys[i]
|