ccxt 4.3.94__py2.py3-none-any.whl → 4.3.96__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/abstract/okx.py +2 -0
- ccxt/ascendex.py +8 -6
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/ascendex.py +9 -6
- ccxt/async_support/base/exchange.py +1 -4
- ccxt/async_support/bingx.py +1 -0
- ccxt/async_support/bitfinex.py +4 -2
- ccxt/async_support/bitfinex2.py +7 -5
- ccxt/async_support/blofin.py +0 -1
- ccxt/async_support/btcturk.py +3 -3
- ccxt/async_support/bybit.py +7 -2
- ccxt/async_support/gate.py +3 -2
- ccxt/async_support/gemini.py +3 -2
- ccxt/async_support/hyperliquid.py +311 -40
- ccxt/async_support/independentreserve.py +5 -3
- ccxt/async_support/indodax.py +2 -0
- ccxt/async_support/kucoin.py +12 -12
- ccxt/async_support/mexc.py +78 -154
- ccxt/async_support/okx.py +2 -1
- ccxt/async_support/p2b.py +0 -1
- ccxt/async_support/tradeogre.py +0 -1
- ccxt/base/exchange.py +4 -8
- ccxt/bingx.py +1 -0
- ccxt/bitfinex.py +3 -2
- ccxt/bitfinex2.py +6 -5
- ccxt/blofin.py +0 -1
- ccxt/btcturk.py +3 -3
- ccxt/bybit.py +7 -2
- ccxt/gate.py +3 -2
- ccxt/gemini.py +3 -2
- ccxt/hyperliquid.py +311 -40
- ccxt/independentreserve.py +4 -3
- ccxt/indodax.py +2 -0
- ccxt/kucoin.py +2 -2
- ccxt/mexc.py +78 -154
- ccxt/okx.py +2 -1
- ccxt/p2b.py +0 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +90 -2
- ccxt/pro/bybit.py +58 -4
- ccxt/pro/cryptocom.py +195 -0
- ccxt/pro/okx.py +238 -31
- ccxt/test/tests_async.py +3 -0
- ccxt/test/tests_sync.py +3 -0
- ccxt/tradeogre.py +0 -1
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/METADATA +5 -5
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/RECORD +51 -53
- ccxt/abstract/bitbay.py +0 -53
- ccxt/abstract/hitbtc3.py +0 -115
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/WHEEL +0 -0
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
# ----------------------------------------------------------------------------
|
24
24
|
|
25
|
-
__version__ = '4.3.
|
25
|
+
__version__ = '4.3.96'
|
26
26
|
|
27
27
|
# ----------------------------------------------------------------------------
|
28
28
|
|
@@ -95,7 +95,6 @@ from ccxt.binanceusdm import binanceusdm # noqa: F4
|
|
95
95
|
from ccxt.bingx import bingx # noqa: F401
|
96
96
|
from ccxt.bit2c import bit2c # noqa: F401
|
97
97
|
from ccxt.bitbank import bitbank # noqa: F401
|
98
|
-
from ccxt.bitbay import bitbay # noqa: F401
|
99
98
|
from ccxt.bitbns import bitbns # noqa: F401
|
100
99
|
from ccxt.bitcoincom import bitcoincom # noqa: F401
|
101
100
|
from ccxt.bitfinex import bitfinex # noqa: F401
|
@@ -145,7 +144,6 @@ from ccxt.gateio import gateio # noqa: F4
|
|
145
144
|
from ccxt.gemini import gemini # noqa: F401
|
146
145
|
from ccxt.hashkey import hashkey # noqa: F401
|
147
146
|
from ccxt.hitbtc import hitbtc # noqa: F401
|
148
|
-
from ccxt.hitbtc3 import hitbtc3 # noqa: F401
|
149
147
|
from ccxt.hollaex import hollaex # noqa: F401
|
150
148
|
from ccxt.htx import htx # noqa: F401
|
151
149
|
from ccxt.huobi import huobi # noqa: F401
|
@@ -207,7 +205,6 @@ exchanges = [
|
|
207
205
|
'bingx',
|
208
206
|
'bit2c',
|
209
207
|
'bitbank',
|
210
|
-
'bitbay',
|
211
208
|
'bitbns',
|
212
209
|
'bitcoincom',
|
213
210
|
'bitfinex',
|
@@ -257,7 +254,6 @@ exchanges = [
|
|
257
254
|
'gemini',
|
258
255
|
'hashkey',
|
259
256
|
'hitbtc',
|
260
|
-
'hitbtc3',
|
261
257
|
'hollaex',
|
262
258
|
'htx',
|
263
259
|
'huobi',
|
ccxt/abstract/okx.py
CHANGED
@@ -127,6 +127,7 @@ class ImplicitAPI:
|
|
127
127
|
private_get_account_account_position_risk = privateGetAccountAccountPositionRisk = Entry('account/account-position-risk', 'private', 'GET', {'cost': 2})
|
128
128
|
private_get_account_bills = privateGetAccountBills = Entry('account/bills', 'private', 'GET', {'cost': 1.6666666666666667})
|
129
129
|
private_get_account_bills_archive = privateGetAccountBillsArchive = Entry('account/bills-archive', 'private', 'GET', {'cost': 1.6666666666666667})
|
130
|
+
private_get_account_bills_history_archive = privateGetAccountBillsHistoryArchive = Entry('account/bills-history-archive', 'private', 'GET', {'cost': 2})
|
130
131
|
private_get_account_config = privateGetAccountConfig = Entry('account/config', 'private', 'GET', {'cost': 4})
|
131
132
|
private_get_account_max_size = privateGetAccountMaxSize = Entry('account/max-size', 'private', 'GET', {'cost': 1})
|
132
133
|
private_get_account_max_avail_size = privateGetAccountMaxAvailSize = Entry('account/max-avail-size', 'private', 'GET', {'cost': 1})
|
@@ -267,6 +268,7 @@ class ImplicitAPI:
|
|
267
268
|
private_post_account_fixed_loan_amend_borrowing_order = privatePostAccountFixedLoanAmendBorrowingOrder = Entry('account/fixed-loan/amend-borrowing-order', 'private', 'POST', {'cost': 5})
|
268
269
|
private_post_account_fixed_loan_manual_reborrow = privatePostAccountFixedLoanManualReborrow = Entry('account/fixed-loan/manual-reborrow', 'private', 'POST', {'cost': 5})
|
269
270
|
private_post_account_fixed_loan_repay_borrowing_order = privatePostAccountFixedLoanRepayBorrowingOrder = Entry('account/fixed-loan/repay-borrowing-order', 'private', 'POST', {'cost': 5})
|
271
|
+
private_post_account_bills_history_archive = privatePostAccountBillsHistoryArchive = Entry('account/bills-history-archive', 'private', 'POST', {'cost': 72000})
|
270
272
|
private_post_users_subaccount_modify_apikey = privatePostUsersSubaccountModifyApikey = Entry('users/subaccount/modify-apikey', 'private', 'POST', {'cost': 10})
|
271
273
|
private_post_asset_subaccount_transfer = privatePostAssetSubaccountTransfer = Entry('asset/subaccount/transfer', 'private', 'POST', {'cost': 10})
|
272
274
|
private_post_users_subaccount_set_transfer_out = privatePostUsersSubaccountSetTransferOut = Entry('users/subaccount/set-transfer-out', 'private', 'POST', {'cost': 10})
|
ccxt/ascendex.py
CHANGED
@@ -394,7 +394,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
394
394
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
395
395
|
:returns dict: an associative dictionary of currencies
|
396
396
|
"""
|
397
|
-
|
397
|
+
assetsPromise = self.v1PublicGetAssets(params)
|
398
398
|
#
|
399
399
|
# {
|
400
400
|
# "code":0,
|
@@ -411,7 +411,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
411
411
|
# ]
|
412
412
|
# }
|
413
413
|
#
|
414
|
-
|
414
|
+
marginPromise = self.v1PublicGetMarginAssets(params)
|
415
415
|
#
|
416
416
|
# {
|
417
417
|
# "code":0,
|
@@ -431,7 +431,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
431
431
|
# ]
|
432
432
|
# }
|
433
433
|
#
|
434
|
-
|
434
|
+
cashPromise = self.v1PublicGetCashAssets(params)
|
435
435
|
#
|
436
436
|
# {
|
437
437
|
# "code":0,
|
@@ -448,6 +448,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
448
448
|
# ]
|
449
449
|
# }
|
450
450
|
#
|
451
|
+
assets, margin, cash = [assetsPromise, marginPromise, cashPromise]
|
451
452
|
assetsData = self.safe_list(assets, 'data', [])
|
452
453
|
marginData = self.safe_list(margin, 'data', [])
|
453
454
|
cashData = self.safe_list(cash, 'data', [])
|
@@ -499,7 +500,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
499
500
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
500
501
|
:returns dict[]: an array of objects representing market data
|
501
502
|
"""
|
502
|
-
|
503
|
+
productsPromise = self.v1PublicGetProducts(params)
|
503
504
|
#
|
504
505
|
# {
|
505
506
|
# "code": 0,
|
@@ -520,7 +521,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
520
521
|
# ]
|
521
522
|
# }
|
522
523
|
#
|
523
|
-
|
524
|
+
cashPromise = self.v1PublicGetCashProducts(params)
|
524
525
|
#
|
525
526
|
# {
|
526
527
|
# "code": 0,
|
@@ -550,7 +551,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
550
551
|
# ]
|
551
552
|
# }
|
552
553
|
#
|
553
|
-
|
554
|
+
perpetualsPromise = self.v2PublicGetFuturesContract(params)
|
554
555
|
#
|
555
556
|
# {
|
556
557
|
# "code": 0,
|
@@ -588,6 +589,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
588
589
|
# ]
|
589
590
|
# }
|
590
591
|
#
|
592
|
+
products, cash, perpetuals = [productsPromise, cashPromise, perpetualsPromise]
|
591
593
|
productsData = self.safe_list(products, 'data', [])
|
592
594
|
productsById = self.index_by(productsData, 'symbol')
|
593
595
|
cashData = self.safe_list(cash, 'data', [])
|
ccxt/async_support/__init__.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.3.
|
7
|
+
__version__ = '4.3.96'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -75,7 +75,6 @@ from ccxt.async_support.binanceusdm import binanceusdm
|
|
75
75
|
from ccxt.async_support.bingx import bingx # noqa: F401
|
76
76
|
from ccxt.async_support.bit2c import bit2c # noqa: F401
|
77
77
|
from ccxt.async_support.bitbank import bitbank # noqa: F401
|
78
|
-
from ccxt.async_support.bitbay import bitbay # noqa: F401
|
79
78
|
from ccxt.async_support.bitbns import bitbns # noqa: F401
|
80
79
|
from ccxt.async_support.bitcoincom import bitcoincom # noqa: F401
|
81
80
|
from ccxt.async_support.bitfinex import bitfinex # noqa: F401
|
@@ -125,7 +124,6 @@ from ccxt.async_support.gateio import gateio
|
|
125
124
|
from ccxt.async_support.gemini import gemini # noqa: F401
|
126
125
|
from ccxt.async_support.hashkey import hashkey # noqa: F401
|
127
126
|
from ccxt.async_support.hitbtc import hitbtc # noqa: F401
|
128
|
-
from ccxt.async_support.hitbtc3 import hitbtc3 # noqa: F401
|
129
127
|
from ccxt.async_support.hollaex import hollaex # noqa: F401
|
130
128
|
from ccxt.async_support.htx import htx # noqa: F401
|
131
129
|
from ccxt.async_support.huobi import huobi # noqa: F401
|
@@ -187,7 +185,6 @@ exchanges = [
|
|
187
185
|
'bingx',
|
188
186
|
'bit2c',
|
189
187
|
'bitbank',
|
190
|
-
'bitbay',
|
191
188
|
'bitbns',
|
192
189
|
'bitcoincom',
|
193
190
|
'bitfinex',
|
@@ -237,7 +234,6 @@ exchanges = [
|
|
237
234
|
'gemini',
|
238
235
|
'hashkey',
|
239
236
|
'hitbtc',
|
240
|
-
'hitbtc3',
|
241
237
|
'hollaex',
|
242
238
|
'htx',
|
243
239
|
'huobi',
|
ccxt/async_support/ascendex.py
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.ascendex import ImplicitAPI
|
8
|
+
import asyncio
|
8
9
|
import hashlib
|
9
10
|
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginMode, MarginModes, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
11
|
from typing import List
|
@@ -394,7 +395,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
394
395
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
395
396
|
:returns dict: an associative dictionary of currencies
|
396
397
|
"""
|
397
|
-
|
398
|
+
assetsPromise = self.v1PublicGetAssets(params)
|
398
399
|
#
|
399
400
|
# {
|
400
401
|
# "code":0,
|
@@ -411,7 +412,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
411
412
|
# ]
|
412
413
|
# }
|
413
414
|
#
|
414
|
-
|
415
|
+
marginPromise = self.v1PublicGetMarginAssets(params)
|
415
416
|
#
|
416
417
|
# {
|
417
418
|
# "code":0,
|
@@ -431,7 +432,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
431
432
|
# ]
|
432
433
|
# }
|
433
434
|
#
|
434
|
-
|
435
|
+
cashPromise = self.v1PublicGetCashAssets(params)
|
435
436
|
#
|
436
437
|
# {
|
437
438
|
# "code":0,
|
@@ -448,6 +449,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
448
449
|
# ]
|
449
450
|
# }
|
450
451
|
#
|
452
|
+
assets, margin, cash = await asyncio.gather(*[assetsPromise, marginPromise, cashPromise])
|
451
453
|
assetsData = self.safe_list(assets, 'data', [])
|
452
454
|
marginData = self.safe_list(margin, 'data', [])
|
453
455
|
cashData = self.safe_list(cash, 'data', [])
|
@@ -499,7 +501,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
499
501
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
500
502
|
:returns dict[]: an array of objects representing market data
|
501
503
|
"""
|
502
|
-
|
504
|
+
productsPromise = self.v1PublicGetProducts(params)
|
503
505
|
#
|
504
506
|
# {
|
505
507
|
# "code": 0,
|
@@ -520,7 +522,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
520
522
|
# ]
|
521
523
|
# }
|
522
524
|
#
|
523
|
-
|
525
|
+
cashPromise = self.v1PublicGetCashProducts(params)
|
524
526
|
#
|
525
527
|
# {
|
526
528
|
# "code": 0,
|
@@ -550,7 +552,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
550
552
|
# ]
|
551
553
|
# }
|
552
554
|
#
|
553
|
-
|
555
|
+
perpetualsPromise = self.v2PublicGetFuturesContract(params)
|
554
556
|
#
|
555
557
|
# {
|
556
558
|
# "code": 0,
|
@@ -588,6 +590,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
588
590
|
# ]
|
589
591
|
# }
|
590
592
|
#
|
593
|
+
products, cash, perpetuals = await asyncio.gather(*[productsPromise, cashPromise, perpetualsPromise])
|
591
594
|
productsData = self.safe_list(products, 'data', [])
|
592
595
|
productsById = self.index_by(productsData, 'symbol')
|
593
596
|
cashData = self.safe_list(cash, 'data', [])
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# -----------------------------------------------------------------------------
|
4
4
|
|
5
|
-
__version__ = '4.3.
|
5
|
+
__version__ = '4.3.96'
|
6
6
|
|
7
7
|
# -----------------------------------------------------------------------------
|
8
8
|
|
@@ -875,9 +875,6 @@ class Exchange(BaseExchange):
|
|
875
875
|
await self.cancel_order_ws(id, symbol)
|
876
876
|
return await self.create_order_ws(symbol, type, side, amount, price, params)
|
877
877
|
|
878
|
-
async def fetch_permissions(self, params={}):
|
879
|
-
raise NotSupported(self.id + ' fetchPermissions() is not supported yet')
|
880
|
-
|
881
878
|
async def fetch_position(self, symbol: str, params={}):
|
882
879
|
raise NotSupported(self.id + ' fetchPosition() is not supported yet')
|
883
880
|
|
ccxt/async_support/bingx.py
CHANGED
ccxt/async_support/bitfinex.py
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex import ImplicitAPI
|
8
|
+
import asyncio
|
8
9
|
import hashlib
|
9
10
|
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
11
|
from typing import List
|
@@ -565,11 +566,11 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
565
566
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
566
567
|
:returns dict[]: an array of objects representing market data
|
567
568
|
"""
|
568
|
-
|
569
|
+
idsPromise = self.publicGetSymbols()
|
569
570
|
#
|
570
571
|
# ["btcusd", "ltcusd", "ltcbtc"]
|
571
572
|
#
|
572
|
-
|
573
|
+
detailsPromise = self.publicGetSymbolsDetails()
|
573
574
|
#
|
574
575
|
# [
|
575
576
|
# {
|
@@ -584,6 +585,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
584
585
|
# },
|
585
586
|
# ]
|
586
587
|
#
|
588
|
+
ids, details = await asyncio.gather(*[idsPromise, detailsPromise])
|
587
589
|
result = []
|
588
590
|
for i in range(0, len(details)):
|
589
591
|
market = details[i]
|
ccxt/async_support/bitfinex2.py
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitfinex2 import ImplicitAPI
|
8
|
+
import asyncio
|
8
9
|
import hashlib
|
9
10
|
from ccxt.base.types import Balances, Currencies, Currency, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
11
|
from typing import List
|
@@ -534,12 +535,13 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
534
535
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
535
536
|
:returns dict[]: an array of objects representing market data
|
536
537
|
"""
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
futuresMarketsInfo =
|
538
|
+
spotMarketsInfoPromise = self.publicGetConfPubInfoPair(params)
|
539
|
+
futuresMarketsInfoPromise = self.publicGetConfPubInfoPairFutures(params)
|
540
|
+
marginIdsPromise = self.publicGetConfPubListPairMargin(params)
|
541
|
+
spotMarketsInfo, futuresMarketsInfo, marginIds = await asyncio.gather(*[spotMarketsInfoPromise, futuresMarketsInfoPromise, marginIdsPromise])
|
542
|
+
spotMarketsInfo = self.safe_list(spotMarketsInfo, 0, [])
|
543
|
+
futuresMarketsInfo = self.safe_list(futuresMarketsInfo, 0, [])
|
541
544
|
markets = self.array_concat(spotMarketsInfo, futuresMarketsInfo)
|
542
|
-
marginIds = await self.publicGetConfPubListPairMargin(params)
|
543
545
|
marginIds = self.safe_value(marginIds, 0, [])
|
544
546
|
#
|
545
547
|
# [
|
ccxt/async_support/blofin.py
CHANGED
ccxt/async_support/btcturk.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.btcturk import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
|
+
from ccxt.base.types import Balances, Bool, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import BadRequest
|
@@ -621,7 +621,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
621
621
|
#
|
622
622
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
623
623
|
|
624
|
-
def parse_ohlcvs(self, ohlcvs, market=None, timeframe='1m', since: Int = None, limit: Int = None):
|
624
|
+
def parse_ohlcvs(self, ohlcvs, market=None, timeframe='1m', since: Int = None, limit: Int = None, tail: Bool = False):
|
625
625
|
results = []
|
626
626
|
timestamp = self.safe_value(ohlcvs, 't')
|
627
627
|
high = self.safe_value(ohlcvs, 'h')
|
@@ -640,7 +640,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
640
640
|
}
|
641
641
|
results.append(self.parse_ohlcv(ohlcv, market))
|
642
642
|
sorted = self.sort_by(results, 0)
|
643
|
-
return self.filter_by_since_limit(sorted, since, limit, 0)
|
643
|
+
return self.filter_by_since_limit(sorted, since, limit, 0, tail)
|
644
644
|
|
645
645
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
646
646
|
"""
|
ccxt/async_support/bybit.py
CHANGED
@@ -5503,11 +5503,16 @@ class bybit(Exchange, ImplicitAPI):
|
|
5503
5503
|
:param str code: unified currency code, default is None
|
5504
5504
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
5505
5505
|
:param int [limit]: max number of ledger entrys to return, default is None
|
5506
|
-
:param
|
5506
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5507
5507
|
:param str [params.subType]: if inverse will use v5/account/contract-transaction-log
|
5508
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5508
5509
|
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
|
5509
5510
|
"""
|
5510
5511
|
await self.load_markets()
|
5512
|
+
paginate = False
|
5513
|
+
paginate, params = self.handle_option_and_params(params, 'fetchLedger', 'paginate')
|
5514
|
+
if paginate:
|
5515
|
+
return await self.fetch_paginated_call_cursor('fetchLedger', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
5511
5516
|
request: dict = {
|
5512
5517
|
# 'coin': currency['id'],
|
5513
5518
|
# 'currency': currency['id'], # alias
|
@@ -5551,7 +5556,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5551
5556
|
else:
|
5552
5557
|
response = await self.privateGetV5AccountTransactionLog(self.extend(request, params))
|
5553
5558
|
else:
|
5554
|
-
response = await self.
|
5559
|
+
response = await self.privateGetV5AccountContractTransactionLog(self.extend(request, params))
|
5555
5560
|
#
|
5556
5561
|
# {
|
5557
5562
|
# "ret_code": 0,
|
ccxt/async_support/gate.py
CHANGED
@@ -994,8 +994,9 @@ class gate(Exchange, ImplicitAPI):
|
|
994
994
|
return self.array_concat(markets, optionMarkets)
|
995
995
|
|
996
996
|
async def fetch_spot_markets(self, params={}):
|
997
|
-
|
998
|
-
|
997
|
+
marginPromise = self.publicMarginGetCurrencyPairs(params)
|
998
|
+
spotMarketsPromise = self.publicSpotGetCurrencyPairs(params)
|
999
|
+
marginResponse, spotMarketsResponse = await asyncio.gather(*[marginPromise, spotMarketsPromise])
|
999
1000
|
marginMarkets = self.index_by(marginResponse, 'id')
|
1000
1001
|
#
|
1001
1002
|
# Spot
|
ccxt/async_support/gemini.py
CHANGED
@@ -814,8 +814,9 @@ class gemini(Exchange, ImplicitAPI):
|
|
814
814
|
return self.parse_ticker(response, market)
|
815
815
|
|
816
816
|
async def fetch_ticker_v1_and_v2(self, symbol: str, params={}):
|
817
|
-
|
818
|
-
|
817
|
+
tickerPromiseA = self.fetch_ticker_v1(symbol, params)
|
818
|
+
tickerPromiseB = self.fetch_ticker_v2(symbol, params)
|
819
|
+
tickerA, tickerB = await asyncio.gather(*[tickerPromiseA, tickerPromiseB])
|
819
820
|
return self.deep_extend(tickerA, {
|
820
821
|
'open': tickerB['open'],
|
821
822
|
'high': tickerB['high'],
|