ccxt 4.4.70__py2.py3-none-any.whl → 4.4.72__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 -3
- ccxt/abstract/bingx.py +1 -0
- ccxt/abstract/bitmart.py +1 -0
- ccxt/abstract/poloniex.py +36 -0
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -3
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/binance.py +107 -102
- ccxt/async_support/bingx.py +65 -43
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex1.py +1 -1
- ccxt/async_support/bitget.py +0 -3
- ccxt/async_support/bitmart.py +12 -1
- ccxt/async_support/bitopro.py +1 -0
- ccxt/async_support/bitrue.py +1 -0
- ccxt/async_support/bl3p.py +2 -2
- ccxt/async_support/cex.py +2 -0
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinbaseexchange.py +4 -2
- ccxt/async_support/coinbaseinternational.py +3 -2
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/deribit.py +3 -1
- ccxt/async_support/derive.py +11 -7
- ccxt/async_support/gate.py +3 -0
- ccxt/async_support/gemini.py +2 -1
- ccxt/async_support/hashkey.py +4 -2
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hyperliquid.py +38 -0
- ccxt/async_support/kraken.py +78 -6
- ccxt/async_support/krakenfutures.py +4 -0
- ccxt/async_support/kucoin.py +5 -3
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/mexc.py +9 -5
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +79 -76
- ccxt/async_support/paradex.py +65 -7
- ccxt/async_support/paymium.py +1 -1
- ccxt/async_support/poloniex.py +1265 -86
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/whitebit.py +102 -4
- ccxt/async_support/woo.py +3 -1
- ccxt/async_support/woofipro.py +1 -1
- ccxt/async_support/yobit.py +2 -1
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +31 -4
- ccxt/base/types.py +28 -0
- ccxt/binance.py +107 -102
- ccxt/bingx.py +65 -43
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex1.py +1 -1
- ccxt/bitget.py +0 -3
- ccxt/bitmart.py +12 -1
- ccxt/bitopro.py +1 -0
- ccxt/bitrue.py +1 -0
- ccxt/bl3p.py +2 -2
- ccxt/cex.py +2 -0
- ccxt/coinbase.py +3 -2
- ccxt/coinbaseexchange.py +4 -2
- ccxt/coinbaseinternational.py +3 -2
- ccxt/coinex.py +1 -1
- ccxt/deribit.py +3 -1
- ccxt/derive.py +11 -7
- ccxt/gate.py +3 -0
- ccxt/gemini.py +2 -1
- ccxt/hashkey.py +4 -2
- ccxt/hitbtc.py +1 -1
- ccxt/hyperliquid.py +38 -0
- ccxt/kraken.py +78 -6
- ccxt/krakenfutures.py +4 -0
- ccxt/kucoin.py +5 -3
- ccxt/kuna.py +1 -1
- ccxt/mexc.py +9 -5
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +79 -76
- ccxt/paradex.py +65 -7
- ccxt/paymium.py +1 -1
- ccxt/poloniex.py +1264 -86
- ccxt/pro/__init__.py +1 -3
- ccxt/pro/binance.py +102 -102
- ccxt/pro/bingx.py +63 -52
- ccxt/pro/bitmart.py +15 -7
- ccxt/pro/derive.py +2 -2
- ccxt/pro/krakenfutures.py +1 -1
- ccxt/test/tests_async.py +1 -0
- ccxt/test/tests_sync.py +1 -0
- ccxt/upbit.py +1 -1
- ccxt/whitebit.py +102 -4
- ccxt/woo.py +3 -1
- ccxt/woofipro.py +1 -1
- ccxt/yobit.py +2 -1
- {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/METADATA +6 -9
- {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/RECORD +98 -99
- ccxt/abstract/poloniexfutures.py +0 -48
- {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/WHEEL +0 -0
- {ccxt-4.4.70.dist-info → ccxt-4.4.72.dist-info}/top_level.txt +0 -0
ccxt/bingx.py
CHANGED
@@ -57,6 +57,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
57
57
|
'createOrder': True,
|
58
58
|
'createOrders': True,
|
59
59
|
'createOrderWithTakeProfitAndStopLoss': True,
|
60
|
+
'createReduceOnlyOrder': True,
|
60
61
|
'createStopLossOrder': True,
|
61
62
|
'createStopOrder': True,
|
62
63
|
'createTakeProfitOrder': True,
|
@@ -400,6 +401,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
400
401
|
'uid': 1,
|
401
402
|
'apiKey/query': 2,
|
402
403
|
'account/apiPermissions': 5,
|
404
|
+
'allAccountBalance': 2,
|
403
405
|
},
|
404
406
|
'post': {
|
405
407
|
'innerTransfer/authorizeSubAccount': 1,
|
@@ -829,7 +831,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
829
831
|
# {
|
830
832
|
# "symbol": "GEAR-USDT",
|
831
833
|
# "minQty": 735, # deprecated
|
832
|
-
# "maxQty": 2941177, # deprecated
|
834
|
+
# "maxQty": 2941177, # deprecated.
|
833
835
|
# "minNotional": 5,
|
834
836
|
# "maxNotional": 20000,
|
835
837
|
# "status": 1,
|
@@ -1428,62 +1430,82 @@ class bingx(Exchange, ImplicitAPI):
|
|
1428
1430
|
# spot
|
1429
1431
|
#
|
1430
1432
|
# {
|
1431
|
-
# "code":
|
1432
|
-
# "
|
1433
|
-
#
|
1434
|
-
# [
|
1435
|
-
#
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
# [
|
1439
|
-
# "26324.71",
|
1440
|
-
# "0.31888"
|
1441
|
-
# ],
|
1442
|
-
# ],
|
1443
|
-
# "asks": [
|
1444
|
-
# [
|
1445
|
-
# "26340.30",
|
1446
|
-
# "6.45221"
|
1433
|
+
# "code":0,
|
1434
|
+
# "timestamp":1743240504535,
|
1435
|
+
# "data":{
|
1436
|
+
# "bids":[
|
1437
|
+
# ["83775.39","1.981875"],
|
1438
|
+
# ["83775.38","0.001076"],
|
1439
|
+
# ["83775.34","0.254716"],
|
1447
1440
|
# ],
|
1448
|
-
# [
|
1449
|
-
#
|
1450
|
-
#
|
1441
|
+
# "asks":[
|
1442
|
+
# ["83985.40","0.000013"],
|
1443
|
+
# ["83980.00","0.000011"],
|
1444
|
+
# ["83975.70","0.000061000000000000005"],
|
1451
1445
|
# ],
|
1452
|
-
#
|
1446
|
+
# "ts":1743240504535,
|
1447
|
+
# "lastUpdateId":13565639906
|
1448
|
+
# }
|
1453
1449
|
# }
|
1454
1450
|
#
|
1455
|
-
#
|
1451
|
+
#
|
1452
|
+
# linear swap
|
1456
1453
|
#
|
1457
1454
|
# {
|
1458
|
-
# "code":
|
1459
|
-
# "msg":
|
1460
|
-
# "data":
|
1461
|
-
#
|
1462
|
-
#
|
1463
|
-
#
|
1464
|
-
#
|
1465
|
-
#
|
1455
|
+
# "code":0,
|
1456
|
+
# "msg":"",
|
1457
|
+
# "data":{
|
1458
|
+
# "T":1743240836255,
|
1459
|
+
# "bids":[
|
1460
|
+
# ["83760.7","7.0861"],
|
1461
|
+
# ["83760.6","0.0044"],
|
1462
|
+
# ["83757.7","1.9526"],
|
1466
1463
|
# ],
|
1467
|
-
# [
|
1468
|
-
#
|
1469
|
-
#
|
1464
|
+
# "asks":[
|
1465
|
+
# ["83784.3","8.3531"],
|
1466
|
+
# ["83782.8","23.7289"],
|
1467
|
+
# ["83780.1","18.0617"],
|
1470
1468
|
# ],
|
1471
|
-
#
|
1472
|
-
#
|
1473
|
-
#
|
1474
|
-
#
|
1475
|
-
# "43616.00000000"
|
1469
|
+
# "bidsCoin":[
|
1470
|
+
# ["83760.7","0.0007"],
|
1471
|
+
# ["83760.6","0.0000"],
|
1472
|
+
# ["83757.7","0.0002"],
|
1476
1473
|
# ],
|
1477
|
-
# [
|
1478
|
-
#
|
1479
|
-
#
|
1474
|
+
# "asksCoin":[
|
1475
|
+
# ["83784.3","0.0008"],
|
1476
|
+
# ["83782.8","0.0024"],
|
1477
|
+
# ["83780.1","0.0018"],
|
1478
|
+
# ]
|
1479
|
+
# }
|
1480
|
+
# }
|
1481
|
+
#
|
1482
|
+
# inverse swap
|
1483
|
+
#
|
1484
|
+
# {
|
1485
|
+
# "code":0,
|
1486
|
+
# "msg":"",
|
1487
|
+
# "timestamp":1743240979146,
|
1488
|
+
# "data":{
|
1489
|
+
# "T":1743240978691,
|
1490
|
+
# "bids":[
|
1491
|
+
# ["83611.4","241.0"],
|
1492
|
+
# ["83611.3","1.0"],
|
1493
|
+
# ["83602.9","666.0"],
|
1480
1494
|
# ],
|
1481
|
-
#
|
1495
|
+
# "asks":[
|
1496
|
+
# ["83645.0","4253.0"],
|
1497
|
+
# ["83640.5","3188.0"],
|
1498
|
+
# ["83636.0","5540.0"],
|
1499
|
+
# ]
|
1500
|
+
# }
|
1482
1501
|
# }
|
1483
1502
|
#
|
1484
1503
|
orderbook = self.safe_dict(response, 'data', {})
|
1504
|
+
nonce = self.safe_integer(orderbook, 'lastUpdateId')
|
1485
1505
|
timestamp = self.safe_integer_2(orderbook, 'T', 'ts')
|
1486
|
-
|
1506
|
+
result = self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks', 0, 1)
|
1507
|
+
result['nonce'] = nonce
|
1508
|
+
return result
|
1487
1509
|
|
1488
1510
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
1489
1511
|
"""
|
ccxt/bitfinex.py
CHANGED
@@ -2202,7 +2202,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
2202
2202
|
tradesList.append({'result': response[i]}) # convert to array of dicts to match parseOrder signature
|
2203
2203
|
return self.parse_trades(tradesList, market, since, limit)
|
2204
2204
|
|
2205
|
-
def create_deposit_address(self, code: str, params={}):
|
2205
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2206
2206
|
"""
|
2207
2207
|
create a currency deposit address
|
2208
2208
|
|
ccxt/bitfinex1.py
CHANGED
@@ -1394,7 +1394,7 @@ class bitfinex1(Exchange, ImplicitAPI):
|
|
1394
1394
|
return self.options['currencyNames'][code]
|
1395
1395
|
raise NotSupported(self.id + ' ' + code + ' not supported for withdrawal')
|
1396
1396
|
|
1397
|
-
def create_deposit_address(self, code: str, params={}):
|
1397
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1398
1398
|
"""
|
1399
1399
|
create a currency deposit address
|
1400
1400
|
|
ccxt/bitget.py
CHANGED
@@ -1757,10 +1757,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1757
1757
|
"""
|
1758
1758
|
if self.options['adjustForTimeDifference']:
|
1759
1759
|
self.load_time_difference()
|
1760
|
-
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
1761
1760
|
types = self.safe_value(self.options, 'fetchMarkets', ['spot', 'swap'])
|
1762
|
-
if sandboxMode:
|
1763
|
-
types = ['swap']
|
1764
1761
|
promises = []
|
1765
1762
|
fetchMargins = False
|
1766
1763
|
for i in range(0, len(types)):
|
ccxt/bitmart.py
CHANGED
@@ -61,6 +61,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
61
61
|
'createOrder': True,
|
62
62
|
'createOrders': True,
|
63
63
|
'createPostOnlyOrder': True,
|
64
|
+
'createReduceOnlyOrder': True,
|
64
65
|
'createStopLimitOrder': False,
|
65
66
|
'createStopMarketOrder': False,
|
66
67
|
'createStopOrder': False,
|
@@ -278,6 +279,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
278
279
|
'contract/private/submit-tp-sl-order': 2.5,
|
279
280
|
'contract/private/modify-plan-order': 2.5,
|
280
281
|
'contract/private/modify-preset-plan-order': 2.5,
|
282
|
+
'contract/private/modify-limit-order': 2.5,
|
281
283
|
'contract/private/modify-tp-sl-order': 2.5,
|
282
284
|
'contract/private/submit-trail-order': 2.5, # weight is not provided by the exchange, is set order
|
283
285
|
'contract/private/cancel-trail-order': 1.5, # weight is not provided by the exchange, is set order
|
@@ -4875,6 +4877,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4875
4877
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-plan-order-signed
|
4876
4878
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-tp-sl-order-signed
|
4877
4879
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-preset-plan-order-signed
|
4880
|
+
https://developer-pro.bitmart.com/en/futuresv2/#modify-limit-order-signed
|
4878
4881
|
|
4879
4882
|
:param str id: order id
|
4880
4883
|
:param str symbol: unified symbol of the market to edit an order in
|
@@ -4909,6 +4912,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4909
4912
|
isTakeProfit = takeProfitPrice is not None
|
4910
4913
|
isPresetStopLoss = presetStopLoss is not None
|
4911
4914
|
isPresetTakeProfit = presetTakeProfit is not None
|
4915
|
+
isLimitOrder = (type == 'limit')
|
4912
4916
|
request: dict = {
|
4913
4917
|
'symbol': market['id'],
|
4914
4918
|
}
|
@@ -4973,8 +4977,15 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4973
4977
|
# "trace": "a5c3234534534a836bc476a203.123452.172716624359200197"
|
4974
4978
|
# }
|
4975
4979
|
#
|
4980
|
+
elif isLimitOrder:
|
4981
|
+
request['order_id'] = self.parse_to_int(id) # reparse id self endpoint is the only one requiring it
|
4982
|
+
if amount is not None:
|
4983
|
+
request['size'] = self.amount_to_precision(symbol, amount)
|
4984
|
+
if price is not None:
|
4985
|
+
request['price'] = self.price_to_precision(symbol, price)
|
4986
|
+
response = self.privatePostContractPrivateModifyLimitOrder(self.extend(request, params))
|
4976
4987
|
else:
|
4977
|
-
raise NotSupported(self.id + ' editOrder() only supports trigger, stop loss and take profit orders')
|
4988
|
+
raise NotSupported(self.id + ' editOrder() only supports limit, trigger, stop loss and take profit orders')
|
4978
4989
|
data = self.safe_dict(response, 'data', {})
|
4979
4990
|
return self.parse_order(data, market)
|
4980
4991
|
|
ccxt/bitopro.py
CHANGED
ccxt/bitrue.py
CHANGED
@@ -56,6 +56,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
56
56
|
'createMarketOrderWithCost': False,
|
57
57
|
'createMarketSellOrderWithCost': False,
|
58
58
|
'createOrder': True,
|
59
|
+
'createReduceOnlyOrder': True,
|
59
60
|
'createStopLimitOrder': True,
|
60
61
|
'createStopMarketOrder': True,
|
61
62
|
'createStopOrder': True,
|
ccxt/bl3p.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bl3p import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Currency, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
9
|
+
from ccxt.base.types import Any, Balances, Currency, DepositAddress, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
12
12
|
from ccxt.base.precise import Precise
|
@@ -477,7 +477,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
477
477
|
'info': response,
|
478
478
|
})
|
479
479
|
|
480
|
-
def create_deposit_address(self, code: str, params={}):
|
480
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
481
481
|
"""
|
482
482
|
create a currency deposit address
|
483
483
|
|
ccxt/cex.py
CHANGED
@@ -38,6 +38,7 @@ class cex(Exchange, ImplicitAPI):
|
|
38
38
|
'cancelAllOrders': True,
|
39
39
|
'cancelOrder': True,
|
40
40
|
'createOrder': True,
|
41
|
+
'createReduceOnlyOrder': False,
|
41
42
|
'createStopOrder': True,
|
42
43
|
'createTriggerOrder': True,
|
43
44
|
'fetchAccounts': True,
|
@@ -327,6 +328,7 @@ class cex(Exchange, ImplicitAPI):
|
|
327
328
|
'margin': None,
|
328
329
|
'deposit': deposit,
|
329
330
|
'withdraw': withdraw,
|
331
|
+
'active': None,
|
330
332
|
'fee': self.safe_number(rawNetwork, 'withdrawalFee'),
|
331
333
|
'precision': currencyPrecision,
|
332
334
|
'limits': {
|
ccxt/coinbase.py
CHANGED
@@ -734,7 +734,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
734
734
|
'info': account,
|
735
735
|
}
|
736
736
|
|
737
|
-
def create_deposit_address(self, code: str, params={}):
|
737
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
738
738
|
"""
|
739
739
|
create a currency deposit address
|
740
740
|
|
@@ -802,6 +802,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
802
802
|
'currency': code,
|
803
803
|
'tag': tag,
|
804
804
|
'address': address,
|
805
|
+
'network': None,
|
805
806
|
'info': response,
|
806
807
|
}
|
807
808
|
|
@@ -2300,7 +2301,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2300
2301
|
# "ending_before":null,
|
2301
2302
|
# "starting_after":null,
|
2302
2303
|
# "previous_ending_before":null,
|
2303
|
-
# "next_starting_after":"6b17acd6-2e68-5eb0-9f45-
|
2304
|
+
# "next_starting_after":"6b17acd6-2e68-5eb0-9f45-72d67cef578a",
|
2304
2305
|
# "limit":100,
|
2305
2306
|
# "order":"desc",
|
2306
2307
|
# "previous_uri":null,
|
ccxt/coinbaseexchange.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbaseexchange import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -43,6 +43,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
43
43
|
'cancelOrder': True,
|
44
44
|
'createDepositAddress': True,
|
45
45
|
'createOrder': True,
|
46
|
+
'createReduceOnlyOrder': False,
|
46
47
|
'createStopLimitOrder': True,
|
47
48
|
'createStopMarketOrder': True,
|
48
49
|
'createStopOrder': True,
|
@@ -1782,7 +1783,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1782
1783
|
'fee': fee,
|
1783
1784
|
}
|
1784
1785
|
|
1785
|
-
def create_deposit_address(self, code: str, params={}):
|
1786
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1786
1787
|
"""
|
1787
1788
|
create a currency deposit address
|
1788
1789
|
|
@@ -1813,6 +1814,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1813
1814
|
return {
|
1814
1815
|
'currency': code,
|
1815
1816
|
'address': self.check_address(address),
|
1817
|
+
'network': None,
|
1816
1818
|
'tag': tag,
|
1817
1819
|
'info': response,
|
1818
1820
|
}
|
ccxt/coinbaseinternational.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbaseinternational import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Currencies, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -736,7 +736,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
736
736
|
}
|
737
737
|
return self.safe_string(statuses, status, status)
|
738
738
|
|
739
|
-
def create_deposit_address(self, code: str, params={}):
|
739
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
740
740
|
"""
|
741
741
|
create a currency deposit address
|
742
742
|
|
@@ -783,6 +783,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
783
783
|
'currency': code,
|
784
784
|
'tag': tag,
|
785
785
|
'address': address,
|
786
|
+
'network': None,
|
786
787
|
'info': response,
|
787
788
|
}
|
788
789
|
|
ccxt/coinex.py
CHANGED
@@ -3678,7 +3678,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3678
3678
|
"""
|
3679
3679
|
return self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
3680
3680
|
|
3681
|
-
def create_deposit_address(self, code: str, params={}):
|
3681
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3682
3682
|
"""
|
3683
3683
|
create a currency deposit address
|
3684
3684
|
|
ccxt/deribit.py
CHANGED
@@ -50,6 +50,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
50
50
|
'cancelOrders': False,
|
51
51
|
'createDepositAddress': True,
|
52
52
|
'createOrder': True,
|
53
|
+
'createReduceOnlyOrder': True,
|
53
54
|
'createStopLimitOrder': True,
|
54
55
|
'createStopMarketOrder': True,
|
55
56
|
'createStopOrder': True,
|
@@ -1099,7 +1100,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1099
1100
|
result = self.safe_dict(response, 'result', {})
|
1100
1101
|
return self.parse_balance(result)
|
1101
1102
|
|
1102
|
-
def create_deposit_address(self, code: str, params={}):
|
1103
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1103
1104
|
"""
|
1104
1105
|
create a currency deposit address
|
1105
1106
|
|
@@ -1134,6 +1135,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1134
1135
|
'currency': code,
|
1135
1136
|
'address': address,
|
1136
1137
|
'tag': None,
|
1138
|
+
'network': None,
|
1137
1139
|
'info': response,
|
1138
1140
|
}
|
1139
1141
|
|
ccxt/derive.py
CHANGED
@@ -600,6 +600,7 @@ class derive(Exchange, ImplicitAPI):
|
|
600
600
|
swap = False
|
601
601
|
option = False
|
602
602
|
linear: Bool = None
|
603
|
+
inverse: Bool = None
|
603
604
|
baseId = self.safe_string(market, 'base_currency')
|
604
605
|
quoteId = self.safe_string(market, 'quote_currency')
|
605
606
|
base = self.safe_currency_code(baseId)
|
@@ -622,6 +623,7 @@ class derive(Exchange, ImplicitAPI):
|
|
622
623
|
symbol = base + '/' + quote + ':' + settle
|
623
624
|
swap = True
|
624
625
|
linear = True
|
626
|
+
inverse = False
|
625
627
|
marketType = 'swap'
|
626
628
|
elif type == 'option':
|
627
629
|
settleId = 'USDC'
|
@@ -656,7 +658,7 @@ class derive(Exchange, ImplicitAPI):
|
|
656
658
|
'active': self.safe_bool(market, 'is_active'),
|
657
659
|
'contract': (swap or option),
|
658
660
|
'linear': linear,
|
659
|
-
'inverse':
|
661
|
+
'inverse': inverse,
|
660
662
|
'contractSize': None if (spot) else 1,
|
661
663
|
'expiry': expiry,
|
662
664
|
'expiryDatetime': self.iso8601(expiry),
|
@@ -1811,7 +1813,7 @@ class derive(Exchange, ImplicitAPI):
|
|
1811
1813
|
order = self.safe_dict(rawOrder, 'data')
|
1812
1814
|
if order is None:
|
1813
1815
|
order = rawOrder
|
1814
|
-
timestamp = self.
|
1816
|
+
timestamp = self.safe_integer_2(rawOrder, 'creation_timestamp', 'nonce')
|
1815
1817
|
orderId = self.safe_string(order, 'order_id')
|
1816
1818
|
marketId = self.safe_string(order, 'instrument_name')
|
1817
1819
|
if marketId is not None:
|
@@ -2328,17 +2330,19 @@ class derive(Exchange, ImplicitAPI):
|
|
2328
2330
|
result: dict = {
|
2329
2331
|
'info': response,
|
2330
2332
|
}
|
2331
|
-
# TODO:
|
2332
|
-
# checked multiple subaccounts
|
2333
|
-
# checked balance after open orders / positions
|
2334
2333
|
for i in range(0, len(response)):
|
2335
2334
|
subaccount = response[i]
|
2336
2335
|
collaterals = self.safe_list(subaccount, 'collaterals', [])
|
2337
2336
|
for j in range(0, len(collaterals)):
|
2338
2337
|
balance = collaterals[j]
|
2339
2338
|
code = self.safe_currency_code(self.safe_string(balance, 'currency'))
|
2340
|
-
account = self.
|
2341
|
-
account
|
2339
|
+
account = self.safe_dict(result, code)
|
2340
|
+
if account is None:
|
2341
|
+
account = self.account()
|
2342
|
+
account['total'] = self.safe_string(balance, 'amount')
|
2343
|
+
else:
|
2344
|
+
amount = self.safe_string(balance, 'amount')
|
2345
|
+
account['total'] = Precise.string_add(account['total'], amount)
|
2342
2346
|
result[code] = account
|
2343
2347
|
return self.safe_balance(result)
|
2344
2348
|
|
ccxt/gate.py
CHANGED
@@ -6363,6 +6363,9 @@ class gate(Exchange, ImplicitAPI):
|
|
6363
6363
|
if (method == 'GET') or (method == 'DELETE') or requiresURLEncoding or (method == 'PATCH'):
|
6364
6364
|
if query:
|
6365
6365
|
queryString = self.urlencode(query)
|
6366
|
+
# https://github.com/ccxt/ccxt/issues/25570
|
6367
|
+
if queryString.find('currencies=') >= 0 and queryString.find('%2C') >= 0:
|
6368
|
+
queryString = queryString.replace('%2', ',')
|
6366
6369
|
url += '?' + queryString
|
6367
6370
|
if method == 'PATCH':
|
6368
6371
|
body = self.json(query)
|
ccxt/gemini.py
CHANGED
@@ -1873,7 +1873,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1873
1873
|
raise ExchangeError(feedback) # unknown message
|
1874
1874
|
return None
|
1875
1875
|
|
1876
|
-
def create_deposit_address(self, code: str, params={}):
|
1876
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1877
1877
|
"""
|
1878
1878
|
create a currency deposit address
|
1879
1879
|
|
@@ -1895,6 +1895,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1895
1895
|
'currency': code,
|
1896
1896
|
'address': address,
|
1897
1897
|
'tag': None,
|
1898
|
+
'network': None,
|
1898
1899
|
'info': response,
|
1899
1900
|
}
|
1900
1901
|
|
ccxt/hashkey.py
CHANGED
@@ -2399,8 +2399,10 @@ class hashkey(Exchange, ImplicitAPI):
|
|
2399
2399
|
market = self.market(symbol)
|
2400
2400
|
if not market['spot']:
|
2401
2401
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() is supported for spot markets only')
|
2402
|
-
|
2403
|
-
|
2402
|
+
req = {
|
2403
|
+
'cost': cost,
|
2404
|
+
}
|
2405
|
+
return self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
|
2404
2406
|
|
2405
2407
|
def create_spot_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> Order:
|
2406
2408
|
"""
|
ccxt/hitbtc.py
CHANGED
@@ -1020,7 +1020,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1020
1020
|
}
|
1021
1021
|
return result
|
1022
1022
|
|
1023
|
-
def create_deposit_address(self, code: str, params={}):
|
1023
|
+
def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1024
1024
|
"""
|
1025
1025
|
create a currency deposit address
|
1026
1026
|
|
ccxt/hyperliquid.py
CHANGED
@@ -1897,6 +1897,44 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1897
1897
|
statuses = self.safe_list(dataObject, 'statuses', [])
|
1898
1898
|
return self.parse_orders(statuses)
|
1899
1899
|
|
1900
|
+
def create_vault(self, name: str, description: str, initialUsd: int, params={}):
|
1901
|
+
"""
|
1902
|
+
creates a value
|
1903
|
+
:param str name: The name of the vault
|
1904
|
+
:param str description: The description of the vault
|
1905
|
+
:param number initialUsd: The initialUsd of the vault
|
1906
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1907
|
+
:returns dict: the api result
|
1908
|
+
"""
|
1909
|
+
self.check_required_credentials()
|
1910
|
+
self.load_markets()
|
1911
|
+
nonce = self.milliseconds()
|
1912
|
+
request: dict = {
|
1913
|
+
'nonce': nonce,
|
1914
|
+
}
|
1915
|
+
usd = self.parse_to_int(Precise.string_mul(self.number_to_string(initialUsd), '1000000'))
|
1916
|
+
action: dict = {
|
1917
|
+
'type': 'createVault',
|
1918
|
+
'name': name,
|
1919
|
+
'description': description,
|
1920
|
+
'initialUsd': usd,
|
1921
|
+
'nonce': nonce,
|
1922
|
+
}
|
1923
|
+
signature = self.sign_l1_action(action, nonce)
|
1924
|
+
request['action'] = action
|
1925
|
+
request['signature'] = signature
|
1926
|
+
response = self.privatePostExchange(self.extend(request, params))
|
1927
|
+
#
|
1928
|
+
# {
|
1929
|
+
# "status": "ok",
|
1930
|
+
# "response": {
|
1931
|
+
# "type": "createVault",
|
1932
|
+
# "data": "0x04fddcbc9ce80219301bd16f18491bedf2a8c2b8"
|
1933
|
+
# }
|
1934
|
+
# }
|
1935
|
+
#
|
1936
|
+
return response
|
1937
|
+
|
1900
1938
|
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1901
1939
|
"""
|
1902
1940
|
fetches historical funding rate prices
|