ccxt 4.4.38__py2.py3-none-any.whl → 4.4.40__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/digifinex.py +1 -0
- ccxt/abstract/mexc.py +1 -0
- ccxt/abstract/woo.py +2 -2
- ccxt/alpaca.py +74 -3
- ccxt/ascendex.py +9 -9
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +74 -3
- ccxt/async_support/ascendex.py +9 -9
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/base/ws/aiohttp_client.py +2 -2
- ccxt/async_support/binance.py +13 -17
- ccxt/async_support/bingx.py +1 -2
- ccxt/async_support/bit2c.py +0 -1
- ccxt/async_support/bitbank.py +0 -1
- ccxt/async_support/bitbns.py +0 -1
- ccxt/async_support/bitfinex.py +15 -16
- ccxt/async_support/bitfinex1.py +0 -1
- ccxt/async_support/bitflyer.py +0 -1
- ccxt/async_support/bitget.py +1 -2
- ccxt/async_support/bithumb.py +0 -1
- ccxt/async_support/bitmart.py +3 -4
- ccxt/async_support/bitmex.py +5 -6
- ccxt/async_support/bitopro.py +4 -5
- ccxt/async_support/bitrue.py +5 -7
- ccxt/async_support/bitso.py +1 -2
- ccxt/async_support/bitstamp.py +1 -2
- ccxt/async_support/bitteam.py +1 -3
- ccxt/async_support/bitvavo.py +2 -4
- ccxt/async_support/blockchaincom.py +5 -5
- ccxt/async_support/blofin.py +10 -10
- ccxt/async_support/btcalpha.py +0 -1
- ccxt/async_support/btcbox.py +0 -1
- ccxt/async_support/btcmarkets.py +1 -3
- ccxt/async_support/bybit.py +2 -3
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +77 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +62 -0
- ccxt/async_support/coincatch.py +1 -1
- ccxt/async_support/coinex.py +9 -9
- ccxt/async_support/coinlist.py +1 -1
- ccxt/async_support/coinmetro.py +1 -1
- ccxt/async_support/cryptocom.py +91 -2
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/defx.py +1 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/digifinex.py +58 -19
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/hashkey.py +3 -5
- ccxt/async_support/htx.py +155 -33
- ccxt/async_support/hyperliquid.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/kucoin.py +25 -24
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/mexc.py +173 -26
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/okcoin.py +18 -18
- ccxt/async_support/okx.py +22 -21
- ccxt/async_support/phemex.py +12 -8
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/poloniexfutures.py +6 -6
- ccxt/async_support/vertex.py +11 -11
- ccxt/async_support/woo.py +39 -39
- ccxt/async_support/woofipro.py +24 -24
- ccxt/async_support/xt.py +26 -26
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +32 -25
- ccxt/binance.py +13 -17
- ccxt/bingx.py +1 -2
- ccxt/bit2c.py +0 -1
- ccxt/bitbank.py +0 -1
- ccxt/bitbns.py +0 -1
- ccxt/bitfinex.py +15 -16
- ccxt/bitfinex1.py +0 -1
- ccxt/bitflyer.py +0 -1
- ccxt/bitget.py +1 -2
- ccxt/bithumb.py +0 -1
- ccxt/bitmart.py +3 -4
- ccxt/bitmex.py +5 -6
- ccxt/bitopro.py +4 -5
- ccxt/bitrue.py +5 -7
- ccxt/bitso.py +1 -2
- ccxt/bitstamp.py +1 -2
- ccxt/bitteam.py +1 -3
- ccxt/bitvavo.py +2 -4
- ccxt/blockchaincom.py +5 -5
- ccxt/blofin.py +10 -10
- ccxt/btcalpha.py +0 -1
- ccxt/btcbox.py +0 -1
- ccxt/btcmarkets.py +1 -3
- ccxt/bybit.py +2 -3
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +77 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +62 -0
- ccxt/coincatch.py +1 -1
- ccxt/coinex.py +9 -9
- ccxt/coinlist.py +1 -1
- ccxt/coinmetro.py +1 -1
- ccxt/cryptocom.py +91 -2
- ccxt/currencycom.py +1 -1
- ccxt/defx.py +1 -2
- ccxt/delta.py +1 -1
- ccxt/digifinex.py +58 -19
- ccxt/exmo.py +2 -2
- ccxt/gate.py +1 -1
- ccxt/hashkey.py +3 -5
- ccxt/htx.py +155 -33
- ccxt/hyperliquid.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/kucoin.py +25 -24
- ccxt/luno.py +1 -1
- ccxt/mexc.py +173 -26
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +18 -18
- ccxt/okx.py +22 -21
- ccxt/phemex.py +12 -8
- ccxt/poloniex.py +1 -1
- ccxt/poloniexfutures.py +6 -6
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +1 -1
- ccxt/pro/bybit.py +12 -1
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/gate.py +6 -6
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/okx.py +11 -11
- ccxt/pro/upbit.py +2 -2
- ccxt/pro/woo.py +1 -1
- ccxt/vertex.py +11 -11
- ccxt/woo.py +39 -39
- ccxt/woofipro.py +24 -24
- ccxt/xt.py +26 -26
- ccxt/zonda.py +1 -1
- {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/METADATA +4 -4
- {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/RECORD +140 -140
- {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/WHEEL +0 -0
- {ccxt-4.4.38.dist-info → ccxt-4.4.40.dist-info}/top_level.txt +0 -0
ccxt/async_support/htx.py
CHANGED
@@ -1251,6 +1251,128 @@ class htx(Exchange, ImplicitAPI):
|
|
1251
1251
|
'BIFI': 'BITCOINFILE', # conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706
|
1252
1252
|
'FUD': 'FTX Users Debt',
|
1253
1253
|
},
|
1254
|
+
'features': {
|
1255
|
+
'spot': {
|
1256
|
+
'sandbox': True,
|
1257
|
+
'createOrder': {
|
1258
|
+
'marginMode': True,
|
1259
|
+
'triggerPrice': True,
|
1260
|
+
'triggerDirection': True,
|
1261
|
+
'triggerPriceType': None,
|
1262
|
+
'stopLossPrice': False, # todo: add support by triggerprice
|
1263
|
+
'takeProfitPrice': False,
|
1264
|
+
'attachedStopLossTakeProfit': None,
|
1265
|
+
'timeInForce': {
|
1266
|
+
'IOC': True,
|
1267
|
+
'FOK': True,
|
1268
|
+
'PO': True,
|
1269
|
+
'GTD': False,
|
1270
|
+
},
|
1271
|
+
'hedged': False,
|
1272
|
+
'trailing': False,
|
1273
|
+
# exchange-specific features
|
1274
|
+
'iceberg': False,
|
1275
|
+
'selfTradePrevention': True,
|
1276
|
+
},
|
1277
|
+
'createOrders': {
|
1278
|
+
'max': 10,
|
1279
|
+
},
|
1280
|
+
'fetchMyTrades': {
|
1281
|
+
'marginMode': False,
|
1282
|
+
'limit': 500,
|
1283
|
+
'daysBack': 120,
|
1284
|
+
'untilDays': 2,
|
1285
|
+
},
|
1286
|
+
'fetchOrder': {
|
1287
|
+
'marginMode': False,
|
1288
|
+
'trigger': False,
|
1289
|
+
'trailing': False,
|
1290
|
+
},
|
1291
|
+
'fetchOpenOrders': {
|
1292
|
+
'marginMode': False,
|
1293
|
+
'trigger': True,
|
1294
|
+
'trailing': False,
|
1295
|
+
'limit': 500,
|
1296
|
+
},
|
1297
|
+
'fetchOrders': {
|
1298
|
+
'marginMode': False,
|
1299
|
+
'trigger': True,
|
1300
|
+
'trailing': False,
|
1301
|
+
'limit': 500,
|
1302
|
+
'untilDays': 2,
|
1303
|
+
'daysBack': 180,
|
1304
|
+
},
|
1305
|
+
'fetchClosedOrders': {
|
1306
|
+
'marginMode': False,
|
1307
|
+
'trigger': True,
|
1308
|
+
'trailing': False,
|
1309
|
+
'untilDays': 2,
|
1310
|
+
'limit': 500,
|
1311
|
+
'daysBackClosed': 180,
|
1312
|
+
'daysBackCanceled': 1 / 12,
|
1313
|
+
},
|
1314
|
+
'fetchOHLCV': {
|
1315
|
+
'limit': 1000, # 2000 for non-historical
|
1316
|
+
},
|
1317
|
+
},
|
1318
|
+
'forDerivatives': {
|
1319
|
+
'extends': 'spot',
|
1320
|
+
'createOrder': {
|
1321
|
+
'stopLossPrice': True,
|
1322
|
+
'takeProfitPrice': True,
|
1323
|
+
'trailing': True,
|
1324
|
+
'hedged': True,
|
1325
|
+
# 'leverage': True, # todo
|
1326
|
+
},
|
1327
|
+
'createOrders': {
|
1328
|
+
'max': 25,
|
1329
|
+
},
|
1330
|
+
'fetchOrder': {
|
1331
|
+
'marginMode': True,
|
1332
|
+
},
|
1333
|
+
'fetchOpenOrders': {
|
1334
|
+
'marginMode': True,
|
1335
|
+
'trigger': False,
|
1336
|
+
'trailing': False,
|
1337
|
+
'limit': 50,
|
1338
|
+
},
|
1339
|
+
'fetchOrders': {
|
1340
|
+
'marginMode': True,
|
1341
|
+
'trigger': False,
|
1342
|
+
'trailing': False,
|
1343
|
+
'limit': 50,
|
1344
|
+
'daysBack': 90,
|
1345
|
+
},
|
1346
|
+
'fetchClosedOrders': {
|
1347
|
+
'marginMode': True,
|
1348
|
+
'trigger': False,
|
1349
|
+
'trailing': False,
|
1350
|
+
'untilDays': 2,
|
1351
|
+
'limit': 50,
|
1352
|
+
'daysBackClosed': 90,
|
1353
|
+
'daysBackCanceled': 1 / 12,
|
1354
|
+
},
|
1355
|
+
'fetchOHLCV': {
|
1356
|
+
'limit': 2000,
|
1357
|
+
},
|
1358
|
+
},
|
1359
|
+
'swap': {
|
1360
|
+
'linear': {
|
1361
|
+
'extends': 'forDerivatives',
|
1362
|
+
},
|
1363
|
+
'inverse': {
|
1364
|
+
'extends': 'forDerivatives',
|
1365
|
+
},
|
1366
|
+
},
|
1367
|
+
'future': {
|
1368
|
+
'linear': {
|
1369
|
+
'extends': 'forDerivatives',
|
1370
|
+
},
|
1371
|
+
'inverse': {
|
1372
|
+
'extends': 'forDerivatives',
|
1373
|
+
},
|
1374
|
+
},
|
1375
|
+
},
|
1254
1376
|
})
|
1255
1377
|
|
1256
1378
|
async def fetch_status(self, params={}):
|
@@ -3865,11 +3987,11 @@ class htx(Exchange, ImplicitAPI):
|
|
3865
3987
|
'status': '0', # support multiple query seperated by ',',such as '3,4,5', 0: all. 3. Have sumbmitted the orders; 4. Orders partially matched; 5. Orders cancelled with partially matched; 6. Orders fully matched; 7. Orders cancelled
|
3866
3988
|
}
|
3867
3989
|
response = None
|
3868
|
-
|
3990
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
3869
3991
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
3870
3992
|
trailing = self.safe_bool(params, 'trailing', False)
|
3871
3993
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
3872
|
-
if
|
3994
|
+
if trigger or stopLossTakeProfit or trailing:
|
3873
3995
|
if limit is not None:
|
3874
3996
|
request['page_size'] = limit
|
3875
3997
|
request['contract_code'] = market['id']
|
@@ -3886,7 +4008,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3886
4008
|
marginMode, params = self.handle_margin_mode_and_params('fetchContractOrders', params)
|
3887
4009
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
3888
4010
|
if marginMode == 'isolated':
|
3889
|
-
if
|
4011
|
+
if trigger:
|
3890
4012
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTriggerHisorders(self.extend(request, params))
|
3891
4013
|
elif stopLossTakeProfit:
|
3892
4014
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTpslHisorders(self.extend(request, params))
|
@@ -3895,7 +4017,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3895
4017
|
else:
|
3896
4018
|
response = await self.contractPrivatePostLinearSwapApiV3SwapHisorders(self.extend(request, params))
|
3897
4019
|
elif marginMode == 'cross':
|
3898
|
-
if
|
4020
|
+
if trigger:
|
3899
4021
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerHisorders(self.extend(request, params))
|
3900
4022
|
elif stopLossTakeProfit:
|
3901
4023
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTpslHisorders(self.extend(request, params))
|
@@ -3905,7 +4027,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3905
4027
|
response = await self.contractPrivatePostLinearSwapApiV3SwapCrossHisorders(self.extend(request, params))
|
3906
4028
|
elif market['inverse']:
|
3907
4029
|
if market['swap']:
|
3908
|
-
if
|
4030
|
+
if trigger:
|
3909
4031
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerHisorders(self.extend(request, params))
|
3910
4032
|
elif stopLossTakeProfit:
|
3911
4033
|
response = await self.contractPrivatePostSwapApiV1SwapTpslHisorders(self.extend(request, params))
|
@@ -3915,7 +4037,7 @@ class htx(Exchange, ImplicitAPI):
|
|
3915
4037
|
response = await self.contractPrivatePostSwapApiV3SwapHisorders(self.extend(request, params))
|
3916
4038
|
elif market['future']:
|
3917
4039
|
request['symbol'] = market['settleId']
|
3918
|
-
if
|
4040
|
+
if trigger:
|
3919
4041
|
response = await self.contractPrivatePostApiV1ContractTriggerHisorders(self.extend(request, params))
|
3920
4042
|
elif stopLossTakeProfit:
|
3921
4043
|
response = await self.contractPrivatePostApiV1ContractTpslHisorders(self.extend(request, params))
|
@@ -4091,7 +4213,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4091
4213
|
:param int [since]: the earliest time in ms to fetch orders for
|
4092
4214
|
:param int [limit]: the maximum number of order structures to retrieve
|
4093
4215
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4094
|
-
:param bool [params.
|
4216
|
+
:param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
|
4095
4217
|
:param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
|
4096
4218
|
:param int [params.until]: the latest time in ms to fetch entries for
|
4097
4219
|
:param boolean [params.trailing]: *contract only* set to True if you want to fetch trailing stop orders
|
@@ -4157,7 +4279,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4157
4279
|
:param int [since]: the earliest time in ms to fetch open orders for
|
4158
4280
|
:param int [limit]: the maximum number of open order structures to retrieve
|
4159
4281
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4160
|
-
:param bool [params.
|
4282
|
+
:param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
|
4161
4283
|
:param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
|
4162
4284
|
:param boolean [params.trailing]: *contract only* set to True if you want to fetch trailing stop orders
|
4163
4285
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -4195,7 +4317,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4195
4317
|
if limit is not None:
|
4196
4318
|
request['page_size'] = limit
|
4197
4319
|
request['contract_code'] = market['id']
|
4198
|
-
|
4320
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
4199
4321
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
4200
4322
|
trailing = self.safe_bool(params, 'trailing', False)
|
4201
4323
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
@@ -4204,7 +4326,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4204
4326
|
marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
4205
4327
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
4206
4328
|
if marginMode == 'isolated':
|
4207
|
-
if
|
4329
|
+
if trigger:
|
4208
4330
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
|
4209
4331
|
elif stopLossTakeProfit:
|
4210
4332
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTpslOpenorders(self.extend(request, params))
|
@@ -4213,7 +4335,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4213
4335
|
else:
|
4214
4336
|
response = await self.contractPrivatePostLinearSwapApiV1SwapOpenorders(self.extend(request, params))
|
4215
4337
|
elif marginMode == 'cross':
|
4216
|
-
if
|
4338
|
+
if trigger:
|
4217
4339
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerOpenorders(self.extend(request, params))
|
4218
4340
|
elif stopLossTakeProfit:
|
4219
4341
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTpslOpenorders(self.extend(request, params))
|
@@ -4223,7 +4345,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4223
4345
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossOpenorders(self.extend(request, params))
|
4224
4346
|
elif market['inverse']:
|
4225
4347
|
if market['swap']:
|
4226
|
-
if
|
4348
|
+
if trigger:
|
4227
4349
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
|
4228
4350
|
elif stopLossTakeProfit:
|
4229
4351
|
response = await self.contractPrivatePostSwapApiV1SwapTpslOpenorders(self.extend(request, params))
|
@@ -4233,7 +4355,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4233
4355
|
response = await self.contractPrivatePostSwapApiV1SwapOpenorders(self.extend(request, params))
|
4234
4356
|
elif market['future']:
|
4235
4357
|
request['symbol'] = market['settleId']
|
4236
|
-
if
|
4358
|
+
if trigger:
|
4237
4359
|
response = await self.contractPrivatePostApiV1ContractTriggerOpenorders(self.extend(request, params))
|
4238
4360
|
elif stopLossTakeProfit:
|
4239
4361
|
response = await self.contractPrivatePostApiV1ContractTpslOpenorders(self.extend(request, params))
|
@@ -4959,7 +5081,7 @@ class htx(Exchange, ImplicitAPI):
|
|
4959
5081
|
if triggerPrice is None:
|
4960
5082
|
stopOrderTypes = self.safe_value(options, 'stopOrderTypes', {})
|
4961
5083
|
if orderType in stopOrderTypes:
|
4962
|
-
raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice for a
|
5084
|
+
raise ArgumentsRequired(self.id + ' createOrder() requires a triggerPrice for a trigger order')
|
4963
5085
|
else:
|
4964
5086
|
defaultOperator = 'lte' if (side == 'sell') else 'gte'
|
4965
5087
|
stopOperator = self.safe_string(params, 'operator', defaultOperator)
|
@@ -5395,7 +5517,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5395
5517
|
:param str id: order id
|
5396
5518
|
:param str symbol: unified symbol of the market the order was made in
|
5397
5519
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5398
|
-
:param boolean [params.
|
5520
|
+
:param boolean [params.trigger]: *contract only* if the order is a trigger trigger order or not
|
5399
5521
|
:param boolean [params.stopLossTakeProfit]: *contract only* if the order is a stop-loss or take-profit order
|
5400
5522
|
:param boolean [params.trailing]: *contract only* set to True if you want to cancel a trailing order
|
5401
5523
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -5441,7 +5563,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5441
5563
|
request['symbol'] = market['settleId']
|
5442
5564
|
else:
|
5443
5565
|
request['contract_code'] = market['id']
|
5444
|
-
|
5566
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
5445
5567
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
5446
5568
|
trailing = self.safe_bool(params, 'trailing', False)
|
5447
5569
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
@@ -5450,7 +5572,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5450
5572
|
marginMode, params = self.handle_margin_mode_and_params('cancelOrder', params)
|
5451
5573
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
5452
5574
|
if marginMode == 'isolated':
|
5453
|
-
if
|
5575
|
+
if trigger:
|
5454
5576
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTriggerCancel(self.extend(request, params))
|
5455
5577
|
elif stopLossTakeProfit:
|
5456
5578
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTpslCancel(self.extend(request, params))
|
@@ -5459,7 +5581,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5459
5581
|
else:
|
5460
5582
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCancel(self.extend(request, params))
|
5461
5583
|
elif marginMode == 'cross':
|
5462
|
-
if
|
5584
|
+
if trigger:
|
5463
5585
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancel(self.extend(request, params))
|
5464
5586
|
elif stopLossTakeProfit:
|
5465
5587
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancel(self.extend(request, params))
|
@@ -5469,7 +5591,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5469
5591
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossCancel(self.extend(request, params))
|
5470
5592
|
elif market['inverse']:
|
5471
5593
|
if market['swap']:
|
5472
|
-
if
|
5594
|
+
if trigger:
|
5473
5595
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerCancel(self.extend(request, params))
|
5474
5596
|
elif stopLossTakeProfit:
|
5475
5597
|
response = await self.contractPrivatePostSwapApiV1SwapTpslCancel(self.extend(request, params))
|
@@ -5478,7 +5600,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5478
5600
|
else:
|
5479
5601
|
response = await self.contractPrivatePostSwapApiV1SwapCancel(self.extend(request, params))
|
5480
5602
|
elif market['future']:
|
5481
|
-
if
|
5603
|
+
if trigger:
|
5482
5604
|
response = await self.contractPrivatePostApiV1ContractTriggerCancel(self.extend(request, params))
|
5483
5605
|
elif stopLossTakeProfit:
|
5484
5606
|
response = await self.contractPrivatePostApiV1ContractTpslCancel(self.extend(request, params))
|
@@ -5518,7 +5640,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5518
5640
|
:param str[] ids: order ids
|
5519
5641
|
:param str symbol: unified market symbol, default is None
|
5520
5642
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5521
|
-
:param bool [params.
|
5643
|
+
:param bool [params.trigger]: *contract only* if the orders are trigger trigger orders or not
|
5522
5644
|
:param bool [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
|
5523
5645
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
5524
5646
|
"""
|
@@ -5568,7 +5690,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5568
5690
|
request['symbol'] = market['settleId']
|
5569
5691
|
else:
|
5570
5692
|
request['contract_code'] = market['id']
|
5571
|
-
|
5693
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
5572
5694
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
5573
5695
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trigger'])
|
5574
5696
|
if market['linear']:
|
@@ -5576,14 +5698,14 @@ class htx(Exchange, ImplicitAPI):
|
|
5576
5698
|
marginMode, params = self.handle_margin_mode_and_params('cancelOrders', params)
|
5577
5699
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
5578
5700
|
if marginMode == 'isolated':
|
5579
|
-
if
|
5701
|
+
if trigger:
|
5580
5702
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTriggerCancel(self.extend(request, params))
|
5581
5703
|
elif stopLossTakeProfit:
|
5582
5704
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTpslCancel(self.extend(request, params))
|
5583
5705
|
else:
|
5584
5706
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCancel(self.extend(request, params))
|
5585
5707
|
elif marginMode == 'cross':
|
5586
|
-
if
|
5708
|
+
if trigger:
|
5587
5709
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancel(self.extend(request, params))
|
5588
5710
|
elif stopLossTakeProfit:
|
5589
5711
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancel(self.extend(request, params))
|
@@ -5591,14 +5713,14 @@ class htx(Exchange, ImplicitAPI):
|
|
5591
5713
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossCancel(self.extend(request, params))
|
5592
5714
|
elif market['inverse']:
|
5593
5715
|
if market['swap']:
|
5594
|
-
if
|
5716
|
+
if trigger:
|
5595
5717
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerCancel(self.extend(request, params))
|
5596
5718
|
elif stopLossTakeProfit:
|
5597
5719
|
response = await self.contractPrivatePostSwapApiV1SwapTpslCancel(self.extend(request, params))
|
5598
5720
|
else:
|
5599
5721
|
response = await self.contractPrivatePostSwapApiV1SwapCancel(self.extend(request, params))
|
5600
5722
|
elif market['future']:
|
5601
|
-
if
|
5723
|
+
if trigger:
|
5602
5724
|
response = await self.contractPrivatePostApiV1ContractTriggerCancel(self.extend(request, params))
|
5603
5725
|
elif stopLossTakeProfit:
|
5604
5726
|
response = await self.contractPrivatePostApiV1ContractTpslCancel(self.extend(request, params))
|
@@ -5719,7 +5841,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5719
5841
|
cancel all open orders
|
5720
5842
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
5721
5843
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5722
|
-
:param boolean [params.
|
5844
|
+
:param boolean [params.trigger]: *contract only* if the orders are trigger trigger orders or not
|
5723
5845
|
:param boolean [params.stopLossTakeProfit]: *contract only* if the orders are stop-loss or take-profit orders
|
5724
5846
|
:param boolean [params.trailing]: *contract only* set to True if you want to cancel all trailing orders
|
5725
5847
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -5771,7 +5893,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5771
5893
|
if market['future']:
|
5772
5894
|
request['symbol'] = market['settleId']
|
5773
5895
|
request['contract_code'] = market['id']
|
5774
|
-
|
5896
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
5775
5897
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
5776
5898
|
trailing = self.safe_bool(params, 'trailing', False)
|
5777
5899
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
@@ -5780,7 +5902,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5780
5902
|
marginMode, params = self.handle_margin_mode_and_params('cancelAllOrders', params)
|
5781
5903
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
5782
5904
|
if marginMode == 'isolated':
|
5783
|
-
if
|
5905
|
+
if trigger:
|
5784
5906
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTriggerCancelall(self.extend(request, params))
|
5785
5907
|
elif stopLossTakeProfit:
|
5786
5908
|
response = await self.contractPrivatePostLinearSwapApiV1SwapTpslCancelall(self.extend(request, params))
|
@@ -5789,7 +5911,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5789
5911
|
else:
|
5790
5912
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCancelall(self.extend(request, params))
|
5791
5913
|
elif marginMode == 'cross':
|
5792
|
-
if
|
5914
|
+
if trigger:
|
5793
5915
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTriggerCancelall(self.extend(request, params))
|
5794
5916
|
elif stopLossTakeProfit:
|
5795
5917
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTpslCancelall(self.extend(request, params))
|
@@ -5799,7 +5921,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5799
5921
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossCancelall(self.extend(request, params))
|
5800
5922
|
elif market['inverse']:
|
5801
5923
|
if market['swap']:
|
5802
|
-
if
|
5924
|
+
if trigger:
|
5803
5925
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerCancelall(self.extend(request, params))
|
5804
5926
|
elif stopLossTakeProfit:
|
5805
5927
|
response = await self.contractPrivatePostSwapApiV1SwapTpslCancelall(self.extend(request, params))
|
@@ -5808,7 +5930,7 @@ class htx(Exchange, ImplicitAPI):
|
|
5808
5930
|
else:
|
5809
5931
|
response = await self.contractPrivatePostSwapApiV1SwapCancelall(self.extend(request, params))
|
5810
5932
|
elif market['future']:
|
5811
|
-
if
|
5933
|
+
if trigger:
|
5812
5934
|
response = await self.contractPrivatePostApiV1ContractTriggerCancelall(self.extend(request, params))
|
5813
5935
|
elif stopLossTakeProfit:
|
5814
5936
|
response = await self.contractPrivatePostApiV1ContractTpslCancelall(self.extend(request, params))
|
@@ -7642,7 +7764,7 @@ class htx(Exchange, ImplicitAPI):
|
|
7642
7764
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7643
7765
|
:param int [params.until]: the latest time in ms to fetch entries for
|
7644
7766
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
7645
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
7767
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
7646
7768
|
"""
|
7647
7769
|
await self.load_markets()
|
7648
7770
|
paginate = False
|
@@ -2971,7 +2971,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2971
2971
|
:param int [limit]: max number of ledger entries to return
|
2972
2972
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2973
2973
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
2974
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
2974
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
2975
2975
|
"""
|
2976
2976
|
await self.load_markets()
|
2977
2977
|
userAddress = None
|
ccxt/async_support/kraken.py
CHANGED
@@ -1129,7 +1129,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
1129
1129
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1130
1130
|
:param int [params.until]: timestamp in ms of the latest ledger entry
|
1131
1131
|
:param int [params.end]: timestamp in seconds of the latest ledger entry
|
1132
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
1132
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
1133
1133
|
"""
|
1134
1134
|
# https://www.kraken.com/features/api#get-ledgers-info
|
1135
1135
|
await self.load_markets()
|
ccxt/async_support/kucoin.py
CHANGED
@@ -577,6 +577,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
577
577
|
'400008': NotSupported,
|
578
578
|
'400100': InsufficientFunds, # {"msg":"account.available.amount","code":"400100"} or {"msg":"Withdrawal amount is below the minimum requirement.","code":"400100"}
|
579
579
|
'400200': InvalidOrder, # {"code":"400200","msg":"Forbidden to place an order"}
|
580
|
+
'400330': InvalidOrder, # {"msg":"Order price can't deviate from NAV by 50%","code":"400330"}
|
580
581
|
'400350': InvalidOrder, # {"code":"400350","msg":"Upper limit for holding: 10,000USDT, you can still buy 10,000USDT worth of coin."}
|
581
582
|
'400370': InvalidOrder, # {"code":"400370","msg":"Max. price: 0.02500000000000000000"}
|
582
583
|
'400400': BadRequest, # Parameter error
|
@@ -2213,7 +2214,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2213
2214
|
market orders --------------------------------------------------
|
2214
2215
|
:param str [params.funds]: # Amount of quote currency to use
|
2215
2216
|
stop orders ----------------------------------------------------
|
2216
|
-
:param str [params.stop]: Either loss or entry, the default is loss. Requires
|
2217
|
+
:param str [params.stop]: Either loss or entry, the default is loss. Requires triggerPrice to be defined
|
2217
2218
|
margin orders --------------------------------------------------
|
2218
2219
|
:param float [params.leverage]: Leverage size of the order
|
2219
2220
|
:param str [params.stp]: '', # self trade prevention, CN, CO, CB or DC
|
@@ -2518,7 +2519,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2518
2519
|
:param str id: order id
|
2519
2520
|
:param str symbol: unified symbol of the market the order was made in
|
2520
2521
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2521
|
-
:param bool [params.
|
2522
|
+
:param bool [params.trigger]: True if cancelling a stop order
|
2522
2523
|
:param bool [params.hf]: False, # True for hf order
|
2523
2524
|
:param bool [params.sync]: False, # True to use the hf sync call
|
2524
2525
|
:returns: Response from the exchange
|
@@ -2526,7 +2527,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2526
2527
|
await self.load_markets()
|
2527
2528
|
request: dict = {}
|
2528
2529
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2529
|
-
|
2530
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2530
2531
|
hf = None
|
2531
2532
|
hf, params = self.handle_hf_and_params(params)
|
2532
2533
|
useSync = False
|
@@ -2540,7 +2541,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2540
2541
|
params = self.omit(params, ['clientOid', 'clientOrderId', 'stop', 'trigger'])
|
2541
2542
|
if clientOrderId is not None:
|
2542
2543
|
request['clientOid'] = clientOrderId
|
2543
|
-
if
|
2544
|
+
if trigger:
|
2544
2545
|
response = await self.privateDeleteStopOrderCancelOrderByClientOid(self.extend(request, params))
|
2545
2546
|
#
|
2546
2547
|
# {
|
@@ -2579,7 +2580,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2579
2580
|
return self.parse_order(response)
|
2580
2581
|
else:
|
2581
2582
|
request['orderId'] = id
|
2582
|
-
if
|
2583
|
+
if trigger:
|
2583
2584
|
response = await self.privateDeleteStopOrderOrderId(self.extend(request, params))
|
2584
2585
|
#
|
2585
2586
|
# {
|
@@ -2627,7 +2628,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2627
2628
|
|
2628
2629
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
2629
2630
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2630
|
-
:param bool [params.
|
2631
|
+
:param bool [params.trigger]: *invalid for isolated margin* True if cancelling all stop orders
|
2631
2632
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
2632
2633
|
:param str [params.orderIds]: *stop orders only* Comma seperated order IDs
|
2633
2634
|
:param bool [params.hf]: False, # True for hf order
|
@@ -2635,7 +2636,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2635
2636
|
"""
|
2636
2637
|
await self.load_markets()
|
2637
2638
|
request: dict = {}
|
2638
|
-
|
2639
|
+
trigger = self.safe_bool(params, 'stop', False)
|
2639
2640
|
hf = None
|
2640
2641
|
hf, params = self.handle_hf_and_params(params)
|
2641
2642
|
params = self.omit(params, 'stop')
|
@@ -2644,10 +2645,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2644
2645
|
request['symbol'] = self.market_id(symbol)
|
2645
2646
|
if marginMode is not None:
|
2646
2647
|
request['tradeType'] = self.options['marginModes'][marginMode]
|
2647
|
-
if marginMode == 'isolated' and
|
2648
|
+
if marginMode == 'isolated' and trigger:
|
2648
2649
|
raise BadRequest(self.id + ' cancelAllOrders does not support isolated margin for stop orders')
|
2649
2650
|
response = None
|
2650
|
-
if
|
2651
|
+
if trigger:
|
2651
2652
|
response = await self.privateDeleteStopOrderCancel(self.extend(request, query))
|
2652
2653
|
elif hf:
|
2653
2654
|
if symbol is None:
|
@@ -2676,9 +2677,9 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2676
2677
|
:param str [params.side]: buy or sell
|
2677
2678
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2678
2679
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2679
|
-
:param int [params.currentPage]: *
|
2680
|
-
:param str [params.orderIds]: *
|
2681
|
-
:param bool [params.
|
2680
|
+
:param int [params.currentPage]: *trigger orders only* current page
|
2681
|
+
:param str [params.orderIds]: *trigger orders only* comma seperated order ID list
|
2682
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2682
2683
|
:param bool [params.hf]: False, # True for hf order
|
2683
2684
|
:returns: An `array of order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
2684
2685
|
"""
|
@@ -2787,7 +2788,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2787
2788
|
:param str [params.side]: buy or sell
|
2788
2789
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2789
2790
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2790
|
-
:param bool [params.
|
2791
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2791
2792
|
:param bool [params.hf]: False, # True for hf order
|
2792
2793
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2793
2794
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2813,12 +2814,12 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2813
2814
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
2814
2815
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2815
2816
|
:param int [params.until]: end time in ms
|
2816
|
-
:param bool [params.
|
2817
|
+
:param bool [params.trigger]: True if fetching trigger orders
|
2817
2818
|
:param str [params.side]: buy or sell
|
2818
2819
|
:param str [params.type]: limit, market, limit_stop or market_stop
|
2819
2820
|
:param str [params.tradeType]: TRADE for spot trading, MARGIN_TRADE for Margin Trading
|
2820
|
-
:param int [params.currentPage]: *
|
2821
|
-
:param str [params.orderIds]: *
|
2821
|
+
:param int [params.currentPage]: *trigger orders only* current page
|
2822
|
+
:param str [params.orderIds]: *trigger orders only* comma seperated order ID list
|
2822
2823
|
:param bool [params.hf]: False, # True for hf order
|
2823
2824
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
2824
2825
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2842,9 +2843,9 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2842
2843
|
https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
|
2843
2844
|
|
2844
2845
|
:param str id: Order id
|
2845
|
-
:param str symbol: not sent to exchange except for
|
2846
|
+
:param str symbol: not sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
|
2846
2847
|
:param dict [params]: exchange specific parameters
|
2847
|
-
:param bool [params.
|
2848
|
+
:param bool [params.trigger]: True if fetching a trigger order
|
2848
2849
|
:param bool [params.hf]: False, # True for hf order
|
2849
2850
|
:param bool [params.clientOid]: unique order id created by users to identify their orders
|
2850
2851
|
:returns: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -2852,7 +2853,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2852
2853
|
await self.load_markets()
|
2853
2854
|
request: dict = {}
|
2854
2855
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
|
2855
|
-
|
2856
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2856
2857
|
hf = None
|
2857
2858
|
hf, params = self.handle_hf_and_params(params)
|
2858
2859
|
market = None
|
@@ -2866,7 +2867,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2866
2867
|
response = None
|
2867
2868
|
if clientOrderId is not None:
|
2868
2869
|
request['clientOid'] = clientOrderId
|
2869
|
-
if
|
2870
|
+
if trigger:
|
2870
2871
|
if symbol is not None:
|
2871
2872
|
request['symbol'] = market['id']
|
2872
2873
|
response = await self.privateGetStopOrderQueryOrderByClientOid(self.extend(request, params))
|
@@ -2881,7 +2882,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2881
2882
|
if id is None:
|
2882
2883
|
raise InvalidOrder(self.id + ' fetchOrder() requires an order id')
|
2883
2884
|
request['orderId'] = id
|
2884
|
-
if
|
2885
|
+
if trigger:
|
2885
2886
|
response = await self.privateGetStopOrderOrderId(self.extend(request, params))
|
2886
2887
|
elif hf:
|
2887
2888
|
response = await self.privateGetHfOrdersOrderId(self.extend(request, params))
|
@@ -3019,7 +3020,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3019
3020
|
feeCurrencyId = self.safe_string(order, 'feeCurrency')
|
3020
3021
|
cancelExist = self.safe_bool(order, 'cancelExist', False)
|
3021
3022
|
responseStop = self.safe_string(order, 'stop')
|
3022
|
-
|
3023
|
+
trigger = responseStop is not None
|
3023
3024
|
stopTriggered = self.safe_bool(order, 'stopTriggered', False)
|
3024
3025
|
isActive = self.safe_bool_2(order, 'isActive', 'active')
|
3025
3026
|
responseStatus = self.safe_string(order, 'status')
|
@@ -3029,7 +3030,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3029
3030
|
status = 'open'
|
3030
3031
|
else:
|
3031
3032
|
status = 'closed'
|
3032
|
-
if
|
3033
|
+
if trigger:
|
3033
3034
|
if responseStatus == 'NEW':
|
3034
3035
|
status = 'open'
|
3035
3036
|
elif not isActive and not stopTriggered:
|
@@ -4182,7 +4183,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4182
4183
|
:param boolean [params.hf]: default False, when True will fetch ledger entries for the high frequency trading account
|
4183
4184
|
:param int [params.until]: the latest time in ms to fetch entries for
|
4184
4185
|
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
4185
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
4186
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
4186
4187
|
"""
|
4187
4188
|
await self.load_markets()
|
4188
4189
|
await self.load_accounts()
|
ccxt/async_support/luno.py
CHANGED
@@ -963,7 +963,7 @@ class luno(Exchange, ImplicitAPI):
|
|
963
963
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
964
964
|
:param int [limit]: max number of ledger entries to return, default is None
|
965
965
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
966
|
-
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger
|
966
|
+
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger>`
|
967
967
|
"""
|
968
968
|
await self.load_markets()
|
969
969
|
await self.load_accounts()
|