ccxt 4.3.39__py2.py3-none-any.whl → 4.3.41__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 +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/abstract/okx.py +7 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +4 -0
- ccxt/async_support/bitfinex2.py +1 -1
- ccxt/async_support/bithumb.py +9 -1
- ccxt/async_support/bitstamp.py +38 -2
- ccxt/async_support/coinlist.py +19 -1
- ccxt/async_support/coinmate.py +19 -3
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinspot.py +11 -2
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/independentreserve.py +33 -1
- ccxt/async_support/indodax.py +43 -2
- ccxt/async_support/okx.py +7 -0
- ccxt/async_support/upbit.py +13 -8
- ccxt/async_support/woo.py +6 -2
- ccxt/async_support/woofipro.py +8 -2
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +4 -0
- ccxt/bitfinex2.py +1 -1
- ccxt/bithumb.py +9 -1
- ccxt/bitstamp.py +38 -2
- ccxt/coinlist.py +19 -1
- ccxt/coinmate.py +19 -3
- ccxt/coinone.py +1 -1
- ccxt/coinspot.py +11 -2
- ccxt/hitbtc.py +2 -2
- ccxt/independentreserve.py +33 -1
- ccxt/indodax.py +43 -2
- ccxt/okx.py +7 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +5 -5
- ccxt/pro/ascendex.py +3 -3
- ccxt/pro/bingx.py +258 -42
- ccxt/pro/bitget.py +6 -5
- ccxt/pro/bitrue.py +3 -4
- ccxt/pro/currencycom.py +6 -5
- ccxt/pro/exmo.py +5 -6
- ccxt/pro/gemini.py +4 -3
- ccxt/pro/independentreserve.py +7 -7
- ccxt/pro/lbank.py +4 -4
- ccxt/pro/phemex.py +5 -5
- ccxt/pro/probit.py +4 -4
- ccxt/pro/upbit.py +295 -4
- ccxt/pro/wazirx.py +12 -12
- ccxt/upbit.py +13 -8
- ccxt/woo.py +6 -2
- ccxt/woofipro.py +8 -2
- {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/METADATA +4 -4
- {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/RECORD +58 -58
- {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/WHEEL +0 -0
- {ccxt-4.3.39.dist-info → ccxt-4.3.41.dist-info}/top_level.txt +0 -0
ccxt/bitstamp.py
CHANGED
@@ -1376,7 +1376,17 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1376
1376
|
request: dict = {
|
1377
1377
|
'id': id,
|
1378
1378
|
}
|
1379
|
-
|
1379
|
+
response = self.privatePostCancelOrder(self.extend(request, params))
|
1380
|
+
#
|
1381
|
+
# {
|
1382
|
+
# "id": 1453282316578816,
|
1383
|
+
# "amount": "0.02035278",
|
1384
|
+
# "price": "2100.45",
|
1385
|
+
# "type": 0,
|
1386
|
+
# "market": "BTC/USD"
|
1387
|
+
# }
|
1388
|
+
#
|
1389
|
+
return self.parse_order(response)
|
1380
1390
|
|
1381
1391
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1382
1392
|
"""
|
@@ -1397,7 +1407,23 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1397
1407
|
response = self.privatePostCancelAllOrdersPair(self.extend(request, params))
|
1398
1408
|
else:
|
1399
1409
|
response = self.privatePostCancelAllOrders(self.extend(request, params))
|
1400
|
-
|
1410
|
+
#
|
1411
|
+
# {
|
1412
|
+
# "canceled": [
|
1413
|
+
# {
|
1414
|
+
# "id": 1453282316578816,
|
1415
|
+
# "amount": "0.02035278",
|
1416
|
+
# "price": "2100.45",
|
1417
|
+
# "type": 0,
|
1418
|
+
# "currency_pair": "BTC/USD",
|
1419
|
+
# "market": "BTC/USD"
|
1420
|
+
# }
|
1421
|
+
# ],
|
1422
|
+
# "success": True
|
1423
|
+
# }
|
1424
|
+
#
|
1425
|
+
canceled = self.safe_list(response, 'canceled')
|
1426
|
+
return self.parse_orders(canceled)
|
1401
1427
|
|
1402
1428
|
def parse_order_status(self, status: Str):
|
1403
1429
|
statuses: dict = {
|
@@ -1743,6 +1769,16 @@ class bitstamp(Exchange, ImplicitAPI):
|
|
1743
1769
|
# "id": "2814205012"
|
1744
1770
|
# }
|
1745
1771
|
#
|
1772
|
+
# cancelOrder
|
1773
|
+
#
|
1774
|
+
# {
|
1775
|
+
# "id": 1453282316578816,
|
1776
|
+
# "amount": "0.02035278",
|
1777
|
+
# "price": "2100.45",
|
1778
|
+
# "type": 0,
|
1779
|
+
# "market": "BTC/USD"
|
1780
|
+
# }
|
1781
|
+
#
|
1746
1782
|
id = self.safe_string(order, 'id')
|
1747
1783
|
clientOrderId = self.safe_string(order, 'client_order_id')
|
1748
1784
|
side = self.safe_string(order, 'type')
|
ccxt/coinlist.py
CHANGED
@@ -1397,7 +1397,25 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1397
1397
|
self.load_markets()
|
1398
1398
|
params = ids
|
1399
1399
|
response = self.privateDeleteV1OrdersBulk(params)
|
1400
|
-
|
1400
|
+
#
|
1401
|
+
# {
|
1402
|
+
# "message": "Cancel order requests received.",
|
1403
|
+
# "order_ids": [
|
1404
|
+
# "ff132955-43bc-4fe5-9d9c-5ba226cc89a0"
|
1405
|
+
# ],
|
1406
|
+
# "timestamp": "2024-06-01T02:32:30.305Z"
|
1407
|
+
# }
|
1408
|
+
#
|
1409
|
+
orderIds = self.safe_list(response, 'order_ids', [])
|
1410
|
+
orders = []
|
1411
|
+
datetime = self.safe_string(response, 'timestamp')
|
1412
|
+
for i in range(0, len(orderIds)):
|
1413
|
+
orders.append(self.safe_order({
|
1414
|
+
'info': orderIds[i],
|
1415
|
+
'id': orderIds[i],
|
1416
|
+
'lastUpdateTimestamp': self.parse8601(datetime),
|
1417
|
+
}))
|
1418
|
+
return orders
|
1401
1419
|
|
1402
1420
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1403
1421
|
"""
|
ccxt/coinmate.py
CHANGED
@@ -895,6 +895,13 @@ class coinmate(Exchange, ImplicitAPI):
|
|
895
895
|
# "trailing": False,
|
896
896
|
# }
|
897
897
|
#
|
898
|
+
# cancelOrder
|
899
|
+
#
|
900
|
+
# {
|
901
|
+
# "success": True,
|
902
|
+
# "remainingAmount": 0.1
|
903
|
+
# }
|
904
|
+
#
|
898
905
|
id = self.safe_string(order, 'id')
|
899
906
|
timestamp = self.safe_integer(order, 'timestamp')
|
900
907
|
side = self.safe_string_lower(order, 'type')
|
@@ -1003,9 +1010,18 @@ class coinmate(Exchange, ImplicitAPI):
|
|
1003
1010
|
# {"error":false,"errorMessage":null,"data":{"success":true,"remainingAmount":0.01}}
|
1004
1011
|
request: dict = {'orderId': id}
|
1005
1012
|
response = self.privatePostCancelOrderWithInfo(self.extend(request, params))
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1013
|
+
#
|
1014
|
+
# {
|
1015
|
+
# "error": False,
|
1016
|
+
# "errorMessage": null,
|
1017
|
+
# "data": {
|
1018
|
+
# "success": True,
|
1019
|
+
# "remainingAmount": 0.1
|
1020
|
+
# }
|
1021
|
+
# }
|
1022
|
+
#
|
1023
|
+
data = self.safe_dict(response, 'data')
|
1024
|
+
return self.parse_order(data)
|
1009
1025
|
|
1010
1026
|
def nonce(self):
|
1011
1027
|
return self.milliseconds()
|
ccxt/coinone.py
CHANGED
ccxt/coinspot.py
CHANGED
@@ -505,11 +505,20 @@ class coinspot(Exchange, ImplicitAPI):
|
|
505
505
|
if side != 'buy' and side != 'sell':
|
506
506
|
raise ArgumentsRequired(self.id + ' cancelOrder() requires a side parameter, "buy" or "sell"')
|
507
507
|
params = self.omit(params, 'side')
|
508
|
-
method = 'privatePostMy' + self.capitalize(side) + 'Cancel'
|
509
508
|
request: dict = {
|
510
509
|
'id': id,
|
511
510
|
}
|
512
|
-
|
511
|
+
response = None
|
512
|
+
if side == 'buy':
|
513
|
+
response = self.privatePostMyBuyCancel(self.extend(request, params))
|
514
|
+
else:
|
515
|
+
response = self.privatePostMySellCancel(self.extend(request, params))
|
516
|
+
#
|
517
|
+
# status - ok, error
|
518
|
+
#
|
519
|
+
return self.safe_order({
|
520
|
+
'info': response,
|
521
|
+
})
|
513
522
|
|
514
523
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
515
524
|
url = self.urls['api'][api] + '/' + path
|
ccxt/hitbtc.py
CHANGED
@@ -860,8 +860,8 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
860
860
|
network = self.safe_network(networkId)
|
861
861
|
fee = self.safe_number(rawNetwork, 'payout_fee')
|
862
862
|
networkPrecision = self.safe_number(rawNetwork, 'precision_payout')
|
863
|
-
payinEnabledNetwork = self.safe_bool(
|
864
|
-
payoutEnabledNetwork = self.safe_bool(
|
863
|
+
payinEnabledNetwork = self.safe_bool(rawNetwork, 'payin_enabled', False)
|
864
|
+
payoutEnabledNetwork = self.safe_bool(rawNetwork, 'payout_enabled', False)
|
865
865
|
activeNetwork = payinEnabledNetwork and payoutEnabledNetwork
|
866
866
|
if payinEnabledNetwork and not depositEnabled:
|
867
867
|
depositEnabled = True
|
ccxt/independentreserve.py
CHANGED
@@ -375,6 +375,21 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
375
375
|
# "FeePercent": 0.005,
|
376
376
|
# }
|
377
377
|
#
|
378
|
+
# cancelOrder
|
379
|
+
#
|
380
|
+
# {
|
381
|
+
# "AvgPrice": 455.48,
|
382
|
+
# "CreatedTimestampUtc": "2022-08-05T06:42:11.3032208Z",
|
383
|
+
# "OrderGuid": "719c495c-a39e-4884-93ac-280b37245037",
|
384
|
+
# "Price": 485.76,
|
385
|
+
# "PrimaryCurrencyCode": "Xbt",
|
386
|
+
# "ReservedAmount": 0.358,
|
387
|
+
# "SecondaryCurrencyCode": "Usd",
|
388
|
+
# "Status": "Cancelled",
|
389
|
+
# "Type": "LimitOffer",
|
390
|
+
# "VolumeFilled": 0,
|
391
|
+
# "VolumeOrdered": 0.358
|
392
|
+
# }
|
378
393
|
symbol = None
|
379
394
|
baseId = self.safe_string(order, 'PrimaryCurrencyCode')
|
380
395
|
quoteId = self.safe_string(order, 'SecondaryCurrencyCode')
|
@@ -666,6 +681,7 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
666
681
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
667
682
|
"""
|
668
683
|
cancels an open order
|
684
|
+
:see: https://www.independentreserve.com/features/api#CancelOrder
|
669
685
|
:param str id: order id
|
670
686
|
:param str symbol: unified symbol of the market the order was made in
|
671
687
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -675,7 +691,23 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
675
691
|
request: dict = {
|
676
692
|
'orderGuid': id,
|
677
693
|
}
|
678
|
-
|
694
|
+
response = self.privatePostCancelOrder(self.extend(request, params))
|
695
|
+
#
|
696
|
+
# {
|
697
|
+
# "AvgPrice": 455.48,
|
698
|
+
# "CreatedTimestampUtc": "2022-08-05T06:42:11.3032208Z",
|
699
|
+
# "OrderGuid": "719c495c-a39e-4884-93ac-280b37245037",
|
700
|
+
# "Price": 485.76,
|
701
|
+
# "PrimaryCurrencyCode": "Xbt",
|
702
|
+
# "ReservedAmount": 0.358,
|
703
|
+
# "SecondaryCurrencyCode": "Usd",
|
704
|
+
# "Status": "Cancelled",
|
705
|
+
# "Type": "LimitOffer",
|
706
|
+
# "VolumeFilled": 0,
|
707
|
+
# "VolumeOrdered": 0.358
|
708
|
+
# }
|
709
|
+
#
|
710
|
+
return self.parse_order(response)
|
679
711
|
|
680
712
|
def fetch_deposit_address(self, code: str, params={}):
|
681
713
|
"""
|
ccxt/indodax.py
CHANGED
@@ -641,6 +641,24 @@ class indodax(Exchange, ImplicitAPI):
|
|
641
641
|
# "order_xrp": "30.45000000",
|
642
642
|
# "remain_xrp": "0.00000000"
|
643
643
|
# }
|
644
|
+
#
|
645
|
+
# cancelOrder
|
646
|
+
#
|
647
|
+
# {
|
648
|
+
# "order_id": 666883,
|
649
|
+
# "client_order_id": "clientx-sj82ks82j",
|
650
|
+
# "type": "sell",
|
651
|
+
# "pair": "btc_idr",
|
652
|
+
# "balance": {
|
653
|
+
# "idr": "33605800",
|
654
|
+
# "btc": "0.00000000",
|
655
|
+
# ...
|
656
|
+
# "frozen_idr": "0",
|
657
|
+
# "frozen_btc": "0.00000000",
|
658
|
+
# ...
|
659
|
+
# }
|
660
|
+
# }
|
661
|
+
#
|
644
662
|
side = None
|
645
663
|
if 'type' in order:
|
646
664
|
side = order['type']
|
@@ -650,6 +668,8 @@ class indodax(Exchange, ImplicitAPI):
|
|
650
668
|
price = self.safe_string(order, 'price')
|
651
669
|
amount = None
|
652
670
|
remaining = None
|
671
|
+
marketId = self.safe_string(order, 'pair')
|
672
|
+
market = self.safe_market(marketId, market)
|
653
673
|
if market is not None:
|
654
674
|
symbol = market['symbol']
|
655
675
|
quoteId = market['quoteId']
|
@@ -668,7 +688,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
668
688
|
return self.safe_order({
|
669
689
|
'info': order,
|
670
690
|
'id': id,
|
671
|
-
'clientOrderId':
|
691
|
+
'clientOrderId': self.safe_string(order, 'client_order_id'),
|
672
692
|
'timestamp': timestamp,
|
673
693
|
'datetime': self.iso8601(timestamp),
|
674
694
|
'lastTradeTimestamp': None,
|
@@ -825,7 +845,28 @@ class indodax(Exchange, ImplicitAPI):
|
|
825
845
|
'pair': market['id'],
|
826
846
|
'type': side,
|
827
847
|
}
|
828
|
-
|
848
|
+
response = self.privatePostCancelOrder(self.extend(request, params))
|
849
|
+
#
|
850
|
+
# {
|
851
|
+
# "success": 1,
|
852
|
+
# "return": {
|
853
|
+
# "order_id": 666883,
|
854
|
+
# "client_order_id": "clientx-sj82ks82j",
|
855
|
+
# "type": "sell",
|
856
|
+
# "pair": "btc_idr",
|
857
|
+
# "balance": {
|
858
|
+
# "idr": "33605800",
|
859
|
+
# "btc": "0.00000000",
|
860
|
+
# ...
|
861
|
+
# "frozen_idr": "0",
|
862
|
+
# "frozen_btc": "0.00000000",
|
863
|
+
# ...
|
864
|
+
# }
|
865
|
+
# }
|
866
|
+
# }
|
867
|
+
#
|
868
|
+
data = self.safe_dict(response, 'return')
|
869
|
+
return self.parse_order(data)
|
829
870
|
|
830
871
|
def fetch_transaction_fee(self, code: str, params={}):
|
831
872
|
"""
|
ccxt/okx.py
CHANGED
@@ -369,6 +369,9 @@ class okx(Exchange, ImplicitAPI):
|
|
369
369
|
'account/greeks': 2,
|
370
370
|
'account/position-tiers': 2,
|
371
371
|
'account/mmp-config': 4,
|
372
|
+
'account/fixed-loan/borrowing-limit': 4,
|
373
|
+
'account/fixed-loan/borrowing-quote': 5,
|
374
|
+
'account/fixed-loan/borrowing-orders-list': 5,
|
372
375
|
# subaccount
|
373
376
|
'users/subaccount/list': 10,
|
374
377
|
'account/subaccount/balances': 10 / 3,
|
@@ -494,6 +497,10 @@ class okx(Exchange, ImplicitAPI):
|
|
494
497
|
'account/set-account-level': 4,
|
495
498
|
'account/mmp-reset': 4,
|
496
499
|
'account/mmp-config': 100,
|
500
|
+
'account/fixed-loan/borrowing-order': 5,
|
501
|
+
'account/fixed-loan/amend-borrowing-order': 5,
|
502
|
+
'account/fixed-loan/manual-reborrow': 5,
|
503
|
+
'account/fixed-loan/repay-borrowing-order': 5,
|
497
504
|
# subaccount
|
498
505
|
'users/subaccount/modify-apikey': 10,
|
499
506
|
'asset/subaccount/transfer': 10,
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/alpaca.py
CHANGED
@@ -226,15 +226,15 @@ class alpaca(ccxt.async_support.alpaca):
|
|
226
226
|
datetime = self.safe_string(message, 't')
|
227
227
|
timestamp = self.parse8601(datetime)
|
228
228
|
isSnapshot = self.safe_bool(message, 'r', False)
|
229
|
-
|
230
|
-
|
231
|
-
|
229
|
+
if not (symbol in self.orderbooks):
|
230
|
+
self.orderbooks[symbol] = self.order_book()
|
231
|
+
orderbook = self.orderbooks[symbol]
|
232
232
|
if isSnapshot:
|
233
233
|
snapshot = self.parse_order_book(message, symbol, timestamp, 'b', 'a', 'p', 's')
|
234
234
|
orderbook.reset(snapshot)
|
235
235
|
else:
|
236
|
-
asks = self.
|
237
|
-
bids = self.
|
236
|
+
asks = self.safe_list(message, 'a', [])
|
237
|
+
bids = self.safe_list(message, 'b', [])
|
238
238
|
self.handle_deltas(orderbook['asks'], asks)
|
239
239
|
self.handle_deltas(orderbook['bids'], bids)
|
240
240
|
orderbook['timestamp'] = timestamp
|
ccxt/pro/ascendex.py
CHANGED
@@ -285,9 +285,9 @@ class ascendex(ccxt.async_support.ascendex):
|
|
285
285
|
marketId = self.safe_string(message, 'symbol')
|
286
286
|
symbol = self.safe_symbol(marketId)
|
287
287
|
messageHash = channel + ':' + marketId
|
288
|
-
|
289
|
-
|
290
|
-
|
288
|
+
if not (symbol in self.orderbooks):
|
289
|
+
self.orderbooks[symbol] = self.order_book({})
|
290
|
+
orderbook = self.orderbooks[symbol]
|
291
291
|
if orderbook['nonce'] is None:
|
292
292
|
orderbook.cache.append(message)
|
293
293
|
else:
|