ccxt 4.4.49__py2.py3-none-any.whl → 4.4.50__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/binance.py +1 -0
- ccxt/abstract/binancecoinm.py +1 -0
- ccxt/abstract/binanceus.py +1 -0
- ccxt/abstract/binanceusdm.py +1 -0
- ccxt/alpaca.py +62 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +62 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +8 -4
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/coinex.py +3 -3
- ccxt/async_support/hollaex.py +12 -16
- ccxt/async_support/kucoin.py +47 -67
- ccxt/async_support/mexc.py +3 -2
- ccxt/async_support/okcoin.py +13 -5
- ccxt/async_support/paymium.py +42 -0
- ccxt/async_support/probit.py +68 -1
- ccxt/async_support/timex.py +67 -0
- ccxt/async_support/tokocrypto.py +81 -4
- ccxt/async_support/tradeogre.py +58 -1
- ccxt/async_support/whitebit.py +10 -4
- ccxt/base/exchange.py +62 -1
- ccxt/binance.py +8 -4
- ccxt/blofin.py +1 -1
- ccxt/coinex.py +3 -3
- ccxt/hollaex.py +12 -16
- ccxt/kucoin.py +47 -67
- ccxt/mexc.py +3 -2
- ccxt/okcoin.py +13 -5
- ccxt/paymium.py +42 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +68 -1
- ccxt/timex.py +67 -0
- ccxt/tokocrypto.py +81 -4
- ccxt/tradeogre.py +58 -1
- ccxt/whitebit.py +10 -4
- {ccxt-4.4.49.dist-info → ccxt-4.4.50.dist-info}/METADATA +4 -4
- {ccxt-4.4.49.dist-info → ccxt-4.4.50.dist-info}/RECORD +42 -42
- {ccxt-4.4.49.dist-info → ccxt-4.4.50.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.49.dist-info → ccxt-4.4.50.dist-info}/WHEEL +0 -0
- {ccxt-4.4.49.dist-info → ccxt-4.4.50.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py
CHANGED
@@ -1351,8 +1351,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1351
1351
|
:param dict params: extra parameters specific to the exchange API endpoint
|
1352
1352
|
:returns dict: an associative dictionary of currencies
|
1353
1353
|
"""
|
1354
|
-
|
1355
|
-
promises.append(self.publicGetCurrencies(params))
|
1354
|
+
response = self.publicGetCurrencies(params)
|
1356
1355
|
#
|
1357
1356
|
# {
|
1358
1357
|
# "code":"200000",
|
@@ -1378,87 +1377,39 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1378
1377
|
# "isDepositEnabled":false,
|
1379
1378
|
# "confirms":12,
|
1380
1379
|
# "preConfirms":12,
|
1380
|
+
# "withdrawPrecision": 8,
|
1381
|
+
# "maxWithdraw": null,
|
1382
|
+
# "maxDeposit": null,
|
1383
|
+
# "needTag": False,
|
1381
1384
|
# "contractAddress":"0xa6446d655a0c34bc4f05042ee88170d056cbaf45",
|
1382
1385
|
# "depositFeeRate": "0.001", # present for some currencies/networks
|
1383
1386
|
# }
|
1384
1387
|
# ]
|
1385
1388
|
# },
|
1386
|
-
# }
|
1387
|
-
#
|
1388
|
-
promises.append(self.fetch_web_endpoint('fetchCurrencies', 'webExchangeGetCurrencyCurrencyChainInfo', True))
|
1389
|
-
#
|
1390
|
-
# {
|
1391
|
-
# "success": True,
|
1392
|
-
# "code": "200",
|
1393
|
-
# "msg": "success",
|
1394
|
-
# "retry": False,
|
1395
|
-
# "data": [
|
1396
|
-
# {
|
1397
|
-
# "status": "enabled",
|
1398
|
-
# "currency": "BTC",
|
1399
|
-
# "isChainEnabled": "true",
|
1400
|
-
# "chain": "btc",
|
1401
|
-
# "chainName": "BTC",
|
1402
|
-
# "chainFullName": "Bitcoin",
|
1403
|
-
# "walletPrecision": "8",
|
1404
|
-
# "isDepositEnabled": "true",
|
1405
|
-
# "depositMinSize": "0.00005",
|
1406
|
-
# "confirmationCount": "2",
|
1407
|
-
# "isWithdrawEnabled": "true",
|
1408
|
-
# "withdrawMinSize": "0.001",
|
1409
|
-
# "withdrawMinFee": "0.0005",
|
1410
|
-
# "withdrawFeeRate": "0",
|
1411
|
-
# "depositDisabledTip": "Wallet Maintenance",
|
1412
|
-
# "preDepositTipEnabled": "true",
|
1413
|
-
# "preDepositTip": "Do not transfer from ETH network directly",
|
1414
|
-
# "withdrawDisabledTip": "",
|
1415
|
-
# "preWithdrawTipEnabled": "false",
|
1416
|
-
# "preWithdrawTip": "",
|
1417
|
-
# "orgAddress": "",
|
1418
|
-
# "userAddressName": "Memo",
|
1419
|
-
# },
|
1420
1389
|
# ]
|
1421
1390
|
# }
|
1422
1391
|
#
|
1423
|
-
|
1424
|
-
currenciesResponse = self.safe_dict(responses, 0, {})
|
1425
|
-
currenciesData = self.safe_list(currenciesResponse, 'data', [])
|
1426
|
-
additionalResponse = self.safe_dict(responses, 1, {})
|
1427
|
-
additionalData = self.safe_list(additionalResponse, 'data', [])
|
1428
|
-
additionalDataGrouped = self.group_by(additionalData, 'currency')
|
1392
|
+
currenciesData = self.safe_list(response, 'data', [])
|
1429
1393
|
result: dict = {}
|
1430
1394
|
for i in range(0, len(currenciesData)):
|
1431
1395
|
entry = currenciesData[i]
|
1432
1396
|
id = self.safe_string(entry, 'currency')
|
1433
1397
|
name = self.safe_string(entry, 'fullName')
|
1434
1398
|
code = self.safe_currency_code(id)
|
1435
|
-
isWithdrawEnabled = None
|
1436
|
-
isDepositEnabled = None
|
1437
1399
|
networks: dict = {}
|
1438
1400
|
chains = self.safe_list(entry, 'chains', [])
|
1439
|
-
extraChainsData = self.index_by(self.safe_list(additionalDataGrouped, id, []), 'chain')
|
1440
1401
|
rawPrecision = self.safe_string(entry, 'precision')
|
1441
1402
|
precision = self.parse_number(self.parse_precision(rawPrecision))
|
1442
1403
|
chainsLength = len(chains)
|
1443
1404
|
if not chainsLength:
|
1444
|
-
# https://t.me/KuCoin_API/173118
|
1445
|
-
|
1446
|
-
isDepositEnabled = False
|
1405
|
+
# one buggy coin, which doesn't contain info https://t.me/KuCoin_API/173118
|
1406
|
+
continue
|
1447
1407
|
for j in range(0, chainsLength):
|
1448
1408
|
chain = chains[j]
|
1449
1409
|
chainId = self.safe_string(chain, 'chainId')
|
1450
1410
|
networkCode = self.network_id_to_code(chainId, code)
|
1451
1411
|
chainWithdrawEnabled = self.safe_bool(chain, 'isWithdrawEnabled', False)
|
1452
|
-
if isWithdrawEnabled is None:
|
1453
|
-
isWithdrawEnabled = chainWithdrawEnabled
|
1454
|
-
else:
|
1455
|
-
isWithdrawEnabled = isWithdrawEnabled or chainWithdrawEnabled
|
1456
1412
|
chainDepositEnabled = self.safe_bool(chain, 'isDepositEnabled', False)
|
1457
|
-
if isDepositEnabled is None:
|
1458
|
-
isDepositEnabled = chainDepositEnabled
|
1459
|
-
else:
|
1460
|
-
isDepositEnabled = isDepositEnabled or chainDepositEnabled
|
1461
|
-
chainExtraData = self.safe_dict(extraChainsData, chainId, {})
|
1462
1413
|
networks[networkCode] = {
|
1463
1414
|
'info': chain,
|
1464
1415
|
'id': chainId,
|
@@ -1468,34 +1419,34 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1468
1419
|
'fee': self.safe_number(chain, 'withdrawalMinFee'),
|
1469
1420
|
'deposit': chainDepositEnabled,
|
1470
1421
|
'withdraw': chainWithdrawEnabled,
|
1471
|
-
'precision': self.parse_number(self.parse_precision(self.safe_string(
|
1422
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'withdrawPrecision'))),
|
1472
1423
|
'limits': {
|
1473
1424
|
'withdraw': {
|
1474
1425
|
'min': self.safe_number(chain, 'withdrawalMinSize'),
|
1475
|
-
'max':
|
1426
|
+
'max': self.safe_number(chain, 'maxWithdraw'),
|
1476
1427
|
},
|
1477
1428
|
'deposit': {
|
1478
1429
|
'min': self.safe_number(chain, 'depositMinSize'),
|
1479
|
-
'max':
|
1430
|
+
'max': self.safe_number(chain, 'maxDeposit'),
|
1480
1431
|
},
|
1481
1432
|
},
|
1482
1433
|
}
|
1483
1434
|
# kucoin has determined 'fiat' currencies with below logic
|
1484
1435
|
isFiat = (rawPrecision == '2') and (chainsLength == 0)
|
1485
|
-
result[code] = {
|
1436
|
+
result[code] = self.safe_currency_structure({
|
1486
1437
|
'id': id,
|
1487
1438
|
'name': name,
|
1488
1439
|
'code': code,
|
1489
1440
|
'type': 'fiat' if isFiat else 'crypto',
|
1490
1441
|
'precision': precision,
|
1491
1442
|
'info': entry,
|
1492
|
-
'active': (isDepositEnabled or isWithdrawEnabled),
|
1493
|
-
'deposit': isDepositEnabled,
|
1494
|
-
'withdraw': isWithdrawEnabled,
|
1495
|
-
'fee': None,
|
1496
|
-
'limits': self.limits,
|
1497
1443
|
'networks': networks,
|
1498
|
-
|
1444
|
+
'deposit': None,
|
1445
|
+
'withdraw': None,
|
1446
|
+
'active': None,
|
1447
|
+
'fee': None,
|
1448
|
+
'limits': None,
|
1449
|
+
})
|
1499
1450
|
return result
|
1500
1451
|
|
1501
1452
|
def fetch_accounts(self, params={}) -> List[Account]:
|
@@ -1635,6 +1586,35 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1635
1586
|
# "chain": "ERC20"
|
1636
1587
|
# }
|
1637
1588
|
#
|
1589
|
+
if 'chains' in fee:
|
1590
|
+
# if data obtained through `currencies` endpoint
|
1591
|
+
resultNew: dict = {
|
1592
|
+
'info': fee,
|
1593
|
+
'withdraw': {
|
1594
|
+
'fee': None,
|
1595
|
+
'percentage': False,
|
1596
|
+
},
|
1597
|
+
'deposit': {
|
1598
|
+
'fee': None,
|
1599
|
+
'percentage': None,
|
1600
|
+
},
|
1601
|
+
'networks': {},
|
1602
|
+
}
|
1603
|
+
chains = self.safe_list(fee, 'chains', [])
|
1604
|
+
for i in range(0, len(chains)):
|
1605
|
+
chain = chains[i]
|
1606
|
+
networkCodeNew = self.network_id_to_code(self.safe_string(chain, 'chainId'), self.safe_string(currency, 'code'))
|
1607
|
+
resultNew['networks'][networkCodeNew] = {
|
1608
|
+
'withdraw': {
|
1609
|
+
'fee': self.safe_number(chain, 'withdrawMinFee'),
|
1610
|
+
'percentage': False,
|
1611
|
+
},
|
1612
|
+
'deposit': {
|
1613
|
+
'fee': None,
|
1614
|
+
'percentage': None,
|
1615
|
+
},
|
1616
|
+
}
|
1617
|
+
return resultNew
|
1638
1618
|
minWithdrawFee = self.safe_number(fee, 'withdrawMinFee')
|
1639
1619
|
result: dict = {
|
1640
1620
|
'info': fee,
|
ccxt/mexc.py
CHANGED
@@ -1379,6 +1379,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1379
1379
|
quote = self.safe_currency_code(quoteId)
|
1380
1380
|
settle = self.safe_currency_code(settleId)
|
1381
1381
|
state = self.safe_string(market, 'state')
|
1382
|
+
isLinear = quote == settle
|
1382
1383
|
result.append({
|
1383
1384
|
'id': id,
|
1384
1385
|
'symbol': base + '/' + quote + ':' + settle,
|
@@ -1396,8 +1397,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
1396
1397
|
'option': False,
|
1397
1398
|
'active': (state == '0'),
|
1398
1399
|
'contract': True,
|
1399
|
-
'linear':
|
1400
|
-
'inverse':
|
1400
|
+
'linear': isLinear,
|
1401
|
+
'inverse': not isLinear,
|
1401
1402
|
'taker': self.safe_number(market, 'takerFeeRate'),
|
1402
1403
|
'maker': self.safe_number(market, 'makerFeeRate'),
|
1403
1404
|
'contractSize': self.safe_number(market, 'contractSize'),
|
ccxt/okcoin.py
CHANGED
@@ -707,12 +707,20 @@ class okcoin(Exchange, ImplicitAPI):
|
|
707
707
|
"""
|
708
708
|
response = self.publicGetPublicTime(params)
|
709
709
|
#
|
710
|
-
#
|
711
|
-
#
|
712
|
-
#
|
713
|
-
#
|
710
|
+
# {
|
711
|
+
# "code": "0",
|
712
|
+
# "data":
|
713
|
+
# [
|
714
|
+
# {
|
715
|
+
# "ts": "1737379360033"
|
716
|
+
# }
|
717
|
+
# ],
|
718
|
+
# "msg": ""
|
719
|
+
# }
|
714
720
|
#
|
715
|
-
|
721
|
+
data = self.safe_list(response, 'data')
|
722
|
+
timestamp = self.safe_dict(data, 0)
|
723
|
+
return self.safe_integer(timestamp, 'ts')
|
716
724
|
|
717
725
|
def fetch_markets(self, params={}) -> List[Market]:
|
718
726
|
"""
|
ccxt/paymium.py
CHANGED
@@ -113,6 +113,48 @@ class paymium(Exchange, ImplicitAPI):
|
|
113
113
|
},
|
114
114
|
},
|
115
115
|
'precisionMode': TICK_SIZE,
|
116
|
+
'features': {
|
117
|
+
'spot': {
|
118
|
+
'sandbox': False,
|
119
|
+
'createOrder': {
|
120
|
+
'marginMode': False,
|
121
|
+
'triggerPrice': False,
|
122
|
+
'triggerDirection': False,
|
123
|
+
'triggerPriceType': None,
|
124
|
+
'stopLossPrice': False,
|
125
|
+
'takeProfitPrice': False,
|
126
|
+
'attachedStopLossTakeProfit': None,
|
127
|
+
'timeInForce': {
|
128
|
+
'IOC': False,
|
129
|
+
'FOK': False,
|
130
|
+
'PO': False,
|
131
|
+
'GTD': False,
|
132
|
+
},
|
133
|
+
'hedged': False,
|
134
|
+
'trailing': False,
|
135
|
+
'leverage': False,
|
136
|
+
'marketBuyByCost': True, # todo
|
137
|
+
'marketBuyRequiresPrice': False,
|
138
|
+
'selfTradePrevention': False,
|
139
|
+
'iceberg': False,
|
140
|
+
},
|
141
|
+
'createOrders': None,
|
142
|
+
'fetchMyTrades': None,
|
143
|
+
'fetchOrder': None, # todo
|
144
|
+
'fetchOpenOrders': None, # todo
|
145
|
+
'fetchOrders': None, # todo
|
146
|
+
'fetchClosedOrders': None, # todo
|
147
|
+
'fetchOHLCV': None, # todo
|
148
|
+
},
|
149
|
+
'swap': {
|
150
|
+
'linear': None,
|
151
|
+
'inverse': None,
|
152
|
+
},
|
153
|
+
'future': {
|
154
|
+
'linear': None,
|
155
|
+
'inverse': None,
|
156
|
+
},
|
157
|
+
},
|
116
158
|
})
|
117
159
|
|
118
160
|
def parse_balance(self, response) -> Balances:
|
ccxt/pro/__init__.py
CHANGED
ccxt/probit.py
CHANGED
@@ -103,7 +103,7 @@ class probit(Exchange, ImplicitAPI):
|
|
103
103
|
'fetchWithdrawal': False,
|
104
104
|
'fetchWithdrawals': True,
|
105
105
|
'reduceMargin': False,
|
106
|
-
'sandbox':
|
106
|
+
'sandbox': False,
|
107
107
|
'setLeverage': False,
|
108
108
|
'setMarginMode': False,
|
109
109
|
'setPositionMode': False,
|
@@ -185,6 +185,73 @@ class probit(Exchange, ImplicitAPI):
|
|
185
185
|
'taker': self.parse_number('0.002'),
|
186
186
|
},
|
187
187
|
},
|
188
|
+
'features': {
|
189
|
+
'spot': {
|
190
|
+
'sandbox': False,
|
191
|
+
'createOrder': {
|
192
|
+
'marginMode': False,
|
193
|
+
'triggerPrice': False,
|
194
|
+
'triggerDirection': False,
|
195
|
+
'triggerPriceType': None,
|
196
|
+
'stopLossPrice': False,
|
197
|
+
'takeProfitPrice': False,
|
198
|
+
'attachedStopLossTakeProfit': None,
|
199
|
+
# todo
|
200
|
+
'timeInForce': {
|
201
|
+
'IOC': True,
|
202
|
+
'FOK': True,
|
203
|
+
'PO': False,
|
204
|
+
'GTD': False,
|
205
|
+
},
|
206
|
+
'hedged': False,
|
207
|
+
'trailing': False,
|
208
|
+
'leverage': False,
|
209
|
+
'marketBuyByCost': True,
|
210
|
+
'marketBuyRequiresPrice': False,
|
211
|
+
'selfTradePrevention': False,
|
212
|
+
'iceberg': False,
|
213
|
+
},
|
214
|
+
'createOrders': None,
|
215
|
+
'fetchMyTrades': {
|
216
|
+
'marginMode': False,
|
217
|
+
'limit': 1000,
|
218
|
+
'daysBack': 100000, # todo
|
219
|
+
'untilDays': 100000, # todo
|
220
|
+
},
|
221
|
+
'fetchOrder': {
|
222
|
+
'marginMode': False,
|
223
|
+
'trigger': False,
|
224
|
+
'trailing': False,
|
225
|
+
},
|
226
|
+
'fetchOpenOrders': {
|
227
|
+
'marginMode': False,
|
228
|
+
'limit': None,
|
229
|
+
'trigger': False,
|
230
|
+
'trailing': False,
|
231
|
+
},
|
232
|
+
'fetchOrders': None,
|
233
|
+
'fetchClosedOrders': {
|
234
|
+
'marginMode': False,
|
235
|
+
'limit': 1000,
|
236
|
+
'daysBack': 100000, # todo
|
237
|
+
'daysBackCanceled': 1, # todo
|
238
|
+
'untilDays': 90,
|
239
|
+
'trigger': False,
|
240
|
+
'trailing': False,
|
241
|
+
},
|
242
|
+
'fetchOHLCV': {
|
243
|
+
'limit': 4000,
|
244
|
+
},
|
245
|
+
},
|
246
|
+
'swap': {
|
247
|
+
'linear': None,
|
248
|
+
'inverse': None,
|
249
|
+
},
|
250
|
+
'future': {
|
251
|
+
'linear': None,
|
252
|
+
'inverse': None,
|
253
|
+
},
|
254
|
+
},
|
188
255
|
'exceptions': {
|
189
256
|
'exact': {
|
190
257
|
'UNAUTHORIZED': AuthenticationError,
|
ccxt/timex.py
CHANGED
@@ -281,6 +281,73 @@ class timex(Exchange, ImplicitAPI):
|
|
281
281
|
'defaultSort': 'timestamp,asc',
|
282
282
|
'defaultSortOrders': 'createdAt,asc',
|
283
283
|
},
|
284
|
+
'features': {
|
285
|
+
'spot': {
|
286
|
+
'sandbox': False,
|
287
|
+
'createOrder': {
|
288
|
+
'marginMode': False,
|
289
|
+
'triggerPrice': False,
|
290
|
+
'triggerDirection': False,
|
291
|
+
'triggerPriceType': None,
|
292
|
+
'stopLossPrice': False,
|
293
|
+
'takeProfitPrice': False,
|
294
|
+
'attachedStopLossTakeProfit': None,
|
295
|
+
# todo
|
296
|
+
'timeInForce': {
|
297
|
+
'IOC': True,
|
298
|
+
'FOK': True,
|
299
|
+
'PO': False,
|
300
|
+
'GTD': True,
|
301
|
+
},
|
302
|
+
'hedged': False,
|
303
|
+
'trailing': False,
|
304
|
+
'leverage': False,
|
305
|
+
'marketBuyByCost': False,
|
306
|
+
'marketBuyRequiresPrice': False,
|
307
|
+
'selfTradePrevention': False,
|
308
|
+
'iceberg': False,
|
309
|
+
},
|
310
|
+
'createOrders': None,
|
311
|
+
'fetchMyTrades': {
|
312
|
+
'marginMode': False,
|
313
|
+
'limit': 100, # todo
|
314
|
+
'daysBack': 100000, # todo
|
315
|
+
'untilDays': 100000, # todo
|
316
|
+
},
|
317
|
+
'fetchOrder': {
|
318
|
+
'marginMode': False,
|
319
|
+
'trigger': False,
|
320
|
+
'trailing': False,
|
321
|
+
},
|
322
|
+
'fetchOpenOrders': {
|
323
|
+
'marginMode': False,
|
324
|
+
'limit': 100, # todo
|
325
|
+
'trigger': False,
|
326
|
+
'trailing': False,
|
327
|
+
},
|
328
|
+
'fetchOrders': None, # todo
|
329
|
+
'fetchClosedOrders': {
|
330
|
+
'marginMode': False,
|
331
|
+
'limit': 100, # todo
|
332
|
+
'daysBack': 100000, # todo
|
333
|
+
'daysBackCanceled': 1, # todo
|
334
|
+
'untilDays': 100000, # todo
|
335
|
+
'trigger': False,
|
336
|
+
'trailing': False,
|
337
|
+
},
|
338
|
+
'fetchOHLCV': {
|
339
|
+
'limit': None,
|
340
|
+
},
|
341
|
+
},
|
342
|
+
'swap': {
|
343
|
+
'linear': None,
|
344
|
+
'inverse': None,
|
345
|
+
},
|
346
|
+
'future': {
|
347
|
+
'linear': None,
|
348
|
+
'inverse': None,
|
349
|
+
},
|
350
|
+
},
|
284
351
|
})
|
285
352
|
|
286
353
|
def fetch_time(self, params={}):
|
ccxt/tokocrypto.py
CHANGED
@@ -619,6 +619,79 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
619
619
|
'MAX_POSITION': InvalidOrder, # {"code":-2010,"msg":"Filter failure: MAX_POSITION"}
|
620
620
|
},
|
621
621
|
},
|
622
|
+
'features': {
|
623
|
+
'spot': {
|
624
|
+
'sandbox': False,
|
625
|
+
'createOrder': {
|
626
|
+
'marginMode': False,
|
627
|
+
'triggerPrice': True,
|
628
|
+
'triggerDirection': False,
|
629
|
+
'triggerPriceType': None,
|
630
|
+
'stopLossPrice': False, # todo
|
631
|
+
'takeProfitPrice': False, # todo
|
632
|
+
'attachedStopLossTakeProfit': None,
|
633
|
+
'timeInForce': {
|
634
|
+
'IOC': True,
|
635
|
+
'FOK': True,
|
636
|
+
'PO': True,
|
637
|
+
'GTD': False,
|
638
|
+
},
|
639
|
+
'hedged': False,
|
640
|
+
'trailing': False,
|
641
|
+
'leverage': False,
|
642
|
+
'marketBuyByCost': True,
|
643
|
+
'marketBuyRequiresPrice': True,
|
644
|
+
'selfTradePrevention': True, # todo
|
645
|
+
'iceberg': True, # todo
|
646
|
+
},
|
647
|
+
'createOrders': None,
|
648
|
+
'fetchMyTrades': {
|
649
|
+
'marginMode': False,
|
650
|
+
'limit': 1000,
|
651
|
+
'daysBack': 100000, # todo
|
652
|
+
'untilDays': 100000, # todo
|
653
|
+
},
|
654
|
+
'fetchOrder': {
|
655
|
+
'marginMode': False,
|
656
|
+
'trigger': False,
|
657
|
+
'trailing': False,
|
658
|
+
},
|
659
|
+
'fetchOpenOrders': {
|
660
|
+
'marginMode': False,
|
661
|
+
'limit': 1000,
|
662
|
+
'trigger': False,
|
663
|
+
'trailing': False,
|
664
|
+
},
|
665
|
+
'fetchOrders': {
|
666
|
+
'marginMode': False,
|
667
|
+
'limit': 1000,
|
668
|
+
'daysBack': 100000,
|
669
|
+
'untilDays': 100000,
|
670
|
+
'trigger': False,
|
671
|
+
'trailing': False,
|
672
|
+
},
|
673
|
+
'fetchClosedOrders': {
|
674
|
+
'marginMode': False,
|
675
|
+
'limit': 1000,
|
676
|
+
'daysBack': 100000, # todo
|
677
|
+
'daysBackCanceled': 1, # todo
|
678
|
+
'untilDays': 100000, # todo
|
679
|
+
'trigger': False,
|
680
|
+
'trailing': False,
|
681
|
+
},
|
682
|
+
'fetchOHLCV': {
|
683
|
+
'limit': 1000,
|
684
|
+
},
|
685
|
+
},
|
686
|
+
'swap': {
|
687
|
+
'linear': None,
|
688
|
+
'inverse': None,
|
689
|
+
},
|
690
|
+
'future': {
|
691
|
+
'linear': None,
|
692
|
+
'inverse': None,
|
693
|
+
},
|
694
|
+
},
|
622
695
|
})
|
623
696
|
|
624
697
|
def nonce(self):
|
@@ -635,9 +708,14 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
635
708
|
"""
|
636
709
|
response = self.publicGetOpenV1CommonTime(params)
|
637
710
|
#
|
711
|
+
# {
|
712
|
+
# "code": 0,
|
713
|
+
# "msg": "Success",
|
714
|
+
# "data": null,
|
715
|
+
# "timestamp": 1737378074159
|
716
|
+
# }
|
638
717
|
#
|
639
|
-
|
640
|
-
return self.safe_integer(response, 'serverTime')
|
718
|
+
return self.safe_integer(response, 'timestamp')
|
641
719
|
|
642
720
|
def fetch_markets(self, params={}) -> List[Market]:
|
643
721
|
"""
|
@@ -1575,7 +1653,6 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1575
1653
|
create a trade order
|
1576
1654
|
|
1577
1655
|
https://www.tokocrypto.com/apidocs/#new-order--signed
|
1578
|
-
https://www.tokocrypto.com/apidocs/#account-trade-list-signed
|
1579
1656
|
|
1580
1657
|
:param str symbol: unified symbol of the market to create an order in
|
1581
1658
|
:param str type: 'market' or 'limit'
|
@@ -1733,7 +1810,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
1733
1810
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
1734
1811
|
"""
|
1735
1812
|
|
1736
|
-
https://www.tokocrypto.com/apidocs/#
|
1813
|
+
https://www.tokocrypto.com/apidocs/#query-order-signed
|
1737
1814
|
|
1738
1815
|
fetches information on an order made by the user
|
1739
1816
|
:param str id: order id
|
ccxt/tradeogre.py
CHANGED
@@ -164,6 +164,57 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
164
164
|
},
|
165
165
|
'options': {
|
166
166
|
},
|
167
|
+
'features': {
|
168
|
+
'spot': {
|
169
|
+
'sandbox': False,
|
170
|
+
'createOrder': {
|
171
|
+
'marginMode': False,
|
172
|
+
'triggerPrice': False,
|
173
|
+
'triggerDirection': False,
|
174
|
+
'triggerPriceType': None,
|
175
|
+
'stopLossPrice': False,
|
176
|
+
'takeProfitPrice': False,
|
177
|
+
'attachedStopLossTakeProfit': None,
|
178
|
+
'timeInForce': {
|
179
|
+
'IOC': False,
|
180
|
+
'FOK': False,
|
181
|
+
'PO': False,
|
182
|
+
'GTD': False,
|
183
|
+
},
|
184
|
+
'hedged': False,
|
185
|
+
'trailing': False,
|
186
|
+
'leverage': False,
|
187
|
+
'marketBuyByCost': False,
|
188
|
+
'marketBuyRequiresPrice': False,
|
189
|
+
'selfTradePrevention': False,
|
190
|
+
'iceberg': False,
|
191
|
+
},
|
192
|
+
'createOrders': None,
|
193
|
+
'fetchMyTrades': None,
|
194
|
+
'fetchOrder': {
|
195
|
+
'marginMode': False,
|
196
|
+
'trigger': False,
|
197
|
+
'trailing': False,
|
198
|
+
},
|
199
|
+
'fetchOpenOrders': {
|
200
|
+
'marginMode': False,
|
201
|
+
'limit': None,
|
202
|
+
'trigger': False,
|
203
|
+
'trailing': False,
|
204
|
+
},
|
205
|
+
'fetchOrders': None,
|
206
|
+
'fetchClosedOrders': None,
|
207
|
+
'fetchOHLCV': None, # todo
|
208
|
+
},
|
209
|
+
'swap': {
|
210
|
+
'linear': None,
|
211
|
+
'inverse': None,
|
212
|
+
},
|
213
|
+
'future': {
|
214
|
+
'linear': None,
|
215
|
+
'inverse': None,
|
216
|
+
},
|
217
|
+
},
|
167
218
|
})
|
168
219
|
|
169
220
|
def fetch_markets(self, params={}) -> List[Market]:
|
@@ -442,6 +493,9 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
442
493
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
443
494
|
"""
|
444
495
|
create a trade order
|
496
|
+
|
497
|
+
https://tradeogre.com/help/api#:~:text=u%20%27%7Bpublic%7D%3A%7Bprivate%7D%27-,Submit%20Buy%20Order
|
498
|
+
|
445
499
|
:param str symbol: unified symbol of the market to create an order in
|
446
500
|
:param str type: must be 'limit'
|
447
501
|
:param str side: 'buy' or 'sell'
|
@@ -499,6 +553,9 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
499
553
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
500
554
|
"""
|
501
555
|
fetch all unfilled currently open orders
|
556
|
+
|
557
|
+
https://tradeogre.com/help/api#:~:text=%7B%22success%22%3Atrue%7D-,Get%20Orders,-Method%20(POST)
|
558
|
+
|
502
559
|
:param str symbol: unified market symbol of the market orders were made in
|
503
560
|
:param int [since]: the earliest time in ms to fetch orders for
|
504
561
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -519,7 +576,7 @@ class tradeogre(Exchange, ImplicitAPI):
|
|
519
576
|
"""
|
520
577
|
fetches information on an order made by the user
|
521
578
|
|
522
|
-
https://
|
579
|
+
https://tradeogre.com/help/api#:~:text=market%22%3A%22XMR%2DBTC%22%7D%5D-,Get%20Order,-Method%20(GET)
|
523
580
|
|
524
581
|
:param str id: order id
|
525
582
|
:param str symbol: unified symbol of the market the order was made in
|