ccxt 4.4.44__py2.py3-none-any.whl → 4.4.46__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/blofin.py +22 -0
- ccxt/ascendex.py +15 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +15 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +178 -62
- ccxt/async_support/bingx.py +15 -9
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitget.py +105 -41
- ccxt/async_support/bitmart.py +3 -3
- ccxt/async_support/bitmex.py +1 -1
- ccxt/async_support/blofin.py +22 -0
- ccxt/async_support/bybit.py +84 -40
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/delta.py +9 -4
- ccxt/async_support/exmo.py +16 -8
- ccxt/async_support/gate.py +1 -2
- ccxt/async_support/hashkey.py +6 -1
- ccxt/async_support/htx.py +2 -2
- ccxt/async_support/hyperliquid.py +3 -4
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +1 -1
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kucoinfutures.py +2 -3
- ccxt/async_support/lykke.py +1 -1
- ccxt/async_support/mexc.py +3 -2
- ccxt/async_support/myokx.py +8 -0
- ccxt/async_support/okx.py +4 -4
- ccxt/async_support/onetrading.py +20 -4
- ccxt/async_support/whitebit.py +31 -8
- ccxt/async_support/woo.py +1 -1
- ccxt/async_support/woofipro.py +2 -2
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +178 -62
- ccxt/bingx.py +15 -9
- ccxt/bitfinex.py +1 -1
- ccxt/bitget.py +105 -41
- ccxt/bitmart.py +3 -3
- ccxt/bitmex.py +1 -1
- ccxt/blofin.py +22 -0
- ccxt/bybit.py +84 -40
- ccxt/coinbase.py +1 -1
- ccxt/coinex.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/delta.py +9 -4
- ccxt/exmo.py +16 -8
- ccxt/gate.py +1 -2
- ccxt/hashkey.py +6 -1
- ccxt/htx.py +2 -2
- ccxt/hyperliquid.py +3 -4
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +1 -1
- ccxt/kucoin.py +1 -1
- ccxt/kucoinfutures.py +2 -3
- ccxt/lykke.py +1 -1
- ccxt/mexc.py +3 -2
- ccxt/myokx.py +8 -0
- ccxt/okx.py +4 -4
- ccxt/onetrading.py +20 -4
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -1
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/myokx.py +5 -0
- ccxt/whitebit.py +31 -8
- ccxt/woo.py +1 -1
- ccxt/woofipro.py +2 -2
- {ccxt-4.4.44.dist-info → ccxt-4.4.46.dist-info}/METADATA +4 -4
- {ccxt-4.4.44.dist-info → ccxt-4.4.46.dist-info}/RECORD +74 -74
- {ccxt-4.4.44.dist-info → ccxt-4.4.46.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.44.dist-info → ccxt-4.4.46.dist-info}/WHEEL +0 -0
- {ccxt-4.4.44.dist-info → ccxt-4.4.46.dist-info}/top_level.txt +0 -0
ccxt/bitmart.py
CHANGED
@@ -756,7 +756,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
756
756
|
'fetchClosedOrders': {
|
757
757
|
'marginMode': True,
|
758
758
|
'limit': 200,
|
759
|
-
'
|
759
|
+
'daysBack': None,
|
760
760
|
'daysBackCanceled': None,
|
761
761
|
'untilDays': None,
|
762
762
|
'trigger': False,
|
@@ -785,7 +785,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
785
785
|
'mark': True,
|
786
786
|
'index': False,
|
787
787
|
},
|
788
|
-
'
|
788
|
+
'price': False,
|
789
789
|
},
|
790
790
|
'timeInForce': {
|
791
791
|
'IOC': True,
|
@@ -823,7 +823,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
823
823
|
'fetchClosedOrders': {
|
824
824
|
'marginMode': True,
|
825
825
|
'limit': 200,
|
826
|
-
'
|
826
|
+
'daysBack': None,
|
827
827
|
'daysBackCanceled': None,
|
828
828
|
'untilDays': None,
|
829
829
|
'trigger': False,
|
ccxt/bitmex.py
CHANGED
ccxt/blofin.py
CHANGED
@@ -204,6 +204,18 @@ class blofin(Exchange, ImplicitAPI):
|
|
204
204
|
'trade/orders-tpsl-history': 1,
|
205
205
|
'user/query-apikey': 1,
|
206
206
|
'affiliate/basic': 1,
|
207
|
+
'copytrading/instruments': 1,
|
208
|
+
'copytrading/account/balance': 1,
|
209
|
+
'copytrading/account/positions-by-order': 1,
|
210
|
+
'copytrading/account/positions-details-by-order': 1,
|
211
|
+
'copytrading/account/positions-by-contract': 1,
|
212
|
+
'copytrading/account/position-mode': 1,
|
213
|
+
'copytrading/account/leverage-info': 1,
|
214
|
+
'copytrading/trade/orders-pending': 1,
|
215
|
+
'copytrading/trade/pending-tpsl-by-contract': 1,
|
216
|
+
'copytrading/trade/position-history-by-order': 1,
|
217
|
+
'copytrading/trade/orders-history': 1,
|
218
|
+
'copytrading/trade/pending-tpsl-by-order': 1,
|
207
219
|
},
|
208
220
|
'post': {
|
209
221
|
'trade/order': 1,
|
@@ -215,6 +227,16 @@ class blofin(Exchange, ImplicitAPI):
|
|
215
227
|
'trade/cancel-tpsl': 1,
|
216
228
|
'trade/close-position': 1,
|
217
229
|
'asset/transfer': 1,
|
230
|
+
'copytrading/account/set-position-mode': 1,
|
231
|
+
'copytrading/account/set-leverage': 1,
|
232
|
+
'copytrading/trade/place-order': 1,
|
233
|
+
'copytrading/trade/cancel-order': 1,
|
234
|
+
'copytrading/trade/place-tpsl-by-contract': 1,
|
235
|
+
'copytrading/trade/cancel-tpsl-by-contract': 1,
|
236
|
+
'copytrading/trade/place-tpsl-by-order': 1,
|
237
|
+
'copytrading/trade/cancel-tpsl-by-order': 1,
|
238
|
+
'copytrading/trade/close-position-by-order': 1,
|
239
|
+
'copytrading/trade/close-position-by-contract': 1,
|
218
240
|
},
|
219
241
|
},
|
220
242
|
},
|
ccxt/bybit.py
CHANGED
@@ -1072,8 +1072,78 @@ class bybit(Exchange, ImplicitAPI):
|
|
1072
1072
|
'ERC20': 'ETH',
|
1073
1073
|
'TRC20': 'TRX',
|
1074
1074
|
'BEP20': 'BSC',
|
1075
|
+
'SOL': 'SOL',
|
1076
|
+
'ACA': 'ACA',
|
1077
|
+
'ADA': 'ADA',
|
1078
|
+
'ALGO': 'ALGO',
|
1079
|
+
'APT': 'APTOS',
|
1080
|
+
'AR': 'AR',
|
1081
|
+
'ARBONE': 'ARBI',
|
1082
|
+
'AVAXC': 'CAVAX',
|
1083
|
+
'AVAXX': 'XAVAX',
|
1084
|
+
'ATOM': 'ATOM',
|
1085
|
+
'BCH': 'BCH',
|
1086
|
+
'BEP2': 'BNB',
|
1087
|
+
'CHZ': 'CHZ',
|
1088
|
+
'DCR': 'DCR',
|
1089
|
+
'DGB': 'DGB',
|
1090
|
+
'DOGE': 'DOGE',
|
1091
|
+
'DOT': 'DOT',
|
1092
|
+
'EGLD': 'EGLD',
|
1093
|
+
'EOS': 'EOS',
|
1094
|
+
'ETC': 'ETC',
|
1095
|
+
'ETHF': 'ETHF',
|
1096
|
+
'ETHW': 'ETHW',
|
1097
|
+
'FIL': 'FIL',
|
1098
|
+
'STEP': 'FITFI',
|
1099
|
+
'FLOW': 'FLOW',
|
1100
|
+
'FTM': 'FTM',
|
1101
|
+
'GLMR': 'GLMR',
|
1102
|
+
'HBAR': 'HBAR',
|
1103
|
+
'HNT': 'HNT',
|
1104
|
+
'ICP': 'ICP',
|
1105
|
+
'ICX': 'ICX',
|
1106
|
+
'KDA': 'KDA',
|
1107
|
+
'KLAY': 'KLAY',
|
1108
|
+
'KMA': 'KMA',
|
1109
|
+
'KSM': 'KSM',
|
1110
|
+
'LTC': 'LTC',
|
1111
|
+
# 'TERRA': 'LUNANEW',
|
1112
|
+
# 'TERRACLASSIC': 'LUNA',
|
1113
|
+
'MATIC': 'MATIC',
|
1114
|
+
'MINA': 'MINA',
|
1115
|
+
'MOVR': 'MOVR',
|
1116
|
+
'NEAR': 'NEAR',
|
1117
|
+
'NEM': 'NEM',
|
1118
|
+
'OASYS': 'OAS',
|
1119
|
+
'OASIS': 'ROSE',
|
1075
1120
|
'OMNI': 'OMNI',
|
1076
|
-
'
|
1121
|
+
'ONE': 'ONE',
|
1122
|
+
'OPTIMISM': 'OP',
|
1123
|
+
'POKT': 'POKT',
|
1124
|
+
'QTUM': 'QTUM',
|
1125
|
+
'RVN': 'RVN',
|
1126
|
+
'SC': 'SC',
|
1127
|
+
'SCRT': 'SCRT',
|
1128
|
+
'STX': 'STX',
|
1129
|
+
'THETA': 'THETA',
|
1130
|
+
'TON': 'TON',
|
1131
|
+
'WAVES': 'WAVES',
|
1132
|
+
'WAX': 'WAXP',
|
1133
|
+
'XDC': 'XDC',
|
1134
|
+
'XEC': 'XEC',
|
1135
|
+
'XLM': 'XLM',
|
1136
|
+
'XRP': 'XRP',
|
1137
|
+
'XTZ': 'XTZ',
|
1138
|
+
'XYM': 'XYM',
|
1139
|
+
'ZEN': 'ZEN',
|
1140
|
+
'ZIL': 'ZIL',
|
1141
|
+
'ZKSYNC': 'ZKSYNC',
|
1142
|
+
# todo: uncomment after consensus
|
1143
|
+
# 'CADUCEUS': 'CMP',
|
1144
|
+
# 'KON': 'KON', # konpay, "konchain"
|
1145
|
+
# 'AURORA': 'AURORA',
|
1146
|
+
# 'BITCOINGOLD': 'BTG',
|
1077
1147
|
},
|
1078
1148
|
'networksById': {
|
1079
1149
|
'ETH': 'ERC20',
|
@@ -1115,7 +1185,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1115
1185
|
'mark': True,
|
1116
1186
|
'index': True,
|
1117
1187
|
},
|
1118
|
-
'
|
1188
|
+
'price': True,
|
1119
1189
|
},
|
1120
1190
|
'timeInForce': {
|
1121
1191
|
'IOC': True,
|
@@ -1155,7 +1225,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1155
1225
|
'fetchClosedOrders': {
|
1156
1226
|
'marginMode': False,
|
1157
1227
|
'limit': 50,
|
1158
|
-
'
|
1228
|
+
'daysBack': 365 * 2, # 2 years
|
1159
1229
|
'daysBackCanceled': 1,
|
1160
1230
|
'untilDays': 7,
|
1161
1231
|
'trigger': True,
|
@@ -1172,7 +1242,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1172
1242
|
'triggerDirection': False,
|
1173
1243
|
'attachedStopLossTakeProfit': {
|
1174
1244
|
'triggerPriceType': None,
|
1175
|
-
'
|
1245
|
+
'price': True,
|
1176
1246
|
},
|
1177
1247
|
'marketBuyRequiresPrice': True,
|
1178
1248
|
},
|
@@ -1253,7 +1323,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
1253
1323
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1254
1324
|
:returns any: [enableUnifiedMargin, enableUnifiedAccount]
|
1255
1325
|
"""
|
1256
|
-
# The API key of user id must own one of permissions will be allowed to call following API endpoints
|
1326
|
+
# The API key of user id must own one of permissions will be allowed to call following API endpoints:
|
1257
1327
|
# SUB UID: "Account Transfer"
|
1258
1328
|
# MASTER UID: "Account Transfer", "Subaccount Transfer", "Withdrawal"
|
1259
1329
|
enableUnifiedMargin = self.safe_bool(self.options, 'enableUnifiedMargin')
|
@@ -5058,12 +5128,11 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
5058
5128
|
address = self.safe_string(depositAddress, 'addressDeposit')
|
5059
5129
|
tag = self.safe_string(depositAddress, 'tagDeposit')
|
5060
5130
|
code = self.safe_string(currency, 'code')
|
5061
|
-
chain = self.safe_string(depositAddress, 'chain')
|
5062
5131
|
self.check_address(address)
|
5063
5132
|
return {
|
5064
5133
|
'info': depositAddress,
|
5065
5134
|
'currency': code,
|
5066
|
-
'network': chain,
|
5135
|
+
'network': self.network_id_to_code(self.safe_string(depositAddress, 'chain'), code),
|
5067
5136
|
'address': address,
|
5068
5137
|
'tag': tag,
|
5069
5138
|
}
|
@@ -5083,6 +5152,10 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
5083
5152
|
request: dict = {
|
5084
5153
|
'coin': currency['id'],
|
5085
5154
|
}
|
5155
|
+
networkCode = None
|
5156
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
5157
|
+
if networkCode is not None:
|
5158
|
+
request['chainType'] = self.network_code_to_id(networkCode, code)
|
5086
5159
|
response = self.privateGetV5AssetDepositQueryAddress(self.extend(request, params))
|
5087
5160
|
#
|
5088
5161
|
# {
|
@@ -5123,40 +5196,11 @@ classic accounts only/ spot not supported* fetches information on an order made
|
|
5123
5196
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
5124
5197
|
"""
|
5125
5198
|
self.load_markets()
|
5126
|
-
networkCode, query = self.handle_network_code_and_params(params)
|
5127
|
-
networkId = self.network_code_to_id(networkCode)
|
5128
5199
|
currency = self.currency(code)
|
5129
|
-
|
5130
|
-
|
5131
|
-
|
5132
|
-
|
5133
|
-
request['chainType'] = networkId
|
5134
|
-
response = self.privateGetV5AssetDepositQueryAddress(self.extend(request, query))
|
5135
|
-
#
|
5136
|
-
# {
|
5137
|
-
# "retCode": 0,
|
5138
|
-
# "retMsg": "success",
|
5139
|
-
# "result": {
|
5140
|
-
# "coin": "USDT",
|
5141
|
-
# "chains": [
|
5142
|
-
# {
|
5143
|
-
# "chainType": "ERC20",
|
5144
|
-
# "addressDeposit": "0xd9e1cd77afa0e50b452a62fbb68a3340602286c3",
|
5145
|
-
# "tagDeposit": "",
|
5146
|
-
# "chain": "ETH"
|
5147
|
-
# }
|
5148
|
-
# ]
|
5149
|
-
# },
|
5150
|
-
# "retExtInfo": {},
|
5151
|
-
# "time": 1672192792860
|
5152
|
-
# }
|
5153
|
-
#
|
5154
|
-
result = self.safe_dict(response, 'result', {})
|
5155
|
-
chains = self.safe_list(result, 'chains', [])
|
5156
|
-
chainsIndexedById = self.index_by(chains, 'chain')
|
5157
|
-
selectedNetworkId = self.select_network_id_from_raw_networks(code, networkCode, chainsIndexedById)
|
5158
|
-
addressObject = self.safe_dict(chainsIndexedById, selectedNetworkId, {})
|
5159
|
-
return self.parse_deposit_address(addressObject, currency)
|
5200
|
+
networkCode, paramsOmited = self.handle_network_code_and_params(params)
|
5201
|
+
indexedAddresses = self.fetch_deposit_addresses_by_network(code, paramsOmited)
|
5202
|
+
selectedNetworkCode = self.select_network_code_from_unified_networks(currency['code'], networkCode, indexedAddresses)
|
5203
|
+
return indexedAddresses[selectedNetworkCode]
|
5160
5204
|
|
5161
5205
|
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
5162
5206
|
"""
|
ccxt/coinbase.py
CHANGED
ccxt/coinex.py
CHANGED
ccxt/cryptocom.py
CHANGED
ccxt/delta.py
CHANGED
@@ -1446,13 +1446,14 @@ class delta(Exchange, ImplicitAPI):
|
|
1446
1446
|
"""
|
1447
1447
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
1448
1448
|
|
1449
|
-
https://docs.delta.exchange/#
|
1449
|
+
https://docs.delta.exchange/#delta-exchange-api-v2-historical-ohlc-candles-sparklines
|
1450
1450
|
|
1451
1451
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
1452
1452
|
:param str timeframe: the length of time each candle represents
|
1453
1453
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
1454
1454
|
:param int [limit]: the maximum amount of candles to fetch
|
1455
1455
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1456
|
+
:param str [params.until]: timestamp in ms of the latest candle to fetch
|
1456
1457
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1457
1458
|
"""
|
1458
1459
|
self.load_markets()
|
@@ -1462,14 +1463,18 @@ class delta(Exchange, ImplicitAPI):
|
|
1462
1463
|
}
|
1463
1464
|
duration = self.parse_timeframe(timeframe)
|
1464
1465
|
limit = limit if limit else 2000 # max 2000
|
1466
|
+
until = self.safe_integer_product(params, 'until', 0.001)
|
1467
|
+
untilIsDefined = (until is not None)
|
1468
|
+
if untilIsDefined:
|
1469
|
+
until = self.parse_to_int(until)
|
1465
1470
|
if since is None:
|
1466
|
-
end = self.seconds()
|
1471
|
+
end = until if untilIsDefined else self.seconds()
|
1467
1472
|
request['end'] = end
|
1468
1473
|
request['start'] = end - limit * duration
|
1469
1474
|
else:
|
1470
1475
|
start = self.parse_to_int(since / 1000)
|
1471
1476
|
request['start'] = start
|
1472
|
-
request['end'] = self.sum(start, limit * duration)
|
1477
|
+
request['end'] = until if untilIsDefined else self.sum(start, limit * duration)
|
1473
1478
|
price = self.safe_string(params, 'price')
|
1474
1479
|
if price == 'mark':
|
1475
1480
|
request['symbol'] = 'MARK:' + market['id']
|
@@ -1477,7 +1482,7 @@ class delta(Exchange, ImplicitAPI):
|
|
1477
1482
|
request['symbol'] = market['info']['spot_index']['symbol']
|
1478
1483
|
else:
|
1479
1484
|
request['symbol'] = market['id']
|
1480
|
-
params = self.omit(params, 'price')
|
1485
|
+
params = self.omit(params, ['price', 'until'])
|
1481
1486
|
response = self.publicGetHistoryCandles(self.extend(request, params))
|
1482
1487
|
#
|
1483
1488
|
# {
|
ccxt/exmo.py
CHANGED
@@ -846,32 +846,40 @@ class exmo(Exchange, ImplicitAPI):
|
|
846
846
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
847
847
|
:param int [limit]: the maximum amount of candles to fetch
|
848
848
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
849
|
+
:param int [params.until]: timestamp in ms of the latest candle to fetch
|
849
850
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
850
851
|
"""
|
851
852
|
self.load_markets()
|
852
853
|
market = self.market(symbol)
|
854
|
+
until = self.safe_integer_product(params, 'until', 0.001)
|
855
|
+
untilIsDefined = (until is not None)
|
853
856
|
request: dict = {
|
854
857
|
'symbol': market['id'],
|
855
858
|
'resolution': self.safe_string(self.timeframes, timeframe, timeframe),
|
856
859
|
}
|
857
860
|
maxLimit = 3000
|
858
861
|
duration = self.parse_timeframe(timeframe)
|
859
|
-
now = self.milliseconds()
|
862
|
+
now = self.parse_to_int(self.milliseconds() / 1000)
|
860
863
|
if since is None:
|
864
|
+
to = min(until, now) if untilIsDefined else now
|
861
865
|
if limit is None:
|
862
866
|
limit = 1000 # cap default at generous amount
|
863
867
|
else:
|
864
868
|
limit = min(limit, maxLimit)
|
865
|
-
request['from'] =
|
866
|
-
request['to'] =
|
869
|
+
request['from'] = to - (limit * duration) - 1
|
870
|
+
request['to'] = to
|
867
871
|
else:
|
868
872
|
request['from'] = self.parse_to_int(since / 1000) - 1
|
869
|
-
if
|
870
|
-
|
873
|
+
if untilIsDefined:
|
874
|
+
request['to'] = min(until, now)
|
871
875
|
else:
|
872
|
-
limit
|
873
|
-
|
874
|
-
|
876
|
+
if limit is None:
|
877
|
+
limit = maxLimit
|
878
|
+
else:
|
879
|
+
limit = min(limit, maxLimit)
|
880
|
+
to = self.sum(since, limit * duration)
|
881
|
+
request['to'] = min(to, now)
|
882
|
+
params = self.omit(params, 'until')
|
875
883
|
response = self.publicGetCandlesHistory(self.extend(request, params))
|
876
884
|
#
|
877
885
|
# {
|
ccxt/gate.py
CHANGED
@@ -734,7 +734,6 @@ class gate(Exchange, ImplicitAPI):
|
|
734
734
|
'takeProfitPrice': True,
|
735
735
|
'attachedStopLossTakeProfit': None,
|
736
736
|
'timeInForce': {
|
737
|
-
'GTC': True,
|
738
737
|
'IOC': True,
|
739
738
|
'FOK': True,
|
740
739
|
'PO': True,
|
@@ -775,7 +774,7 @@ class gate(Exchange, ImplicitAPI):
|
|
775
774
|
'trailing': False,
|
776
775
|
'limit': 100,
|
777
776
|
'untilDays': 30,
|
778
|
-
'
|
777
|
+
'daysBack': None,
|
779
778
|
'daysBackCanceled': None,
|
780
779
|
},
|
781
780
|
'fetchOHLCV': {
|
ccxt/hashkey.py
CHANGED
@@ -1454,9 +1454,14 @@ class hashkey(Exchange, ImplicitAPI):
|
|
1454
1454
|
if isBuyer is not None:
|
1455
1455
|
side = 'buy' if isBuyer else 'sell'
|
1456
1456
|
takerOrMaker = None
|
1457
|
-
isMaker = self.safe_bool_n(trade, ['isMaker', 'isMarker'
|
1457
|
+
isMaker = self.safe_bool_n(trade, ['isMaker', 'isMarker'])
|
1458
1458
|
if isMaker is not None:
|
1459
1459
|
takerOrMaker = 'maker' if isMaker else 'taker'
|
1460
|
+
isBuyerMaker = self.safe_bool(trade, 'ibm')
|
1461
|
+
# if public trade
|
1462
|
+
if isBuyerMaker is not None:
|
1463
|
+
takerOrMaker = 'taker'
|
1464
|
+
side = 'sell' if isBuyerMaker else 'buy'
|
1460
1465
|
feeCost = self.safe_string(trade, 'commission')
|
1461
1466
|
feeCurrncyId = self.safe_string(trade, 'commissionAsset')
|
1462
1467
|
feeInfo = self.safe_dict(trade, 'fee')
|
ccxt/htx.py
CHANGED
@@ -1310,7 +1310,7 @@ class htx(Exchange, ImplicitAPI):
|
|
1310
1310
|
'trailing': False,
|
1311
1311
|
'untilDays': 2,
|
1312
1312
|
'limit': 500,
|
1313
|
-
'
|
1313
|
+
'daysBack': 180,
|
1314
1314
|
'daysBackCanceled': 1 / 12,
|
1315
1315
|
},
|
1316
1316
|
'fetchOHLCV': {
|
@@ -1351,7 +1351,7 @@ class htx(Exchange, ImplicitAPI):
|
|
1351
1351
|
'trailing': False,
|
1352
1352
|
'untilDays': 2,
|
1353
1353
|
'limit': 50,
|
1354
|
-
'
|
1354
|
+
'daysBack': 90,
|
1355
1355
|
'daysBackCanceled': 1 / 12,
|
1356
1356
|
},
|
1357
1357
|
'fetchOHLCV': {
|
ccxt/hyperliquid.py
CHANGED
@@ -238,7 +238,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
238
238
|
'takeProfitPrice': False,
|
239
239
|
'attachedStopLossTakeProfit': None,
|
240
240
|
'timeInForce': {
|
241
|
-
'GTC': True,
|
242
241
|
'IOC': True,
|
243
242
|
'FOK': False,
|
244
243
|
'PO': True,
|
@@ -283,7 +282,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
283
282
|
'fetchClosedOrders': {
|
284
283
|
'marginMode': False,
|
285
284
|
'limit': 2000,
|
286
|
-
'
|
285
|
+
'daysBack': None,
|
287
286
|
'daysBackCanceled': None,
|
288
287
|
'untilDays': None,
|
289
288
|
'trigger': False,
|
@@ -2181,7 +2180,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2181
2180
|
else:
|
2182
2181
|
market = self.safe_market(marketId, market)
|
2183
2182
|
symbol = market['symbol']
|
2184
|
-
timestamp = self.
|
2183
|
+
timestamp = self.safe_integer(entry, 'timestamp')
|
2185
2184
|
status = self.safe_string_2(order, 'status', 'ccxtStatus')
|
2186
2185
|
order = self.omit(order, ['ccxtStatus'])
|
2187
2186
|
side = self.safe_string(entry, 'side')
|
@@ -2196,7 +2195,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2196
2195
|
'timestamp': timestamp,
|
2197
2196
|
'datetime': self.iso8601(timestamp),
|
2198
2197
|
'lastTradeTimestamp': None,
|
2199
|
-
'lastUpdateTimestamp':
|
2198
|
+
'lastUpdateTimestamp': self.safe_integer(order, 'statusTimestamp'),
|
2200
2199
|
'symbol': symbol,
|
2201
2200
|
'type': self.parse_order_type(self.safe_string_lower(entry, 'orderType')),
|
2202
2201
|
'timeInForce': self.safe_string_upper(entry, 'tif'),
|
ccxt/kraken.py
CHANGED
ccxt/krakenfutures.py
CHANGED
ccxt/kucoin.py
CHANGED
ccxt/kucoinfutures.py
CHANGED
@@ -386,9 +386,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
386
386
|
'stopLossPrice': True,
|
387
387
|
'takeProfitPrice': True,
|
388
388
|
'attachedStopLossTakeProfit': {
|
389
|
-
'triggerPrice': None,
|
390
389
|
'triggerPriceType': None,
|
391
|
-
'
|
390
|
+
'price': True,
|
392
391
|
},
|
393
392
|
'timeInForce': {
|
394
393
|
'IOC': True,
|
@@ -428,7 +427,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
428
427
|
'fetchClosedOrders': {
|
429
428
|
'marginMode': False,
|
430
429
|
'limit': 1000,
|
431
|
-
'
|
430
|
+
'daysBack': None,
|
432
431
|
'daysBackCanceled': None,
|
433
432
|
'untilDays': None,
|
434
433
|
'trigger': True,
|
ccxt/lykke.py
CHANGED
@@ -209,7 +209,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
209
209
|
# {
|
210
210
|
# "payload":[
|
211
211
|
# {
|
212
|
-
# "assetId":"115a60c2-0da1-40f9-a7f2-
|
212
|
+
# "assetId":"115a60c2-0da1-40f9-a7f2-41da723b9075",
|
213
213
|
# "name":"Monaco Token",
|
214
214
|
# "symbol":"MCO",
|
215
215
|
# "accuracy":6,
|
ccxt/mexc.py
CHANGED
@@ -457,6 +457,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
457
457
|
'1h': '60m',
|
458
458
|
'4h': '4h',
|
459
459
|
'1d': '1d',
|
460
|
+
'1w': '1W',
|
460
461
|
'1M': '1M',
|
461
462
|
},
|
462
463
|
'swap': {
|
@@ -748,7 +749,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
748
749
|
'fetchClosedOrders': {
|
749
750
|
'marginMode': True,
|
750
751
|
'limit': 1000,
|
751
|
-
'
|
752
|
+
'daysBack': 7,
|
752
753
|
'daysBackCanceled': 7,
|
753
754
|
'untilDays': 7,
|
754
755
|
'trigger': False,
|
@@ -804,7 +805,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
804
805
|
'fetchClosedOrders': {
|
805
806
|
'marginMode': False,
|
806
807
|
'limit': 100,
|
807
|
-
'
|
808
|
+
'daysBack': 90,
|
808
809
|
'daysBackCanceled': None,
|
809
810
|
'untilDays': 90,
|
810
811
|
'trigger': True,
|
ccxt/myokx.py
CHANGED
ccxt/okx.py
CHANGED
@@ -1225,7 +1225,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1225
1225
|
'mark': True,
|
1226
1226
|
'index': True,
|
1227
1227
|
},
|
1228
|
-
'
|
1228
|
+
'price': True,
|
1229
1229
|
},
|
1230
1230
|
'timeInForce': {
|
1231
1231
|
'IOC': True,
|
@@ -1265,7 +1265,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1265
1265
|
'fetchClosedOrders': {
|
1266
1266
|
'marginMode': False,
|
1267
1267
|
'limit': 100,
|
1268
|
-
'
|
1268
|
+
'daysBack': 90, # 3 months
|
1269
1269
|
'daysBackCanceled': 1 / 12, # 2 hour
|
1270
1270
|
'untilDays': None,
|
1271
1271
|
'trigger': True,
|
@@ -1635,7 +1635,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1635
1635
|
'contractSize': self.safe_number(market, 'ctVal') if contract else None,
|
1636
1636
|
'expiry': expiry,
|
1637
1637
|
'expiryDatetime': self.iso8601(expiry),
|
1638
|
-
'strike': strikePrice,
|
1638
|
+
'strike': self.parse_number(strikePrice),
|
1639
1639
|
'optionType': optionType,
|
1640
1640
|
'created': self.safe_integer(market, 'listTime'),
|
1641
1641
|
'precision': {
|
@@ -1834,7 +1834,7 @@ class okx(Exchange, ImplicitAPI):
|
|
1834
1834
|
}
|
1835
1835
|
firstChain = self.safe_dict(chains, 0, {})
|
1836
1836
|
result[code] = {
|
1837
|
-
'info':
|
1837
|
+
'info': chains,
|
1838
1838
|
'code': code,
|
1839
1839
|
'id': currencyId,
|
1840
1840
|
'name': self.safe_string(firstChain, 'name'),
|