ccxt 4.4.45__py2.py3-none-any.whl → 4.4.47__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/abstract/bybit.py +1 -0
- ccxt/ace.py +58 -0
- ccxt/alpaca.py +80 -0
- ccxt/ascendex.py +110 -3
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +58 -0
- ccxt/async_support/alpaca.py +80 -0
- ccxt/async_support/ascendex.py +110 -3
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +113 -4
- ccxt/async_support/binance.py +4 -5
- ccxt/async_support/binanceus.py +10 -0
- ccxt/async_support/bingx.py +1 -2
- ccxt/async_support/bit2c.py +56 -0
- ccxt/async_support/bitbank.py +58 -0
- ccxt/async_support/bitbns.py +60 -0
- ccxt/async_support/bitfinex.py +2 -3
- ccxt/async_support/bitfinex1.py +8 -0
- ccxt/async_support/bitflyer.py +71 -0
- ccxt/async_support/bitget.py +103 -40
- ccxt/async_support/bithumb.py +54 -0
- ccxt/async_support/bitmex.py +1 -2
- ccxt/async_support/bitopro.py +74 -0
- ccxt/async_support/bitrue.py +97 -17
- ccxt/async_support/bitso.py +59 -0
- ccxt/async_support/bitteam.py +73 -0
- ccxt/async_support/bitvavo.py +70 -2
- ccxt/async_support/bl3p.py +42 -0
- ccxt/async_support/blockchaincom.py +66 -2
- ccxt/async_support/blofin.py +87 -1
- ccxt/async_support/btcalpha.py +73 -0
- ccxt/async_support/btcbox.py +58 -0
- ccxt/async_support/btcmarkets.py +73 -0
- ccxt/async_support/btcturk.py +61 -0
- ccxt/async_support/bybit.py +87 -39
- ccxt/async_support/cex.py +57 -0
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +76 -0
- ccxt/async_support/coinex.py +1 -2
- ccxt/async_support/delta.py +10 -6
- ccxt/async_support/gate.py +3 -4
- ccxt/async_support/hashkey.py +1 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +2 -4
- ccxt/async_support/hyperliquid.py +6 -7
- ccxt/async_support/krakenfutures.py +2 -0
- ccxt/async_support/lbank.py +1 -2
- ccxt/async_support/mexc.py +1 -0
- ccxt/async_support/okx.py +13 -9
- ccxt/async_support/onetrading.py +18 -3
- ccxt/async_support/oxfun.py +1 -2
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +1 -2
- ccxt/async_support/woofipro.py +1 -2
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +16 -14
- ccxt/bigone.py +113 -4
- ccxt/binance.py +4 -5
- ccxt/binanceus.py +10 -0
- ccxt/bingx.py +1 -2
- ccxt/bit2c.py +56 -0
- ccxt/bitbank.py +58 -0
- ccxt/bitbns.py +60 -0
- ccxt/bitfinex.py +2 -3
- ccxt/bitfinex1.py +8 -0
- ccxt/bitflyer.py +71 -0
- ccxt/bitget.py +103 -40
- ccxt/bithumb.py +54 -0
- ccxt/bitmex.py +1 -2
- ccxt/bitopro.py +74 -0
- ccxt/bitrue.py +97 -17
- ccxt/bitso.py +59 -0
- ccxt/bitteam.py +73 -0
- ccxt/bitvavo.py +70 -2
- ccxt/bl3p.py +42 -0
- ccxt/blockchaincom.py +66 -2
- ccxt/blofin.py +87 -1
- ccxt/btcalpha.py +73 -0
- ccxt/btcbox.py +58 -0
- ccxt/btcmarkets.py +73 -0
- ccxt/btcturk.py +61 -0
- ccxt/bybit.py +87 -39
- ccxt/cex.py +57 -0
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +76 -0
- ccxt/coinex.py +1 -2
- ccxt/delta.py +10 -6
- ccxt/gate.py +3 -4
- ccxt/hashkey.py +1 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +2 -4
- ccxt/hyperliquid.py +6 -7
- ccxt/krakenfutures.py +2 -0
- ccxt/lbank.py +1 -2
- ccxt/mexc.py +1 -0
- ccxt/okx.py +13 -9
- ccxt/onetrading.py +18 -3
- ccxt/oxfun.py +1 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bingx.py +3 -5
- ccxt/pro/bitget.py +2 -4
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/xt.py +1 -1
- ccxt/test/tests_async.py +2 -0
- ccxt/test/tests_sync.py +2 -0
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +1 -2
- ccxt/woofipro.py +1 -2
- {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/METADATA +4 -5
- {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/RECORD +118 -118
- {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/WHEEL +0 -0
- {ccxt-4.4.45.dist-info → ccxt-4.4.47.dist-info}/top_level.txt +0 -0
ccxt/bitflyer.py
CHANGED
@@ -123,6 +123,77 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
123
123
|
},
|
124
124
|
},
|
125
125
|
'precisionMode': TICK_SIZE,
|
126
|
+
'features': {
|
127
|
+
'spot': {
|
128
|
+
'sandbox': False,
|
129
|
+
'createOrder': {
|
130
|
+
'marginMode': False,
|
131
|
+
'triggerPrice': False,
|
132
|
+
'triggerPriceType': None,
|
133
|
+
'triggerDirection': False,
|
134
|
+
'stopLossPrice': False,
|
135
|
+
'takeProfitPrice': False,
|
136
|
+
'attachedStopLossTakeProfit': None,
|
137
|
+
'timeInForce': {
|
138
|
+
'IOC': True,
|
139
|
+
'FOK': True,
|
140
|
+
'PO': True,
|
141
|
+
'GTD': True, # todo implement
|
142
|
+
},
|
143
|
+
'hedged': False,
|
144
|
+
'trailing': False, # todo recheck
|
145
|
+
'leverage': False,
|
146
|
+
'marketBuyRequiresPrice': False,
|
147
|
+
'marketBuyByCost': False,
|
148
|
+
'selfTradePrevention': False,
|
149
|
+
'iceberg': False,
|
150
|
+
},
|
151
|
+
'createOrders': None,
|
152
|
+
'fetchMyTrades': {
|
153
|
+
'marginMode': False,
|
154
|
+
'limit': 100,
|
155
|
+
'daysBack': None,
|
156
|
+
'untilDays': None,
|
157
|
+
},
|
158
|
+
'fetchOrder': {
|
159
|
+
'marginMode': False,
|
160
|
+
'trigger': False,
|
161
|
+
'trailing': False,
|
162
|
+
},
|
163
|
+
'fetchOpenOrders': {
|
164
|
+
'marginMode': False,
|
165
|
+
'limit': 100,
|
166
|
+
'trigger': False,
|
167
|
+
'trailing': False,
|
168
|
+
},
|
169
|
+
'fetchOrders': {
|
170
|
+
'marginMode': False,
|
171
|
+
'limit': 100,
|
172
|
+
'daysBack': None,
|
173
|
+
'untilDays': None,
|
174
|
+
'trigger': False,
|
175
|
+
'trailing': False,
|
176
|
+
},
|
177
|
+
'fetchClosedOrders': {
|
178
|
+
'marginMode': False,
|
179
|
+
'limit': 100,
|
180
|
+
'daysBack': None,
|
181
|
+
'daysBackCanceled': None,
|
182
|
+
'untilDays': None,
|
183
|
+
'trigger': False,
|
184
|
+
'trailing': False,
|
185
|
+
},
|
186
|
+
'fetchOHLCV': None,
|
187
|
+
},
|
188
|
+
'swap': {
|
189
|
+
'linear': None,
|
190
|
+
'inverse': None,
|
191
|
+
},
|
192
|
+
'future': {
|
193
|
+
'linear': None,
|
194
|
+
'inverse': None,
|
195
|
+
},
|
196
|
+
},
|
126
197
|
'exceptions': {
|
127
198
|
'exact': {
|
128
199
|
'-2': OnMaintenance, # {"status":-2,"error_message":"Under maintenance","data":null}
|
ccxt/bitget.py
CHANGED
@@ -1444,16 +1444,102 @@ class bitget(Exchange, ImplicitAPI):
|
|
1444
1444
|
},
|
1445
1445
|
'sandboxMode': False,
|
1446
1446
|
'networks': {
|
1447
|
+
# 'TRX': 'TRX', # different code for mainnet
|
1447
1448
|
'TRC20': 'TRC20',
|
1449
|
+
# 'ETH': 'ETH', # different code for mainnet
|
1448
1450
|
'ERC20': 'ERC20',
|
1449
1451
|
'BEP20': 'BSC',
|
1450
|
-
'
|
1451
|
-
'
|
1452
|
-
'
|
1452
|
+
# 'BEP20': 'BEP20', # different for BEP20
|
1453
|
+
'BSC': 'BEP20',
|
1454
|
+
'ATOM': 'ATOM',
|
1455
|
+
'ACA': 'AcalaToken',
|
1453
1456
|
'APT': 'Aptos',
|
1457
|
+
'ARBONE': 'ArbitrumOne',
|
1458
|
+
'ARBNOVA': 'ArbitrumNova',
|
1459
|
+
'AVAXC': 'C-Chain',
|
1460
|
+
'AVAXX': 'X-Chain',
|
1461
|
+
'AR': 'Arweave',
|
1462
|
+
'BCH': 'BCH',
|
1463
|
+
'BCHA': 'BCHA',
|
1464
|
+
'BITCI': 'BITCI',
|
1465
|
+
'BTC': 'BTC',
|
1466
|
+
'CELO': 'CELO',
|
1467
|
+
'CSPR': 'CSPR',
|
1468
|
+
'ADA': 'Cardano',
|
1469
|
+
'CHZ': 'ChilizChain',
|
1470
|
+
'CRC20': 'CronosChain',
|
1471
|
+
'DOGE': 'DOGE',
|
1472
|
+
'DOT': 'DOT',
|
1473
|
+
'EOS': 'EOS',
|
1474
|
+
'ETHF': 'ETHFAIR',
|
1475
|
+
'ETHW': 'ETHW',
|
1476
|
+
'ETC': 'ETC',
|
1477
|
+
'EGLD': 'Elrond',
|
1478
|
+
'FIL': 'FIL',
|
1479
|
+
'FIO': 'FIO',
|
1480
|
+
'FTM': 'Fantom',
|
1481
|
+
'HRC20': 'HECO',
|
1482
|
+
'ONE': 'Harmony',
|
1483
|
+
'HNT': 'Helium',
|
1484
|
+
'ICP': 'ICP',
|
1485
|
+
'IOTX': 'IoTeX',
|
1486
|
+
'KARDIA': 'KAI',
|
1487
|
+
'KAVA': 'KAVA',
|
1488
|
+
'KDA': 'KDA',
|
1489
|
+
'KLAY': 'Klaytn',
|
1490
|
+
'KSM': 'Kusama',
|
1491
|
+
'LAT': 'LAT',
|
1492
|
+
'LTC': 'LTC',
|
1493
|
+
'MINA': 'MINA',
|
1494
|
+
'MOVR': 'MOVR',
|
1495
|
+
'METIS': 'MetisToken',
|
1496
|
+
'GLMR': 'Moonbeam',
|
1497
|
+
'NEAR': 'NEARProtocol',
|
1498
|
+
'NULS': 'NULS',
|
1499
|
+
'OASYS': 'OASYS',
|
1500
|
+
'OASIS': 'ROSE',
|
1501
|
+
'OMNI': 'OMNI',
|
1502
|
+
'ONT': 'Ontology',
|
1503
|
+
'OPTIMISM': 'Optimism',
|
1504
|
+
'OSMO': 'Osmosis',
|
1505
|
+
'POKT': 'PocketNetwork',
|
1454
1506
|
'MATIC': 'Polygon',
|
1507
|
+
'QTUM': 'QTUM',
|
1508
|
+
'REEF': 'REEF',
|
1509
|
+
'SOL': 'SOL',
|
1510
|
+
'SYS': 'SYS', # SyscoinNEVM is different
|
1511
|
+
'SXP': 'Solar',
|
1512
|
+
'XYM': 'Symbol',
|
1513
|
+
'TON': 'TON',
|
1514
|
+
'TT': 'TT',
|
1515
|
+
'TLOS': 'Telos',
|
1516
|
+
'THETA': 'ThetaToken',
|
1517
|
+
'VITE': 'VITE',
|
1518
|
+
'WAVES': 'WAVES',
|
1519
|
+
'WAX': 'WAXP',
|
1520
|
+
'WEMIX': 'WEMIXMainnet',
|
1521
|
+
'XDC': 'XDCNetworkXDC',
|
1522
|
+
'XRP': 'XRP',
|
1523
|
+
'FET': 'FETCH',
|
1524
|
+
'NEM': 'NEM',
|
1525
|
+
'REI': 'REINetwork',
|
1526
|
+
'ZIL': 'ZIL',
|
1527
|
+
'ABBC': 'ABBCCoin',
|
1528
|
+
'RSK': 'RSK',
|
1529
|
+
'AZERO': 'AZERO',
|
1530
|
+
'TRC10': 'TRC10',
|
1531
|
+
'JUNO': 'JUNO',
|
1532
|
+
# undetected: USDSP, more info at https://www.bitget.com/v1/spot/public/coinChainList
|
1533
|
+
# todo: uncomment below after unification
|
1534
|
+
# 'TERRACLASSIC': 'Terra', # tbd, that network id is also assigned to TERRANEW network
|
1535
|
+
# 'CUBENETWORK': 'CUBE',
|
1536
|
+
# 'CADUCEUS': 'CMP',
|
1537
|
+
# 'CONFLUX': 'CFX', # CFXeSpace is different
|
1538
|
+
# 'CERE': 'CERE',
|
1539
|
+
# 'CANTO': 'CANTO',
|
1540
|
+
'ZKSYNC': 'zkSyncEra',
|
1541
|
+
'STARKNET': 'Starknet',
|
1455
1542
|
'VIC': 'VICTION',
|
1456
|
-
'AVAXC': 'C-Chain',
|
1457
1543
|
},
|
1458
1544
|
'networksById': {
|
1459
1545
|
},
|
@@ -2303,13 +2389,13 @@ class bitget(Exchange, ImplicitAPI):
|
|
2303
2389
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
2304
2390
|
"""
|
2305
2391
|
self.check_address(address)
|
2306
|
-
|
2307
|
-
params = self.
|
2308
|
-
if
|
2309
|
-
raise ArgumentsRequired(self.id + ' withdraw() requires a
|
2392
|
+
networkCode = None
|
2393
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
2394
|
+
if networkCode is None:
|
2395
|
+
raise ArgumentsRequired(self.id + ' withdraw() requires a "network" parameter')
|
2310
2396
|
self.load_markets()
|
2311
2397
|
currency = self.currency(code)
|
2312
|
-
networkId = self.network_code_to_id(
|
2398
|
+
networkId = self.network_code_to_id(networkCode)
|
2313
2399
|
request: dict = {
|
2314
2400
|
'coin': currency['id'],
|
2315
2401
|
'address': address,
|
@@ -2332,27 +2418,8 @@ class bitget(Exchange, ImplicitAPI):
|
|
2332
2418
|
# }
|
2333
2419
|
#
|
2334
2420
|
data = self.safe_value(response, 'data', {})
|
2335
|
-
result
|
2336
|
-
|
2337
|
-
'info': response,
|
2338
|
-
'txid': None,
|
2339
|
-
'timestamp': None,
|
2340
|
-
'datetime': None,
|
2341
|
-
'network': None,
|
2342
|
-
'addressFrom': None,
|
2343
|
-
'address': None,
|
2344
|
-
'addressTo': None,
|
2345
|
-
'amount': None,
|
2346
|
-
'type': 'withdrawal',
|
2347
|
-
'currency': None,
|
2348
|
-
'status': None,
|
2349
|
-
'updated': None,
|
2350
|
-
'tagFrom': None,
|
2351
|
-
'tag': None,
|
2352
|
-
'tagTo': None,
|
2353
|
-
'comment': None,
|
2354
|
-
'fee': None,
|
2355
|
-
}
|
2421
|
+
result = self.parse_transaction(data, currency)
|
2422
|
+
result['type'] = 'withdrawal'
|
2356
2423
|
withdrawOptions = self.safe_value(self.options, 'withdraw', {})
|
2357
2424
|
fillResponseFromRequest = self.safe_bool(withdrawOptions, 'fillResponseFromRequest', True)
|
2358
2425
|
if fillResponseFromRequest:
|
@@ -2363,7 +2430,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
2363
2430
|
result['tag'] = tag
|
2364
2431
|
result['address'] = address
|
2365
2432
|
result['addressTo'] = address
|
2366
|
-
result['network'] =
|
2433
|
+
result['network'] = networkCode
|
2367
2434
|
return result
|
2368
2435
|
|
2369
2436
|
def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
@@ -2525,17 +2592,14 @@ class bitget(Exchange, ImplicitAPI):
|
|
2525
2592
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
2526
2593
|
"""
|
2527
2594
|
self.load_markets()
|
2528
|
-
networkCode =
|
2529
|
-
params = self.
|
2530
|
-
networkId = None
|
2531
|
-
if networkCode is not None:
|
2532
|
-
networkId = self.network_code_to_id(networkCode, code)
|
2595
|
+
networkCode = None
|
2596
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
2533
2597
|
currency = self.currency(code)
|
2534
2598
|
request: dict = {
|
2535
2599
|
'coin': currency['id'],
|
2536
2600
|
}
|
2537
|
-
if
|
2538
|
-
request['chain'] =
|
2601
|
+
if networkCode is not None:
|
2602
|
+
request['chain'] = self.network_code_to_id(networkCode, code)
|
2539
2603
|
response = self.privateSpotGetV2SpotWalletDepositAddress(self.extend(request, params))
|
2540
2604
|
#
|
2541
2605
|
# {
|
@@ -6615,8 +6679,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
6615
6679
|
# }
|
6616
6680
|
symbols = self.market_symbols(symbols)
|
6617
6681
|
data = self.safe_list(response, 'data', [])
|
6618
|
-
|
6619
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
6682
|
+
return self.parse_funding_rates(data, symbols)
|
6620
6683
|
|
6621
6684
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
6622
6685
|
#
|
ccxt/bithumb.py
CHANGED
@@ -141,6 +141,60 @@ class bithumb(Exchange, ImplicitAPI):
|
|
141
141
|
},
|
142
142
|
},
|
143
143
|
'precisionMode': SIGNIFICANT_DIGITS,
|
144
|
+
# todo: update to v2 apis
|
145
|
+
'features': {
|
146
|
+
'spot': {
|
147
|
+
'sandbox': False,
|
148
|
+
'createOrder': {
|
149
|
+
'marginMode': False,
|
150
|
+
'triggerPrice': False,
|
151
|
+
'triggerPriceType': None,
|
152
|
+
'triggerDirection': False,
|
153
|
+
'stopLossPrice': False,
|
154
|
+
'takeProfitPrice': False,
|
155
|
+
'attachedStopLossTakeProfit': None,
|
156
|
+
'timeInForce': {
|
157
|
+
'IOC': False,
|
158
|
+
'FOK': False,
|
159
|
+
'PO': False,
|
160
|
+
'GTD': False,
|
161
|
+
},
|
162
|
+
'hedged': False,
|
163
|
+
'trailing': False,
|
164
|
+
'leverage': False,
|
165
|
+
'marketBuyRequiresPrice': False,
|
166
|
+
'marketBuyByCost': False,
|
167
|
+
'selfTradePrevention': False,
|
168
|
+
'iceberg': False,
|
169
|
+
},
|
170
|
+
'createOrders': None,
|
171
|
+
'fetchMyTrades': None,
|
172
|
+
'fetchOrder': {
|
173
|
+
'marginMode': False,
|
174
|
+
'trigger': False,
|
175
|
+
'trailing': False,
|
176
|
+
},
|
177
|
+
'fetchOpenOrders': {
|
178
|
+
'marginMode': False,
|
179
|
+
'limit': 1000,
|
180
|
+
'trigger': False,
|
181
|
+
'trailing': False,
|
182
|
+
},
|
183
|
+
'fetchOrders': None,
|
184
|
+
'fetchClosedOrders': None,
|
185
|
+
'fetchOHLCV': {
|
186
|
+
'limit': 1000,
|
187
|
+
},
|
188
|
+
},
|
189
|
+
'swap': {
|
190
|
+
'linear': None,
|
191
|
+
'inverse': None,
|
192
|
+
},
|
193
|
+
'future': {
|
194
|
+
'linear': None,
|
195
|
+
'inverse': None,
|
196
|
+
},
|
197
|
+
},
|
144
198
|
'exceptions': {
|
145
199
|
'Bad Request(SSL)': BadRequest,
|
146
200
|
'Bad Request(Bad Method)': BadRequest,
|
ccxt/bitmex.py
CHANGED
@@ -2502,8 +2502,7 @@ class bitmex(Exchange, ImplicitAPI):
|
|
2502
2502
|
if swap:
|
2503
2503
|
filteredResponse.append(item)
|
2504
2504
|
symbols = self.market_symbols(symbols)
|
2505
|
-
|
2506
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
2505
|
+
return self.parse_funding_rates(filteredResponse, symbols)
|
2507
2506
|
|
2508
2507
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
2509
2508
|
# see response sample under "fetchMarkets" because same endpoint is being used here
|
ccxt/bitopro.py
CHANGED
@@ -208,6 +208,80 @@ class bitopro(Exchange, ImplicitAPI):
|
|
208
208
|
'BSC': 'BSC',
|
209
209
|
},
|
210
210
|
},
|
211
|
+
'features': {
|
212
|
+
'spot': {
|
213
|
+
'sandbox': False,
|
214
|
+
'createOrder': {
|
215
|
+
'marginMode': False,
|
216
|
+
'triggerPrice': True,
|
217
|
+
'triggerPriceType': None,
|
218
|
+
'triggerDirection': True, # todo implement
|
219
|
+
'stopLossPrice': False,
|
220
|
+
'takeProfitPrice': False,
|
221
|
+
'attachedStopLossTakeProfit': None,
|
222
|
+
'timeInForce': {
|
223
|
+
'IOC': False,
|
224
|
+
'FOK': False,
|
225
|
+
'PO': True,
|
226
|
+
'GTD': False,
|
227
|
+
},
|
228
|
+
'hedged': False,
|
229
|
+
'trailing': False,
|
230
|
+
'leverage': False,
|
231
|
+
'marketBuyRequiresPrice': False,
|
232
|
+
'marketBuyByCost': False,
|
233
|
+
'selfTradePrevention': False,
|
234
|
+
'iceberg': False,
|
235
|
+
},
|
236
|
+
'createOrders': None,
|
237
|
+
'fetchMyTrades': {
|
238
|
+
'marginMode': False,
|
239
|
+
'limit': 1000,
|
240
|
+
'daysBack': 100000,
|
241
|
+
'untilDays': 100000,
|
242
|
+
},
|
243
|
+
'fetchOrder': {
|
244
|
+
'marginMode': False,
|
245
|
+
'trigger': False,
|
246
|
+
'trailing': False,
|
247
|
+
},
|
248
|
+
# todo: implement through fetchOrders
|
249
|
+
'fetchOpenOrders': {
|
250
|
+
'marginMode': False,
|
251
|
+
'limit': None,
|
252
|
+
'trigger': False,
|
253
|
+
'trailing': False,
|
254
|
+
},
|
255
|
+
'fetchOrders': {
|
256
|
+
'marginMode': False,
|
257
|
+
'limit': 1000,
|
258
|
+
'daysBack': 100000,
|
259
|
+
'untilDays': 100000,
|
260
|
+
'trigger': False,
|
261
|
+
'trailing': False,
|
262
|
+
},
|
263
|
+
'fetchClosedOrders': {
|
264
|
+
'marginMode': False,
|
265
|
+
'limit': 1000,
|
266
|
+
'daysBack': 100000,
|
267
|
+
'daysBackCanceled': 1,
|
268
|
+
'untilDays': 10000,
|
269
|
+
'trigger': False,
|
270
|
+
'trailing': False,
|
271
|
+
},
|
272
|
+
'fetchOHLCV': {
|
273
|
+
'limit': 1000,
|
274
|
+
},
|
275
|
+
},
|
276
|
+
'swap': {
|
277
|
+
'linear': None,
|
278
|
+
'inverse': None,
|
279
|
+
},
|
280
|
+
'future': {
|
281
|
+
'linear': None,
|
282
|
+
'inverse': None,
|
283
|
+
},
|
284
|
+
},
|
211
285
|
'precisionMode': TICK_SIZE,
|
212
286
|
'exceptions': {
|
213
287
|
'exact': {
|
ccxt/bitrue.py
CHANGED
@@ -459,7 +459,92 @@ class bitrue(Exchange, ImplicitAPI):
|
|
459
459
|
'MIM': 'MIM Swarm',
|
460
460
|
},
|
461
461
|
'precisionMode': TICK_SIZE,
|
462
|
-
|
462
|
+
'features': {
|
463
|
+
'default': {
|
464
|
+
'sandbox': False,
|
465
|
+
'createOrder': {
|
466
|
+
'marginMode': False,
|
467
|
+
'triggerPrice': True,
|
468
|
+
'triggerPriceType': None,
|
469
|
+
'triggerDirection': None,
|
470
|
+
'stopLossPrice': False, # todo
|
471
|
+
'takeProfitPrice': False, # todo
|
472
|
+
'attachedStopLossTakeProfit': None,
|
473
|
+
'timeInForce': {
|
474
|
+
'IOC': True,
|
475
|
+
'FOK': True,
|
476
|
+
'PO': True,
|
477
|
+
'GTD': False,
|
478
|
+
},
|
479
|
+
'hedged': False,
|
480
|
+
'trailing': False,
|
481
|
+
'leverage': False,
|
482
|
+
'marketBuyRequiresPrice': True, # todo revise
|
483
|
+
'marketBuyByCost': True,
|
484
|
+
'selfTradePrevention': False,
|
485
|
+
'iceberg': True, # todo implement
|
486
|
+
},
|
487
|
+
'createOrders': None,
|
488
|
+
'fetchMyTrades': {
|
489
|
+
'marginMode': False,
|
490
|
+
'limit': 1000,
|
491
|
+
'daysBack': 100000,
|
492
|
+
'untilDays': 100000,
|
493
|
+
},
|
494
|
+
'fetchOrder': {
|
495
|
+
'marginMode': False,
|
496
|
+
'trigger': False,
|
497
|
+
'trailing': False,
|
498
|
+
},
|
499
|
+
'fetchOpenOrders': {
|
500
|
+
'marginMode': False,
|
501
|
+
'limit': None,
|
502
|
+
'trigger': False,
|
503
|
+
'trailing': False,
|
504
|
+
},
|
505
|
+
'fetchOrders': None,
|
506
|
+
'fetchClosedOrders': {
|
507
|
+
'marginMode': False,
|
508
|
+
'limit': 1000,
|
509
|
+
'daysBack': 90,
|
510
|
+
'daysBackCanceled': 1,
|
511
|
+
'untilDays': 90,
|
512
|
+
'trigger': False,
|
513
|
+
'trailing': False,
|
514
|
+
},
|
515
|
+
'fetchOHLCV': {
|
516
|
+
'limit': 1440,
|
517
|
+
},
|
518
|
+
},
|
519
|
+
'spot': {
|
520
|
+
'extends': 'default',
|
521
|
+
},
|
522
|
+
'forDerivatives': {
|
523
|
+
'extends': 'default',
|
524
|
+
'createOrder': {
|
525
|
+
'marginMode': True,
|
526
|
+
'leverage': True,
|
527
|
+
'marketBuyRequiresPrice': False,
|
528
|
+
'marketBuyByCost': False,
|
529
|
+
},
|
530
|
+
'fetchOHLCV': {
|
531
|
+
'limit': 300,
|
532
|
+
},
|
533
|
+
'fetchClosedOrders': None,
|
534
|
+
},
|
535
|
+
'swap': {
|
536
|
+
'linear': {
|
537
|
+
'extends': 'forDerivatives',
|
538
|
+
},
|
539
|
+
'inverse': {
|
540
|
+
'extends': 'forDerivatives',
|
541
|
+
},
|
542
|
+
},
|
543
|
+
'future': {
|
544
|
+
'linear': None,
|
545
|
+
'inverse': None,
|
546
|
+
},
|
547
|
+
},
|
463
548
|
'exceptions': {
|
464
549
|
'exact': {
|
465
550
|
'System is under maintenance.': OnMaintenance, # {"code":1,"msg":"System is under maintenance."}
|
@@ -1288,9 +1373,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1288
1373
|
"""
|
1289
1374
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1290
1375
|
|
1291
|
-
https://
|
1292
|
-
https://www.bitrue.com/
|
1293
|
-
https://www.bitrue.com/api_docs_includes_file/delivery.html#kline-candlestick-data
|
1376
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#kline-data
|
1377
|
+
https://www.bitrue.com/api_docs_includes_file/futures/index.html#kline-candlestick-data
|
1294
1378
|
|
1295
1379
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1296
1380
|
:param str timeframe: the length of time each candle represents
|
@@ -1825,9 +1909,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1825
1909
|
"""
|
1826
1910
|
create a trade order
|
1827
1911
|
|
1828
|
-
https://
|
1829
|
-
https://www.bitrue.com/
|
1830
|
-
https://www.bitrue.com/api_docs_includes_file/delivery.html#new-order-trade-hmac-sha256
|
1912
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#new-order-trade
|
1913
|
+
https://www.bitrue.com/api_docs_includes_file/futures/index.html#new-order-trade-hmac-sha256
|
1831
1914
|
|
1832
1915
|
:param str symbol: unified symbol of the market to create an order in
|
1833
1916
|
:param str type: 'market' or 'limit'
|
@@ -1949,9 +2032,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
1949
2032
|
"""
|
1950
2033
|
fetches information on an order made by the user
|
1951
2034
|
|
1952
|
-
https://
|
1953
|
-
https://www.bitrue.com/
|
1954
|
-
https://www.bitrue.com/api_docs_includes_file/delivery.html#query-order-user_data-hmac-sha256
|
2035
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#query-order-user_data
|
2036
|
+
https://www.bitrue.com/api_docs_includes_file/futures/index.html#query-order-user_data-hmac-sha256
|
1955
2037
|
|
1956
2038
|
:param str id: the order id
|
1957
2039
|
:param str symbol: unified symbol of the market the order was made in
|
@@ -2037,7 +2119,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2037
2119
|
"""
|
2038
2120
|
fetches information on multiple closed orders made by the user
|
2039
2121
|
|
2040
|
-
https://
|
2122
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#all-orders-user_data
|
2041
2123
|
|
2042
2124
|
:param str symbol: unified market symbol of the market orders were made in
|
2043
2125
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -2091,9 +2173,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2091
2173
|
"""
|
2092
2174
|
fetch all unfilled currently open orders
|
2093
2175
|
|
2094
|
-
https://
|
2095
|
-
https://www.bitrue.com/
|
2096
|
-
https://www.bitrue.com/api_docs_includes_file/delivery.html#current-all-open-orders-user_data-hmac-sha256
|
2176
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#current-open-orders-user_data
|
2177
|
+
https://www.bitrue.com/api_docs_includes_file/futures/index.html#cancel-all-open-orders-trade-hmac-sha256
|
2097
2178
|
|
2098
2179
|
:param str symbol: unified market symbol
|
2099
2180
|
:param int [since]: the earliest time in ms to fetch open orders for
|
@@ -2275,9 +2356,8 @@ class bitrue(Exchange, ImplicitAPI):
|
|
2275
2356
|
"""
|
2276
2357
|
fetch all trades made by the user
|
2277
2358
|
|
2278
|
-
https://
|
2279
|
-
https://www.bitrue.com/
|
2280
|
-
https://www.bitrue.com/api_docs_includes_file/delivery.html#account-trade-list-user_data-hmac-sha256
|
2359
|
+
https://www.bitrue.com/api_docs_includes_file/spot/index.html#account-trade-list-user_data
|
2360
|
+
https://www.bitrue.com/api_docs_includes_file/futures/index.html#account-trade-list-user_data-hmac-sha256
|
2281
2361
|
|
2282
2362
|
:param str symbol: unified market symbol
|
2283
2363
|
:param int [since]: the earliest time in ms to fetch trades for
|
ccxt/bitso.py
CHANGED
@@ -195,6 +195,65 @@ class bitso(Exchange, ImplicitAPI):
|
|
195
195
|
],
|
196
196
|
},
|
197
197
|
},
|
198
|
+
'features': {
|
199
|
+
'spot': {
|
200
|
+
'sandbox': False,
|
201
|
+
'createOrder': {
|
202
|
+
'marginMode': False,
|
203
|
+
'triggerPrice': True, # todo implementation
|
204
|
+
'triggerPriceType': None,
|
205
|
+
'triggerDirection': None,
|
206
|
+
'stopLossPrice': False, # todo
|
207
|
+
'takeProfitPrice': False, # todo
|
208
|
+
'attachedStopLossTakeProfit': None,
|
209
|
+
# todo: implementation for TIF
|
210
|
+
'timeInForce': {
|
211
|
+
'IOC': True,
|
212
|
+
'FOK': True,
|
213
|
+
'PO': True,
|
214
|
+
'GTD': False,
|
215
|
+
},
|
216
|
+
'hedged': False,
|
217
|
+
'trailing': False,
|
218
|
+
'leverage': False,
|
219
|
+
'marketBuyRequiresPrice': False,
|
220
|
+
'marketBuyByCost': False,
|
221
|
+
'selfTradePrevention': False,
|
222
|
+
'iceberg': False,
|
223
|
+
},
|
224
|
+
'createOrders': None,
|
225
|
+
'fetchMyTrades': {
|
226
|
+
'marginMode': False,
|
227
|
+
'limit': 100,
|
228
|
+
'daysBack': None,
|
229
|
+
'untilDays': None,
|
230
|
+
},
|
231
|
+
'fetchOrder': {
|
232
|
+
'marginMode': False,
|
233
|
+
'trigger': False,
|
234
|
+
'trailing': False,
|
235
|
+
},
|
236
|
+
'fetchOpenOrders': {
|
237
|
+
'marginMode': False,
|
238
|
+
'limit': 500,
|
239
|
+
'trigger': False,
|
240
|
+
'trailing': False,
|
241
|
+
},
|
242
|
+
'fetchOrders': None,
|
243
|
+
'fetchClosedOrders': None,
|
244
|
+
'fetchOHLCV': {
|
245
|
+
'limit': 300,
|
246
|
+
},
|
247
|
+
},
|
248
|
+
'swap': {
|
249
|
+
'linear': None,
|
250
|
+
'inverse': None,
|
251
|
+
},
|
252
|
+
'future': {
|
253
|
+
'linear': None,
|
254
|
+
'inverse': None,
|
255
|
+
},
|
256
|
+
},
|
198
257
|
'exceptions': {
|
199
258
|
'0201': AuthenticationError, # Invalid Nonce or Invalid Credentials
|
200
259
|
'104': InvalidNonce, # Cannot perform request - nonce must be higher than 1520307203724237
|