ccxt 4.5.1__py2.py3-none-any.whl → 4.5.2__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 -5
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +17 -12
- ccxt/async_support/bitget.py +1 -1
- ccxt/async_support/indodax.py +11 -12
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/poloniex.py +1 -1
- ccxt/async_support/zonda.py +12 -0
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +17 -12
- ccxt/bitget.py +1 -1
- ccxt/indodax.py +11 -12
- ccxt/okx.py +2 -2
- ccxt/poloniex.py +1 -1
- ccxt/pro/__init__.py +1 -3
- ccxt/pro/bitget.py +151 -26
- ccxt/pro/bitmart.py +1 -1
- ccxt/pro/gemini.py +6 -2
- ccxt/pro/hyperliquid.py +4 -0
- ccxt/pro/kraken.py +3 -6
- ccxt/test/tests_async.py +2 -25
- ccxt/test/tests_sync.py +2 -25
- ccxt/zonda.py +12 -0
- {ccxt-4.5.1.dist-info → ccxt-4.5.2.dist-info}/METADATA +111 -113
- {ccxt-4.5.1.dist-info → ccxt-4.5.2.dist-info}/RECORD +31 -38
- ccxt/abstract/ellipx.py +0 -25
- ccxt/abstract/vertex.py +0 -19
- ccxt/async_support/ellipx.py +0 -2029
- ccxt/async_support/vertex.py +0 -3050
- ccxt/ellipx.py +0 -2029
- ccxt/pro/vertex.py +0 -948
- ccxt/vertex.py +0 -3050
- {ccxt-4.5.1.dist-info → ccxt-4.5.2.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.5.1.dist-info → ccxt-4.5.2.dist-info}/WHEEL +0 -0
- {ccxt-4.5.1.dist-info → ccxt-4.5.2.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.5.
|
25
|
+
__version__ = '4.5.2'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -137,7 +137,6 @@ from ccxt.delta import delta # noqa: F4
|
|
137
137
|
from ccxt.deribit import deribit # noqa: F401
|
138
138
|
from ccxt.derive import derive # noqa: F401
|
139
139
|
from ccxt.digifinex import digifinex # noqa: F401
|
140
|
-
from ccxt.ellipx import ellipx # noqa: F401
|
141
140
|
from ccxt.exmo import exmo # noqa: F401
|
142
141
|
from ccxt.fmfwio import fmfwio # noqa: F401
|
143
142
|
from ccxt.foxbit import foxbit # noqa: F401
|
@@ -182,7 +181,6 @@ from ccxt.timex import timex # noqa: F4
|
|
182
181
|
from ccxt.tokocrypto import tokocrypto # noqa: F401
|
183
182
|
from ccxt.tradeogre import tradeogre # noqa: F401
|
184
183
|
from ccxt.upbit import upbit # noqa: F401
|
185
|
-
from ccxt.vertex import vertex # noqa: F401
|
186
184
|
from ccxt.wavesexchange import wavesexchange # noqa: F401
|
187
185
|
from ccxt.whitebit import whitebit # noqa: F401
|
188
186
|
from ccxt.woo import woo # noqa: F401
|
@@ -246,7 +244,6 @@ exchanges = [
|
|
246
244
|
'deribit',
|
247
245
|
'derive',
|
248
246
|
'digifinex',
|
249
|
-
'ellipx',
|
250
247
|
'exmo',
|
251
248
|
'fmfwio',
|
252
249
|
'foxbit',
|
@@ -291,7 +288,6 @@ exchanges = [
|
|
291
288
|
'tokocrypto',
|
292
289
|
'tradeogre',
|
293
290
|
'upbit',
|
294
|
-
'vertex',
|
295
291
|
'wavesexchange',
|
296
292
|
'whitebit',
|
297
293
|
'woo',
|
ccxt/ascendex.py
CHANGED
@@ -1583,7 +1583,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1583
1583
|
# "code": "0",
|
1584
1584
|
# "data": {
|
1585
1585
|
# "domain": "spot",
|
1586
|
-
# "userUID": "
|
1586
|
+
# "userUID": "U1479576457",
|
1587
1587
|
# "vipLevel": "0",
|
1588
1588
|
# "fees": [
|
1589
1589
|
# {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.5.
|
7
|
+
__version__ = '4.5.2'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -117,7 +117,6 @@ from ccxt.async_support.delta import delta
|
|
117
117
|
from ccxt.async_support.deribit import deribit # noqa: F401
|
118
118
|
from ccxt.async_support.derive import derive # noqa: F401
|
119
119
|
from ccxt.async_support.digifinex import digifinex # noqa: F401
|
120
|
-
from ccxt.async_support.ellipx import ellipx # noqa: F401
|
121
120
|
from ccxt.async_support.exmo import exmo # noqa: F401
|
122
121
|
from ccxt.async_support.fmfwio import fmfwio # noqa: F401
|
123
122
|
from ccxt.async_support.foxbit import foxbit # noqa: F401
|
@@ -162,7 +161,6 @@ from ccxt.async_support.timex import timex
|
|
162
161
|
from ccxt.async_support.tokocrypto import tokocrypto # noqa: F401
|
163
162
|
from ccxt.async_support.tradeogre import tradeogre # noqa: F401
|
164
163
|
from ccxt.async_support.upbit import upbit # noqa: F401
|
165
|
-
from ccxt.async_support.vertex import vertex # noqa: F401
|
166
164
|
from ccxt.async_support.wavesexchange import wavesexchange # noqa: F401
|
167
165
|
from ccxt.async_support.whitebit import whitebit # noqa: F401
|
168
166
|
from ccxt.async_support.woo import woo # noqa: F401
|
@@ -226,7 +224,6 @@ exchanges = [
|
|
226
224
|
'deribit',
|
227
225
|
'derive',
|
228
226
|
'digifinex',
|
229
|
-
'ellipx',
|
230
227
|
'exmo',
|
231
228
|
'fmfwio',
|
232
229
|
'foxbit',
|
@@ -271,7 +268,6 @@ exchanges = [
|
|
271
268
|
'tokocrypto',
|
272
269
|
'tradeogre',
|
273
270
|
'upbit',
|
274
|
-
'vertex',
|
275
271
|
'wavesexchange',
|
276
272
|
'whitebit',
|
277
273
|
'woo',
|
ccxt/async_support/ascendex.py
CHANGED
@@ -1584,7 +1584,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1584
1584
|
# "code": "0",
|
1585
1585
|
# "data": {
|
1586
1586
|
# "domain": "spot",
|
1587
|
-
# "userUID": "
|
1587
|
+
# "userUID": "U1479576457",
|
1588
1588
|
# "vipLevel": "0",
|
1589
1589
|
# "fees": [
|
1590
1590
|
# {symbol: 'HT/USDT', fee: {taker: '0.001', maker: "0.001"}},
|
ccxt/async_support/binance.py
CHANGED
@@ -1309,6 +1309,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1309
1309
|
'defaultSubType': None, # 'linear', 'inverse'
|
1310
1310
|
'hasAlreadyAuthenticatedSuccessfully': False,
|
1311
1311
|
'warnOnFetchOpenOrdersWithoutSymbol': True,
|
1312
|
+
'currencyToPrecisionRoundingMode': TRUNCATE,
|
1312
1313
|
# not an error
|
1313
1314
|
# https://github.com/ccxt/ccxt/issues/11268
|
1314
1315
|
# https://github.com/ccxt/ccxt/pull/11624
|
@@ -2753,13 +2754,6 @@ class binance(Exchange, ImplicitAPI):
|
|
2753
2754
|
def cost_to_precision(self, symbol, cost):
|
2754
2755
|
return self.decimal_to_precision(cost, TRUNCATE, self.markets[symbol]['precision']['quote'], self.precisionMode, self.paddingMode)
|
2755
2756
|
|
2756
|
-
def currency_to_precision(self, code, fee, networkCode=None):
|
2757
|
-
# info is available in currencies only if the user has configured his api keys
|
2758
|
-
if self.safe_value(self.currencies[code], 'precision') is not None:
|
2759
|
-
return self.decimal_to_precision(fee, TRUNCATE, self.currencies[code]['precision'], self.precisionMode, self.paddingMode)
|
2760
|
-
else:
|
2761
|
-
return self.number_to_string(fee)
|
2762
|
-
|
2763
2757
|
def nonce(self):
|
2764
2758
|
return self.milliseconds() - self.options['timeDifference']
|
2765
2759
|
|
@@ -7366,6 +7360,7 @@ class binance(Exchange, ImplicitAPI):
|
|
7366
7360
|
:param str[] ids: order ids
|
7367
7361
|
:param str [symbol]: unified market symbol
|
7368
7362
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7363
|
+
:param str[] [params.clientOrderIds]: alternative to ids, array of client order ids
|
7369
7364
|
|
7370
7365
|
EXCHANGE SPECIFIC PARAMETERS
|
7371
7366
|
:param str[] [params.origClientOrderIdList]: max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
@@ -7380,8 +7375,14 @@ class binance(Exchange, ImplicitAPI):
|
|
7380
7375
|
raise BadRequest(self.id + ' cancelOrders is only supported for swap markets.')
|
7381
7376
|
request: dict = {
|
7382
7377
|
'symbol': market['id'],
|
7383
|
-
'orderidlist': ids,
|
7378
|
+
# 'orderidlist': ids,
|
7384
7379
|
}
|
7380
|
+
origClientOrderIdList = self.safe_list_2(params, 'origClientOrderIdList', 'clientOrderIds')
|
7381
|
+
if origClientOrderIdList is not None:
|
7382
|
+
params = self.omit(params, ['clientOrderIds'])
|
7383
|
+
request['origClientOrderIdList'] = origClientOrderIdList
|
7384
|
+
else:
|
7385
|
+
request['orderidlist'] = ids
|
7385
7386
|
response = None
|
7386
7387
|
if market['linear']:
|
7387
7388
|
response = await self.fapiPrivateDeleteBatchOrders(self.extend(request, params))
|
@@ -8864,7 +8865,6 @@ class binance(Exchange, ImplicitAPI):
|
|
8864
8865
|
request: dict = {
|
8865
8866
|
'coin': currency['id'],
|
8866
8867
|
'address': address,
|
8867
|
-
'amount': self.currency_to_precision(code, amount),
|
8868
8868
|
# issue sapiGetCapitalConfigGetall() to get networks for withdrawing USDT ERC20 vs USDT Omni
|
8869
8869
|
# 'network': 'ETH', # 'BTC', 'TRX', etc, optional
|
8870
8870
|
}
|
@@ -8876,6 +8876,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8876
8876
|
if network is not None:
|
8877
8877
|
request['network'] = network
|
8878
8878
|
params = self.omit(params, 'network')
|
8879
|
+
request['amount'] = self.currency_to_precision(code, amount, network)
|
8879
8880
|
response = await self.sapiPostCapitalWithdrawApply(self.extend(request, params))
|
8880
8881
|
# {id: '9a67628b16ba4988ae20d329333f16bc'}
|
8881
8882
|
return self.parse_transaction(response, currency)
|
@@ -11253,15 +11254,19 @@ class binance(Exchange, ImplicitAPI):
|
|
11253
11254
|
elif (path == 'batchOrders') or (path.find('sub-account') >= 0) or (path == 'capital/withdraw/apply') or (path.find('staking') >= 0) or (path.find('simple-earn') >= 0):
|
11254
11255
|
if (method == 'DELETE') and (path == 'batchOrders'):
|
11255
11256
|
orderidlist = self.safe_list(extendedParams, 'orderidlist', [])
|
11256
|
-
origclientorderidlist = self.
|
11257
|
-
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist'])
|
11257
|
+
origclientorderidlist = self.safe_list_2(extendedParams, 'origclientorderidlist', 'origClientOrderIdList', [])
|
11258
|
+
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist', 'origClientOrderIdList'])
|
11258
11259
|
query = self.rawencode(extendedParams)
|
11259
11260
|
orderidlistLength = len(orderidlist)
|
11260
11261
|
origclientorderidlistLength = len(origclientorderidlist)
|
11261
11262
|
if orderidlistLength > 0:
|
11262
11263
|
query = query + '&' + 'orderidlist=%5B' + '%2C'.join(orderidlist) + '%5D'
|
11263
11264
|
if origclientorderidlistLength > 0:
|
11264
|
-
|
11265
|
+
# wrap clientOrderids around ""
|
11266
|
+
newClientOrderIds = []
|
11267
|
+
for i in range(0, origclientorderidlistLength):
|
11268
|
+
newClientOrderIds.append('%22' + origclientorderidlist[i] + '%22')
|
11269
|
+
query = query + '&' + 'origclientorderidlist=%5B' + '%2C'.join(newClientOrderIds) + '%5D'
|
11265
11270
|
else:
|
11266
11271
|
query = self.rawencode(extendedParams)
|
11267
11272
|
else:
|
ccxt/async_support/bitget.py
CHANGED
@@ -1917,7 +1917,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1917
1917
|
res = self.safe_dict(results, i)
|
1918
1918
|
data = self.safe_list(res, 'data', [])
|
1919
1919
|
firstData = self.safe_dict(data, 0, {})
|
1920
|
-
isBorrowable = self.
|
1920
|
+
isBorrowable = self.safe_bool(firstData, 'isBorrowable')
|
1921
1921
|
if fetchMargins and isBorrowable is not None:
|
1922
1922
|
keysList = list(self.index_by(data, 'symbol').keys())
|
1923
1923
|
self.options['crossMarginPairsData'] = keysList
|
ccxt/async_support/indodax.py
CHANGED
@@ -204,6 +204,16 @@ class indodax(Exchange, ImplicitAPI):
|
|
204
204
|
'Minimum order': InvalidOrder,
|
205
205
|
},
|
206
206
|
},
|
207
|
+
'timeframes': {
|
208
|
+
'1m': '1',
|
209
|
+
'15m': '15',
|
210
|
+
'30m': '30',
|
211
|
+
'1h': '60',
|
212
|
+
'4h': '240',
|
213
|
+
'1d': '1D',
|
214
|
+
'3d': '3D',
|
215
|
+
'1w': '1W',
|
216
|
+
},
|
207
217
|
# exchange-specific options
|
208
218
|
'options': {
|
209
219
|
'recvWindow': 5 * 1000, # default 5 sec
|
@@ -227,16 +237,6 @@ class indodax(Exchange, ImplicitAPI):
|
|
227
237
|
# 'ETH': 'eth'
|
228
238
|
# 'BASE': 'base'
|
229
239
|
},
|
230
|
-
'timeframes': {
|
231
|
-
'1m': '1',
|
232
|
-
'15m': '15',
|
233
|
-
'30m': '30',
|
234
|
-
'1h': '60',
|
235
|
-
'4h': '240',
|
236
|
-
'1d': '1D',
|
237
|
-
'3d': '3D',
|
238
|
-
'1w': '1W',
|
239
|
-
},
|
240
240
|
},
|
241
241
|
'features': {
|
242
242
|
'spot': {
|
@@ -690,8 +690,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
690
690
|
"""
|
691
691
|
await self.load_markets()
|
692
692
|
market = self.market(symbol)
|
693
|
-
|
694
|
-
selectedTimeframe = self.safe_string(timeframes, timeframe, timeframe)
|
693
|
+
selectedTimeframe = self.safe_string(self.timeframes, timeframe, timeframe)
|
695
694
|
now = self.seconds()
|
696
695
|
until = self.safe_integer(params, 'until', now)
|
697
696
|
params = self.omit(params, ['until'])
|
ccxt/async_support/okx.py
CHANGED
@@ -1244,7 +1244,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1244
1244
|
'FUTURES': 'FUTURES',
|
1245
1245
|
'OPTION': 'OPTION',
|
1246
1246
|
},
|
1247
|
-
'brokerId': '
|
1247
|
+
'brokerId': '6b9ad766b55dBCDE',
|
1248
1248
|
},
|
1249
1249
|
'features': {
|
1250
1250
|
'default': {
|
@@ -6009,7 +6009,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6009
6009
|
self.check_required_credentials()
|
6010
6010
|
# inject id in implicit api call
|
6011
6011
|
if method == 'POST' and (path == 'trade/batch-orders' or path == 'trade/order-algo' or path == 'trade/order'):
|
6012
|
-
brokerId = self.safe_string(self.options, 'brokerId', '
|
6012
|
+
brokerId = self.safe_string(self.options, 'brokerId', '6b9ad766b55dBCDE')
|
6013
6013
|
if isinstance(params, list):
|
6014
6014
|
for i in range(0, len(params)):
|
6015
6015
|
entry = params[i]
|
ccxt/async_support/poloniex.py
CHANGED
@@ -2568,7 +2568,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2568
2568
|
# "scale" : "-1",
|
2569
2569
|
# "asks" : ["23139.82", "0.317981", "23140", "0.191091", "23170.06", "0.01", "23200", "0.107758", "23230.55", "0.01", "23247.2", "0.154", "23254", "0.005121", "23263", "0.038", "23285.4", "0.308", "23300", "0.108896"],
|
2570
2570
|
# "bids" : ["23139.74", "0.432092", "23139.73", "0.198592", "23123.21", "0.000886", "23123.2", "0.308", "23121.4", "0.154", "23105", "0.000789", "23100", "0.078175", "23069.1", "0.026276", "23068.83", "0.001329", "23051", "0.000048"],
|
2571
|
-
# "ts" :
|
2571
|
+
# "ts" : 1659695219512
|
2572
2572
|
# }
|
2573
2573
|
#
|
2574
2574
|
timestamp = self.safe_integer(response, 'time')
|
ccxt/async_support/zonda.py
CHANGED
@@ -41,6 +41,9 @@ class zonda(Exchange, ImplicitAPI):
|
|
41
41
|
'future': False,
|
42
42
|
'option': False,
|
43
43
|
'addMargin': False,
|
44
|
+
'borrowCrossMargin': False,
|
45
|
+
'borrowIsolatedMargin': False,
|
46
|
+
'borrowMargin': False,
|
44
47
|
'cancelAllOrders': False,
|
45
48
|
'cancelOrder': True,
|
46
49
|
'cancelOrders': False,
|
@@ -49,6 +52,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
49
52
|
'createDepositAddress': False,
|
50
53
|
'createOrder': True,
|
51
54
|
'createReduceOnlyOrder': False,
|
55
|
+
'fetchAllGreeks': False,
|
52
56
|
'fetchBalance': True,
|
53
57
|
'fetchBorrowInterest': False,
|
54
58
|
'fetchBorrowRate': False,
|
@@ -79,12 +83,15 @@ class zonda(Exchange, ImplicitAPI):
|
|
79
83
|
'fetchLeverages': False,
|
80
84
|
'fetchLeverageTiers': False,
|
81
85
|
'fetchLiquidations': False,
|
86
|
+
'fetchLongShortRatio': False,
|
87
|
+
'fetchLongShortRatioHistory': False,
|
82
88
|
'fetchMarginAdjustmentHistory': False,
|
83
89
|
'fetchMarginMode': False,
|
84
90
|
'fetchMarginModes': False,
|
85
91
|
'fetchMarketLeverageTiers': False,
|
86
92
|
'fetchMarkets': True,
|
87
93
|
'fetchMarkOHLCV': False,
|
94
|
+
'fetchMarkPrice': False,
|
88
95
|
'fetchMarkPrices': False,
|
89
96
|
'fetchMyLiquidations': False,
|
90
97
|
'fetchMySettlementHistory': False,
|
@@ -92,6 +99,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
92
99
|
'fetchOHLCV': True,
|
93
100
|
'fetchOpenInterest': False,
|
94
101
|
'fetchOpenInterestHistory': False,
|
102
|
+
'fetchOpenInterests': False,
|
95
103
|
'fetchOpenOrder': False,
|
96
104
|
'fetchOpenOrders': True,
|
97
105
|
'fetchOption': False,
|
@@ -99,8 +107,11 @@ class zonda(Exchange, ImplicitAPI):
|
|
99
107
|
'fetchOrderBook': True,
|
100
108
|
'fetchOrderBooks': False,
|
101
109
|
'fetchPosition': False,
|
110
|
+
'fetchPositionHistory': False,
|
102
111
|
'fetchPositionMode': False,
|
103
112
|
'fetchPositions': False,
|
113
|
+
'fetchPositionsForSymbol': False,
|
114
|
+
'fetchPositionsHistory': False,
|
104
115
|
'fetchPositionsRisk': False,
|
105
116
|
'fetchPremiumIndexOHLCV': False,
|
106
117
|
'fetchSettlementHistory': False,
|
@@ -121,6 +132,7 @@ class zonda(Exchange, ImplicitAPI):
|
|
121
132
|
'reduceMargin': False,
|
122
133
|
'repayCrossMargin': False,
|
123
134
|
'repayIsolatedMargin': False,
|
135
|
+
'repayMargin': False,
|
124
136
|
'setLeverage': False,
|
125
137
|
'setMargin': False,
|
126
138
|
'setMarginMode': False,
|
ccxt/base/exchange.py
CHANGED
ccxt/binance.py
CHANGED
@@ -1308,6 +1308,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1308
1308
|
'defaultSubType': None, # 'linear', 'inverse'
|
1309
1309
|
'hasAlreadyAuthenticatedSuccessfully': False,
|
1310
1310
|
'warnOnFetchOpenOrdersWithoutSymbol': True,
|
1311
|
+
'currencyToPrecisionRoundingMode': TRUNCATE,
|
1311
1312
|
# not an error
|
1312
1313
|
# https://github.com/ccxt/ccxt/issues/11268
|
1313
1314
|
# https://github.com/ccxt/ccxt/pull/11624
|
@@ -2752,13 +2753,6 @@ class binance(Exchange, ImplicitAPI):
|
|
2752
2753
|
def cost_to_precision(self, symbol, cost):
|
2753
2754
|
return self.decimal_to_precision(cost, TRUNCATE, self.markets[symbol]['precision']['quote'], self.precisionMode, self.paddingMode)
|
2754
2755
|
|
2755
|
-
def currency_to_precision(self, code, fee, networkCode=None):
|
2756
|
-
# info is available in currencies only if the user has configured his api keys
|
2757
|
-
if self.safe_value(self.currencies[code], 'precision') is not None:
|
2758
|
-
return self.decimal_to_precision(fee, TRUNCATE, self.currencies[code]['precision'], self.precisionMode, self.paddingMode)
|
2759
|
-
else:
|
2760
|
-
return self.number_to_string(fee)
|
2761
|
-
|
2762
2756
|
def nonce(self):
|
2763
2757
|
return self.milliseconds() - self.options['timeDifference']
|
2764
2758
|
|
@@ -7365,6 +7359,7 @@ class binance(Exchange, ImplicitAPI):
|
|
7365
7359
|
:param str[] ids: order ids
|
7366
7360
|
:param str [symbol]: unified market symbol
|
7367
7361
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
7362
|
+
:param str[] [params.clientOrderIds]: alternative to ids, array of client order ids
|
7368
7363
|
|
7369
7364
|
EXCHANGE SPECIFIC PARAMETERS
|
7370
7365
|
:param str[] [params.origClientOrderIdList]: max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma
|
@@ -7379,8 +7374,14 @@ class binance(Exchange, ImplicitAPI):
|
|
7379
7374
|
raise BadRequest(self.id + ' cancelOrders is only supported for swap markets.')
|
7380
7375
|
request: dict = {
|
7381
7376
|
'symbol': market['id'],
|
7382
|
-
'orderidlist': ids,
|
7377
|
+
# 'orderidlist': ids,
|
7383
7378
|
}
|
7379
|
+
origClientOrderIdList = self.safe_list_2(params, 'origClientOrderIdList', 'clientOrderIds')
|
7380
|
+
if origClientOrderIdList is not None:
|
7381
|
+
params = self.omit(params, ['clientOrderIds'])
|
7382
|
+
request['origClientOrderIdList'] = origClientOrderIdList
|
7383
|
+
else:
|
7384
|
+
request['orderidlist'] = ids
|
7384
7385
|
response = None
|
7385
7386
|
if market['linear']:
|
7386
7387
|
response = self.fapiPrivateDeleteBatchOrders(self.extend(request, params))
|
@@ -8863,7 +8864,6 @@ class binance(Exchange, ImplicitAPI):
|
|
8863
8864
|
request: dict = {
|
8864
8865
|
'coin': currency['id'],
|
8865
8866
|
'address': address,
|
8866
|
-
'amount': self.currency_to_precision(code, amount),
|
8867
8867
|
# issue sapiGetCapitalConfigGetall() to get networks for withdrawing USDT ERC20 vs USDT Omni
|
8868
8868
|
# 'network': 'ETH', # 'BTC', 'TRX', etc, optional
|
8869
8869
|
}
|
@@ -8875,6 +8875,7 @@ class binance(Exchange, ImplicitAPI):
|
|
8875
8875
|
if network is not None:
|
8876
8876
|
request['network'] = network
|
8877
8877
|
params = self.omit(params, 'network')
|
8878
|
+
request['amount'] = self.currency_to_precision(code, amount, network)
|
8878
8879
|
response = self.sapiPostCapitalWithdrawApply(self.extend(request, params))
|
8879
8880
|
# {id: '9a67628b16ba4988ae20d329333f16bc'}
|
8880
8881
|
return self.parse_transaction(response, currency)
|
@@ -11252,15 +11253,19 @@ class binance(Exchange, ImplicitAPI):
|
|
11252
11253
|
elif (path == 'batchOrders') or (path.find('sub-account') >= 0) or (path == 'capital/withdraw/apply') or (path.find('staking') >= 0) or (path.find('simple-earn') >= 0):
|
11253
11254
|
if (method == 'DELETE') and (path == 'batchOrders'):
|
11254
11255
|
orderidlist = self.safe_list(extendedParams, 'orderidlist', [])
|
11255
|
-
origclientorderidlist = self.
|
11256
|
-
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist'])
|
11256
|
+
origclientorderidlist = self.safe_list_2(extendedParams, 'origclientorderidlist', 'origClientOrderIdList', [])
|
11257
|
+
extendedParams = self.omit(extendedParams, ['orderidlist', 'origclientorderidlist', 'origClientOrderIdList'])
|
11257
11258
|
query = self.rawencode(extendedParams)
|
11258
11259
|
orderidlistLength = len(orderidlist)
|
11259
11260
|
origclientorderidlistLength = len(origclientorderidlist)
|
11260
11261
|
if orderidlistLength > 0:
|
11261
11262
|
query = query + '&' + 'orderidlist=%5B' + '%2C'.join(orderidlist) + '%5D'
|
11262
11263
|
if origclientorderidlistLength > 0:
|
11263
|
-
|
11264
|
+
# wrap clientOrderids around ""
|
11265
|
+
newClientOrderIds = []
|
11266
|
+
for i in range(0, origclientorderidlistLength):
|
11267
|
+
newClientOrderIds.append('%22' + origclientorderidlist[i] + '%22')
|
11268
|
+
query = query + '&' + 'origclientorderidlist=%5B' + '%2C'.join(newClientOrderIds) + '%5D'
|
11264
11269
|
else:
|
11265
11270
|
query = self.rawencode(extendedParams)
|
11266
11271
|
else:
|
ccxt/bitget.py
CHANGED
@@ -1916,7 +1916,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1916
1916
|
res = self.safe_dict(results, i)
|
1917
1917
|
data = self.safe_list(res, 'data', [])
|
1918
1918
|
firstData = self.safe_dict(data, 0, {})
|
1919
|
-
isBorrowable = self.
|
1919
|
+
isBorrowable = self.safe_bool(firstData, 'isBorrowable')
|
1920
1920
|
if fetchMargins and isBorrowable is not None:
|
1921
1921
|
keysList = list(self.index_by(data, 'symbol').keys())
|
1922
1922
|
self.options['crossMarginPairsData'] = keysList
|
ccxt/indodax.py
CHANGED
@@ -204,6 +204,16 @@ class indodax(Exchange, ImplicitAPI):
|
|
204
204
|
'Minimum order': InvalidOrder,
|
205
205
|
},
|
206
206
|
},
|
207
|
+
'timeframes': {
|
208
|
+
'1m': '1',
|
209
|
+
'15m': '15',
|
210
|
+
'30m': '30',
|
211
|
+
'1h': '60',
|
212
|
+
'4h': '240',
|
213
|
+
'1d': '1D',
|
214
|
+
'3d': '3D',
|
215
|
+
'1w': '1W',
|
216
|
+
},
|
207
217
|
# exchange-specific options
|
208
218
|
'options': {
|
209
219
|
'recvWindow': 5 * 1000, # default 5 sec
|
@@ -227,16 +237,6 @@ class indodax(Exchange, ImplicitAPI):
|
|
227
237
|
# 'ETH': 'eth'
|
228
238
|
# 'BASE': 'base'
|
229
239
|
},
|
230
|
-
'timeframes': {
|
231
|
-
'1m': '1',
|
232
|
-
'15m': '15',
|
233
|
-
'30m': '30',
|
234
|
-
'1h': '60',
|
235
|
-
'4h': '240',
|
236
|
-
'1d': '1D',
|
237
|
-
'3d': '3D',
|
238
|
-
'1w': '1W',
|
239
|
-
},
|
240
240
|
},
|
241
241
|
'features': {
|
242
242
|
'spot': {
|
@@ -690,8 +690,7 @@ class indodax(Exchange, ImplicitAPI):
|
|
690
690
|
"""
|
691
691
|
self.load_markets()
|
692
692
|
market = self.market(symbol)
|
693
|
-
|
694
|
-
selectedTimeframe = self.safe_string(timeframes, timeframe, timeframe)
|
693
|
+
selectedTimeframe = self.safe_string(self.timeframes, timeframe, timeframe)
|
695
694
|
now = self.seconds()
|
696
695
|
until = self.safe_integer(params, 'until', now)
|
697
696
|
params = self.omit(params, ['until'])
|
ccxt/okx.py
CHANGED
@@ -1243,7 +1243,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1243
1243
|
'FUTURES': 'FUTURES',
|
1244
1244
|
'OPTION': 'OPTION',
|
1245
1245
|
},
|
1246
|
-
'brokerId': '
|
1246
|
+
'brokerId': '6b9ad766b55dBCDE',
|
1247
1247
|
},
|
1248
1248
|
'features': {
|
1249
1249
|
'default': {
|
@@ -6008,7 +6008,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6008
6008
|
self.check_required_credentials()
|
6009
6009
|
# inject id in implicit api call
|
6010
6010
|
if method == 'POST' and (path == 'trade/batch-orders' or path == 'trade/order-algo' or path == 'trade/order'):
|
6011
|
-
brokerId = self.safe_string(self.options, 'brokerId', '
|
6011
|
+
brokerId = self.safe_string(self.options, 'brokerId', '6b9ad766b55dBCDE')
|
6012
6012
|
if isinstance(params, list):
|
6013
6013
|
for i in range(0, len(params)):
|
6014
6014
|
entry = params[i]
|
ccxt/poloniex.py
CHANGED
@@ -2567,7 +2567,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2567
2567
|
# "scale" : "-1",
|
2568
2568
|
# "asks" : ["23139.82", "0.317981", "23140", "0.191091", "23170.06", "0.01", "23200", "0.107758", "23230.55", "0.01", "23247.2", "0.154", "23254", "0.005121", "23263", "0.038", "23285.4", "0.308", "23300", "0.108896"],
|
2569
2569
|
# "bids" : ["23139.74", "0.432092", "23139.73", "0.198592", "23123.21", "0.000886", "23123.2", "0.308", "23121.4", "0.154", "23105", "0.000789", "23100", "0.078175", "23069.1", "0.026276", "23068.83", "0.001329", "23051", "0.000048"],
|
2570
|
-
# "ts" :
|
2570
|
+
# "ts" : 1659695219512
|
2571
2571
|
# }
|
2572
2572
|
#
|
2573
2573
|
timestamp = self.safe_integer(response, 'time')
|
ccxt/pro/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# ----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.5.
|
7
|
+
__version__ = '4.5.2'
|
8
8
|
|
9
9
|
# ----------------------------------------------------------------------------
|
10
10
|
|
@@ -125,7 +125,6 @@ from ccxt.pro.poloniex import poloniex # noqa
|
|
125
125
|
from ccxt.pro.probit import probit # noqa: F401
|
126
126
|
from ccxt.pro.tradeogre import tradeogre # noqa: F401
|
127
127
|
from ccxt.pro.upbit import upbit # noqa: F401
|
128
|
-
from ccxt.pro.vertex import vertex # noqa: F401
|
129
128
|
from ccxt.pro.whitebit import whitebit # noqa: F401
|
130
129
|
from ccxt.pro.woo import woo # noqa: F401
|
131
130
|
from ccxt.pro.woofipro import woofipro # noqa: F401
|
@@ -200,7 +199,6 @@ exchanges = [
|
|
200
199
|
'probit',
|
201
200
|
'tradeogre',
|
202
201
|
'upbit',
|
203
|
-
'vertex',
|
204
202
|
'whitebit',
|
205
203
|
'woo',
|
206
204
|
'woofipro',
|