ccxt 4.4.33__py2.py3-none-any.whl → 4.4.35__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 +17 -0
- ccxt/abstract/bitbank.py +5 -0
- ccxt/abstract/bitfinex2.py +1 -0
- ccxt/abstract/bitpanda.py +0 -12
- ccxt/abstract/bitrue.py +3 -3
- ccxt/abstract/ellipx.py +25 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/abstract/onetrading.py +0 -12
- ccxt/abstract/xt.py +5 -5
- 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 +19 -15
- ccxt/async_support/bingx.py +479 -146
- 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 +3 -1
- ccxt/async_support/bitopro.py +3 -0
- ccxt/async_support/bitrue.py +3 -2
- ccxt/async_support/btcmarkets.py +5 -3
- ccxt/async_support/btcturk.py +19 -19
- ccxt/async_support/bybit.py +13 -10
- ccxt/async_support/cex.py +13 -4
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinex.py +1 -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 +143 -39
- ccxt/async_support/hyperliquid.py +70 -11
- ccxt/async_support/idex.py +3 -4
- ccxt/async_support/kraken.py +58 -49
- ccxt/async_support/krakenfutures.py +3 -1
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/okcoin.py +2 -0
- ccxt/async_support/okx.py +15 -10
- ccxt/async_support/onetrading.py +67 -370
- ccxt/async_support/paradex.py +2 -0
- ccxt/async_support/phemex.py +16 -0
- 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/async_support/xt.py +10 -10
- ccxt/base/exchange.py +28 -7
- ccxt/binance.py +19 -15
- ccxt/bingx.py +479 -146
- ccxt/bitbank.py +5 -0
- ccxt/bitbns.py +2 -0
- ccxt/bitfinex2.py +1 -0
- ccxt/bitget.py +174 -40
- ccxt/bitmex.py +3 -1
- ccxt/bitopro.py +3 -0
- ccxt/bitrue.py +3 -2
- ccxt/btcmarkets.py +5 -3
- ccxt/btcturk.py +19 -19
- ccxt/bybit.py +13 -10
- ccxt/cex.py +13 -4
- ccxt/coinbase.py +3 -2
- ccxt/coinex.py +1 -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 +143 -39
- ccxt/hyperliquid.py +70 -11
- ccxt/idex.py +3 -4
- ccxt/kraken.py +58 -49
- ccxt/krakenfutures.py +3 -1
- ccxt/kucoin.py +1 -1
- ccxt/okcoin.py +2 -0
- ccxt/okx.py +15 -10
- ccxt/onetrading.py +67 -370
- ccxt/paradex.py +2 -0
- ccxt/phemex.py +16 -0
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +3 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitrue.py +13 -11
- ccxt/pro/idex.py +15 -0
- ccxt/pro/probit.py +58 -68
- ccxt/pro/woo.py +15 -15
- ccxt/test/tests_async.py +29 -2
- ccxt/test/tests_helpers.py +0 -2
- ccxt/test/tests_sync.py +29 -2
- ccxt/vertex.py +2 -0
- ccxt/woo.py +69 -69
- ccxt/xt.py +10 -10
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/METADATA +9 -8
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/RECORD +100 -97
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/WHEEL +0 -0
- {ccxt-4.4.33.dist-info → ccxt-4.4.35.dist-info}/top_level.txt +0 -0
ccxt/async_support/bybit.py
CHANGED
@@ -1077,6 +1077,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1077
1077
|
'default': {
|
1078
1078
|
'sandbox': True,
|
1079
1079
|
'createOrder': {
|
1080
|
+
'marginMode': False,
|
1080
1081
|
'triggerPrice': True,
|
1081
1082
|
'triggerPriceType': {
|
1082
1083
|
'last': True,
|
@@ -1094,7 +1095,6 @@ class bybit(Exchange, ImplicitAPI):
|
|
1094
1095
|
},
|
1095
1096
|
'limitPrice': True,
|
1096
1097
|
},
|
1097
|
-
'marginMode': False,
|
1098
1098
|
'timeInForce': {
|
1099
1099
|
'GTC': True,
|
1100
1100
|
'IOC': True,
|
@@ -1114,6 +1114,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1114
1114
|
'max': 10,
|
1115
1115
|
},
|
1116
1116
|
'fetchMyTrades': {
|
1117
|
+
'marginMode': False,
|
1117
1118
|
'limit': 100,
|
1118
1119
|
'daysBack': 365 * 2, # 2 years
|
1119
1120
|
'untilDays': 7, # days between start-end
|
@@ -1124,18 +1125,18 @@ class bybit(Exchange, ImplicitAPI):
|
|
1124
1125
|
'trailing': False,
|
1125
1126
|
},
|
1126
1127
|
'fetchOpenOrders': {
|
1127
|
-
'limit': 50,
|
1128
1128
|
'marginMode': False,
|
1129
|
+
'limit': 50,
|
1129
1130
|
'trigger': True,
|
1130
1131
|
'trailing': False,
|
1131
1132
|
},
|
1132
1133
|
'fetchOrders': None,
|
1133
1134
|
'fetchClosedOrders': {
|
1135
|
+
'marginMode': False,
|
1134
1136
|
'limit': 50,
|
1135
1137
|
'daysBackClosed': 365 * 2, # 2 years
|
1136
1138
|
'daysBackCanceled': 1,
|
1137
1139
|
'untilDays': 7,
|
1138
|
-
'marginMode': False,
|
1139
1140
|
'trigger': True,
|
1140
1141
|
'trailing': False,
|
1141
1142
|
},
|
@@ -1146,6 +1147,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1146
1147
|
'spot': {
|
1147
1148
|
'extends': 'default',
|
1148
1149
|
'createOrder': {
|
1150
|
+
'marginMode': False,
|
1149
1151
|
'triggerPrice': True,
|
1150
1152
|
'triggerPriceType': None,
|
1151
1153
|
'triggerDirection': False,
|
@@ -1155,7 +1157,6 @@ class bybit(Exchange, ImplicitAPI):
|
|
1155
1157
|
'triggerPriceType': None,
|
1156
1158
|
'limitPrice': True,
|
1157
1159
|
},
|
1158
|
-
'marginMode': False,
|
1159
1160
|
'timeInForce': {
|
1160
1161
|
'GTC': True,
|
1161
1162
|
'IOC': True,
|
@@ -1229,7 +1230,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1229
1230
|
|
1230
1231
|
def add_pagination_cursor_to_result(self, response):
|
1231
1232
|
result = self.safe_dict(response, 'result', {})
|
1232
|
-
data = self.
|
1233
|
+
data = self.safe_list_n(result, ['list', 'rows', 'data', 'dataList'], [])
|
1233
1234
|
paginationCursor = self.safe_string_2(result, 'nextPageCursor', 'cursor')
|
1234
1235
|
dataLength = len(data)
|
1235
1236
|
if (paginationCursor is not None) and (dataLength > 0):
|
@@ -1240,12 +1241,12 @@ class bybit(Exchange, ImplicitAPI):
|
|
1240
1241
|
|
1241
1242
|
async def is_unified_enabled(self, params={}):
|
1242
1243
|
"""
|
1243
|
-
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1244
1244
|
|
1245
1245
|
https://bybit-exchange.github.io/docs/v5/user/apikey-info#http-request
|
1246
1246
|
https://bybit-exchange.github.io/docs/v5/account/account-info
|
1247
1247
|
|
1248
1248
|
returns [enableUnifiedMargin, enableUnifiedAccount] so the user can check if unified account is enabled
|
1249
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1249
1250
|
:returns any: [enableUnifiedMargin, enableUnifiedAccount]
|
1250
1251
|
"""
|
1251
1252
|
# The API key of user id must own one of permissions will be allowed to call following API endpoints.
|
@@ -2278,6 +2279,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
2278
2279
|
:param str[] symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
2279
2280
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2280
2281
|
:param str [params.subType]: *contract only* 'linear', 'inverse'
|
2282
|
+
:param str [params.baseCoin]: *option only* base coin, default is 'BTC'
|
2281
2283
|
:returns dict: an array of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
2282
2284
|
"""
|
2283
2285
|
await self.load_markets()
|
@@ -2319,10 +2321,11 @@ class bybit(Exchange, ImplicitAPI):
|
|
2319
2321
|
# only if passedSubType is None, then use spot
|
2320
2322
|
if type == 'spot' and passedSubType is None:
|
2321
2323
|
request['category'] = 'spot'
|
2322
|
-
elif type == 'swap' or type == 'future' or subType is not None:
|
2323
|
-
request['category'] = subType
|
2324
2324
|
elif type == 'option':
|
2325
2325
|
request['category'] = 'option'
|
2326
|
+
request['baseCoin'] = self.safe_string(params, 'baseCoin', 'BTC')
|
2327
|
+
elif type == 'swap' or type == 'future' or subType is not None:
|
2328
|
+
request['category'] = subType
|
2326
2329
|
response = await self.publicGetV5MarketTickers(self.extend(request, params))
|
2327
2330
|
#
|
2328
2331
|
# {
|
@@ -3109,7 +3112,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3109
3112
|
'datetime': self.iso8601(timestamp),
|
3110
3113
|
}
|
3111
3114
|
responseResult = self.safe_dict(response, 'result', {})
|
3112
|
-
currencyList = self.
|
3115
|
+
currencyList = self.safe_list_n(responseResult, ['loanAccountList', 'list', 'balance'])
|
3113
3116
|
if currencyList is None:
|
3114
3117
|
# usdc wallet
|
3115
3118
|
code = 'USDC'
|
@@ -3879,7 +3882,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
3879
3882
|
side = self.safe_string(rawOrder, 'side')
|
3880
3883
|
amount = self.safe_value(rawOrder, 'amount')
|
3881
3884
|
price = self.safe_value(rawOrder, 'price')
|
3882
|
-
orderParams = self.
|
3885
|
+
orderParams = self.safe_dict(rawOrder, 'params', {})
|
3883
3886
|
orderRequest = self.create_order_request(marketId, type, side, amount, price, orderParams, isUta)
|
3884
3887
|
ordersRequests.append(orderRequest)
|
3885
3888
|
symbols = self.market_symbols(orderSymbols, None, False, True, True)
|
ccxt/async_support/cex.py
CHANGED
@@ -27,7 +27,7 @@ class cex(Exchange, ImplicitAPI):
|
|
27
27
|
'id': 'cex',
|
28
28
|
'name': 'CEX.IO',
|
29
29
|
'countries': ['GB', 'EU', 'CY', 'RU'],
|
30
|
-
'rateLimit':
|
30
|
+
'rateLimit': 300, # 200 req/min
|
31
31
|
'pro': True,
|
32
32
|
'has': {
|
33
33
|
'CORS': None,
|
@@ -39,6 +39,8 @@ class cex(Exchange, ImplicitAPI):
|
|
39
39
|
'cancelAllOrders': True,
|
40
40
|
'cancelOrder': True,
|
41
41
|
'createOrder': True,
|
42
|
+
'createStopOrder': True,
|
43
|
+
'createTriggerOrder': True,
|
42
44
|
'fetchAccounts': True,
|
43
45
|
'fetchBalance': True,
|
44
46
|
'fetchClosedOrder': True,
|
@@ -919,7 +921,7 @@ class cex(Exchange, ImplicitAPI):
|
|
919
921
|
# },
|
920
922
|
# ...
|
921
923
|
#
|
922
|
-
data = self.
|
924
|
+
data = self.safe_list(response, 'data', [])
|
923
925
|
return self.parse_orders(data, market, since, limit)
|
924
926
|
|
925
927
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
@@ -988,10 +990,16 @@ class cex(Exchange, ImplicitAPI):
|
|
988
990
|
|
989
991
|
def parse_order_status(self, status: Str):
|
990
992
|
statuses: dict = {
|
993
|
+
'PENDING_NEW': 'open',
|
994
|
+
'NEW': 'open',
|
995
|
+
'PARTIALLY_FILLED': 'open',
|
991
996
|
'FILLED': 'closed',
|
997
|
+
'EXPIRED': 'expired',
|
998
|
+
'REJECTED': 'rejected',
|
999
|
+
'PENDING_CANCEL': 'canceling',
|
992
1000
|
'CANCELLED': 'canceled',
|
993
1001
|
}
|
994
|
-
return self.safe_string(statuses, status,
|
1002
|
+
return self.safe_string(statuses, status, status)
|
995
1003
|
|
996
1004
|
def parse_order(self, order: dict, market: Market = None) -> Order:
|
997
1005
|
#
|
@@ -1040,7 +1048,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1040
1048
|
currencyId = self.safe_string(order, 'feeCurrency')
|
1041
1049
|
feeCode = self.safe_currency_code(currencyId)
|
1042
1050
|
fee['currency'] = feeCode
|
1043
|
-
fee['
|
1051
|
+
fee['cost'] = feeAmount
|
1044
1052
|
timestamp = self.safe_integer(order, 'serverCreateTimestamp')
|
1045
1053
|
requestedBase = self.safe_number(order, 'requestedAmountCcy1')
|
1046
1054
|
executedBase = self.safe_number(order, 'executedAmountCcy1')
|
@@ -1084,6 +1092,7 @@ class cex(Exchange, ImplicitAPI):
|
|
1084
1092
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1085
1093
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1086
1094
|
:param str [params.accountId]: account-id to use(default is empty string)
|
1095
|
+
:param float [params.triggerPrice]: the price at which a trigger order is triggered at
|
1087
1096
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1088
1097
|
"""
|
1089
1098
|
accountId = None
|
ccxt/async_support/coinbase.py
CHANGED
@@ -2182,7 +2182,8 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2182
2182
|
|
2183
2183
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2184
2184
|
:param boolean [params.v3]: default False, set True to use v3 api endpoint
|
2185
|
-
:param
|
2185
|
+
:param str [params.type]: "spot"(default) or "swap" or "future"
|
2186
|
+
:param int [params.limit]: default 250, maximum number of accounts to return
|
2186
2187
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
2187
2188
|
"""
|
2188
2189
|
await self.load_markets()
|
@@ -2199,7 +2200,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2199
2200
|
request['limit'] = 250
|
2200
2201
|
response = await self.v3PrivateGetBrokerageAccounts(self.extend(request, params))
|
2201
2202
|
else:
|
2202
|
-
request['limit'] =
|
2203
|
+
request['limit'] = 250
|
2203
2204
|
response = await self.v2PrivateGetAccounts(self.extend(request, params))
|
2204
2205
|
#
|
2205
2206
|
# v2PrivateGetAccounts
|
ccxt/async_support/coinex.py
CHANGED
ccxt/async_support/coinone.py
CHANGED
@@ -240,7 +240,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
240
240
|
# }
|
241
241
|
#
|
242
242
|
result: dict = {}
|
243
|
-
currencies = self.
|
243
|
+
currencies = self.safe_list(response, 'currencies', [])
|
244
244
|
for i in range(0, len(currencies)):
|
245
245
|
entry = currencies[i]
|
246
246
|
id = self.safe_string(entry, 'symbol')
|
@@ -320,7 +320,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
320
320
|
# ]
|
321
321
|
# }
|
322
322
|
#
|
323
|
-
tickers = self.
|
323
|
+
tickers = self.safe_list(response, 'tickers', [])
|
324
324
|
result = []
|
325
325
|
for i in range(0, len(tickers)):
|
326
326
|
entry = self.safe_value(tickers, i)
|
@@ -570,7 +570,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
570
570
|
# ]
|
571
571
|
# }
|
572
572
|
#
|
573
|
-
data = self.
|
573
|
+
data = self.safe_list(response, 'tickers', [])
|
574
574
|
ticker = self.safe_dict(data, 0, {})
|
575
575
|
return self.parse_ticker(ticker, market)
|
576
576
|
|
@@ -603,8 +603,8 @@ class coinone(Exchange, ImplicitAPI):
|
|
603
603
|
#
|
604
604
|
timestamp = self.safe_integer(ticker, 'timestamp')
|
605
605
|
last = self.safe_string(ticker, 'last')
|
606
|
-
asks = self.
|
607
|
-
bids = self.
|
606
|
+
asks = self.safe_list(ticker, 'best_asks', [])
|
607
|
+
bids = self.safe_list(ticker, 'best_bids', [])
|
608
608
|
baseId = self.safe_string(ticker, 'target_currency')
|
609
609
|
quoteId = self.safe_string(ticker, 'quote_currency')
|
610
610
|
base = self.safe_currency_code(baseId)
|
@@ -658,7 +658,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
658
658
|
#
|
659
659
|
timestamp = self.safe_integer(trade, 'timestamp')
|
660
660
|
market = self.safe_market(None, market)
|
661
|
-
isSellerMaker = self.
|
661
|
+
isSellerMaker = self.safe_bool(trade, 'is_seller_maker')
|
662
662
|
side = None
|
663
663
|
if isSellerMaker is not None:
|
664
664
|
side = 'sell' if isSellerMaker else 'buy'
|
@@ -1063,7 +1063,7 @@ class coinone(Exchange, ImplicitAPI):
|
|
1063
1063
|
# }
|
1064
1064
|
# }
|
1065
1065
|
#
|
1066
|
-
walletAddress = self.
|
1066
|
+
walletAddress = self.safe_dict(response, 'walletAddress', {})
|
1067
1067
|
keys = list(walletAddress.keys())
|
1068
1068
|
result: dict = {}
|
1069
1069
|
for i in range(0, len(keys)):
|
ccxt/async_support/coinsph.py
CHANGED
@@ -555,7 +555,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
555
555
|
# ]
|
556
556
|
# }
|
557
557
|
#
|
558
|
-
markets = self.
|
558
|
+
markets = self.safe_list(response, 'symbols', [])
|
559
559
|
result = []
|
560
560
|
for i in range(0, len(markets)):
|
561
561
|
market = markets[i]
|
@@ -564,7 +564,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
564
564
|
quoteId = self.safe_string(market, 'quoteAsset')
|
565
565
|
base = self.safe_currency_code(baseId)
|
566
566
|
quote = self.safe_currency_code(quoteId)
|
567
|
-
limits = self.index_by(self.
|
567
|
+
limits = self.index_by(self.safe_list(market, 'filters', []), 'filterType')
|
568
568
|
amountLimits = self.safe_value(limits, 'LOT_SIZE', {})
|
569
569
|
priceLimits = self.safe_value(limits, 'PRICE_FILTER', {})
|
570
570
|
costLimits = self.safe_value(limits, 'NOTIONAL', {})
|
@@ -644,7 +644,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
644
644
|
ids.append(id)
|
645
645
|
request['symbols'] = ids
|
646
646
|
defaultMethod = 'publicGetOpenapiQuoteV1Ticker24hr'
|
647
|
-
options = self.
|
647
|
+
options = self.safe_dict(self.options, 'fetchTickers', {})
|
648
648
|
method = self.safe_string(options, 'method', defaultMethod)
|
649
649
|
tickers = None
|
650
650
|
if method == 'publicGetOpenapiQuoteV1TickerPrice':
|
@@ -673,7 +673,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
673
673
|
'symbol': market['id'],
|
674
674
|
}
|
675
675
|
defaultMethod = 'publicGetOpenapiQuoteV1Ticker24hr'
|
676
|
-
options = self.
|
676
|
+
options = self.safe_dict(self.options, 'fetchTicker', {})
|
677
677
|
method = self.safe_string(options, 'method', defaultMethod)
|
678
678
|
ticker = None
|
679
679
|
if method == 'publicGetOpenapiQuoteV1TickerPrice':
|
@@ -1002,7 +1002,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1002
1002
|
'cost': feeCost,
|
1003
1003
|
'currency': self.safe_currency_code(feeCurrencyId),
|
1004
1004
|
}
|
1005
|
-
isBuyer = self.
|
1005
|
+
isBuyer = self.safe_bool_2(trade, 'isBuyer', 'isBuyerMaker', None)
|
1006
1006
|
side = None
|
1007
1007
|
if isBuyer is not None:
|
1008
1008
|
side = 'buy' if (isBuyer is True) else 'sell'
|
@@ -1064,7 +1064,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1064
1064
|
return self.parse_balance(response)
|
1065
1065
|
|
1066
1066
|
def parse_balance(self, response) -> Balances:
|
1067
|
-
balances = self.
|
1067
|
+
balances = self.safe_list(response, 'balances', [])
|
1068
1068
|
result: dict = {
|
1069
1069
|
'info': response,
|
1070
1070
|
'timestamp': None,
|
@@ -1484,7 +1484,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
1484
1484
|
# }
|
1485
1485
|
# ]
|
1486
1486
|
#
|
1487
|
-
tradingFee = self.
|
1487
|
+
tradingFee = self.safe_dict(response, 0, {})
|
1488
1488
|
return self.parse_trading_fee(tradingFee, market)
|
1489
1489
|
|
1490
1490
|
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
ccxt/async_support/coinspot.py
CHANGED
@@ -270,7 +270,7 @@ class coinspot(Exchange, ImplicitAPI):
|
|
270
270
|
response = await self.publicGetLatest(params)
|
271
271
|
id = market['id']
|
272
272
|
id = id.lower()
|
273
|
-
prices = self.
|
273
|
+
prices = self.safe_dict(response, 'prices', {})
|
274
274
|
#
|
275
275
|
# {
|
276
276
|
# "status":"ok",
|
@@ -301,22 +301,22 @@ class coinspot(Exchange, ImplicitAPI):
|
|
301
301
|
#
|
302
302
|
# {
|
303
303
|
# "status": "ok",
|
304
|
-
# "prices":
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
304
|
+
# "prices": {
|
305
|
+
# "btc": {
|
306
|
+
# "bid": "25050",
|
307
|
+
# "ask": "25370",
|
308
|
+
# "last": "25234"
|
309
|
+
# },
|
310
|
+
# "ltc": {
|
311
|
+
# "bid": "79.39192993",
|
312
|
+
# "ask": "87.98",
|
313
|
+
# "last": "87.95"
|
314
|
+
# }
|
314
315
|
# }
|
315
|
-
# }
|
316
316
|
# }
|
317
317
|
#
|
318
318
|
result: dict = {}
|
319
|
-
prices = self.
|
319
|
+
prices = self.safe_dict(response, 'prices', {})
|
320
320
|
ids = list(prices.keys())
|
321
321
|
for i in range(0, len(ids)):
|
322
322
|
id = ids[i]
|
@@ -377,35 +377,35 @@ class coinspot(Exchange, ImplicitAPI):
|
|
377
377
|
request['startdate'] = self.yyyymmdd(since)
|
378
378
|
response = await self.privatePostRoMyTransactions(self.extend(request, params))
|
379
379
|
# {
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
383
|
-
#
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
#
|
389
|
-
#
|
390
|
-
#
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
#
|
395
|
-
#
|
396
|
-
#
|
397
|
-
#
|
398
|
-
#
|
399
|
-
#
|
400
|
-
#
|
401
|
-
#
|
402
|
-
#
|
403
|
-
#
|
380
|
+
# "status": "ok",
|
381
|
+
# "buyorders": [
|
382
|
+
# {
|
383
|
+
# "otc": False,
|
384
|
+
# "market": "ALGO/AUD",
|
385
|
+
# "amount": 386.95197925,
|
386
|
+
# "created": "2022-10-20T09:56:44.502Z",
|
387
|
+
# "audfeeExGst": 1.80018002,
|
388
|
+
# "audGst": 0.180018,
|
389
|
+
# "audtotal": 200
|
390
|
+
# },
|
391
|
+
# ],
|
392
|
+
# "sellorders": [
|
393
|
+
# {
|
394
|
+
# "otc": False,
|
395
|
+
# "market": "SOLO/ALGO",
|
396
|
+
# "amount": 154.52345614,
|
397
|
+
# "total": 115.78858204658796,
|
398
|
+
# "created": "2022-04-16T09:36:43.698Z",
|
399
|
+
# "audfeeExGst": 1.08995731,
|
400
|
+
# "audGst": 0.10899573,
|
401
|
+
# "audtotal": 118.7
|
402
|
+
# },
|
403
|
+
# ]
|
404
404
|
# }
|
405
|
-
buyTrades = self.
|
405
|
+
buyTrades = self.safe_list(response, 'buyorders', [])
|
406
406
|
for i in range(0, len(buyTrades)):
|
407
407
|
buyTrades[i]['side'] = 'buy'
|
408
|
-
sellTrades = self.
|
408
|
+
sellTrades = self.safe_list(response, 'sellorders', [])
|
409
409
|
for i in range(0, len(sellTrades)):
|
410
410
|
sellTrades[i]['side'] = 'sell'
|
411
411
|
trades = self.array_concat(buyTrades, sellTrades)
|