ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +2 -2
- 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/bitbank.py +1 -0
- ccxt/abstract/coinbase.py +2 -0
- ccxt/abstract/htx.py +3 -0
- ccxt/abstract/huobi.py +3 -0
- ccxt/abstract/huobipro.py +3 -0
- ccxt/abstract/okex.py +3 -1
- ccxt/abstract/okex5.py +3 -1
- ccxt/abstract/okx.py +3 -1
- ccxt/ace.py +23 -23
- ccxt/alpaca.py +8 -8
- ccxt/ascendex.py +26 -26
- ccxt/async_support/__init__.py +2 -2
- ccxt/async_support/ace.py +23 -23
- ccxt/async_support/alpaca.py +8 -8
- ccxt/async_support/ascendex.py +26 -26
- ccxt/async_support/base/exchange.py +4 -2216
- ccxt/async_support/bigone.py +21 -24
- ccxt/async_support/binance.py +61 -54
- ccxt/async_support/bingx.py +28 -28
- ccxt/async_support/bit2c.py +9 -9
- ccxt/async_support/bitbank.py +11 -10
- ccxt/async_support/bitbns.py +11 -11
- ccxt/async_support/bitfinex.py +15 -15
- ccxt/async_support/bitfinex2.py +22 -22
- ccxt/async_support/bitflyer.py +13 -13
- ccxt/async_support/bitforex.py +10 -10
- ccxt/async_support/bitget.py +44 -44
- ccxt/async_support/bithumb.py +9 -9
- ccxt/async_support/bitmart.py +85 -104
- ccxt/async_support/bitmex.py +27 -27
- ccxt/async_support/bitopro.py +18 -18
- ccxt/async_support/bitpanda.py +18 -18
- ccxt/async_support/bitrue.py +14 -14
- ccxt/async_support/bitso.py +17 -17
- ccxt/async_support/bitstamp.py +17 -17
- ccxt/async_support/bittrex.py +22 -24
- ccxt/async_support/bitvavo.py +15 -15
- ccxt/async_support/bl3p.py +4 -4
- ccxt/async_support/blockchaincom.py +17 -17
- ccxt/async_support/btcalpha.py +14 -14
- ccxt/async_support/btcbox.py +9 -9
- ccxt/async_support/btcmarkets.py +17 -17
- ccxt/async_support/btcturk.py +9 -9
- ccxt/async_support/bybit.py +46 -46
- ccxt/async_support/cex.py +10 -10
- ccxt/async_support/coinbase.py +69 -25
- ccxt/async_support/coinbasepro.py +19 -19
- ccxt/async_support/coincheck.py +10 -10
- ccxt/async_support/coinex.py +57 -66
- ccxt/async_support/coinlist.py +22 -22
- ccxt/async_support/coinmate.py +10 -10
- ccxt/async_support/coinone.py +10 -10
- ccxt/async_support/coinsph.py +17 -17
- ccxt/async_support/coinspot.py +5 -5
- ccxt/async_support/cryptocom.py +27 -27
- ccxt/async_support/currencycom.py +18 -18
- ccxt/async_support/delta.py +21 -21
- ccxt/async_support/deribit.py +24 -24
- ccxt/async_support/digifinex.py +35 -35
- ccxt/async_support/exmo.py +19 -19
- ccxt/async_support/gate.py +38 -38
- ccxt/async_support/gemini.py +11 -11
- ccxt/async_support/hitbtc.py +27 -27
- ccxt/async_support/hollaex.py +19 -19
- ccxt/async_support/htx.py +47 -44
- ccxt/async_support/huobijp.py +22 -22
- ccxt/async_support/idex.py +20 -20
- ccxt/async_support/independentreserve.py +9 -9
- ccxt/async_support/indodax.py +10 -10
- ccxt/async_support/kraken.py +25 -25
- ccxt/async_support/krakenfutures.py +17 -17
- ccxt/async_support/kucoin.py +27 -27
- ccxt/async_support/kucoinfutures.py +20 -20
- ccxt/async_support/kuna.py +19 -19
- ccxt/async_support/latoken.py +14 -14
- ccxt/async_support/lbank.py +18 -18
- ccxt/async_support/luno.py +14 -14
- ccxt/async_support/lykke.py +12 -12
- ccxt/async_support/mercado.py +11 -11
- ccxt/async_support/mexc.py +36 -36
- ccxt/async_support/ndax.py +18 -18
- ccxt/async_support/novadax.py +17 -17
- ccxt/async_support/oceanex.py +12 -12
- ccxt/async_support/okcoin.py +19 -19
- ccxt/async_support/okx.py +48 -45
- ccxt/async_support/p2b.py +6 -6
- ccxt/async_support/paymium.py +6 -6
- ccxt/async_support/phemex.py +57 -57
- ccxt/async_support/poloniex.py +31 -30
- ccxt/async_support/poloniexfutures.py +16 -16
- ccxt/async_support/probit.py +22 -22
- ccxt/async_support/tidex.py +15 -15
- ccxt/async_support/timex.py +20 -20
- ccxt/async_support/tokocrypto.py +16 -16
- ccxt/async_support/upbit.py +15 -15
- ccxt/async_support/wavesexchange.py +12 -12
- ccxt/async_support/wazirx.py +13 -13
- ccxt/async_support/whitebit.py +26 -26
- ccxt/async_support/woo.py +47 -47
- ccxt/async_support/yobit.py +8 -8
- ccxt/async_support/zaif.py +10 -10
- ccxt/async_support/zonda.py +16 -16
- ccxt/base/errors.py +17 -16
- ccxt/base/exchange.py +57 -97
- ccxt/base/types.py +138 -139
- ccxt/bigone.py +21 -24
- ccxt/binance.py +61 -54
- ccxt/bingx.py +28 -28
- ccxt/bit2c.py +9 -9
- ccxt/bitbank.py +11 -10
- ccxt/bitbns.py +11 -11
- ccxt/bitfinex.py +15 -15
- ccxt/bitfinex2.py +22 -22
- ccxt/bitflyer.py +13 -13
- ccxt/bitforex.py +10 -10
- ccxt/bitget.py +44 -44
- ccxt/bithumb.py +9 -9
- ccxt/bitmart.py +85 -104
- ccxt/bitmex.py +27 -27
- ccxt/bitopro.py +18 -18
- ccxt/bitpanda.py +18 -18
- ccxt/bitrue.py +14 -14
- ccxt/bitso.py +17 -17
- ccxt/bitstamp.py +17 -17
- ccxt/bittrex.py +22 -24
- ccxt/bitvavo.py +15 -15
- ccxt/bl3p.py +4 -4
- ccxt/blockchaincom.py +17 -17
- ccxt/btcalpha.py +14 -14
- ccxt/btcbox.py +9 -9
- ccxt/btcmarkets.py +17 -17
- ccxt/btcturk.py +9 -9
- ccxt/bybit.py +46 -46
- ccxt/cex.py +10 -10
- ccxt/coinbase.py +69 -25
- ccxt/coinbasepro.py +19 -19
- ccxt/coincheck.py +10 -10
- ccxt/coinex.py +57 -66
- ccxt/coinlist.py +22 -22
- ccxt/coinmate.py +10 -10
- ccxt/coinone.py +10 -10
- ccxt/coinsph.py +17 -17
- ccxt/coinspot.py +5 -5
- ccxt/cryptocom.py +27 -27
- ccxt/currencycom.py +18 -18
- ccxt/delta.py +21 -21
- ccxt/deribit.py +24 -24
- ccxt/digifinex.py +35 -35
- ccxt/exmo.py +19 -19
- ccxt/gate.py +38 -38
- ccxt/gemini.py +11 -11
- ccxt/hitbtc.py +27 -27
- ccxt/hollaex.py +19 -19
- ccxt/htx.py +47 -44
- ccxt/huobijp.py +22 -22
- ccxt/idex.py +20 -20
- ccxt/independentreserve.py +9 -9
- ccxt/indodax.py +10 -10
- ccxt/kraken.py +25 -25
- ccxt/krakenfutures.py +17 -17
- ccxt/kucoin.py +27 -27
- ccxt/kucoinfutures.py +20 -20
- ccxt/kuna.py +19 -19
- ccxt/latoken.py +14 -14
- ccxt/lbank.py +18 -18
- ccxt/luno.py +14 -14
- ccxt/lykke.py +12 -12
- ccxt/mercado.py +11 -11
- ccxt/mexc.py +36 -36
- ccxt/ndax.py +18 -18
- ccxt/novadax.py +17 -17
- ccxt/oceanex.py +12 -12
- ccxt/okcoin.py +19 -19
- ccxt/okx.py +48 -45
- ccxt/p2b.py +6 -6
- ccxt/paymium.py +6 -6
- ccxt/phemex.py +57 -57
- ccxt/poloniex.py +31 -30
- ccxt/poloniexfutures.py +16 -16
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +3 -3
- ccxt/pro/ascendex.py +2 -2
- ccxt/pro/binance.py +9 -9
- ccxt/pro/bingx.py +3 -3
- ccxt/pro/bitfinex.py +3 -3
- ccxt/pro/bitfinex2.py +3 -3
- ccxt/pro/bitget.py +3 -3
- ccxt/pro/bitmart.py +2 -2
- ccxt/pro/bitmex.py +3 -3
- ccxt/pro/bitpanda.py +3 -3
- ccxt/pro/bitrue.py +2 -2
- ccxt/pro/bitstamp.py +2 -2
- ccxt/pro/bittrex.py +3 -3
- ccxt/pro/bitvavo.py +3 -3
- ccxt/pro/blockchaincom.py +2 -2
- ccxt/pro/bybit.py +4 -4
- ccxt/pro/cex.py +3 -3
- ccxt/pro/coinbasepro.py +3 -3
- ccxt/pro/coinex.py +2 -2
- ccxt/pro/cryptocom.py +5 -5
- ccxt/pro/deribit.py +3 -3
- ccxt/pro/exmo.py +2 -2
- ccxt/pro/gate.py +3 -3
- ccxt/pro/gemini.py +2 -2
- ccxt/pro/hitbtc.py +4 -4
- ccxt/pro/hollaex.py +3 -3
- ccxt/pro/htx.py +3 -3
- ccxt/pro/idex.py +3 -3
- ccxt/pro/kraken.py +7 -7
- ccxt/pro/krakenfutures.py +4 -4
- ccxt/pro/kucoin.py +3 -3
- ccxt/pro/kucoinfutures.py +3 -3
- ccxt/pro/mexc.py +3 -3
- ccxt/pro/okcoin.py +2 -2
- ccxt/pro/okx.py +6 -6
- ccxt/pro/phemex.py +3 -3
- ccxt/pro/poloniex.py +3 -3
- ccxt/pro/poloniexfutures.py +3 -3
- ccxt/pro/probit.py +3 -3
- ccxt/pro/wazirx.py +3 -3
- ccxt/pro/whitebit.py +3 -3
- ccxt/pro/woo.py +2 -2
- ccxt/probit.py +22 -22
- ccxt/test/base/test_shared_methods.py +3 -3
- ccxt/test/test_async.py +543 -535
- ccxt/test/test_sync.py +542 -534
- ccxt/tidex.py +15 -15
- ccxt/timex.py +20 -20
- ccxt/tokocrypto.py +16 -16
- ccxt/upbit.py +15 -15
- ccxt/wavesexchange.py +12 -12
- ccxt/wazirx.py +13 -13
- ccxt/whitebit.py +26 -26
- ccxt/woo.py +47 -47
- ccxt/yobit.py +8 -8
- ccxt/zaif.py +10 -10
- ccxt/zonda.py +16 -16
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
- ccxt-4.1.56.dist-info/RECORD +449 -0
- ccxt/async_support/bitstamp1.py +0 -402
- ccxt/async_support/lbank2.py +0 -2620
- ccxt/bitstamp1.py +0 -402
- ccxt/lbank2.py +0 -2619
- ccxt-4.1.54.dist-info/RECORD +0 -453
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
- {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
ccxt/wazirx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.wazirx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -229,16 +229,16 @@ class wazirx(Exchange, ImplicitAPI):
|
|
229
229
|
quote = self.safe_currency_code(quoteId)
|
230
230
|
isSpot = self.safe_value(market, 'isSpotTradingAllowed')
|
231
231
|
filters = self.safe_value(market, 'filters')
|
232
|
-
minPrice = None
|
232
|
+
minPrice: Num = None
|
233
233
|
for j in range(0, len(filters)):
|
234
234
|
filter = filters[j]
|
235
235
|
filterType = self.safe_string(filter, 'filterType')
|
236
236
|
if filterType == 'PRICE_FILTER':
|
237
237
|
minPrice = self.safe_number(filter, 'minPrice')
|
238
238
|
fee = self.safe_value(self.fees, quote, {})
|
239
|
-
takerString = self.safe_string(fee, 'taker', '0.2')
|
239
|
+
takerString: Str = self.safe_string(fee, 'taker', '0.2')
|
240
240
|
takerString = Precise.string_div(takerString, '100')
|
241
|
-
makerString = self.safe_string(fee, 'maker', '0.2')
|
241
|
+
makerString: Str = self.safe_string(fee, 'maker', '0.2')
|
242
242
|
makerString = Precise.string_div(makerString, '100')
|
243
243
|
status = self.safe_string(market, 'status')
|
244
244
|
return {
|
@@ -328,7 +328,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
328
328
|
#
|
329
329
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
330
330
|
|
331
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
331
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
332
332
|
#
|
333
333
|
# [1669014300,1402001,1402001,1402001,1402001,0],
|
334
334
|
#
|
@@ -471,7 +471,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
471
471
|
# ]
|
472
472
|
return self.parse_trades(response, market, since, limit)
|
473
473
|
|
474
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
474
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
475
475
|
#
|
476
476
|
# {
|
477
477
|
# "id":322307791,
|
@@ -545,7 +545,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
545
545
|
#
|
546
546
|
return self.safe_integer(response, 'serverTime')
|
547
547
|
|
548
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
548
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
549
549
|
#
|
550
550
|
# {
|
551
551
|
# "symbol":"btcinr",
|
@@ -627,7 +627,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
627
627
|
#
|
628
628
|
return self.parse_balance(response)
|
629
629
|
|
630
|
-
def fetch_orders(self, symbol:
|
630
|
+
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
631
631
|
"""
|
632
632
|
:see: https://docs.wazirx.com/#all-orders-user_data
|
633
633
|
fetches information on multiple orders made by the user
|
@@ -681,7 +681,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
681
681
|
orders = self.filter_by(orders, 'symbol', symbol)
|
682
682
|
return orders
|
683
683
|
|
684
|
-
def fetch_open_orders(self, symbol:
|
684
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
685
685
|
"""
|
686
686
|
:see: https://docs.wazirx.com/#current-open-orders-user_data
|
687
687
|
fetch all unfilled currently open orders
|
@@ -693,7 +693,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
693
693
|
"""
|
694
694
|
self.load_markets()
|
695
695
|
request = {}
|
696
|
-
market = None
|
696
|
+
market: Market = None
|
697
697
|
if symbol is not None:
|
698
698
|
market = self.market(symbol)
|
699
699
|
request['symbol'] = market['id']
|
@@ -728,7 +728,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
728
728
|
orders = self.parse_orders(response, market, since, limit)
|
729
729
|
return orders
|
730
730
|
|
731
|
-
def cancel_all_orders(self, symbol:
|
731
|
+
def cancel_all_orders(self, symbol: Str = None, params={}):
|
732
732
|
"""
|
733
733
|
:see: https://docs.wazirx.com/#cancel-all-open-orders-on-a-symbol-trade
|
734
734
|
cancel all open orders in a market
|
@@ -744,7 +744,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
744
744
|
}
|
745
745
|
return self.privateDeleteOpenOrders(self.extend(request, params))
|
746
746
|
|
747
|
-
def cancel_order(self, id: str, symbol:
|
747
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
748
748
|
"""
|
749
749
|
:see: https://docs.wazirx.com/#cancel-order-trade
|
750
750
|
cancels an open order
|
@@ -808,7 +808,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
808
808
|
# }
|
809
809
|
return self.parse_order(response, market)
|
810
810
|
|
811
|
-
def parse_order(self, order, market=None) -> Order:
|
811
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
812
812
|
# {
|
813
813
|
# "id":1949417813,
|
814
814
|
# "symbol":"ltcusdt",
|
ccxt/whitebit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.whitebit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType,
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Bool, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -320,17 +320,17 @@ class whitebit(Exchange, ImplicitAPI):
|
|
320
320
|
active = self.safe_value(market, 'tradesEnabled')
|
321
321
|
isCollateral = self.safe_value(market, 'isCollateral')
|
322
322
|
typeId = self.safe_string(market, 'type')
|
323
|
-
type
|
324
|
-
settle = None
|
325
|
-
settleId = None
|
323
|
+
type: str
|
324
|
+
settle: Str = None
|
325
|
+
settleId: Str = None
|
326
326
|
symbol = base + '/' + quote
|
327
327
|
swap = typeId == 'futures'
|
328
328
|
margin = isCollateral and not swap
|
329
329
|
contract = False
|
330
330
|
amountPrecision = self.parse_number(self.parse_precision(self.safe_string(market, 'stockPrec')))
|
331
331
|
contractSize = amountPrecision
|
332
|
-
linear = None
|
333
|
-
inverse = None
|
332
|
+
linear: Bool = None
|
333
|
+
inverse: Bool = None
|
334
334
|
if swap:
|
335
335
|
settleId = quoteId
|
336
336
|
settle = self.safe_currency_code(settleId)
|
@@ -722,7 +722,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
722
722
|
ticker = self.safe_value(response, 'result', {})
|
723
723
|
return self.parse_ticker(ticker, market)
|
724
724
|
|
725
|
-
def parse_ticker(self, ticker, market=None) -> Ticker:
|
725
|
+
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
726
726
|
#
|
727
727
|
# FetchTicker(v1)
|
728
728
|
#
|
@@ -874,7 +874,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
874
874
|
#
|
875
875
|
return self.parse_trades(response, market, since, limit)
|
876
876
|
|
877
|
-
def fetch_my_trades(self, symbol:
|
877
|
+
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
878
878
|
"""
|
879
879
|
fetch all trades made by the user
|
880
880
|
:param str symbol: unified symbol of the market to fetch trades for
|
@@ -884,7 +884,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
884
884
|
:returns Trade[]: a list of `trade structures <https://github.com/ccxt/ccxt/wiki/Manual#public-trades>`
|
885
885
|
"""
|
886
886
|
self.load_markets()
|
887
|
-
market = None
|
887
|
+
market: Market = None
|
888
888
|
request = {}
|
889
889
|
if symbol is not None:
|
890
890
|
market = self.market(symbol)
|
@@ -941,7 +941,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
941
941
|
results = self.sort_by_2(results, 'timestamp', 'id')
|
942
942
|
return self.filter_by_since_limit(results, since, limit, 'timestamp')
|
943
943
|
|
944
|
-
def parse_trade(self, trade, market=None) -> Trade:
|
944
|
+
def parse_trade(self, trade, market: Market = None) -> Trade:
|
945
945
|
#
|
946
946
|
# fetchTradesV4
|
947
947
|
#
|
@@ -993,7 +993,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
993
993
|
side = self.safe_string_2(trade, 'type', 'side')
|
994
994
|
symbol = market['symbol']
|
995
995
|
role = self.safe_integer(trade, 'role')
|
996
|
-
takerOrMaker = None
|
996
|
+
takerOrMaker: Str = None
|
997
997
|
if role is not None:
|
998
998
|
takerOrMaker = 'maker' if (role == 1) else 'taker'
|
999
999
|
fee = None
|
@@ -1059,7 +1059,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1059
1059
|
result = self.safe_value(response, 'result', [])
|
1060
1060
|
return self.parse_ohlcvs(result, market, timeframe, since, limit)
|
1061
1061
|
|
1062
|
-
def parse_ohlcv(self, ohlcv, market=None) -> list:
|
1062
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
1063
1063
|
#
|
1064
1064
|
# [
|
1065
1065
|
# 1591488000,
|
@@ -1150,7 +1150,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1150
1150
|
marginMode, query = self.handle_margin_mode_and_params('createOrder', params)
|
1151
1151
|
if postOnly:
|
1152
1152
|
request['postOnly'] = True
|
1153
|
-
method
|
1153
|
+
method: str
|
1154
1154
|
if marginMode is not None and marginMode != 'cross':
|
1155
1155
|
raise NotSupported(self.id + ' createOrder() is only available for cross margin')
|
1156
1156
|
useCollateralEndpoint = marginMode is not None or marketType == 'swap'
|
@@ -1181,7 +1181,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1181
1181
|
response = getattr(self, method)(self.extend(request, params))
|
1182
1182
|
return self.parse_order(response)
|
1183
1183
|
|
1184
|
-
def cancel_order(self, id: str, symbol:
|
1184
|
+
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1185
1185
|
"""
|
1186
1186
|
cancels an open order
|
1187
1187
|
:param str id: order id
|
@@ -1262,7 +1262,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1262
1262
|
#
|
1263
1263
|
return self.parse_balance(response)
|
1264
1264
|
|
1265
|
-
def fetch_open_orders(self, symbol:
|
1265
|
+
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1266
1266
|
"""
|
1267
1267
|
fetch all unfilled currently open orders
|
1268
1268
|
:param str symbol: unified market symbol
|
@@ -1302,7 +1302,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1302
1302
|
#
|
1303
1303
|
return self.parse_orders(response, market, since, limit, {'status': 'open'})
|
1304
1304
|
|
1305
|
-
def fetch_closed_orders(self, symbol:
|
1305
|
+
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1306
1306
|
"""
|
1307
1307
|
fetches information on multiple closed orders made by the user
|
1308
1308
|
:param str symbol: unified market symbol of the market orders were made in
|
@@ -1363,7 +1363,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1363
1363
|
}
|
1364
1364
|
return self.safe_string(types, type, type)
|
1365
1365
|
|
1366
|
-
def parse_order(self, order, market=None) -> Order:
|
1366
|
+
def parse_order(self, order, market: Market = None) -> Order:
|
1367
1367
|
#
|
1368
1368
|
# createOrder, fetchOpenOrders
|
1369
1369
|
#
|
@@ -1453,7 +1453,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1453
1453
|
'trades': None,
|
1454
1454
|
}, market)
|
1455
1455
|
|
1456
|
-
def fetch_order_trades(self, id: str, symbol:
|
1456
|
+
def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1457
1457
|
"""
|
1458
1458
|
fetch all the trades made from a single order
|
1459
1459
|
:param str id: order id
|
@@ -1562,7 +1562,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1562
1562
|
'info': response,
|
1563
1563
|
}
|
1564
1564
|
|
1565
|
-
def set_leverage(self, leverage, symbol:
|
1565
|
+
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
1566
1566
|
"""
|
1567
1567
|
set the level of leverage for a market
|
1568
1568
|
:param float leverage: the rate of leverage
|
@@ -1612,7 +1612,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1612
1612
|
#
|
1613
1613
|
return self.parse_transfer(response, currency)
|
1614
1614
|
|
1615
|
-
def parse_transfer(self, transfer, currency=None):
|
1615
|
+
def parse_transfer(self, transfer, currency: Currency = None):
|
1616
1616
|
#
|
1617
1617
|
# []
|
1618
1618
|
#
|
@@ -1665,7 +1665,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1665
1665
|
#
|
1666
1666
|
return self.extend({'id': uniqueId}, self.parse_transaction(response, currency))
|
1667
1667
|
|
1668
|
-
def parse_transaction(self, transaction, currency=None) -> Transaction:
|
1668
|
+
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1669
1669
|
#
|
1670
1670
|
# {
|
1671
1671
|
# "address": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE", # deposit address
|
@@ -1748,7 +1748,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1748
1748
|
}
|
1749
1749
|
return self.safe_string(statuses, status, status)
|
1750
1750
|
|
1751
|
-
def fetch_deposit(self, id: str, code:
|
1751
|
+
def fetch_deposit(self, id: str, code: Str = None, params={}):
|
1752
1752
|
"""
|
1753
1753
|
fetch information on a deposit
|
1754
1754
|
:param str id: deposit id
|
@@ -1809,7 +1809,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1809
1809
|
first = self.safe_value(records, 0, {})
|
1810
1810
|
return self.parse_transaction(first, currency)
|
1811
1811
|
|
1812
|
-
def fetch_deposits(self, code:
|
1812
|
+
def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1813
1813
|
"""
|
1814
1814
|
fetch all deposits made to an account
|
1815
1815
|
:param str code: unified currency code
|
@@ -1871,7 +1871,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1871
1871
|
records = self.safe_value(response, 'records', [])
|
1872
1872
|
return self.parse_transactions(records, currency, since, limit)
|
1873
1873
|
|
1874
|
-
def fetch_borrow_interest(self, code:
|
1874
|
+
def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1875
1875
|
"""
|
1876
1876
|
fetch the interest owed by the user for borrowing currency for margin trading
|
1877
1877
|
:see: https://github.com/whitebit-exchange/api-docs/blob/main/docs/Private/http-trade-v4.md#open-positions
|
@@ -1913,7 +1913,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
1913
1913
|
interest = self.parse_borrow_interests(response, market)
|
1914
1914
|
return self.filter_by_currency_since_limit(interest, code, since, limit)
|
1915
1915
|
|
1916
|
-
def parse_borrow_interest(self, info, market=None):
|
1916
|
+
def parse_borrow_interest(self, info, market: Market = None):
|
1917
1917
|
#
|
1918
1918
|
# {
|
1919
1919
|
# "positionId": 191823,
|
@@ -2020,7 +2020,7 @@ class whitebit(Exchange, ImplicitAPI):
|
|
2020
2020
|
result = self.parse_funding_rates(data)
|
2021
2021
|
return self.filter_by_array(result, 'symbol', symbols)
|
2022
2022
|
|
2023
|
-
def parse_funding_rate(self, contract, market=None):
|
2023
|
+
def parse_funding_rate(self, contract, market: Market = None):
|
2024
2024
|
#
|
2025
2025
|
# {
|
2026
2026
|
# "ticker_id":"ADA_PERP",
|