ccxt 4.4.52__py2.py3-none-any.whl → 4.4.53__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 +0 -1
- ccxt/abstract/binancecoinm.py +0 -1
- ccxt/abstract/binanceus.py +0 -1
- ccxt/abstract/binanceusdm.py +0 -1
- ccxt/ace.py +3 -0
- ccxt/alpaca.py +5 -0
- ccxt/ascendex.py +2 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +3 -0
- ccxt/async_support/alpaca.py +5 -0
- ccxt/async_support/ascendex.py +2 -1
- ccxt/async_support/base/exchange.py +20 -3
- ccxt/async_support/bigone.py +5 -0
- ccxt/async_support/binance.py +55 -69
- ccxt/async_support/bingx.py +25 -29
- ccxt/async_support/bit2c.py +3 -0
- ccxt/async_support/bitbank.py +3 -0
- ccxt/async_support/bitbns.py +3 -0
- ccxt/async_support/bitfinex.py +6 -1
- ccxt/async_support/bitflyer.py +6 -1
- ccxt/async_support/bitget.py +8 -4
- ccxt/async_support/bithumb.py +3 -1
- ccxt/async_support/bitmart.py +22 -12
- ccxt/async_support/bitmex.py +99 -93
- ccxt/async_support/bitopro.py +7 -2
- ccxt/async_support/bitrue.py +4 -0
- ccxt/async_support/bitso.py +5 -2
- ccxt/async_support/bitstamp.py +3 -0
- ccxt/async_support/bitteam.py +5 -0
- ccxt/async_support/bitvavo.py +4 -0
- ccxt/async_support/blockchaincom.py +4 -0
- ccxt/async_support/blofin.py +3 -0
- ccxt/async_support/btcalpha.py +5 -0
- ccxt/async_support/btcbox.py +3 -2
- ccxt/async_support/btcmarkets.py +5 -0
- ccxt/async_support/btcturk.py +3 -0
- ccxt/async_support/bybit.py +10 -4
- ccxt/async_support/cex.py +2 -0
- ccxt/async_support/coinbase.py +19 -12
- ccxt/async_support/coinbaseexchange.py +5 -0
- ccxt/async_support/coinbaseinternational.py +21 -2
- ccxt/async_support/coincatch.py +3 -0
- ccxt/async_support/coincheck.py +2 -0
- ccxt/async_support/coinex.py +5 -1
- ccxt/async_support/coinlist.py +5 -0
- ccxt/async_support/coinmate.py +4 -0
- ccxt/async_support/coinmetro.py +9 -5
- ccxt/async_support/coinone.py +3 -0
- ccxt/async_support/coinsph.py +4 -0
- ccxt/async_support/coinspot.py +1 -0
- ccxt/async_support/cryptocom.py +5 -0
- ccxt/async_support/currencycom.py +3 -0
- ccxt/async_support/defx.py +5 -0
- ccxt/async_support/delta.py +4 -1
- ccxt/async_support/deribit.py +7 -3
- ccxt/async_support/digifinex.py +10 -5
- ccxt/async_support/ellipx.py +9 -5
- ccxt/async_support/exmo.py +6 -3
- ccxt/async_support/gate.py +5 -1
- ccxt/async_support/gemini.py +3 -0
- ccxt/async_support/hashkey.py +5 -4
- ccxt/async_support/hitbtc.py +6 -2
- ccxt/async_support/hollaex.py +7 -2
- ccxt/async_support/htx.py +8 -1
- ccxt/async_support/huobijp.py +5 -0
- ccxt/async_support/hyperliquid.py +6 -1
- ccxt/async_support/idex.py +5 -1
- ccxt/async_support/independentreserve.py +4 -0
- ccxt/async_support/indodax.py +3 -0
- ccxt/async_support/kraken.py +6 -4
- ccxt/async_support/krakenfutures.py +5 -2
- ccxt/async_support/kucoin.py +13 -6
- ccxt/async_support/kucoinfutures.py +5 -1
- ccxt/async_support/kuna.py +3 -0
- ccxt/async_support/latoken.py +4 -0
- ccxt/async_support/lbank.py +6 -1
- ccxt/async_support/luno.py +6 -1
- ccxt/async_support/lykke.py +4 -0
- ccxt/async_support/mercado.py +4 -0
- ccxt/async_support/mexc.py +10 -9
- ccxt/async_support/ndax.py +6 -1
- ccxt/async_support/novadax.py +5 -0
- ccxt/async_support/oceanex.py +6 -2
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +17 -5
- ccxt/async_support/onetrading.py +4 -0
- ccxt/async_support/oxfun.py +3 -0
- ccxt/async_support/p2b.py +3 -0
- ccxt/async_support/paradex.py +8 -2
- ccxt/async_support/phemex.py +10 -4
- ccxt/async_support/poloniex.py +6 -3
- ccxt/async_support/poloniexfutures.py +5 -1
- ccxt/async_support/probit.py +4 -0
- ccxt/async_support/timex.py +4 -0
- ccxt/async_support/tokocrypto.py +5 -0
- ccxt/async_support/tradeogre.py +2 -0
- ccxt/async_support/upbit.py +5 -2
- ccxt/async_support/vertex.py +6 -2
- ccxt/async_support/wavesexchange.py +20 -3
- ccxt/async_support/wazirx.py +2 -0
- ccxt/async_support/whitebit.py +5 -4
- ccxt/async_support/woo.py +15 -5
- ccxt/async_support/woofipro.py +21 -7
- ccxt/async_support/xt.py +5 -0
- ccxt/async_support/yobit.py +5 -2
- ccxt/async_support/zaif.py +2 -0
- ccxt/async_support/zonda.py +2 -0
- ccxt/base/exchange.py +92 -50
- ccxt/base/types.py +1 -1
- ccxt/bigone.py +5 -0
- ccxt/binance.py +55 -69
- ccxt/bingx.py +25 -29
- ccxt/bit2c.py +3 -0
- ccxt/bitbank.py +3 -0
- ccxt/bitbns.py +3 -0
- ccxt/bitfinex.py +6 -1
- ccxt/bitflyer.py +6 -1
- ccxt/bitget.py +8 -4
- ccxt/bithumb.py +3 -1
- ccxt/bitmart.py +22 -12
- ccxt/bitmex.py +99 -93
- ccxt/bitopro.py +7 -2
- ccxt/bitrue.py +4 -0
- ccxt/bitso.py +5 -2
- ccxt/bitstamp.py +3 -0
- ccxt/bitteam.py +5 -0
- ccxt/bitvavo.py +4 -0
- ccxt/blockchaincom.py +4 -0
- ccxt/blofin.py +3 -0
- ccxt/btcalpha.py +5 -0
- ccxt/btcbox.py +3 -2
- ccxt/btcmarkets.py +5 -0
- ccxt/btcturk.py +3 -0
- ccxt/bybit.py +10 -4
- ccxt/cex.py +2 -0
- ccxt/coinbase.py +19 -12
- ccxt/coinbaseexchange.py +5 -0
- ccxt/coinbaseinternational.py +21 -2
- ccxt/coincatch.py +3 -0
- ccxt/coincheck.py +2 -0
- ccxt/coinex.py +5 -1
- ccxt/coinlist.py +5 -0
- ccxt/coinmate.py +4 -0
- ccxt/coinmetro.py +9 -5
- ccxt/coinone.py +3 -0
- ccxt/coinsph.py +4 -0
- ccxt/coinspot.py +1 -0
- ccxt/cryptocom.py +5 -0
- ccxt/currencycom.py +3 -0
- ccxt/defx.py +5 -0
- ccxt/delta.py +4 -1
- ccxt/deribit.py +7 -3
- ccxt/digifinex.py +10 -5
- ccxt/ellipx.py +9 -5
- ccxt/exmo.py +6 -3
- ccxt/gate.py +5 -1
- ccxt/gemini.py +3 -0
- ccxt/hashkey.py +5 -4
- ccxt/hitbtc.py +6 -2
- ccxt/hollaex.py +7 -2
- ccxt/htx.py +8 -1
- ccxt/huobijp.py +5 -0
- ccxt/hyperliquid.py +6 -1
- ccxt/idex.py +5 -1
- ccxt/independentreserve.py +4 -0
- ccxt/indodax.py +3 -0
- ccxt/kraken.py +6 -4
- ccxt/krakenfutures.py +5 -2
- ccxt/kucoin.py +13 -6
- ccxt/kucoinfutures.py +5 -1
- ccxt/kuna.py +3 -0
- ccxt/latoken.py +4 -0
- ccxt/lbank.py +6 -1
- ccxt/luno.py +6 -1
- ccxt/lykke.py +4 -0
- ccxt/mercado.py +4 -0
- ccxt/mexc.py +10 -9
- ccxt/ndax.py +6 -1
- ccxt/novadax.py +5 -0
- ccxt/oceanex.py +6 -2
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +17 -5
- ccxt/onetrading.py +4 -0
- ccxt/oxfun.py +3 -0
- ccxt/p2b.py +3 -0
- ccxt/paradex.py +8 -2
- ccxt/phemex.py +10 -4
- ccxt/poloniex.py +6 -3
- ccxt/poloniexfutures.py +5 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bitcoincom.py +1 -4
- ccxt/pro/bitopro.py +1 -1
- ccxt/probit.py +4 -0
- ccxt/test/tests_async.py +57 -30
- ccxt/test/tests_sync.py +57 -30
- ccxt/timex.py +4 -0
- ccxt/tokocrypto.py +5 -0
- ccxt/tradeogre.py +2 -0
- ccxt/upbit.py +5 -2
- ccxt/vertex.py +6 -2
- ccxt/wavesexchange.py +20 -3
- ccxt/wazirx.py +2 -0
- ccxt/whitebit.py +5 -4
- ccxt/woo.py +15 -5
- ccxt/woofipro.py +21 -7
- ccxt/xt.py +5 -0
- ccxt/yobit.py +5 -2
- ccxt/zaif.py +2 -0
- ccxt/zonda.py +2 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/METADATA +225 -140
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/RECORD +215 -224
- ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
- ccxt/static_dependencies/ethereum/account/py.typed +0 -0
- ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
- ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
- ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
- ccxt/static_dependencies/lark/py.typed +0 -0
- ccxt/static_dependencies/marshmallow/py.typed +0 -0
- ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
- ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/WHEEL +0 -0
- {ccxt-4.4.52.dist-info → ccxt-4.4.53.dist-info}/top_level.txt +0 -0
ccxt/bit2c.py
CHANGED
@@ -209,17 +209,20 @@ class bit2c(Exchange, ImplicitAPI):
|
|
209
209
|
'limit': 100,
|
210
210
|
'daysBack': 30,
|
211
211
|
'untilDays': 30,
|
212
|
+
'symbolRequired': False,
|
212
213
|
},
|
213
214
|
'fetchOrder': {
|
214
215
|
'marginMode': False,
|
215
216
|
'trigger': False,
|
216
217
|
'trailing': False,
|
218
|
+
'symbolRequired': False,
|
217
219
|
},
|
218
220
|
'fetchOpenOrders': {
|
219
221
|
'marginMode': False,
|
220
222
|
'limit': None,
|
221
223
|
'trigger': False,
|
222
224
|
'trailing': False,
|
225
|
+
'symbolRequired': True,
|
223
226
|
},
|
224
227
|
'fetchOrders': None,
|
225
228
|
'fetchClosedOrders': None, # todo implement
|
ccxt/bitbank.py
CHANGED
@@ -185,17 +185,20 @@ class bitbank(Exchange, ImplicitAPI):
|
|
185
185
|
'limit': 1000,
|
186
186
|
'daysBack': None,
|
187
187
|
'untilDays': None,
|
188
|
+
'symbolRequired': False,
|
188
189
|
},
|
189
190
|
'fetchOrder': {
|
190
191
|
'marginMode': False,
|
191
192
|
'trigger': False,
|
192
193
|
'trailing': False,
|
194
|
+
'symbolRequired': False,
|
193
195
|
},
|
194
196
|
'fetchOpenOrders': {
|
195
197
|
'marginMode': False,
|
196
198
|
'limit': 1000,
|
197
199
|
'trigger': False,
|
198
200
|
'trailing': False,
|
201
|
+
'symbolRequired': False,
|
199
202
|
},
|
200
203
|
'fetchOrders': None,
|
201
204
|
'fetchClosedOrders': None,
|
ccxt/bitbns.py
CHANGED
@@ -182,17 +182,20 @@ class bitbns(Exchange, ImplicitAPI):
|
|
182
182
|
'limit': None,
|
183
183
|
'daysBack': None,
|
184
184
|
'untilDays': None,
|
185
|
+
'symbolRequired': True,
|
185
186
|
},
|
186
187
|
'fetchOrder': {
|
187
188
|
'marginMode': False,
|
188
189
|
'trigger': False,
|
189
190
|
'trailing': False,
|
191
|
+
'symbolRequired': True,
|
190
192
|
},
|
191
193
|
'fetchOpenOrders': {
|
192
194
|
'marginMode': False,
|
193
195
|
'limit': None,
|
194
196
|
'trigger': True,
|
195
197
|
'trailing': False,
|
198
|
+
'symbolRequired': True,
|
196
199
|
},
|
197
200
|
'fetchOrders': None,
|
198
201
|
'fetchClosedOrders': None,
|
ccxt/bitfinex.py
CHANGED
@@ -453,17 +453,20 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
453
453
|
'limit': 2500,
|
454
454
|
'daysBack': None,
|
455
455
|
'untilDays': 100000, # todo: implement
|
456
|
+
'symbolRequired': False,
|
456
457
|
},
|
457
458
|
'fetchOrder': {
|
458
459
|
'marginMode': False,
|
459
460
|
'trigger': False,
|
460
461
|
'trailing': False,
|
462
|
+
'symbolRequired': False,
|
461
463
|
},
|
462
464
|
'fetchOpenOrders': {
|
463
465
|
'marginMode': False,
|
464
466
|
'limit': None,
|
465
467
|
'trigger': False,
|
466
468
|
'trailing': False,
|
469
|
+
'symbolRequired': False,
|
467
470
|
},
|
468
471
|
'fetchOrders': None,
|
469
472
|
'fetchClosedOrders': {
|
@@ -474,6 +477,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
474
477
|
'untilDays': 100000,
|
475
478
|
'trigger': False,
|
476
479
|
'trailing': False,
|
480
|
+
'symbolRequired': False,
|
477
481
|
},
|
478
482
|
'fetchOHLCV': {
|
479
483
|
'limit': 10000,
|
@@ -1136,7 +1140,8 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
1136
1140
|
signedAmount = self.safe_string(order, 2)
|
1137
1141
|
amount = Precise.string_abs(signedAmount)
|
1138
1142
|
side = 'bids' if Precise.string_gt(signedAmount, '0') else 'asks'
|
1139
|
-
result[side]
|
1143
|
+
resultSide = result[side]
|
1144
|
+
resultSide.append([price, self.parse_number(amount)])
|
1140
1145
|
result['bids'] = self.sort_by(result['bids'], 0, True)
|
1141
1146
|
result['asks'] = self.sort_by(result['asks'], 0)
|
1142
1147
|
return result
|
ccxt/bitflyer.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitflyer import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, FundingRate, Trade, TradingFeeInterface, Transaction, MarketInterface
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -154,17 +154,20 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
154
154
|
'limit': 100,
|
155
155
|
'daysBack': None,
|
156
156
|
'untilDays': None,
|
157
|
+
'symbolRequired': True,
|
157
158
|
},
|
158
159
|
'fetchOrder': {
|
159
160
|
'marginMode': False,
|
160
161
|
'trigger': False,
|
161
162
|
'trailing': False,
|
163
|
+
'symbolRequired': True,
|
162
164
|
},
|
163
165
|
'fetchOpenOrders': {
|
164
166
|
'marginMode': False,
|
165
167
|
'limit': 100,
|
166
168
|
'trigger': False,
|
167
169
|
'trailing': False,
|
170
|
+
'symbolRequired': True,
|
168
171
|
},
|
169
172
|
'fetchOrders': {
|
170
173
|
'marginMode': False,
|
@@ -173,6 +176,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
173
176
|
'untilDays': None,
|
174
177
|
'trigger': False,
|
175
178
|
'trailing': False,
|
179
|
+
'symbolRequired': True,
|
176
180
|
},
|
177
181
|
'fetchClosedOrders': {
|
178
182
|
'marginMode': False,
|
@@ -182,6 +186,7 @@ class bitflyer(Exchange, ImplicitAPI):
|
|
182
186
|
'untilDays': None,
|
183
187
|
'trigger': False,
|
184
188
|
'trailing': False,
|
189
|
+
'symbolRequired': True,
|
185
190
|
},
|
186
191
|
'fetchOHLCV': None,
|
187
192
|
},
|
ccxt/bitget.py
CHANGED
@@ -1594,17 +1594,20 @@ class bitget(Exchange, ImplicitAPI):
|
|
1594
1594
|
'limit': 100,
|
1595
1595
|
'daysBack': None,
|
1596
1596
|
'untilDays': 90,
|
1597
|
+
'symbolRequired': True,
|
1597
1598
|
},
|
1598
1599
|
'fetchOrder': {
|
1599
1600
|
'marginMode': False,
|
1600
1601
|
'trigger': False,
|
1601
1602
|
'trailing': False,
|
1603
|
+
'symbolRequired': True,
|
1602
1604
|
},
|
1603
1605
|
'fetchOpenOrders': {
|
1604
1606
|
'marginMode': True,
|
1605
1607
|
'limit': 100,
|
1606
1608
|
'trigger': True,
|
1607
1609
|
'trailing': False,
|
1610
|
+
'symbolRequired': False,
|
1608
1611
|
},
|
1609
1612
|
'fetchOrders': None,
|
1610
1613
|
'fetchClosedOrders': {
|
@@ -1615,6 +1618,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
1615
1618
|
'untilDays': 90,
|
1616
1619
|
'trigger': True,
|
1617
1620
|
'trailing': False,
|
1621
|
+
'symbolRequired': False,
|
1618
1622
|
},
|
1619
1623
|
'fetchOHLCV': {
|
1620
1624
|
'limit': 1000, # variable timespans for recent endpoint, 200 for historical
|
@@ -1949,10 +1953,10 @@ class bitget(Exchange, ImplicitAPI):
|
|
1949
1953
|
amountDecimals = self.safe_integer(market, 'volumePlace')
|
1950
1954
|
priceStep = self.safe_string(market, 'priceEndStep')
|
1951
1955
|
amountStep = self.safe_string(market, 'minTradeNum')
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
priceString = str(
|
1956
|
+
precise = Precise(priceStep)
|
1957
|
+
precise.decimals = max(precise.decimals, priceDecimals)
|
1958
|
+
precise.reduce()
|
1959
|
+
priceString = str(precise)
|
1956
1960
|
pricePrecision = self.parse_number(priceString)
|
1957
1961
|
preciseAmount = Precise(amountStep)
|
1958
1962
|
preciseAmount.decimals = max(preciseAmount.decimals, amountDecimals)
|
ccxt/bithumb.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bithumb import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, MarketInterface
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -173,12 +173,14 @@ class bithumb(Exchange, ImplicitAPI):
|
|
173
173
|
'marginMode': False,
|
174
174
|
'trigger': False,
|
175
175
|
'trailing': False,
|
176
|
+
'symbolRequired': True,
|
176
177
|
},
|
177
178
|
'fetchOpenOrders': {
|
178
179
|
'marginMode': False,
|
179
180
|
'limit': 1000,
|
180
181
|
'trigger': False,
|
181
182
|
'trailing': False,
|
183
|
+
'symbolRequired': True,
|
182
184
|
},
|
183
185
|
'fetchOrders': None,
|
184
186
|
'fetchClosedOrders': None,
|
ccxt/bitmart.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bitmart import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, BorrowInterest, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, BorrowInterest, Currencies, Currency, DepositAddress, FundingHistory, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, FundingRate, Trade, TradingFeeInterface, Transaction, MarketInterface, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -742,17 +742,20 @@ class bitmart(Exchange, ImplicitAPI):
|
|
742
742
|
'limit': 200,
|
743
743
|
'daysBack': None,
|
744
744
|
'untilDays': 99999,
|
745
|
+
'symbolRequired': False,
|
745
746
|
},
|
746
747
|
'fetchOrder': {
|
747
748
|
'marginMode': False,
|
748
749
|
'trigger': False,
|
749
750
|
'trailing': False,
|
751
|
+
'symbolRequired': False,
|
750
752
|
},
|
751
753
|
'fetchOpenOrders': {
|
752
754
|
'marginMode': True,
|
753
755
|
'limit': 200,
|
754
756
|
'trigger': False,
|
755
757
|
'trailing': False,
|
758
|
+
'symbolRequired': False,
|
756
759
|
},
|
757
760
|
'fetchOrders': None,
|
758
761
|
'fetchClosedOrders': {
|
@@ -763,6 +766,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
763
766
|
'untilDays': None,
|
764
767
|
'trigger': False,
|
765
768
|
'trailing': False,
|
769
|
+
'symbolRequired': False,
|
766
770
|
},
|
767
771
|
'fetchOHLCV': {
|
768
772
|
'limit': 1000, # variable timespans for recent endpoint, 200 for historical
|
@@ -933,7 +937,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
933
937
|
'info': response,
|
934
938
|
}
|
935
939
|
|
936
|
-
def fetch_spot_markets(self, params={}):
|
940
|
+
def fetch_spot_markets(self, params={}) -> List[MarketInterface]:
|
937
941
|
response = self.publicGetSpotV1SymbolsDetails(params)
|
938
942
|
#
|
939
943
|
# {
|
@@ -977,7 +981,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
977
981
|
minSellCost = self.safe_string(market, 'min_sell_amount')
|
978
982
|
minCost = Precise.string_max(minBuyCost, minSellCost)
|
979
983
|
baseMinSize = self.safe_number(market, 'base_min_size')
|
980
|
-
result.append({
|
984
|
+
result.append(self.safe_market_structure({
|
981
985
|
'id': id,
|
982
986
|
'numericId': numericId,
|
983
987
|
'symbol': symbol,
|
@@ -1026,10 +1030,10 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1026
1030
|
},
|
1027
1031
|
'created': None,
|
1028
1032
|
'info': market,
|
1029
|
-
})
|
1033
|
+
}))
|
1030
1034
|
return result
|
1031
1035
|
|
1032
|
-
def fetch_contract_markets(self, params={}):
|
1036
|
+
def fetch_contract_markets(self, params={}) -> List[MarketInterface]:
|
1033
1037
|
response = self.publicGetContractPublicDetails(params)
|
1034
1038
|
#
|
1035
1039
|
# {
|
@@ -1089,7 +1093,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1089
1093
|
expiry = self.safe_integer(market, 'expire_timestamp')
|
1090
1094
|
if not isFutures and (expiry == 0):
|
1091
1095
|
expiry = None
|
1092
|
-
result.append({
|
1096
|
+
result.append(self.safe_market_structure({
|
1093
1097
|
'id': id,
|
1094
1098
|
'numericId': None,
|
1095
1099
|
'symbol': symbol,
|
@@ -1138,7 +1142,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1138
1142
|
},
|
1139
1143
|
'created': self.safe_integer(market, 'open_timestamp'),
|
1140
1144
|
'info': market,
|
1141
|
-
})
|
1145
|
+
}))
|
1142
1146
|
return result
|
1143
1147
|
|
1144
1148
|
def fetch_markets(self, params={}) -> List[Market]:
|
@@ -2959,7 +2963,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2959
2963
|
order = self.safe_order({'id': id, 'symbol': market['symbol'], 'info': {}}, market)
|
2960
2964
|
return order
|
2961
2965
|
|
2962
|
-
def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
|
2966
|
+
def cancel_orders(self, ids: List[str], symbol: Str = None, params={}) -> List[Order]:
|
2963
2967
|
"""
|
2964
2968
|
cancel multiple orders
|
2965
2969
|
|
@@ -3405,8 +3409,9 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3405
3409
|
"""
|
3406
3410
|
self.load_markets()
|
3407
3411
|
currency = self.currency(code)
|
3412
|
+
currencyId = currency['id']
|
3408
3413
|
request: dict = {
|
3409
|
-
'currency':
|
3414
|
+
'currency': currencyId,
|
3410
3415
|
}
|
3411
3416
|
if code == 'USDT':
|
3412
3417
|
defaultNetworks = self.safe_value(self.options, 'defaultNetworks')
|
@@ -3415,8 +3420,13 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3415
3420
|
networkInner = self.safe_string_upper(params, 'network', defaultNetwork) # self line allows the user to specify either ERC20 or ETH
|
3416
3421
|
networkInner = self.safe_string(networks, networkInner, networkInner) # handle ERC20>ETH alias
|
3417
3422
|
if networkInner is not None:
|
3418
|
-
request['currency'] =
|
3423
|
+
request['currency'] = currencyId + '-' + networkInner # when network the currency need to be changed to currency + '-' + network https://developer-pro.bitmart.com/en/account/withdraw_apply.html on the end of page
|
3419
3424
|
params = self.omit(params, 'network')
|
3425
|
+
else:
|
3426
|
+
networkCode = None
|
3427
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
3428
|
+
if networkCode is not None:
|
3429
|
+
request['currency'] = currencyId + '-' + self.network_code_to_id(networkCode)
|
3420
3430
|
response = self.privateGetAccountV1DepositAddress(self.extend(request, params))
|
3421
3431
|
#
|
3422
3432
|
# {
|
@@ -3535,7 +3545,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3535
3545
|
network = self.safe_string_upper(params, 'network', defaultNetwork) # self line allows the user to specify either ERC20 or ETH
|
3536
3546
|
network = self.safe_string(networks, network, network) # handle ERC20>ETH alias
|
3537
3547
|
if network is not None:
|
3538
|
-
request['currency']
|
3548
|
+
request['currency'] = request['currency'] + '-' + network # when network the currency need to be changed to currency + '-' + network https://developer-pro.bitmart.com/en/account/withdraw_apply.html on the end of page
|
3539
3549
|
currency['code'] = request['currency'] # update currency code to filter
|
3540
3550
|
params = self.omit(params, 'network')
|
3541
3551
|
response = self.privateGetAccountV2DepositWithdrawHistory(self.extend(request, params))
|
@@ -4386,7 +4396,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
4386
4396
|
https://developer-pro.bitmart.com/en/futuresv2/#get-funding-rate-history
|
4387
4397
|
|
4388
4398
|
:param str symbol: unified symbol of the market to fetch the funding rate history for
|
4389
|
-
:param int [since]:
|
4399
|
+
:param int [since]: not sent to exchange api, exchange api always returns the most recent data, only used to filter exchange response
|
4390
4400
|
:param int [limit]: the maximum amount of funding rate structures to fetch
|
4391
4401
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4392
4402
|
:returns dict[]: a list of `funding rate structures <https://docs.ccxt.com/#/?id=funding-rate-history-structure>`
|
ccxt/bitmex.py
CHANGED
@@ -286,108 +286,113 @@ class bitmex(Exchange, ImplicitAPI):
|
|
286
286
|
'SOL': 'sol',
|
287
287
|
'ADA': 'ada',
|
288
288
|
},
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
'triggerDirection': True,
|
300
|
-
'stopLossPrice': False,
|
301
|
-
'takeProfitPrice': False,
|
302
|
-
'attachedStopLossTakeProfit': None,
|
303
|
-
'timeInForce': {
|
304
|
-
'IOC': True,
|
305
|
-
'FOK': True,
|
306
|
-
'PO': True,
|
307
|
-
'GTD': False,
|
308
|
-
},
|
309
|
-
'hedged': False,
|
310
|
-
'trailing': True,
|
311
|
-
'marketBuyRequiresPrice': False,
|
312
|
-
'marketBuyByCost': False,
|
313
|
-
# exchange-supported features
|
314
|
-
# 'selfTradePrevention': True,
|
315
|
-
# 'twap': False,
|
316
|
-
# 'iceberg': False,
|
317
|
-
# 'oco': False,
|
318
|
-
},
|
319
|
-
'createOrders': None,
|
320
|
-
'fetchMyTrades': {
|
321
|
-
'marginMode': False,
|
322
|
-
'limit': 500,
|
323
|
-
'daysBack': None,
|
324
|
-
'untilDays': 1000000,
|
325
|
-
},
|
326
|
-
'fetchOrder': {
|
327
|
-
'marginMode': False,
|
328
|
-
'trigger': False,
|
329
|
-
'trailing': False,
|
330
|
-
},
|
331
|
-
'fetchOpenOrders': {
|
332
|
-
'marginMode': False,
|
333
|
-
'limit': 500,
|
334
|
-
'trigger': False,
|
335
|
-
'trailing': False,
|
336
|
-
},
|
337
|
-
'fetchOrders': {
|
338
|
-
'marginMode': False,
|
339
|
-
'limit': 500,
|
340
|
-
'daysBack': None,
|
341
|
-
'untilDays': 1000000,
|
342
|
-
'trigger': False,
|
343
|
-
'trailing': False,
|
344
|
-
},
|
345
|
-
'fetchClosedOrders': {
|
346
|
-
'marginMode': False,
|
347
|
-
'limit': 500,
|
348
|
-
'daysBackClosed': None,
|
349
|
-
'daysBackCanceled': None,
|
350
|
-
'untilDays': 1000000,
|
351
|
-
'trigger': False,
|
352
|
-
'trailing': False,
|
289
|
+
},
|
290
|
+
'features': {
|
291
|
+
'default': {
|
292
|
+
'sandbox': True,
|
293
|
+
'createOrder': {
|
294
|
+
'marginMode': True,
|
295
|
+
'triggerPrice': True,
|
296
|
+
'triggerPriceType': {
|
297
|
+
'last': True,
|
298
|
+
'mark': True,
|
353
299
|
},
|
354
|
-
'
|
355
|
-
|
300
|
+
'triggerDirection': True,
|
301
|
+
'stopLossPrice': False,
|
302
|
+
'takeProfitPrice': False,
|
303
|
+
'attachedStopLossTakeProfit': None,
|
304
|
+
'timeInForce': {
|
305
|
+
'IOC': True,
|
306
|
+
'FOK': True,
|
307
|
+
'PO': True,
|
308
|
+
'GTD': False,
|
356
309
|
},
|
310
|
+
'hedged': False,
|
311
|
+
'trailing': True,
|
312
|
+
'marketBuyRequiresPrice': False,
|
313
|
+
'marketBuyByCost': False,
|
314
|
+
# exchange-supported features
|
315
|
+
# 'selfTradePrevention': True,
|
316
|
+
# 'twap': False,
|
317
|
+
# 'iceberg': False,
|
318
|
+
# 'oco': False,
|
357
319
|
},
|
358
|
-
'
|
359
|
-
|
360
|
-
'
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
320
|
+
'createOrders': None,
|
321
|
+
'fetchMyTrades': {
|
322
|
+
'marginMode': False,
|
323
|
+
'limit': 500,
|
324
|
+
'daysBack': None,
|
325
|
+
'untilDays': 1000000,
|
326
|
+
'symbolRequired': False,
|
365
327
|
},
|
366
|
-
'
|
367
|
-
'
|
368
|
-
'
|
369
|
-
|
370
|
-
|
371
|
-
},
|
372
|
-
},
|
328
|
+
'fetchOrder': {
|
329
|
+
'marginMode': False,
|
330
|
+
'trigger': False,
|
331
|
+
'trailing': False,
|
332
|
+
'symbolRequired': False,
|
373
333
|
},
|
374
|
-
'
|
375
|
-
'
|
376
|
-
|
377
|
-
|
378
|
-
'
|
379
|
-
|
380
|
-
|
334
|
+
'fetchOpenOrders': {
|
335
|
+
'marginMode': False,
|
336
|
+
'limit': 500,
|
337
|
+
'trigger': False,
|
338
|
+
'trailing': False,
|
339
|
+
'symbolRequired': False,
|
340
|
+
},
|
341
|
+
'fetchOrders': {
|
342
|
+
'marginMode': False,
|
343
|
+
'limit': 500,
|
344
|
+
'daysBack': None,
|
345
|
+
'untilDays': 1000000,
|
346
|
+
'trigger': False,
|
347
|
+
'trailing': False,
|
348
|
+
'symbolRequired': False,
|
381
349
|
},
|
382
|
-
'
|
383
|
-
'
|
384
|
-
|
350
|
+
'fetchClosedOrders': {
|
351
|
+
'marginMode': False,
|
352
|
+
'limit': 500,
|
353
|
+
'daysBack': None,
|
354
|
+
'daysBackCanceled': None,
|
355
|
+
'untilDays': 1000000,
|
356
|
+
'trigger': False,
|
357
|
+
'trailing': False,
|
358
|
+
'symbolRequired': False,
|
359
|
+
},
|
360
|
+
'fetchOHLCV': {
|
361
|
+
'limit': 10000,
|
362
|
+
},
|
363
|
+
},
|
364
|
+
'spot': {
|
365
|
+
'extends': 'default',
|
366
|
+
'createOrder': {
|
367
|
+
'triggerPriceType': {
|
368
|
+
'index': False,
|
385
369
|
},
|
386
|
-
|
387
|
-
|
370
|
+
},
|
371
|
+
},
|
372
|
+
'derivatives': {
|
373
|
+
'extends': 'default',
|
374
|
+
'createOrder': {
|
375
|
+
'triggerPriceType': {
|
376
|
+
'index': True,
|
388
377
|
},
|
389
378
|
},
|
390
379
|
},
|
380
|
+
'swap': {
|
381
|
+
'linear': {
|
382
|
+
'extends': 'derivatives',
|
383
|
+
},
|
384
|
+
'inverse': {
|
385
|
+
'extends': 'derivatives',
|
386
|
+
},
|
387
|
+
},
|
388
|
+
'future': {
|
389
|
+
'linear': {
|
390
|
+
'extends': 'derivatives',
|
391
|
+
},
|
392
|
+
'inverse': {
|
393
|
+
'extends': 'derivatives',
|
394
|
+
},
|
395
|
+
},
|
391
396
|
},
|
392
397
|
'commonCurrencies': {
|
393
398
|
'USDt': 'USDT',
|
@@ -964,7 +969,8 @@ class bitmex(Exchange, ImplicitAPI):
|
|
964
969
|
# https://github.com/ccxt/ccxt/issues/4927
|
965
970
|
# the exchange sometimes returns null price in the orderbook
|
966
971
|
if price is not None:
|
967
|
-
result[side]
|
972
|
+
resultSide = result[side]
|
973
|
+
resultSide.append([price, amount])
|
968
974
|
result['bids'] = self.sort_by(result['bids'], 0, True)
|
969
975
|
result['asks'] = self.sort_by(result['asks'], 0)
|
970
976
|
return result
|
ccxt/bitopro.py
CHANGED
@@ -239,11 +239,13 @@ class bitopro(Exchange, ImplicitAPI):
|
|
239
239
|
'limit': 1000,
|
240
240
|
'daysBack': 100000,
|
241
241
|
'untilDays': 100000,
|
242
|
+
'symbolRequired': True,
|
242
243
|
},
|
243
244
|
'fetchOrder': {
|
244
245
|
'marginMode': False,
|
245
246
|
'trigger': False,
|
246
247
|
'trailing': False,
|
248
|
+
'symbolRequired': True,
|
247
249
|
},
|
248
250
|
# todo: implement through fetchOrders
|
249
251
|
'fetchOpenOrders': {
|
@@ -251,6 +253,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
251
253
|
'limit': None,
|
252
254
|
'trigger': False,
|
253
255
|
'trailing': False,
|
256
|
+
'symbolRequired': False,
|
254
257
|
},
|
255
258
|
'fetchOrders': {
|
256
259
|
'marginMode': False,
|
@@ -259,6 +262,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
259
262
|
'untilDays': 100000,
|
260
263
|
'trigger': False,
|
261
264
|
'trailing': False,
|
265
|
+
'symbolRequired': True,
|
262
266
|
},
|
263
267
|
'fetchClosedOrders': {
|
264
268
|
'marginMode': False,
|
@@ -268,6 +272,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
268
272
|
'untilDays': 10000,
|
269
273
|
'trigger': False,
|
270
274
|
'trailing': False,
|
275
|
+
'symbolRequired': True,
|
271
276
|
},
|
272
277
|
'fetchOHLCV': {
|
273
278
|
'limit': 1000,
|
@@ -1151,7 +1156,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1151
1156
|
}))
|
1152
1157
|
return orders
|
1153
1158
|
|
1154
|
-
def cancel_orders(self, ids, symbol: Str = None, params={}):
|
1159
|
+
def cancel_orders(self, ids, symbol: Str = None, params={}) -> List[Order]:
|
1155
1160
|
"""
|
1156
1161
|
cancel multiple orders
|
1157
1162
|
|
@@ -1183,7 +1188,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1183
1188
|
data = self.safe_dict(response, 'data')
|
1184
1189
|
return self.parse_cancel_orders(data)
|
1185
1190
|
|
1186
|
-
def cancel_all_orders(self, symbol: Str = None, params={}):
|
1191
|
+
def cancel_all_orders(self, symbol: Str = None, params={}) -> List[Order]:
|
1187
1192
|
"""
|
1188
1193
|
cancel all open orders
|
1189
1194
|
|
ccxt/bitrue.py
CHANGED
@@ -490,17 +490,20 @@ class bitrue(Exchange, ImplicitAPI):
|
|
490
490
|
'limit': 1000,
|
491
491
|
'daysBack': 100000,
|
492
492
|
'untilDays': 100000,
|
493
|
+
'symbolRequired': True,
|
493
494
|
},
|
494
495
|
'fetchOrder': {
|
495
496
|
'marginMode': False,
|
496
497
|
'trigger': False,
|
497
498
|
'trailing': False,
|
499
|
+
'symbolRequired': True,
|
498
500
|
},
|
499
501
|
'fetchOpenOrders': {
|
500
502
|
'marginMode': False,
|
501
503
|
'limit': None,
|
502
504
|
'trigger': False,
|
503
505
|
'trailing': False,
|
506
|
+
'symbolRequired': True,
|
504
507
|
},
|
505
508
|
'fetchOrders': None,
|
506
509
|
'fetchClosedOrders': {
|
@@ -511,6 +514,7 @@ class bitrue(Exchange, ImplicitAPI):
|
|
511
514
|
'untilDays': 90,
|
512
515
|
'trigger': False,
|
513
516
|
'trailing': False,
|
517
|
+
'symbolRequired': True,
|
514
518
|
},
|
515
519
|
'fetchOHLCV': {
|
516
520
|
'limit': 1440,
|