ccxt 4.3.41__py2.py3-none-any.whl → 4.3.43__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/coinex.py +2 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +163 -42
- ccxt/async_support/bitmart.py +191 -100
- ccxt/async_support/blockchaincom.py +11 -7
- ccxt/async_support/btcmarkets.py +31 -2
- ccxt/async_support/coinex.py +104 -104
- ccxt/async_support/kraken.py +30 -3
- ccxt/async_support/krakenfutures.py +55 -1
- ccxt/async_support/kucoin.py +59 -2
- ccxt/async_support/phemex.py +4 -4
- ccxt/async_support/tradeogre.py +10 -4
- ccxt/async_support/wavesexchange.py +2 -2
- ccxt/async_support/wazirx.py +38 -15
- ccxt/async_support/zonda.py +9 -1
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +163 -42
- ccxt/bitmart.py +191 -100
- ccxt/blockchaincom.py +11 -7
- ccxt/btcmarkets.py +31 -2
- ccxt/coinex.py +104 -104
- ccxt/kraken.py +30 -3
- ccxt/krakenfutures.py +55 -1
- ccxt/kucoin.py +59 -2
- ccxt/phemex.py +4 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitget.py +32 -20
- ccxt/pro/bybit.py +1 -1
- ccxt/pro/mexc.py +2 -2
- ccxt/pro/upbit.py +8 -4
- ccxt/pro/woo.py +1 -1
- ccxt/tradeogre.py +10 -4
- ccxt/wavesexchange.py +2 -2
- ccxt/wazirx.py +38 -15
- ccxt/zonda.py +9 -1
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/METADATA +6 -6
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/RECORD +41 -41
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/WHEEL +0 -0
- {ccxt-4.3.41.dist-info → ccxt-4.3.43.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitmart.py
CHANGED
@@ -1126,27 +1126,46 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1126
1126
|
|
1127
1127
|
def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
|
1128
1128
|
#
|
1129
|
-
# spot(REST)
|
1129
|
+
# spot(REST) fetchTickers
|
1130
1130
|
#
|
1131
|
-
#
|
1132
|
-
#
|
1133
|
-
#
|
1134
|
-
#
|
1135
|
-
#
|
1136
|
-
#
|
1137
|
-
#
|
1138
|
-
#
|
1139
|
-
#
|
1140
|
-
#
|
1141
|
-
#
|
1142
|
-
#
|
1143
|
-
#
|
1144
|
-
#
|
1145
|
-
#
|
1146
|
-
#
|
1147
|
-
#
|
1131
|
+
# {
|
1132
|
+
# 'result': [
|
1133
|
+
# "AFIN_USDT", # symbol
|
1134
|
+
# "0.001047", # last
|
1135
|
+
# "11110", # v_24h
|
1136
|
+
# "11.632170", # qv_24h
|
1137
|
+
# "0.001048", # open_24h
|
1138
|
+
# "0.001048", # high_24h
|
1139
|
+
# "0.001047", # low_24h
|
1140
|
+
# "-0.00095", # price_change_24h
|
1141
|
+
# "0.001029", # bid_px
|
1142
|
+
# "5555", # bid_sz
|
1143
|
+
# "0.001041", # ask_px
|
1144
|
+
# "5297", # ask_sz
|
1145
|
+
# "1717122550482" # timestamp
|
1146
|
+
# ]
|
1147
|
+
# }
|
1148
|
+
#
|
1149
|
+
# spot(REST) fetchTicker
|
1150
|
+
#
|
1151
|
+
# {
|
1152
|
+
# "symbol": "BTC_USDT",
|
1153
|
+
# "last": "68500.00",
|
1154
|
+
# "v_24h": "10491.65490",
|
1155
|
+
# "qv_24h": "717178990.42",
|
1156
|
+
# "open_24h": "68149.75",
|
1157
|
+
# "high_24h": "69499.99",
|
1158
|
+
# "low_24h": "67132.40",
|
1159
|
+
# "fluctuation": "0.00514",
|
1160
|
+
# "bid_px": "68500",
|
1161
|
+
# "bid_sz": "0.00162",
|
1162
|
+
# "ask_px": "68500.01",
|
1163
|
+
# "ask_sz": "0.01722",
|
1164
|
+
# "ts": "1717131391671"
|
1165
|
+
# }
|
1148
1166
|
#
|
1149
1167
|
# spot(WS)
|
1168
|
+
#
|
1150
1169
|
# {
|
1151
1170
|
# "symbol":"BTC_USDT",
|
1152
1171
|
# "last_price":"146.24",
|
@@ -1172,19 +1191,44 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1172
1191
|
# "legal_coin_price":"0.1302699"
|
1173
1192
|
# }
|
1174
1193
|
#
|
1175
|
-
|
1176
|
-
|
1177
|
-
# ticker from WS has a different field(in seconds)
|
1178
|
-
timestamp = self.safe_integer_product(ticker, 's_t', 1000)
|
1194
|
+
result = self.safe_list(ticker, 'result', [])
|
1195
|
+
average = self.safe_string_2(ticker, 'avg_price', 'index_price')
|
1179
1196
|
marketId = self.safe_string_2(ticker, 'symbol', 'contract_symbol')
|
1197
|
+
timestamp = self.safe_integer_2(ticker, 'timestamp', 'ts')
|
1198
|
+
last = self.safe_string_2(ticker, 'last_price', 'last')
|
1199
|
+
percentage = self.safe_string(ticker, 'price_change_percent_24h')
|
1200
|
+
change = self.safe_string(ticker, 'fluctuation')
|
1201
|
+
high = self.safe_string_2(ticker, 'high_24h', 'high_price')
|
1202
|
+
low = self.safe_string_2(ticker, 'low_24h', 'low_price')
|
1203
|
+
bid = self.safe_string_2(ticker, 'best_bid', 'bid_px')
|
1204
|
+
bidVolume = self.safe_string_2(ticker, 'best_bid_size', 'bid_sz')
|
1205
|
+
ask = self.safe_string_2(ticker, 'best_ask', 'ask_px')
|
1206
|
+
askVolume = self.safe_string_2(ticker, 'best_ask_size', 'ask_sz')
|
1207
|
+
open = self.safe_string(ticker, 'open_24h')
|
1208
|
+
baseVolume = self.safe_string_2(ticker, 'base_volume_24h', 'v_24h')
|
1209
|
+
quoteVolume = self.safe_string_lower_2(ticker, 'quote_volume_24h', 'qv_24h')
|
1210
|
+
listMarketId = self.safe_string(result, 0)
|
1211
|
+
if listMarketId is not None:
|
1212
|
+
marketId = listMarketId
|
1213
|
+
timestamp = self.safe_integer(result, 12)
|
1214
|
+
high = self.safe_string(result, 5)
|
1215
|
+
low = self.safe_string(result, 6)
|
1216
|
+
bid = self.safe_string(result, 8)
|
1217
|
+
bidVolume = self.safe_string(result, 9)
|
1218
|
+
ask = self.safe_string(result, 10)
|
1219
|
+
askVolume = self.safe_string(result, 11)
|
1220
|
+
open = self.safe_string(result, 4)
|
1221
|
+
last = self.safe_string(result, 1)
|
1222
|
+
change = self.safe_string(result, 7)
|
1223
|
+
baseVolume = self.safe_string(result, 2)
|
1224
|
+
quoteVolume = self.safe_string_lower(result, 3)
|
1180
1225
|
market = self.safe_market(marketId, market)
|
1181
1226
|
symbol = market['symbol']
|
1182
|
-
|
1183
|
-
|
1227
|
+
if timestamp is None:
|
1228
|
+
# ticker from WS has a different field(in seconds)
|
1229
|
+
timestamp = self.safe_integer_product(ticker, 's_t', 1000)
|
1184
1230
|
if percentage is None:
|
1185
|
-
percentage = Precise.string_mul(
|
1186
|
-
baseVolume = self.safe_string(ticker, 'base_volume_24h')
|
1187
|
-
quoteVolume = self.safe_string(ticker, 'quote_volume_24h')
|
1231
|
+
percentage = Precise.string_mul(change, '100')
|
1188
1232
|
if quoteVolume is None:
|
1189
1233
|
if baseVolume is None:
|
1190
1234
|
# self is swap
|
@@ -1194,25 +1238,22 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1194
1238
|
# contrary to name and documentation, base_volume_24h is actually the quote volume
|
1195
1239
|
quoteVolume = baseVolume
|
1196
1240
|
baseVolume = None
|
1197
|
-
average = self.safe_string_2(ticker, 'avg_price', 'index_price')
|
1198
|
-
high = self.safe_string_2(ticker, 'high_24h', 'high_price')
|
1199
|
-
low = self.safe_string_2(ticker, 'low_24h', 'low_price')
|
1200
1241
|
return self.safe_ticker({
|
1201
1242
|
'symbol': symbol,
|
1202
1243
|
'timestamp': timestamp,
|
1203
1244
|
'datetime': self.iso8601(timestamp),
|
1204
1245
|
'high': high,
|
1205
1246
|
'low': low,
|
1206
|
-
'bid':
|
1207
|
-
'bidVolume':
|
1208
|
-
'ask':
|
1209
|
-
'askVolume':
|
1247
|
+
'bid': bid,
|
1248
|
+
'bidVolume': bidVolume,
|
1249
|
+
'ask': ask,
|
1250
|
+
'askVolume': askVolume,
|
1210
1251
|
'vwap': None,
|
1211
|
-
'open':
|
1252
|
+
'open': open,
|
1212
1253
|
'close': last,
|
1213
1254
|
'last': last,
|
1214
1255
|
'previousClose': None,
|
1215
|
-
'change':
|
1256
|
+
'change': change,
|
1216
1257
|
'percentage': percentage,
|
1217
1258
|
'average': average,
|
1218
1259
|
'baseVolume': baseVolume,
|
@@ -1223,6 +1264,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1223
1264
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
1224
1265
|
"""
|
1225
1266
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
1267
|
+
:see: https://developer-pro.bitmart.com/en/spot/#get-ticker-of-a-trading-pair-v3
|
1226
1268
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
1227
1269
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1228
1270
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1234,79 +1276,73 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1234
1276
|
if market['swap']:
|
1235
1277
|
request['contract_symbol'] = market['id']
|
1236
1278
|
response = await self.publicGetContractV1Tickers(self.extend(request, params))
|
1279
|
+
#
|
1280
|
+
# {
|
1281
|
+
# "message":"OK",
|
1282
|
+
# "code":1000,
|
1283
|
+
# "trace":"4a0ebceb-d3f7-45a3-8feb-f61e230e24cd",
|
1284
|
+
# "data":{
|
1285
|
+
# "tickers":[
|
1286
|
+
# {
|
1287
|
+
# "contract_symbol":"DOGEUSDT",
|
1288
|
+
# "last_price":"0.130180",
|
1289
|
+
# "index_price":"0.13028635",
|
1290
|
+
# "last_funding_rate":"0.00002025",
|
1291
|
+
# "price_change_percent_24h":"-2.326",
|
1292
|
+
# "volume_24h":"116789313.01797258",
|
1293
|
+
# "url":"https://futures.bitmart.com/en?symbol=DOGEUSDT",
|
1294
|
+
# "high_price":"0.134520",
|
1295
|
+
# "low_price":"0.128570",
|
1296
|
+
# "legal_coin_price":"0.13017401"
|
1297
|
+
# }
|
1298
|
+
# ]
|
1299
|
+
# }
|
1300
|
+
# }
|
1301
|
+
#
|
1237
1302
|
elif market['spot']:
|
1238
1303
|
request['symbol'] = market['id']
|
1239
|
-
response = await self.
|
1304
|
+
response = await self.publicGetSpotQuotationV3Ticker(self.extend(request, params))
|
1305
|
+
#
|
1306
|
+
# {
|
1307
|
+
# "code": 1000,
|
1308
|
+
# "trace": "f2194c2c202d2.99.1717535",
|
1309
|
+
# "message": "success",
|
1310
|
+
# "data": {
|
1311
|
+
# "symbol": "BTC_USDT",
|
1312
|
+
# "last": "68500.00",
|
1313
|
+
# "v_24h": "10491.65490",
|
1314
|
+
# "qv_24h": "717178990.42",
|
1315
|
+
# "open_24h": "68149.75",
|
1316
|
+
# "high_24h": "69499.99",
|
1317
|
+
# "low_24h": "67132.40",
|
1318
|
+
# "fluctuation": "0.00514",
|
1319
|
+
# "bid_px": "68500",
|
1320
|
+
# "bid_sz": "0.00162",
|
1321
|
+
# "ask_px": "68500.01",
|
1322
|
+
# "ask_sz": "0.01722",
|
1323
|
+
# "ts": "1717131391671"
|
1324
|
+
# }
|
1325
|
+
# }
|
1326
|
+
#
|
1240
1327
|
else:
|
1241
1328
|
raise NotSupported(self.id + ' fetchTicker() does not support ' + market['type'] + ' markets, only spot and swap markets are accepted')
|
1242
|
-
#
|
1243
|
-
# spot
|
1244
|
-
#
|
1245
|
-
# {
|
1246
|
-
# "message":"OK",
|
1247
|
-
# "code":1000,
|
1248
|
-
# "trace":"6aa5b923-2f57-46e3-876d-feca190e0b82",
|
1249
|
-
# "data":{
|
1250
|
-
# "tickers":[
|
1251
|
-
# {
|
1252
|
-
# "symbol":"ETH_BTC",
|
1253
|
-
# "last_price":"0.036037",
|
1254
|
-
# "quote_volume_24h":"4380.6660000000",
|
1255
|
-
# "base_volume_24h":"159.3582006712",
|
1256
|
-
# "high_24h":"0.036972",
|
1257
|
-
# "low_24h":"0.035524",
|
1258
|
-
# "open_24h":"0.036561",
|
1259
|
-
# "close_24h":"0.036037",
|
1260
|
-
# "best_ask":"0.036077",
|
1261
|
-
# "best_ask_size":"9.9500",
|
1262
|
-
# "best_bid":"0.035983",
|
1263
|
-
# "best_bid_size":"4.2792",
|
1264
|
-
# "fluctuation":"-0.0143",
|
1265
|
-
# "url":"https://www.bitmart.com/trade?symbol=ETH_BTC"
|
1266
|
-
# }
|
1267
|
-
# ]
|
1268
|
-
# }
|
1269
|
-
# }
|
1270
|
-
#
|
1271
|
-
# swap
|
1272
|
-
#
|
1273
|
-
# {
|
1274
|
-
# "message":"OK",
|
1275
|
-
# "code":1000,
|
1276
|
-
# "trace":"4a0ebceb-d3f7-45a3-8feb-f61e230e24cd",
|
1277
|
-
# "data":{
|
1278
|
-
# "tickers":[
|
1279
|
-
# {
|
1280
|
-
# "contract_symbol":"DOGEUSDT",
|
1281
|
-
# "last_price":"0.130180",
|
1282
|
-
# "index_price":"0.13028635",
|
1283
|
-
# "last_funding_rate":"0.00002025",
|
1284
|
-
# "price_change_percent_24h":"-2.326",
|
1285
|
-
# "volume_24h":"116789313.01797258",
|
1286
|
-
# "url":"https://futures.bitmart.com/en?symbol=DOGEUSDT",
|
1287
|
-
# "high_price":"0.134520",
|
1288
|
-
# "low_price":"0.128570",
|
1289
|
-
# "legal_coin_price":"0.13017401"
|
1290
|
-
# }
|
1291
|
-
# ]
|
1292
|
-
# }
|
1293
|
-
# }
|
1294
|
-
#
|
1295
|
-
data = self.safe_value(response, 'data', {})
|
1296
|
-
tickers = self.safe_value(data, 'tickers', [])
|
1297
1329
|
# fails in naming for contract tickers 'contract_symbol'
|
1298
1330
|
tickersById = None
|
1331
|
+
tickers = []
|
1332
|
+
ticker: dict = {}
|
1299
1333
|
if market['spot']:
|
1300
|
-
|
1301
|
-
|
1334
|
+
ticker = self.safe_dict(response, 'data', {})
|
1335
|
+
else:
|
1336
|
+
data = self.safe_dict(response, 'data', {})
|
1337
|
+
tickers = self.safe_list(data, 'tickers', [])
|
1302
1338
|
tickersById = self.index_by(tickers, 'contract_symbol')
|
1303
|
-
|
1339
|
+
ticker = self.safe_dict(tickersById, market['id'])
|
1304
1340
|
return self.parse_ticker(ticker, market)
|
1305
1341
|
|
1306
1342
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
1307
1343
|
"""
|
1308
1344
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
1309
|
-
:see: https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-
|
1345
|
+
:see: https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3
|
1310
1346
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
1311
1347
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1312
1348
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -1321,16 +1357,71 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1321
1357
|
type, params = self.handle_market_type_and_params('fetchTickers', market, params)
|
1322
1358
|
response = None
|
1323
1359
|
if type == 'spot':
|
1324
|
-
response = await self.
|
1360
|
+
response = await self.publicGetSpotQuotationV3Tickers(params)
|
1361
|
+
#
|
1362
|
+
# {
|
1363
|
+
# "code": 1000,
|
1364
|
+
# "trace": "17c5e5d9ac49f9b71efca2bed55f1a.105.171225637482393",
|
1365
|
+
# "message": "success",
|
1366
|
+
# "data": [
|
1367
|
+
# [
|
1368
|
+
# "AFIN_USDT",
|
1369
|
+
# "0.001047",
|
1370
|
+
# "11110",
|
1371
|
+
# "11.632170",
|
1372
|
+
# "0.001048",
|
1373
|
+
# "0.001048",
|
1374
|
+
# "0.001047",
|
1375
|
+
# "-0.00095",
|
1376
|
+
# "0.001029",
|
1377
|
+
# "5555",
|
1378
|
+
# "0.001041",
|
1379
|
+
# "5297",
|
1380
|
+
# "1717122550482"
|
1381
|
+
# ],
|
1382
|
+
# ]
|
1383
|
+
# }
|
1384
|
+
#
|
1325
1385
|
elif type == 'swap':
|
1326
1386
|
response = await self.publicGetContractV1Tickers(params)
|
1387
|
+
#
|
1388
|
+
# {
|
1389
|
+
# "message": "OK",
|
1390
|
+
# "code": 1000,
|
1391
|
+
# "trace": "c1dec681c24ea5d.105.171712565",
|
1392
|
+
# "data": {
|
1393
|
+
# "tickers": [
|
1394
|
+
# {
|
1395
|
+
# "contract_symbol": "SNTUSDT",
|
1396
|
+
# "last_price": "0.0366600",
|
1397
|
+
# "index_price": "0.03587373",
|
1398
|
+
# "last_funding_rate": "0.00005000",
|
1399
|
+
# "price_change_percent_24h": "-2.629",
|
1400
|
+
# "volume_24h": "10102540.19909109848",
|
1401
|
+
# "url": "https://futures.bitmart.com/en?symbol=SNTUSDT",
|
1402
|
+
# "high_price": "0.0405600",
|
1403
|
+
# "low_price": "0.0355000",
|
1404
|
+
# "legal_coin_price": "0.03666697"
|
1405
|
+
# },
|
1406
|
+
# ]
|
1407
|
+
# }
|
1408
|
+
# }
|
1409
|
+
#
|
1327
1410
|
else:
|
1328
1411
|
raise NotSupported(self.id + ' fetchTickers() does not support ' + type + ' markets, only spot and swap markets are accepted')
|
1329
|
-
|
1330
|
-
|
1412
|
+
tickers = []
|
1413
|
+
if type == 'spot':
|
1414
|
+
tickers = self.safe_list(response, 'data', [])
|
1415
|
+
else:
|
1416
|
+
data = self.safe_dict(response, 'data', {})
|
1417
|
+
tickers = self.safe_list(data, 'tickers', [])
|
1331
1418
|
result: dict = {}
|
1332
1419
|
for i in range(0, len(tickers)):
|
1333
|
-
ticker =
|
1420
|
+
ticker: dict = {}
|
1421
|
+
if type == 'spot':
|
1422
|
+
ticker = self.parse_ticker({'result': tickers[i]})
|
1423
|
+
else:
|
1424
|
+
ticker = self.parse_ticker(tickers[i])
|
1334
1425
|
symbol = ticker['symbol']
|
1335
1426
|
result[symbol] = ticker
|
1336
1427
|
return self.filter_by_array_tickers(result, 'symbol', symbols)
|
@@ -589,15 +589,15 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
589
589
|
'orderId': id,
|
590
590
|
}
|
591
591
|
response = await self.privateDeleteOrdersOrderId(self.extend(request, params))
|
592
|
-
return {
|
592
|
+
return self.safe_order({
|
593
593
|
'id': id,
|
594
594
|
'info': response,
|
595
|
-
}
|
595
|
+
})
|
596
596
|
|
597
597
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
598
598
|
"""
|
599
599
|
cancel all open orders
|
600
|
-
:see: https://api.blockchain.com/v3
|
600
|
+
:see: https://api.blockchain.com/v3/#deleteallorders
|
601
601
|
:param str symbol: unified market symbol of the market to cancel orders in, all markets are used if None, default is None
|
602
602
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
603
603
|
:returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -612,10 +612,14 @@ class blockchaincom(Exchange, ImplicitAPI):
|
|
612
612
|
marketId = self.market_id(symbol)
|
613
613
|
request['symbol'] = marketId
|
614
614
|
response = await self.privateDeleteOrders(self.extend(request, params))
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
615
|
+
#
|
616
|
+
# {}
|
617
|
+
#
|
618
|
+
return [
|
619
|
+
self.safe_order({
|
620
|
+
'info': response,
|
621
|
+
}),
|
622
|
+
]
|
619
623
|
|
620
624
|
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
621
625
|
"""
|
ccxt/async_support/btcmarkets.py
CHANGED
@@ -855,7 +855,29 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
855
855
|
request: dict = {
|
856
856
|
'ids': ids,
|
857
857
|
}
|
858
|
-
|
858
|
+
response = await self.privateDeleteBatchordersIds(self.extend(request, params))
|
859
|
+
#
|
860
|
+
# {
|
861
|
+
# "cancelOrders": [
|
862
|
+
# {
|
863
|
+
# "orderId": "414186",
|
864
|
+
# "clientOrderId": "6"
|
865
|
+
# },
|
866
|
+
# ...
|
867
|
+
# ],
|
868
|
+
# "unprocessedRequests": [
|
869
|
+
# {
|
870
|
+
# "code": "OrderAlreadyCancelled",
|
871
|
+
# "message": "order is already cancelled.",
|
872
|
+
# "requestId": "1"
|
873
|
+
# }
|
874
|
+
# ]
|
875
|
+
# }
|
876
|
+
#
|
877
|
+
cancelOrders = self.safe_list(response, 'cancelOrders', [])
|
878
|
+
unprocessedRequests = self.safe_list(response, 'unprocessedRequests', [])
|
879
|
+
orders = self.array_concat(cancelOrders, unprocessedRequests)
|
880
|
+
return self.parse_orders(orders)
|
859
881
|
|
860
882
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
861
883
|
"""
|
@@ -870,7 +892,14 @@ class btcmarkets(Exchange, ImplicitAPI):
|
|
870
892
|
request: dict = {
|
871
893
|
'id': id,
|
872
894
|
}
|
873
|
-
|
895
|
+
response = await self.privateDeleteOrdersId(self.extend(request, params))
|
896
|
+
#
|
897
|
+
# {
|
898
|
+
# "orderId": "7524",
|
899
|
+
# "clientOrderId": "123-456"
|
900
|
+
# }
|
901
|
+
#
|
902
|
+
return self.parse_order(response)
|
874
903
|
|
875
904
|
def calculate_fee(self, symbol, type, side, amount, price, takerOrMaker='taker', params={}):
|
876
905
|
"""
|