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/okx.py
CHANGED
@@ -1020,7 +1020,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1020
1020
|
'BHP': 'BHP',
|
1021
1021
|
'APT': 'Aptos',
|
1022
1022
|
'ARBONE': 'Arbitrum One',
|
1023
|
-
'AVAXC': 'Avalanche C',
|
1023
|
+
'AVAXC': 'Avalanche C-Chain',
|
1024
1024
|
'AVAXX': 'Avalanche X-Chain',
|
1025
1025
|
'ARK': 'ARK',
|
1026
1026
|
'AR': 'Arweave',
|
@@ -1808,8 +1808,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1808
1808
|
currencyActive = active if (active) else currencyActive
|
1809
1809
|
networkId = self.safe_string(chain, 'chain')
|
1810
1810
|
if (networkId is not None) and (networkId.find('-') >= 0):
|
1811
|
-
parts = networkId.split('-')
|
1812
|
-
chainPart =
|
1811
|
+
parts = networkId.split('-')[1:]
|
1812
|
+
chainPart = '-'.join(parts)
|
1813
1813
|
networkCode = self.network_id_to_code(chainPart, currency['code'])
|
1814
1814
|
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
|
1815
1815
|
if maxPrecision is None:
|
@@ -2749,9 +2749,11 @@ class okx(Exchange, ImplicitAPI):
|
|
2749
2749
|
market = self.market(symbol)
|
2750
2750
|
if not market['spot']:
|
2751
2751
|
raise NotSupported(self.id + ' createMarketBuyOrderWithCost() supports spot markets only')
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2752
|
+
req = {
|
2753
|
+
'createMarketBuyOrderRequiresPrice': False,
|
2754
|
+
'tgtCcy': 'quote_ccy',
|
2755
|
+
}
|
2756
|
+
return self.create_order(symbol, 'market', 'buy', cost, None, self.extend(req, params))
|
2755
2757
|
|
2756
2758
|
def create_market_sell_order_with_cost(self, symbol: str, cost: float, params={}):
|
2757
2759
|
"""
|
@@ -2768,9 +2770,11 @@ class okx(Exchange, ImplicitAPI):
|
|
2768
2770
|
market = self.market(symbol)
|
2769
2771
|
if not market['spot']:
|
2770
2772
|
raise NotSupported(self.id + ' createMarketSellOrderWithCost() supports spot markets only')
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2773
|
+
req = {
|
2774
|
+
'createMarketBuyOrderRequiresPrice': False,
|
2775
|
+
'tgtCcy': 'quote_ccy',
|
2776
|
+
}
|
2777
|
+
return self.create_order(symbol, 'market', 'sell', cost, None, self.extend(req, params))
|
2774
2778
|
|
2775
2779
|
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
2776
2780
|
market = self.market(symbol)
|
ccxt/onetrading.py
CHANGED
@@ -289,6 +289,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
289
289
|
'INTERNAL_SERVER_ERROR': ExchangeError,
|
290
290
|
},
|
291
291
|
'broad': {
|
292
|
+
'Order not found.': OrderNotFound,
|
292
293
|
},
|
293
294
|
},
|
294
295
|
'commonCurrencies': {
|
@@ -1000,6 +1001,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1000
1001
|
'CLOSED': 'canceled',
|
1001
1002
|
'FAILED': 'failed',
|
1002
1003
|
'STOP_TRIGGERED': 'triggered',
|
1004
|
+
'DONE': 'closed',
|
1003
1005
|
}
|
1004
1006
|
return self.safe_string(statuses, status, status)
|
1005
1007
|
|
@@ -1094,7 +1096,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1094
1096
|
'datetime': self.iso8601(timestamp),
|
1095
1097
|
'lastTradeTimestamp': None,
|
1096
1098
|
'symbol': symbol,
|
1097
|
-
'type': type,
|
1099
|
+
'type': self.parse_order_type(type),
|
1098
1100
|
'timeInForce': timeInForce,
|
1099
1101
|
'postOnly': postOnly,
|
1100
1102
|
'side': side,
|
@@ -1110,6 +1112,12 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1110
1112
|
'trades': rawTrades,
|
1111
1113
|
}, market)
|
1112
1114
|
|
1115
|
+
def parse_order_type(self, type: Str):
|
1116
|
+
types: dict = {
|
1117
|
+
'booked': 'limit',
|
1118
|
+
}
|
1119
|
+
return self.safe_string(types, type, type)
|
1120
|
+
|
1113
1121
|
def parse_time_in_force(self, timeInForce: Str):
|
1114
1122
|
timeInForces: dict = {
|
1115
1123
|
'GOOD_TILL_CANCELLED': 'GTC',
|
@@ -1167,6 +1175,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1167
1175
|
if clientOrderId is not None:
|
1168
1176
|
request['client_id'] = clientOrderId
|
1169
1177
|
params = self.omit(params, ['clientOrderId', 'client_id'])
|
1178
|
+
timeInForce = self.safe_string_2(params, 'timeInForce', 'time_in_force', 'GOOD_TILL_CANCELLED')
|
1179
|
+
params = self.omit(params, 'timeInForce')
|
1180
|
+
request['time_in_force'] = timeInForce
|
1170
1181
|
response = self.privatePostAccountOrders(self.extend(request, params))
|
1171
1182
|
#
|
1172
1183
|
# {
|
@@ -1206,11 +1217,15 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1206
1217
|
request['client_id'] = clientOrderId
|
1207
1218
|
else:
|
1208
1219
|
request['order_id'] = id
|
1209
|
-
response =
|
1220
|
+
response = None
|
1221
|
+
if method == 'privateDeleteAccountOrdersOrderId':
|
1222
|
+
response = self.privateDeleteAccountOrdersOrderId(self.extend(request, params))
|
1223
|
+
else:
|
1224
|
+
response = self.privateDeleteAccountOrdersClientClientId(self.extend(request, params))
|
1210
1225
|
#
|
1211
1226
|
# responds with an empty body
|
1212
1227
|
#
|
1213
|
-
return response
|
1228
|
+
return self.parse_order(response)
|
1214
1229
|
|
1215
1230
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1216
1231
|
"""
|
ccxt/oxfun.py
CHANGED
@@ -1032,8 +1032,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
1032
1032
|
# }
|
1033
1033
|
#
|
1034
1034
|
data = self.safe_list(response, 'data', [])
|
1035
|
-
|
1036
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
1035
|
+
return self.parse_funding_rates(data, symbols)
|
1037
1036
|
|
1038
1037
|
def parse_funding_rate(self, fundingRate, market: Market = None) -> FundingRate:
|
1039
1038
|
#
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/bingx.py
CHANGED
@@ -12,7 +12,6 @@ from ccxt.base.errors import ArgumentsRequired
|
|
12
12
|
from ccxt.base.errors import BadRequest
|
13
13
|
from ccxt.base.errors import NotSupported
|
14
14
|
from ccxt.base.errors import NetworkError
|
15
|
-
from ccxt.base.precise import Precise
|
16
15
|
|
17
16
|
|
18
17
|
class bingx(ccxt.async_support.bingx):
|
@@ -1386,11 +1385,10 @@ class bingx(ccxt.async_support.bingx):
|
|
1386
1385
|
balance = data[i]
|
1387
1386
|
currencyId = self.safe_string(balance, 'a')
|
1388
1387
|
code = self.safe_currency_code(currencyId)
|
1389
|
-
account = self.
|
1388
|
+
account = self.account()
|
1389
|
+
account['info'] = balance
|
1390
|
+
account['used'] = self.safe_string(balance, 'lk')
|
1390
1391
|
account['free'] = self.safe_string(balance, 'wb')
|
1391
|
-
balanceChange = self.safe_string(balance, 'bc')
|
1392
|
-
if account['used'] is not None:
|
1393
|
-
account['used'] = Precise.string_sub(self.safe_string(account, 'used'), balanceChange)
|
1394
1392
|
self.balance[type][code] = account
|
1395
1393
|
self.balance[type] = self.safe_balance(self.balance[type])
|
1396
1394
|
client.resolve(self.balance[type], type + ':balance')
|
ccxt/pro/bitget.py
CHANGED
@@ -984,13 +984,11 @@ class bitget(ccxt.async_support.bitget):
|
|
984
984
|
instType = self.safe_string(arg, 'instType', '')
|
985
985
|
if self.positions is None:
|
986
986
|
self.positions = {}
|
987
|
-
|
987
|
+
action = self.safe_string(message, 'action')
|
988
|
+
if not (instType in self.positions) or (action == 'snapshot'):
|
988
989
|
self.positions[instType] = ArrayCacheBySymbolBySide()
|
989
990
|
cache = self.positions[instType]
|
990
991
|
rawPositions = self.safe_value(message, 'data', [])
|
991
|
-
dataLength = len(rawPositions)
|
992
|
-
if dataLength == 0:
|
993
|
-
return
|
994
992
|
newPositions = []
|
995
993
|
for i in range(0, len(rawPositions)):
|
996
994
|
rawPosition = rawPositions[i]
|
ccxt/pro/coinex.py
CHANGED
@@ -1238,7 +1238,7 @@ class coinex(ccxt.async_support.coinex):
|
|
1238
1238
|
defaultType = self.safe_string(self.options, 'defaultType')
|
1239
1239
|
marketId = self.safe_string(ticker, 'market')
|
1240
1240
|
market = self.safe_market(marketId, market, None, defaultType)
|
1241
|
-
timestamp = self.
|
1241
|
+
timestamp = self.safe_integer(ticker, 'updated_at')
|
1242
1242
|
return self.safe_ticker({
|
1243
1243
|
'symbol': self.safe_symbol(marketId, market, None, defaultType),
|
1244
1244
|
'timestamp': timestamp,
|
ccxt/pro/xt.py
CHANGED
@@ -70,7 +70,7 @@ class xt(ccxt.async_support.xt):
|
|
70
70
|
if not isContract:
|
71
71
|
url = url + '/private'
|
72
72
|
client = self.client(url)
|
73
|
-
token = self.
|
73
|
+
token = self.safe_string(client.subscriptions, 'token')
|
74
74
|
if token is None:
|
75
75
|
if isContract:
|
76
76
|
response = await self.privateLinearGetFutureUserV1UserListenKey()
|
ccxt/test/tests_async.py
CHANGED
ccxt/test/tests_sync.py
CHANGED
ccxt/whitebit.py
CHANGED
@@ -310,6 +310,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
310
310
|
'broad': {
|
311
311
|
'This action is unauthorized': PermissionDenied, # {"code":2,"message":"This action is unauthorized. Enable your key in API settings"}
|
312
312
|
'Given amount is less than min amount': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Given amount is less than min amount 200000"],"total":["Total is less than 5.05"]}}
|
313
|
+
'Min amount step': InvalidOrder, # {"code":32,"errors":{"amount":["Min amount step = 0.01"]},"message":"Validation failed"}
|
313
314
|
'Total is less than': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Given amount is less than min amount 200000"],"total":["Total is less than 5.05"]}}
|
314
315
|
'fee must be no less than': InvalidOrder, # {"code":0,"message":"Validation failed","errors":{"amount":["Total amount + fee must be no less than 5.05505"]}}
|
315
316
|
'Enable your key in API settings': PermissionDenied, # {"code":2,"message":"This action is unauthorized. Enable your key in API settings"}
|
@@ -2376,8 +2377,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2376
2377
|
# ]
|
2377
2378
|
#
|
2378
2379
|
data = self.safe_list(response, 'result', [])
|
2379
|
-
|
2380
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
2380
|
+
return self.parse_funding_rates(data, symbols)
|
2381
2381
|
|
2382
2382
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
2383
2383
|
#
|
ccxt/woo.py
CHANGED
@@ -2825,8 +2825,7 @@ class woo(Exchange, ImplicitAPI):
|
|
2825
2825
|
# }
|
2826
2826
|
#
|
2827
2827
|
rows = self.safe_list(response, 'rows', [])
|
2828
|
-
|
2829
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
2828
|
+
return self.parse_funding_rates(rows, symbols)
|
2830
2829
|
|
2831
2830
|
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
2832
2831
|
"""
|
ccxt/woofipro.py
CHANGED
@@ -962,8 +962,7 @@ class woofipro(Exchange, ImplicitAPI):
|
|
962
962
|
#
|
963
963
|
data = self.safe_dict(response, 'data', {})
|
964
964
|
rows = self.safe_list(data, 'rows', [])
|
965
|
-
|
966
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
965
|
+
return self.parse_funding_rates(rows, symbols)
|
967
966
|
|
968
967
|
def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
969
968
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.47
|
4
4
|
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
|
5
5
|
Home-page: https://ccxt.com
|
6
6
|
Author: Igor Kroitor
|
@@ -70,7 +70,6 @@ Current feature list:
|
|
70
70
|
|
71
71
|
|
72
72
|
## Sponsored Promotion
|
73
|
-
[](https://www.bitmex.com/ccxt-trading-campaign)
|
74
73
|
|
75
74
|
## See Also
|
76
75
|
|
@@ -277,13 +276,13 @@ console.log(version, Object.keys(exchanges));
|
|
277
276
|
|
278
277
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
279
278
|
|
280
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
281
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
279
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.47/dist/ccxt.browser.min.js
|
280
|
+
* unpkg: https://unpkg.com/ccxt@4.4.47/dist/ccxt.browser.min.js
|
282
281
|
|
283
282
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
284
283
|
|
285
284
|
```HTML
|
286
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
285
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.47/dist/ccxt.browser.min.js"></script>
|
287
286
|
```
|
288
287
|
|
289
288
|
Creates a global `ccxt` object:
|