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/async_support/bigone.py
CHANGED
@@ -306,6 +306,105 @@ class bigone(Exchange, ImplicitAPI):
|
|
306
306
|
# undetermined: XinFin, YAS, Ycash
|
307
307
|
},
|
308
308
|
},
|
309
|
+
'features': {
|
310
|
+
'default': {
|
311
|
+
'sandbox': False,
|
312
|
+
'createOrder': {
|
313
|
+
'marginMode': False,
|
314
|
+
'triggerPrice': True,
|
315
|
+
'triggerPriceType': None,
|
316
|
+
'triggerDirection': True, # todo implement
|
317
|
+
'stopLossPrice': False, # todo by trigger
|
318
|
+
'takeProfitPrice': False, # todo by trigger
|
319
|
+
'attachedStopLossTakeProfit': None,
|
320
|
+
'timeInForce': {
|
321
|
+
'IOC': True,
|
322
|
+
'FOK': False,
|
323
|
+
'PO': True,
|
324
|
+
'GTD': False,
|
325
|
+
},
|
326
|
+
'hedged': False,
|
327
|
+
'trailing': False,
|
328
|
+
'leverage': False,
|
329
|
+
'marketBuyRequiresPrice': True,
|
330
|
+
'marketBuyByCost': True,
|
331
|
+
'selfTradePrevention': False,
|
332
|
+
'iceberg': False,
|
333
|
+
},
|
334
|
+
'createOrders': None, # todo: implement
|
335
|
+
'fetchMyTrades': {
|
336
|
+
'marginMode': False,
|
337
|
+
'limit': 200,
|
338
|
+
'daysBack': None,
|
339
|
+
'untilDays': None,
|
340
|
+
},
|
341
|
+
'fetchOrder': {
|
342
|
+
'marginMode': False,
|
343
|
+
'trigger': False,
|
344
|
+
'trailing': False,
|
345
|
+
},
|
346
|
+
'fetchOpenOrders': {
|
347
|
+
'marginMode': False,
|
348
|
+
'limit': 200,
|
349
|
+
'trigger': False,
|
350
|
+
'trailing': False,
|
351
|
+
},
|
352
|
+
'fetchOrders': {
|
353
|
+
'marginMode': False,
|
354
|
+
'limit': 200,
|
355
|
+
'daysBack': None,
|
356
|
+
'untilDays': None,
|
357
|
+
'trigger': False,
|
358
|
+
'trailing': False,
|
359
|
+
},
|
360
|
+
'fetchClosedOrders': {
|
361
|
+
'marginMode': False,
|
362
|
+
'limit': 200,
|
363
|
+
'daysBack': None,
|
364
|
+
'daysBackCanceled': None,
|
365
|
+
'untilDays': None,
|
366
|
+
'trigger': False,
|
367
|
+
'trailing': False,
|
368
|
+
},
|
369
|
+
'fetchOHLCV': {
|
370
|
+
'limit': 500,
|
371
|
+
},
|
372
|
+
},
|
373
|
+
'spot': {
|
374
|
+
'extends': 'default',
|
375
|
+
},
|
376
|
+
'forDerivatives': {
|
377
|
+
'extends': 'default',
|
378
|
+
'createOrder': {
|
379
|
+
# todo: implement
|
380
|
+
'triggerPriceType': {
|
381
|
+
'mark': True,
|
382
|
+
'index': True,
|
383
|
+
'last': True,
|
384
|
+
},
|
385
|
+
},
|
386
|
+
'fetchOrders': {
|
387
|
+
'daysBack': 100000,
|
388
|
+
'untilDays': 100000,
|
389
|
+
},
|
390
|
+
'fetchClosedOrders': {
|
391
|
+
'daysBack': 100000,
|
392
|
+
'untilDays': 100000,
|
393
|
+
},
|
394
|
+
},
|
395
|
+
'swap': {
|
396
|
+
'linear': {
|
397
|
+
'extends': 'forDerivatives',
|
398
|
+
},
|
399
|
+
'inverse': {
|
400
|
+
'extends': 'forDerivatives',
|
401
|
+
},
|
402
|
+
},
|
403
|
+
'future': {
|
404
|
+
'linear': None,
|
405
|
+
'inverse': None,
|
406
|
+
},
|
407
|
+
},
|
309
408
|
'precisionMode': TICK_SIZE,
|
310
409
|
'exceptions': {
|
311
410
|
'exact': {
|
@@ -1174,24 +1273,34 @@ class bigone(Exchange, ImplicitAPI):
|
|
1174
1273
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
1175
1274
|
:param int [limit]: the maximum amount of candles to fetch
|
1176
1275
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1276
|
+
:param int [params.until]: timestamp in ms of the earliest candle to fetch
|
1177
1277
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1178
1278
|
"""
|
1179
1279
|
await self.load_markets()
|
1180
1280
|
market = self.market(symbol)
|
1181
1281
|
if market['contract']:
|
1182
1282
|
raise BadRequest(self.id + ' fetchOHLCV() can only fetch ohlcvs for spot markets')
|
1283
|
+
until = self.safe_integer(params, 'until')
|
1284
|
+
untilIsDefined = (until is not None)
|
1285
|
+
sinceIsDefined = (since is not None)
|
1183
1286
|
if limit is None:
|
1184
|
-
limit = 100 # default 100, max 500
|
1287
|
+
limit = 500 if (sinceIsDefined and untilIsDefined) else 100 # default 100, max 500, if since and limit defined then fetch all the candles between them unless it exceeds the max of 500
|
1185
1288
|
request: dict = {
|
1186
1289
|
'asset_pair_name': market['id'],
|
1187
1290
|
'period': self.safe_string(self.timeframes, timeframe, timeframe),
|
1188
1291
|
'limit': limit,
|
1189
1292
|
}
|
1190
|
-
if
|
1293
|
+
if sinceIsDefined:
|
1191
1294
|
# start = self.parse_to_int(since / 1000)
|
1192
1295
|
duration = self.parse_timeframe(timeframe)
|
1193
|
-
|
1194
|
-
|
1296
|
+
endByLimit = self.sum(since, limit * duration * 1000)
|
1297
|
+
if untilIsDefined:
|
1298
|
+
request['time'] = self.iso8601(min(endByLimit, until + 1))
|
1299
|
+
else:
|
1300
|
+
request['time'] = self.iso8601(endByLimit)
|
1301
|
+
elif untilIsDefined:
|
1302
|
+
request['time'] = self.iso8601(until + 1)
|
1303
|
+
params = self.omit(params, 'until')
|
1195
1304
|
response = await self.publicGetAssetPairsAssetPairNameCandles(self.extend(request, params))
|
1196
1305
|
#
|
1197
1306
|
# {
|
ccxt/async_support/binance.py
CHANGED
@@ -1149,6 +1149,7 @@ class binance(Exchange, ImplicitAPI):
|
|
1149
1149
|
'um/symbolConfig': 1,
|
1150
1150
|
'cm/accountConfig': 1,
|
1151
1151
|
'cm/symbolConfig': 1,
|
1152
|
+
'rateLimit/order': 1,
|
1152
1153
|
},
|
1153
1154
|
'post': {
|
1154
1155
|
'um/order': 1,
|
@@ -2496,7 +2497,7 @@ class binance(Exchange, ImplicitAPI):
|
|
2496
2497
|
#
|
2497
2498
|
'-2010': InvalidOrder, # NEW_ORDER_REJECTED
|
2498
2499
|
'-2011': OperationRejected, # CANCEL_REJECTED
|
2499
|
-
'-2013':
|
2500
|
+
'-2013': OrderNotFound, # Order does not exist.
|
2500
2501
|
'-2014': OperationRejected, # API-key format invalid.
|
2501
2502
|
'-2015': OperationRejected, # Invalid API-key, IP, or permissions for action.
|
2502
2503
|
'-2016': OperationFailed, # No trading window could be found for the symbol. Try ticker/24hrs instead.
|
@@ -9324,8 +9325,7 @@ class binance(Exchange, ImplicitAPI):
|
|
9324
9325
|
response = await self.dapiPublicGetPremiumIndex(query)
|
9325
9326
|
else:
|
9326
9327
|
raise NotSupported(self.id + ' fetchFundingRates() supports linear and inverse contracts only')
|
9327
|
-
|
9328
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
9328
|
+
return self.parse_funding_rates(response, symbols)
|
9329
9329
|
|
9330
9330
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
9331
9331
|
# ensure it matches with https://www.binance.com/en/futures/funding-history/0
|
@@ -13253,8 +13253,7 @@ class binance(Exchange, ImplicitAPI):
|
|
13253
13253
|
# },
|
13254
13254
|
# ]
|
13255
13255
|
#
|
13256
|
-
|
13257
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
13256
|
+
return self.parse_funding_rates(response, symbols)
|
13258
13257
|
|
13259
13258
|
async def fetch_long_short_ratio_history(self, symbol: Str = None, timeframe: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LongShortRatio]:
|
13260
13259
|
"""
|
ccxt/async_support/binanceus.py
CHANGED
ccxt/async_support/bingx.py
CHANGED
@@ -1538,8 +1538,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
1538
1538
|
symbols = self.market_symbols(symbols, 'swap', True)
|
1539
1539
|
response = await self.swapV2PublicGetQuotePremiumIndex(self.extend(params))
|
1540
1540
|
data = self.safe_list(response, 'data', [])
|
1541
|
-
|
1542
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
1541
|
+
return self.parse_funding_rates(data, symbols)
|
1543
1542
|
|
1544
1543
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
1545
1544
|
#
|
ccxt/async_support/bit2c.py
CHANGED
@@ -178,6 +178,62 @@ class bit2c(Exchange, ImplicitAPI):
|
|
178
178
|
'options': {
|
179
179
|
'fetchTradesMethod': 'public_get_exchanges_pair_trades',
|
180
180
|
},
|
181
|
+
'features': {
|
182
|
+
'spot': {
|
183
|
+
'sandbox': False,
|
184
|
+
'createOrder': {
|
185
|
+
'marginMode': False,
|
186
|
+
'triggerPrice': False,
|
187
|
+
'triggerPriceType': None,
|
188
|
+
'triggerDirection': False,
|
189
|
+
'stopLossPrice': False,
|
190
|
+
'takeProfitPrice': False,
|
191
|
+
'attachedStopLossTakeProfit': None,
|
192
|
+
'timeInForce': {
|
193
|
+
'IOC': False,
|
194
|
+
'FOK': False,
|
195
|
+
'PO': False,
|
196
|
+
'GTD': False,
|
197
|
+
},
|
198
|
+
'hedged': False,
|
199
|
+
'trailing': False,
|
200
|
+
'leverage': False,
|
201
|
+
'marketBuyRequiresPrice': False,
|
202
|
+
'marketBuyByCost': False,
|
203
|
+
'selfTradePrevention': False,
|
204
|
+
'iceberg': False,
|
205
|
+
},
|
206
|
+
'createOrders': None,
|
207
|
+
'fetchMyTrades': {
|
208
|
+
'marginMode': False,
|
209
|
+
'limit': 100,
|
210
|
+
'daysBack': 30,
|
211
|
+
'untilDays': 30,
|
212
|
+
},
|
213
|
+
'fetchOrder': {
|
214
|
+
'marginMode': False,
|
215
|
+
'trigger': False,
|
216
|
+
'trailing': False,
|
217
|
+
},
|
218
|
+
'fetchOpenOrders': {
|
219
|
+
'marginMode': False,
|
220
|
+
'limit': None,
|
221
|
+
'trigger': False,
|
222
|
+
'trailing': False,
|
223
|
+
},
|
224
|
+
'fetchOrders': None,
|
225
|
+
'fetchClosedOrders': None, # todo implement
|
226
|
+
'fetchOHLCV': None,
|
227
|
+
},
|
228
|
+
'swap': {
|
229
|
+
'linear': None,
|
230
|
+
'inverse': None,
|
231
|
+
},
|
232
|
+
'future': {
|
233
|
+
'linear': None,
|
234
|
+
'inverse': None,
|
235
|
+
},
|
236
|
+
},
|
181
237
|
'precisionMode': TICK_SIZE,
|
182
238
|
'exceptions': {
|
183
239
|
'exact': {
|
ccxt/async_support/bitbank.py
CHANGED
@@ -154,6 +154,64 @@ class bitbank(Exchange, ImplicitAPI):
|
|
154
154
|
],
|
155
155
|
},
|
156
156
|
},
|
157
|
+
'features': {
|
158
|
+
'spot': {
|
159
|
+
'sandbox': False,
|
160
|
+
'createOrder': {
|
161
|
+
'marginMode': False,
|
162
|
+
'triggerPrice': True, # todo implement
|
163
|
+
'triggerPriceType': None,
|
164
|
+
'triggerDirection': False,
|
165
|
+
'stopLossPrice': False,
|
166
|
+
'takeProfitPrice': False,
|
167
|
+
'attachedStopLossTakeProfit': None,
|
168
|
+
'timeInForce': {
|
169
|
+
'IOC': False,
|
170
|
+
'FOK': False,
|
171
|
+
'PO': True, # todo: implement
|
172
|
+
'GTD': False,
|
173
|
+
},
|
174
|
+
'hedged': False,
|
175
|
+
'trailing': False,
|
176
|
+
'leverage': False,
|
177
|
+
'marketBuyRequiresPrice': False,
|
178
|
+
'marketBuyByCost': False,
|
179
|
+
'selfTradePrevention': False,
|
180
|
+
'iceberg': False,
|
181
|
+
},
|
182
|
+
'createOrders': None,
|
183
|
+
'fetchMyTrades': {
|
184
|
+
'marginMode': False,
|
185
|
+
'limit': 1000,
|
186
|
+
'daysBack': None,
|
187
|
+
'untilDays': None,
|
188
|
+
},
|
189
|
+
'fetchOrder': {
|
190
|
+
'marginMode': False,
|
191
|
+
'trigger': False,
|
192
|
+
'trailing': False,
|
193
|
+
},
|
194
|
+
'fetchOpenOrders': {
|
195
|
+
'marginMode': False,
|
196
|
+
'limit': 1000,
|
197
|
+
'trigger': False,
|
198
|
+
'trailing': False,
|
199
|
+
},
|
200
|
+
'fetchOrders': None,
|
201
|
+
'fetchClosedOrders': None,
|
202
|
+
'fetchOHLCV': {
|
203
|
+
'limit': 1000,
|
204
|
+
},
|
205
|
+
},
|
206
|
+
'swap': {
|
207
|
+
'linear': None,
|
208
|
+
'inverse': None,
|
209
|
+
},
|
210
|
+
'future': {
|
211
|
+
'linear': None,
|
212
|
+
'inverse': None,
|
213
|
+
},
|
214
|
+
},
|
157
215
|
'precisionMode': TICK_SIZE,
|
158
216
|
'exceptions': {
|
159
217
|
'exact': {
|
ccxt/async_support/bitbns.py
CHANGED
@@ -151,6 +151,66 @@ class bitbns(Exchange, ImplicitAPI):
|
|
151
151
|
},
|
152
152
|
},
|
153
153
|
'precisionMode': TICK_SIZE,
|
154
|
+
'features': {
|
155
|
+
'spot': {
|
156
|
+
'sandbox': False,
|
157
|
+
'createOrder': {
|
158
|
+
'marginMode': False,
|
159
|
+
'triggerPrice': True,
|
160
|
+
'triggerPriceType': None,
|
161
|
+
'triggerDirection': False,
|
162
|
+
'stopLossPrice': False, # todo with triggerPrice
|
163
|
+
'takeProfitPrice': False, # todo with triggerPrice
|
164
|
+
'attachedStopLossTakeProfit': None,
|
165
|
+
'timeInForce': {
|
166
|
+
'IOC': False,
|
167
|
+
'FOK': False,
|
168
|
+
'PO': False,
|
169
|
+
'GTD': False,
|
170
|
+
},
|
171
|
+
'hedged': False,
|
172
|
+
'trailing': False, # todo recheck
|
173
|
+
'leverage': False,
|
174
|
+
'marketBuyRequiresPrice': False,
|
175
|
+
'marketBuyByCost': False,
|
176
|
+
'selfTradePrevention': False,
|
177
|
+
'iceberg': False,
|
178
|
+
},
|
179
|
+
'createOrders': None,
|
180
|
+
'fetchMyTrades': {
|
181
|
+
'marginMode': False,
|
182
|
+
'limit': None,
|
183
|
+
'daysBack': None,
|
184
|
+
'untilDays': None,
|
185
|
+
},
|
186
|
+
'fetchOrder': {
|
187
|
+
'marginMode': False,
|
188
|
+
'trigger': False,
|
189
|
+
'trailing': False,
|
190
|
+
},
|
191
|
+
'fetchOpenOrders': {
|
192
|
+
'marginMode': False,
|
193
|
+
'limit': None,
|
194
|
+
'trigger': True,
|
195
|
+
'trailing': False,
|
196
|
+
},
|
197
|
+
'fetchOrders': None,
|
198
|
+
'fetchClosedOrders': None,
|
199
|
+
# todo: implement fetchOHLCV
|
200
|
+
'fetchOHLCV': {
|
201
|
+
'limit': 100,
|
202
|
+
},
|
203
|
+
},
|
204
|
+
# todo: implement swap methods
|
205
|
+
'swap': {
|
206
|
+
'linear': None,
|
207
|
+
'inverse': None,
|
208
|
+
},
|
209
|
+
'future': {
|
210
|
+
'linear': None,
|
211
|
+
'inverse': None,
|
212
|
+
},
|
213
|
+
},
|
154
214
|
'exceptions': {
|
155
215
|
'exact': {
|
156
216
|
'400': BadRequest, # {"msg":"Invalid Request","status":-1,"code":400}
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -3013,7 +3013,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
3013
3013
|
# ]
|
3014
3014
|
# ]
|
3015
3015
|
#
|
3016
|
-
return self.parse_funding_rates(response)
|
3016
|
+
return self.parse_funding_rates(response, symbols)
|
3017
3017
|
|
3018
3018
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
3019
3019
|
"""
|
@@ -3240,8 +3240,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
3240
3240
|
# ]
|
3241
3241
|
# ]
|
3242
3242
|
#
|
3243
|
-
|
3244
|
-
return self.filter_by_array(result, 'symbol', symbols)
|
3243
|
+
return self.parse_open_interests(response, symbols)
|
3245
3244
|
|
3246
3245
|
async def fetch_open_interest(self, symbol: str, params={}):
|
3247
3246
|
"""
|
ccxt/async_support/bitfinex1.py
CHANGED
@@ -1354,6 +1354,7 @@ class bitfinex1(Exchange, ImplicitAPI):
|
|
1354
1354
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
1355
1355
|
:param int [limit]: the maximum amount of candles to fetch
|
1356
1356
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1357
|
+
:param int [params.until]: timestamp in ms of the latest candle to fetch
|
1357
1358
|
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
1358
1359
|
"""
|
1359
1360
|
await self.load_markets()
|
@@ -1369,8 +1370,15 @@ class bitfinex1(Exchange, ImplicitAPI):
|
|
1369
1370
|
'sort': 1,
|
1370
1371
|
'limit': limit,
|
1371
1372
|
}
|
1373
|
+
until = self.safe_integer(params, 'until')
|
1372
1374
|
if since is not None:
|
1373
1375
|
request['start'] = since
|
1376
|
+
elif until is not None:
|
1377
|
+
duration = self.parse_timeframe(timeframe)
|
1378
|
+
request['start'] = until - ((limit - 1) * duration * 1000)
|
1379
|
+
if until is not None:
|
1380
|
+
request['end'] = until
|
1381
|
+
params = self.omit(params, 'until')
|
1374
1382
|
response = await self.v2GetCandlesTradeTimeframeSymbolHist(self.extend(request, params))
|
1375
1383
|
#
|
1376
1384
|
# [
|
ccxt/async_support/bitflyer.py
CHANGED
@@ -123,6 +123,77 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
123
123
|
},
|
124
124
|
},
|
125
125
|
'precisionMode': TICK_SIZE,
|
126
|
+
'features': {
|
127
|
+
'spot': {
|
128
|
+
'sandbox': False,
|
129
|
+
'createOrder': {
|
130
|
+
'marginMode': False,
|
131
|
+
'triggerPrice': False,
|
132
|
+
'triggerPriceType': None,
|
133
|
+
'triggerDirection': False,
|
134
|
+
'stopLossPrice': False,
|
135
|
+
'takeProfitPrice': False,
|
136
|
+
'attachedStopLossTakeProfit': None,
|
137
|
+
'timeInForce': {
|
138
|
+
'IOC': True,
|
139
|
+
'FOK': True,
|
140
|
+
'PO': True,
|
141
|
+
'GTD': True, # todo implement
|
142
|
+
},
|
143
|
+
'hedged': False,
|
144
|
+
'trailing': False, # todo recheck
|
145
|
+
'leverage': False,
|
146
|
+
'marketBuyRequiresPrice': False,
|
147
|
+
'marketBuyByCost': False,
|
148
|
+
'selfTradePrevention': False,
|
149
|
+
'iceberg': False,
|
150
|
+
},
|
151
|
+
'createOrders': None,
|
152
|
+
'fetchMyTrades': {
|
153
|
+
'marginMode': False,
|
154
|
+
'limit': 100,
|
155
|
+
'daysBack': None,
|
156
|
+
'untilDays': None,
|
157
|
+
},
|
158
|
+
'fetchOrder': {
|
159
|
+
'marginMode': False,
|
160
|
+
'trigger': False,
|
161
|
+
'trailing': False,
|
162
|
+
},
|
163
|
+
'fetchOpenOrders': {
|
164
|
+
'marginMode': False,
|
165
|
+
'limit': 100,
|
166
|
+
'trigger': False,
|
167
|
+
'trailing': False,
|
168
|
+
},
|
169
|
+
'fetchOrders': {
|
170
|
+
'marginMode': False,
|
171
|
+
'limit': 100,
|
172
|
+
'daysBack': None,
|
173
|
+
'untilDays': None,
|
174
|
+
'trigger': False,
|
175
|
+
'trailing': False,
|
176
|
+
},
|
177
|
+
'fetchClosedOrders': {
|
178
|
+
'marginMode': False,
|
179
|
+
'limit': 100,
|
180
|
+
'daysBack': None,
|
181
|
+
'daysBackCanceled': None,
|
182
|
+
'untilDays': None,
|
183
|
+
'trigger': False,
|
184
|
+
'trailing': False,
|
185
|
+
},
|
186
|
+
'fetchOHLCV': None,
|
187
|
+
},
|
188
|
+
'swap': {
|
189
|
+
'linear': None,
|
190
|
+
'inverse': None,
|
191
|
+
},
|
192
|
+
'future': {
|
193
|
+
'linear': None,
|
194
|
+
'inverse': None,
|
195
|
+
},
|
196
|
+
},
|
126
197
|
'exceptions': {
|
127
198
|
'exact': {
|
128
199
|
'-2': OnMaintenance, # {"status":-2,"error_message":"Under maintenance","data":null}
|