ccxt 4.4.32__py2.py3-none-any.whl → 4.4.34__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 +3 -1
- ccxt/abstract/bingx.py +16 -0
- ccxt/abstract/bitbank.py +5 -0
- ccxt/abstract/bitfinex2.py +1 -0
- ccxt/abstract/coinbaseexchange.py +1 -0
- ccxt/abstract/ellipx.py +25 -0
- ccxt/abstract/kraken.py +1 -0
- ccxt/alpaca.py +2 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/alpaca.py +2 -0
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +164 -7
- ccxt/async_support/bingx.py +155 -8
- ccxt/async_support/bitbank.py +5 -0
- ccxt/async_support/bitbns.py +2 -0
- ccxt/async_support/bitfinex2.py +1 -0
- ccxt/async_support/bitget.py +174 -40
- ccxt/async_support/bitmex.py +2 -0
- ccxt/async_support/bitopro.py +3 -0
- ccxt/async_support/bitrue.py +1 -0
- ccxt/async_support/btcmarkets.py +2 -0
- ccxt/async_support/bybit.py +143 -12
- ccxt/async_support/cex.py +16 -5
- ccxt/async_support/coinbase.py +5 -24
- ccxt/async_support/coinbaseexchange.py +2 -1
- ccxt/async_support/coinex.py +2 -0
- ccxt/async_support/coinone.py +7 -7
- ccxt/async_support/coinsph.py +7 -7
- ccxt/async_support/coinspot.py +39 -39
- ccxt/async_support/cryptocom.py +36 -34
- ccxt/async_support/ellipx.py +1828 -0
- ccxt/async_support/gate.py +1 -0
- ccxt/async_support/hyperliquid.py +13 -2
- ccxt/async_support/kraken.py +1 -0
- ccxt/async_support/krakenfutures.py +3 -1
- ccxt/async_support/kucoinfutures.py +1 -1
- ccxt/async_support/lbank.py +1 -0
- ccxt/async_support/okcoin.py +2 -0
- ccxt/async_support/okx.py +103 -8
- ccxt/async_support/onetrading.py +20 -1
- ccxt/async_support/paradex.py +2 -0
- ccxt/async_support/phemex.py +33 -6
- ccxt/async_support/poloniex.py +3 -1
- ccxt/async_support/poloniexfutures.py +3 -1
- ccxt/async_support/vertex.py +2 -0
- ccxt/async_support/woo.py +69 -69
- ccxt/base/exchange.py +100 -2
- ccxt/binance.py +164 -7
- ccxt/bingx.py +155 -8
- ccxt/bitbank.py +5 -0
- ccxt/bitbns.py +2 -0
- ccxt/bitfinex2.py +1 -0
- ccxt/bitget.py +174 -40
- ccxt/bitmex.py +2 -0
- ccxt/bitopro.py +3 -0
- ccxt/bitrue.py +1 -0
- ccxt/btcmarkets.py +2 -0
- ccxt/bybit.py +143 -12
- ccxt/cex.py +16 -5
- ccxt/coinbase.py +5 -24
- ccxt/coinbaseexchange.py +2 -1
- ccxt/coinex.py +2 -0
- ccxt/coinone.py +7 -7
- ccxt/coinsph.py +7 -7
- ccxt/coinspot.py +39 -39
- ccxt/cryptocom.py +36 -34
- ccxt/ellipx.py +1828 -0
- ccxt/gate.py +1 -0
- ccxt/hyperliquid.py +13 -2
- ccxt/kraken.py +1 -0
- ccxt/krakenfutures.py +3 -1
- ccxt/kucoinfutures.py +1 -1
- ccxt/lbank.py +1 -0
- ccxt/okcoin.py +2 -0
- ccxt/okx.py +103 -8
- ccxt/onetrading.py +20 -1
- ccxt/paradex.py +2 -0
- ccxt/phemex.py +33 -6
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +3 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/idex.py +15 -0
- ccxt/pro/okx.py +8 -0
- ccxt/pro/probit.py +4 -2
- ccxt/pro/woo.py +15 -15
- ccxt/test/tests_async.py +3 -1
- ccxt/test/tests_helpers.py +1 -3
- ccxt/test/tests_sync.py +3 -1
- ccxt/vertex.py +2 -0
- ccxt/woo.py +69 -69
- {ccxt-4.4.32.dist-info → ccxt-4.4.34.dist-info}/METADATA +9 -8
- {ccxt-4.4.32.dist-info → ccxt-4.4.34.dist-info}/RECORD +95 -92
- {ccxt-4.4.32.dist-info → ccxt-4.4.34.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.32.dist-info → ccxt-4.4.34.dist-info}/WHEEL +0 -0
- {ccxt-4.4.32.dist-info → ccxt-4.4.34.dist-info}/top_level.txt +0 -0
ccxt/binance.py
CHANGED
@@ -1578,6 +1578,159 @@ class binance(Exchange, ImplicitAPI):
|
|
1578
1578
|
'BUSD': 'USD',
|
1579
1579
|
},
|
1580
1580
|
},
|
1581
|
+
'features': {
|
1582
|
+
# https://developers.binance.com/docs/binance-spot-api-docs/rest-api#:~:text=quoteOrderQty
|
1583
|
+
'spot': {
|
1584
|
+
'sandbox': True,
|
1585
|
+
'createOrder': {
|
1586
|
+
'marginMode': True,
|
1587
|
+
'triggerPrice': True,
|
1588
|
+
'triggerPriceType': None,
|
1589
|
+
'triggerDirection': False,
|
1590
|
+
'stopLossPrice': True,
|
1591
|
+
'takeProfitPrice': True,
|
1592
|
+
'attachedStopLossTakeProfit': None, # not supported
|
1593
|
+
'timeInForce': {
|
1594
|
+
'GTC': True,
|
1595
|
+
'IOC': True,
|
1596
|
+
'FOK': True,
|
1597
|
+
'PO': True,
|
1598
|
+
'GTD': False,
|
1599
|
+
},
|
1600
|
+
'hedged': True,
|
1601
|
+
# exchange-supported features
|
1602
|
+
'selfTradePrevention': True,
|
1603
|
+
'trailing': True,
|
1604
|
+
'twap': False,
|
1605
|
+
'iceberg': True,
|
1606
|
+
'oco': False,
|
1607
|
+
},
|
1608
|
+
'createOrders': None,
|
1609
|
+
'fetchMyTrades': {
|
1610
|
+
'marginMode': False,
|
1611
|
+
'limit': 1000,
|
1612
|
+
'daysBack': None,
|
1613
|
+
'untilDays': 1, # days between start-end
|
1614
|
+
},
|
1615
|
+
'fetchOrder': {
|
1616
|
+
'marginMode': True,
|
1617
|
+
'trigger': False,
|
1618
|
+
'trailing': False,
|
1619
|
+
},
|
1620
|
+
'fetchOpenOrders': {
|
1621
|
+
'marginMode': True,
|
1622
|
+
'limit': None,
|
1623
|
+
'trigger': False,
|
1624
|
+
'trailing': False,
|
1625
|
+
},
|
1626
|
+
'fetchOrders': {
|
1627
|
+
'marginMode': True,
|
1628
|
+
'limit': 1000,
|
1629
|
+
'daysBack': None,
|
1630
|
+
'untilDays': 10000,
|
1631
|
+
'trigger': False,
|
1632
|
+
'trailing': False,
|
1633
|
+
},
|
1634
|
+
'fetchClosedOrders': {
|
1635
|
+
'marginMode': True,
|
1636
|
+
'limit': 1000,
|
1637
|
+
'daysBackClosed': None,
|
1638
|
+
'daysBackCanceled': None,
|
1639
|
+
'untilDays': 10000,
|
1640
|
+
'trigger': False,
|
1641
|
+
'trailing': False,
|
1642
|
+
},
|
1643
|
+
'fetchOHLCV': {
|
1644
|
+
'limit': 1000,
|
1645
|
+
},
|
1646
|
+
},
|
1647
|
+
'default': {
|
1648
|
+
'sandbox': True,
|
1649
|
+
'createOrder': {
|
1650
|
+
'marginMode': False,
|
1651
|
+
'triggerPrice': True,
|
1652
|
+
'triggerPriceType': {
|
1653
|
+
'mark': True,
|
1654
|
+
'last': True,
|
1655
|
+
'index': False,
|
1656
|
+
},
|
1657
|
+
'stopLossPrice': True,
|
1658
|
+
'takeProfitPrice': True,
|
1659
|
+
'attachedStopLossTakeProfit': None, # not supported
|
1660
|
+
'timeInForce': {
|
1661
|
+
'GTC': True,
|
1662
|
+
'IOC': True,
|
1663
|
+
'FOK': True,
|
1664
|
+
'PO': True,
|
1665
|
+
'GTD': True,
|
1666
|
+
# 'GTX': True,
|
1667
|
+
},
|
1668
|
+
'hedged': True,
|
1669
|
+
# exchange-supported features
|
1670
|
+
'selfTradePrevention': True,
|
1671
|
+
'trailing': True,
|
1672
|
+
'twap': False,
|
1673
|
+
'iceberg': False,
|
1674
|
+
'oco': False,
|
1675
|
+
},
|
1676
|
+
'createOrders': {
|
1677
|
+
'max': 5,
|
1678
|
+
},
|
1679
|
+
'fetchMyTrades': {
|
1680
|
+
'marginMode': False,
|
1681
|
+
'daysBack': None,
|
1682
|
+
'limit': 1000,
|
1683
|
+
'untilDays': 7,
|
1684
|
+
},
|
1685
|
+
'fetchOrder': {
|
1686
|
+
'marginMode': False,
|
1687
|
+
'trigger': False,
|
1688
|
+
'trailing': False,
|
1689
|
+
},
|
1690
|
+
'fetchOpenOrders': {
|
1691
|
+
'marginMode': True,
|
1692
|
+
'limit': 500,
|
1693
|
+
'trigger': False,
|
1694
|
+
'trailing': False,
|
1695
|
+
},
|
1696
|
+
'fetchOrders': {
|
1697
|
+
'marginMode': True,
|
1698
|
+
'limit': 1000,
|
1699
|
+
'daysBack': 90,
|
1700
|
+
'untilDays': 7,
|
1701
|
+
'trigger': False,
|
1702
|
+
'trailing': False,
|
1703
|
+
},
|
1704
|
+
'fetchClosedOrders': {
|
1705
|
+
'marginMode': True,
|
1706
|
+
'limit': 1000,
|
1707
|
+
'daysBackClosed': 90,
|
1708
|
+
'daysBackCanceled': 3,
|
1709
|
+
'untilDays': 7,
|
1710
|
+
'trigger': False,
|
1711
|
+
'trailing': False,
|
1712
|
+
},
|
1713
|
+
'fetchOHLCV': {
|
1714
|
+
'limit': 1500,
|
1715
|
+
},
|
1716
|
+
},
|
1717
|
+
'swap': {
|
1718
|
+
'linear': {
|
1719
|
+
'extends': 'default',
|
1720
|
+
},
|
1721
|
+
'inverse': {
|
1722
|
+
'extends': 'default',
|
1723
|
+
},
|
1724
|
+
},
|
1725
|
+
'future': {
|
1726
|
+
'linear': {
|
1727
|
+
'extends': 'default',
|
1728
|
+
},
|
1729
|
+
'inverse': {
|
1730
|
+
'extends': 'default',
|
1731
|
+
},
|
1732
|
+
},
|
1733
|
+
},
|
1581
1734
|
'exceptions': {
|
1582
1735
|
'spot': {
|
1583
1736
|
'exact': {
|
@@ -1973,12 +2126,15 @@ class binance(Exchange, ImplicitAPI):
|
|
1973
2126
|
'-4088': PermissionDenied, # User can not place order currently
|
1974
2127
|
'-4114': BadRequest, # INVALID_CLIENT_TRAN_ID_LEN
|
1975
2128
|
'-4115': BadRequest, # DUPLICATED_CLIENT_TRAN_ID
|
2129
|
+
'-4116': InvalidOrder, # DUPLICATED_CLIENT_ORDER_ID
|
2130
|
+
'-4117': OperationRejected, # STOP_ORDER_TRIGGERING
|
1976
2131
|
'-4118': OperationRejected, # REDUCE_ONLY_MARGIN_CHECK_FAILED
|
1977
2132
|
'-4131': OperationRejected, # The counterparty's best price does not meet the PERCENT_PRICE filter limit
|
1978
2133
|
'-4140': BadRequest, # Invalid symbol status for opening position
|
1979
2134
|
'-4141': OperationRejected, # Symbol is closed
|
1980
2135
|
'-4144': BadSymbol, # Invalid pair
|
1981
|
-
'-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."}
|
2136
|
+
'-4164': InvalidOrder, # {"code":-4164,"msg":"Order's notional must be no smaller than 20(unless you choose reduce only)."},
|
2137
|
+
'-4136': InvalidOrder, # {"code":-4136,"msg":"Target strategy invalid for orderType TRAILING_STOP_MARKET,closePosition True"}
|
1982
2138
|
'-4165': BadRequest, # Invalid time interval
|
1983
2139
|
'-4167': BadRequest, # Unable to adjust to Multi-Assets mode with symbols of USDⓈ-M Futures under isolated-margin mode.
|
1984
2140
|
'-4168': BadRequest, # Unable to adjust to isolated-margin mode under the Multi-Assets mode.
|
@@ -5957,6 +6113,7 @@ class binance(Exchange, ImplicitAPI):
|
|
5957
6113
|
typeRequest = 'strategyType' if isPortfolioMarginConditional else 'type'
|
5958
6114
|
request[typeRequest] = uppercaseType
|
5959
6115
|
# additional required fields depending on the order type
|
6116
|
+
closePosition = self.safe_bool(params, 'closePosition', False)
|
5960
6117
|
timeInForceIsRequired = False
|
5961
6118
|
priceIsRequired = False
|
5962
6119
|
stopPriceIsRequired = False
|
@@ -6022,12 +6179,12 @@ class binance(Exchange, ImplicitAPI):
|
|
6022
6179
|
stopPriceIsRequired = True
|
6023
6180
|
priceIsRequired = True
|
6024
6181
|
elif (uppercaseType == 'STOP_MARKET') or (uppercaseType == 'TAKE_PROFIT_MARKET'):
|
6025
|
-
|
6026
|
-
if closePosition is None:
|
6182
|
+
if not closePosition:
|
6027
6183
|
quantityIsRequired = True
|
6028
6184
|
stopPriceIsRequired = True
|
6029
6185
|
elif uppercaseType == 'TRAILING_STOP_MARKET':
|
6030
|
-
|
6186
|
+
if not closePosition:
|
6187
|
+
quantityIsRequired = True
|
6031
6188
|
if trailingPercent is None:
|
6032
6189
|
raise InvalidOrder(self.id + ' createOrder() requires a trailingPercent param for a ' + type + ' order')
|
6033
6190
|
if quantityIsRequired:
|
@@ -10976,11 +11133,11 @@ class binance(Exchange, ImplicitAPI):
|
|
10976
11133
|
def get_exceptions_by_url(self, url: str, exactOrBroad: str):
|
10977
11134
|
marketType = None
|
10978
11135
|
hostname = self.hostname if (self.hostname is not None) else 'binance.com'
|
10979
|
-
if url.startswith('https://api.' + hostname + '/'):
|
11136
|
+
if url.startswith('https://api.' + hostname + '/') or url.startswith('https://testnet.binance.vision'):
|
10980
11137
|
marketType = 'spot'
|
10981
|
-
elif url.startswith('https://dapi.' + hostname + '/'):
|
11138
|
+
elif url.startswith('https://dapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/dapi'):
|
10982
11139
|
marketType = 'inverse'
|
10983
|
-
elif url.startswith('https://fapi.' + hostname + '/'):
|
11140
|
+
elif url.startswith('https://fapi.' + hostname + '/') or url.startswith('https://testnet.binancefuture.com/fapi'):
|
10984
11141
|
marketType = 'linear'
|
10985
11142
|
elif url.startswith('https://eapi.' + hostname + '/'):
|
10986
11143
|
marketType = 'option'
|
ccxt/bingx.py
CHANGED
@@ -58,6 +58,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
58
58
|
'createOrders': True,
|
59
59
|
'createOrderWithTakeProfitAndStopLoss': True,
|
60
60
|
'createStopLossOrder': True,
|
61
|
+
'createStopOrder': True,
|
61
62
|
'createTakeProfitOrder': True,
|
62
63
|
'createTrailingAmountOrder': True,
|
63
64
|
'createTrailingPercentOrder': True,
|
@@ -211,6 +212,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
211
212
|
'get': {
|
212
213
|
'ticker/price': 1,
|
213
214
|
'market/historicalTrades': 1,
|
215
|
+
'market/markPriceKlines': 1,
|
216
|
+
'trade/multiAssetsRules': 1,
|
214
217
|
},
|
215
218
|
},
|
216
219
|
'private': {
|
@@ -219,12 +222,24 @@ class bingx(Exchange, ImplicitAPI):
|
|
219
222
|
'market/markPriceKlines': 1,
|
220
223
|
'trade/batchCancelReplace': 5,
|
221
224
|
'trade/fullOrder': 2,
|
225
|
+
'maintMarginRatio': 2,
|
226
|
+
'trade/positionHistory': 2,
|
222
227
|
'positionMargin/history': 2,
|
228
|
+
'twap/openOrders': 5,
|
229
|
+
'twap/historyOrders': 5,
|
230
|
+
'twap/orderDetail': 5,
|
231
|
+
'trade/assetMode': 5,
|
232
|
+
'user/marginAssets': 5,
|
223
233
|
},
|
224
234
|
'post': {
|
225
235
|
'trade/cancelReplace': 2,
|
226
236
|
'positionSide/dual': 5,
|
237
|
+
'trade/batchCancelReplace': 5,
|
227
238
|
'trade/closePosition': 2,
|
239
|
+
'trade/getVst': 5,
|
240
|
+
'twap/order': 5,
|
241
|
+
'twap/cancelOrder': 5,
|
242
|
+
'trade/assetMode': 5,
|
228
243
|
},
|
229
244
|
},
|
230
245
|
},
|
@@ -257,6 +272,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
257
272
|
'trade/forceOrders': 1,
|
258
273
|
'trade/allOrders': 2,
|
259
274
|
'trade/allFillOrders': 2,
|
275
|
+
'trade/fillHistory': 2,
|
260
276
|
'user/income/export': 2,
|
261
277
|
'user/commissionRate': 2,
|
262
278
|
'quote/bookTicker': 1,
|
@@ -314,12 +330,13 @@ class bingx(Exchange, ImplicitAPI):
|
|
314
330
|
'post': {
|
315
331
|
'trade/order': 2,
|
316
332
|
'trade/leverage': 2,
|
333
|
+
'trade/allOpenOrders': 2,
|
317
334
|
'trade/closeAllPositions': 2,
|
318
335
|
'trade/marginType': 2,
|
319
336
|
'trade/positionMargin': 2,
|
320
337
|
},
|
321
338
|
'delete': {
|
322
|
-
'trade/allOpenOrders': 2,
|
339
|
+
'trade/allOpenOrders': 2, # post method in doc
|
323
340
|
'trade/cancelOrder': 2,
|
324
341
|
},
|
325
342
|
},
|
@@ -512,6 +529,136 @@ class bingx(Exchange, ImplicitAPI):
|
|
512
529
|
'MATIC': 'POLYGON',
|
513
530
|
},
|
514
531
|
},
|
532
|
+
'features': {
|
533
|
+
'defaultForLinear': {
|
534
|
+
'sandbox': True,
|
535
|
+
'createOrder': {
|
536
|
+
'marginMode': False,
|
537
|
+
'triggerPrice': True,
|
538
|
+
'triggerPriceType': {
|
539
|
+
'last': True,
|
540
|
+
'mark': True,
|
541
|
+
'index': True,
|
542
|
+
},
|
543
|
+
'triggerDirection': False,
|
544
|
+
'stopLossPrice': True,
|
545
|
+
'takeProfitPrice': True,
|
546
|
+
'attachedStopLossTakeProfit': {
|
547
|
+
'triggerPriceType': {
|
548
|
+
'last': True,
|
549
|
+
'mark': True,
|
550
|
+
'index': True,
|
551
|
+
},
|
552
|
+
'limitPrice': True,
|
553
|
+
},
|
554
|
+
'timeInForce': {
|
555
|
+
'GTC': True,
|
556
|
+
'IOC': True,
|
557
|
+
'FOK': True,
|
558
|
+
'PO': True,
|
559
|
+
'GTD': False,
|
560
|
+
},
|
561
|
+
'hedged': True,
|
562
|
+
'trailing': True,
|
563
|
+
},
|
564
|
+
'createOrders': {
|
565
|
+
'max': 5,
|
566
|
+
},
|
567
|
+
'fetchMyTrades': {
|
568
|
+
'marginMode': False,
|
569
|
+
'limit': 512, # 512 days for 'allFillOrders', 1000 days for 'fillOrders'
|
570
|
+
'daysBack': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
|
571
|
+
'untilDays': 30, # 30 for 'allFillOrders', 7 for 'fillHistory'
|
572
|
+
},
|
573
|
+
'fetchOrder': {
|
574
|
+
'marginMode': False,
|
575
|
+
'trigger': False,
|
576
|
+
'trailing': False,
|
577
|
+
},
|
578
|
+
'fetchOpenOrders': {
|
579
|
+
'marginMode': False,
|
580
|
+
'limit': None,
|
581
|
+
'trigger': False,
|
582
|
+
'trailing': False,
|
583
|
+
},
|
584
|
+
'fetchOrders': {
|
585
|
+
'marginMode': False,
|
586
|
+
'limit': 1000,
|
587
|
+
'daysBack': 20000, # since epoch
|
588
|
+
'untilDays': 7,
|
589
|
+
'trigger': False,
|
590
|
+
'trailing': False,
|
591
|
+
},
|
592
|
+
'fetchClosedOrders': {
|
593
|
+
'marginMode': False,
|
594
|
+
'limit': 1000,
|
595
|
+
'daysBackClosed': None,
|
596
|
+
'daysBackCanceled': None,
|
597
|
+
'untilDays': 7,
|
598
|
+
'trigger': False,
|
599
|
+
'trailing': False,
|
600
|
+
},
|
601
|
+
'fetchOHLCV': {
|
602
|
+
'limit': 1440,
|
603
|
+
},
|
604
|
+
},
|
605
|
+
'defaultForInverse': {
|
606
|
+
'extends': 'defaultForLinear',
|
607
|
+
'fetchMyTrades': {
|
608
|
+
'limit': 1000,
|
609
|
+
'daysBack': None,
|
610
|
+
'untilDays': None,
|
611
|
+
},
|
612
|
+
'fetchOHLCV': {
|
613
|
+
'limit': 1440,
|
614
|
+
},
|
615
|
+
'fetchOrders': None,
|
616
|
+
'fetchClosedOrders': {
|
617
|
+
'marginMode': False,
|
618
|
+
'limit': 1000,
|
619
|
+
'daysBackClosed': None,
|
620
|
+
'daysBackCanceled': None,
|
621
|
+
'untilDays': 7,
|
622
|
+
'trigger': False,
|
623
|
+
'trailing': False,
|
624
|
+
},
|
625
|
+
},
|
626
|
+
#
|
627
|
+
'spot': {
|
628
|
+
'extends': 'defaultForLinear',
|
629
|
+
'createOrder': {
|
630
|
+
'triggerPriceType': None,
|
631
|
+
'attachedStopLossTakeProfit': None,
|
632
|
+
'trailing': False,
|
633
|
+
},
|
634
|
+
'fetchMyTrades': {
|
635
|
+
'limit': 1000,
|
636
|
+
'daysBack': 1,
|
637
|
+
'untilDays': 1,
|
638
|
+
},
|
639
|
+
'fetchOrders': None,
|
640
|
+
'fetchClosedOrders': {
|
641
|
+
'limit': 100,
|
642
|
+
'untilDays': None,
|
643
|
+
},
|
644
|
+
},
|
645
|
+
'swap': {
|
646
|
+
'linear': {
|
647
|
+
'extends': 'defaultForLinear',
|
648
|
+
},
|
649
|
+
'inverse': {
|
650
|
+
'extends': 'defaultForInverse',
|
651
|
+
},
|
652
|
+
},
|
653
|
+
'future': {
|
654
|
+
'linear': {
|
655
|
+
'extends': 'defaultForLinear',
|
656
|
+
},
|
657
|
+
'inverse': {
|
658
|
+
'extends': 'defaultForInverse',
|
659
|
+
},
|
660
|
+
},
|
661
|
+
},
|
515
662
|
})
|
516
663
|
|
517
664
|
def fetch_time(self, params={}):
|
@@ -3764,7 +3911,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
3764
3911
|
"""
|
3765
3912
|
fetches information on multiple orders made by the user
|
3766
3913
|
|
3767
|
-
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#
|
3914
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#All%20Orders
|
3915
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history(returns less fields than above)
|
3768
3916
|
|
3769
3917
|
:param str symbol: unified market symbol of the market orders were made in
|
3770
3918
|
:param int [since]: the earliest time in ms to fetch orders for
|
@@ -3788,11 +3936,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
3788
3936
|
request['limit'] = limit
|
3789
3937
|
if since is not None:
|
3790
3938
|
request['startTime'] = since
|
3791
|
-
|
3792
|
-
endTime = self.safe_integer(params, 'endTime', until) # exchange-specific in milliseconds
|
3793
|
-
params = self.omit(params, ['endTime', 'until'])
|
3794
|
-
if endTime is not None:
|
3795
|
-
request['endTime'] = endTime
|
3939
|
+
request, params = self.handle_until_option('endTime', request, params)
|
3796
3940
|
response = self.swapV1PrivateGetTradeFullOrder(self.extend(request, params))
|
3797
3941
|
#
|
3798
3942
|
# {
|
@@ -4071,6 +4215,8 @@ class bingx(Exchange, ImplicitAPI):
|
|
4071
4215
|
if standard:
|
4072
4216
|
response = self.contractV1PrivateGetAllOrders(self.extend(request, params))
|
4073
4217
|
elif type == 'spot':
|
4218
|
+
if limit is not None:
|
4219
|
+
request['limit'] = limit
|
4074
4220
|
response = self.spotV1PrivateGetTradeHistoryOrders(self.extend(request, params))
|
4075
4221
|
#
|
4076
4222
|
# {
|
@@ -4861,6 +5007,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4861
5007
|
|
4862
5008
|
https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
|
4863
5009
|
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
|
5010
|
+
https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20details
|
4864
5011
|
https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
|
4865
5012
|
|
4866
5013
|
:param str [symbol]: unified market symbol
|
@@ -4920,7 +5067,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
4920
5067
|
startTimeReq = 'startTime' if market['spot'] else 'startTs'
|
4921
5068
|
request[startTimeReq] = since
|
4922
5069
|
elif market['swap']:
|
4923
|
-
request['startTs'] = now -
|
5070
|
+
request['startTs'] = now - 30 * 24 * 60 * 60 * 1000 # 30 days for swap
|
4924
5071
|
until = self.safe_integer(params, 'until')
|
4925
5072
|
params = self.omit(params, 'until')
|
4926
5073
|
if until is not None:
|
ccxt/bitbank.py
CHANGED
@@ -128,8 +128,11 @@ class bitbank(Exchange, ImplicitAPI):
|
|
128
128
|
'user/assets',
|
129
129
|
'user/spot/order',
|
130
130
|
'user/spot/active_orders',
|
131
|
+
'user/margin/positions',
|
131
132
|
'user/spot/trade_history',
|
132
133
|
'user/deposit_history',
|
134
|
+
'user/unconfirmed_deposits',
|
135
|
+
'user/deposit_originators',
|
133
136
|
'user/withdrawal_account',
|
134
137
|
'user/withdrawal_history',
|
135
138
|
'spot/status',
|
@@ -140,6 +143,8 @@ class bitbank(Exchange, ImplicitAPI):
|
|
140
143
|
'user/spot/cancel_order',
|
141
144
|
'user/spot/cancel_orders',
|
142
145
|
'user/spot/orders_info',
|
146
|
+
'user/confirm_deposits',
|
147
|
+
'user/confirm_deposits_all',
|
143
148
|
'user/request_withdrawal',
|
144
149
|
],
|
145
150
|
},
|
ccxt/bitbns.py
CHANGED
@@ -39,6 +39,8 @@ class bitbns(Exchange, ImplicitAPI):
|
|
39
39
|
'cancelAllOrders': False,
|
40
40
|
'cancelOrder': True,
|
41
41
|
'createOrder': True,
|
42
|
+
'createStopOrder': True,
|
43
|
+
'createTriggerOrder': True,
|
42
44
|
'fetchBalance': True,
|
43
45
|
'fetchDepositAddress': True,
|
44
46
|
'fetchDepositAddresses': False,
|
ccxt/bitfinex2.py
CHANGED