ccxt 4.2.59__py2.py3-none-any.whl → 4.2.60__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 +1 -1
- ccxt/abstract/blofin.py +1 -0
- ccxt/abstract/kraken.py +37 -37
- ccxt/abstract/wazirx.py +6 -1
- ccxt/ascendex.py +10 -12
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +10 -12
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bingx.py +37 -1
- ccxt/async_support/bitfinex2.py +20 -3
- ccxt/async_support/bitget.py +7 -2
- ccxt/async_support/bitmart.py +40 -23
- ccxt/async_support/blofin.py +52 -2
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/htx.py +3 -1
- ccxt/async_support/kraken.py +42 -39
- ccxt/async_support/kucoinfutures.py +1 -0
- ccxt/async_support/wazirx.py +6 -1
- ccxt/async_support/woo.py +146 -74
- ccxt/base/exchange.py +1 -1
- ccxt/bingx.py +37 -1
- ccxt/bitfinex2.py +20 -3
- ccxt/bitget.py +7 -2
- ccxt/bitmart.py +40 -23
- ccxt/blofin.py +52 -2
- ccxt/hitbtc.py +1 -1
- ccxt/htx.py +3 -1
- ccxt/kraken.py +42 -39
- ccxt/kucoinfutures.py +1 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +11 -2
- ccxt/pro/deribit.py +1 -1
- ccxt/wazirx.py +6 -1
- ccxt/woo.py +146 -74
- {ccxt-4.2.59.dist-info → ccxt-4.2.60.dist-info}/METADATA +4 -4
- {ccxt-4.2.59.dist-info → ccxt-4.2.60.dist-info}/RECORD +38 -38
- {ccxt-4.2.59.dist-info → ccxt-4.2.60.dist-info}/WHEEL +0 -0
- {ccxt-4.2.59.dist-info → ccxt-4.2.60.dist-info}/top_level.txt +0 -0
ccxt/bingx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.bingx import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Int, Leverage, MarginMode, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -72,6 +72,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
72
72
|
'fetchFundingRates': True,
|
73
73
|
'fetchLeverage': True,
|
74
74
|
'fetchLiquidations': False,
|
75
|
+
'fetchMarginMode': True,
|
75
76
|
'fetchMarkets': True,
|
76
77
|
'fetchMarkOHLCV': True,
|
77
78
|
'fetchMyLiquidations': True,
|
@@ -3898,6 +3899,41 @@ class bingx(Exchange, ImplicitAPI):
|
|
3898
3899
|
data = self.safe_dict(response, 'data')
|
3899
3900
|
return self.parse_order(data, market)
|
3900
3901
|
|
3902
|
+
def fetch_margin_mode(self, symbol: str, params={}) -> MarginMode:
|
3903
|
+
"""
|
3904
|
+
fetches the margin mode of the trading pair
|
3905
|
+
:see: https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Margin%20Mode
|
3906
|
+
:param str symbol: unified symbol of the market to fetch the margin mode for
|
3907
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
3908
|
+
:returns dict: Struct of MarginMode
|
3909
|
+
"""
|
3910
|
+
self.load_markets()
|
3911
|
+
market = self.market(symbol)
|
3912
|
+
request: dict = {
|
3913
|
+
'symbol': market['id'],
|
3914
|
+
}
|
3915
|
+
response = self.swapV2PrivateGetTradeMarginType(self.extend(request, params))
|
3916
|
+
#
|
3917
|
+
# {
|
3918
|
+
# "code": 0,
|
3919
|
+
# "msg": "",
|
3920
|
+
# "data": {
|
3921
|
+
# "marginType": "CROSSED"
|
3922
|
+
# }
|
3923
|
+
# }
|
3924
|
+
#
|
3925
|
+
data = self.safe_dict(response, 'data', {})
|
3926
|
+
return self.parse_margin_mode(data, market)
|
3927
|
+
|
3928
|
+
def parse_margin_mode(self, marginMode, market=None) -> MarginMode:
|
3929
|
+
marginType = self.safe_string_lower(marginMode, 'marginType')
|
3930
|
+
marginType = 'cross' if (marginType == 'crossed') else marginType
|
3931
|
+
return {
|
3932
|
+
'info': marginMode,
|
3933
|
+
'symbol': market['symbol'],
|
3934
|
+
'marginMode': marginType,
|
3935
|
+
}
|
3936
|
+
|
3901
3937
|
def sign(self, path, section='public', method='GET', params={}, headers=None, body=None):
|
3902
3938
|
type = section[0]
|
3903
3939
|
version = section[1]
|
ccxt/bitfinex2.py
CHANGED
@@ -46,8 +46,8 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
46
46
|
'spot': True,
|
47
47
|
'margin': True,
|
48
48
|
'swap': True,
|
49
|
-
'future':
|
50
|
-
'option':
|
49
|
+
'future': False,
|
50
|
+
'option': False,
|
51
51
|
'addMargin': False,
|
52
52
|
'borrowCrossMargin': False,
|
53
53
|
'borrowIsolatedMargin': False,
|
@@ -58,6 +58,7 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
58
58
|
'createLimitOrder': True,
|
59
59
|
'createMarketOrder': True,
|
60
60
|
'createOrder': True,
|
61
|
+
'createPostOnlyOrder': True,
|
61
62
|
'createReduceOnlyOrder': True,
|
62
63
|
'createStopLimitOrder': True,
|
63
64
|
'createStopMarketOrder': True,
|
@@ -68,8 +69,11 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
68
69
|
'editOrder': True,
|
69
70
|
'fetchBalance': True,
|
70
71
|
'fetchBorrowInterest': False,
|
72
|
+
'fetchBorrowRate': False,
|
71
73
|
'fetchBorrowRateHistories': False,
|
72
74
|
'fetchBorrowRateHistory': False,
|
75
|
+
'fetchBorrowRates': False,
|
76
|
+
'fetchBorrowRatesPerSymbol': False,
|
73
77
|
'fetchClosedOrder': True,
|
74
78
|
'fetchClosedOrders': True,
|
75
79
|
'fetchCrossBorrowRate': False,
|
@@ -98,6 +102,8 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
98
102
|
'fetchOpenOrder': True,
|
99
103
|
'fetchOpenOrders': True,
|
100
104
|
'fetchOrder': True,
|
105
|
+
'fetchOrderBook': True,
|
106
|
+
'fetchOrderBooks': False,
|
101
107
|
'fetchOrderTrades': True,
|
102
108
|
'fetchPosition': False,
|
103
109
|
'fetchPositionMode': False,
|
@@ -117,6 +123,8 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
117
123
|
'setMargin': True,
|
118
124
|
'setMarginMode': False,
|
119
125
|
'setPositionMode': False,
|
126
|
+
'signIn': False,
|
127
|
+
'transfer': True,
|
120
128
|
'withdraw': True,
|
121
129
|
},
|
122
130
|
'timeframes': {
|
@@ -1484,7 +1492,16 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
1484
1492
|
:param float amount: how much you want to trade in units of the base currency
|
1485
1493
|
:param float [price]: the price of the order, in units of the quote currency, ignored in market orders
|
1486
1494
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1487
|
-
:
|
1495
|
+
:param float [params.stopPrice]: The price at which a trigger order is triggered at
|
1496
|
+
:param str [params.timeInForce]: "GTC", "IOC", "FOK", or "PO"
|
1497
|
+
:param bool [params.postOnly]:
|
1498
|
+
:param bool [params.reduceOnly]: Ensures that the executed order does not flip the opened position.
|
1499
|
+
:param int [params.flags]: additional order parameters: 4096(Post Only), 1024(Reduce Only), 16384(OCO), 64(Hidden), 512(Close), 524288(No Var Rates)
|
1500
|
+
:param int [params.lev]: leverage for a derivative order, supported by derivative symbol orders only. The value should be between 1 and 100 inclusive.
|
1501
|
+
:param str [params.price_traling]: The trailing price for a trailing stop order
|
1502
|
+
:param str [params.price_aux_limit]: Order price for stop limit orders
|
1503
|
+
:param str [params.price_oco_stop]: OCO stop price
|
1504
|
+
:returns dict: an `order structure <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
|
1488
1505
|
"""
|
1489
1506
|
market = self.market(symbol)
|
1490
1507
|
amountString = self.amount_to_precision(symbol, amount)
|
ccxt/bitget.py
CHANGED
@@ -2846,8 +2846,13 @@ class bitget(Exchange, ImplicitAPI):
|
|
2846
2846
|
currencyCode = self.safe_currency_code(self.safe_string(feeStructure, 'feeCoin'))
|
2847
2847
|
fee = {
|
2848
2848
|
'currency': currencyCode,
|
2849
|
-
'cost': Precise.string_abs(self.safe_string(feeStructure, 'totalFee')),
|
2850
2849
|
}
|
2850
|
+
feeCostString = self.safe_string(feeStructure, 'totalFee')
|
2851
|
+
deduction = self.safe_string(feeStructure, 'deduction') is True if 'yes' else False
|
2852
|
+
if deduction:
|
2853
|
+
fee['cost'] = feeCostString
|
2854
|
+
else:
|
2855
|
+
fee['cost'] = Precise.string_neg(feeCostString)
|
2851
2856
|
return self.safe_trade({
|
2852
2857
|
'info': trade,
|
2853
2858
|
'id': self.safe_string(trade, 'tradeId'),
|
@@ -3865,7 +3870,7 @@ class bitget(Exchange, ImplicitAPI):
|
|
3865
3870
|
:see: https://www.bitget.com/api-doc/margin/isolated/trade/Isolated-Place-Order
|
3866
3871
|
:param str symbol: unified symbol of the market to create an order in
|
3867
3872
|
:param str type: 'market' or 'limit'
|
3868
|
-
:param str side: 'buy' or 'sell'
|
3873
|
+
:param str side: 'buy' or 'sell'
|
3869
3874
|
:param float amount: how much you want to trade in units of the base currency
|
3870
3875
|
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
|
3871
3876
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
ccxt/bitmart.py
CHANGED
@@ -530,6 +530,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
530
530
|
},
|
531
531
|
'networks': {
|
532
532
|
'ERC20': 'ERC20',
|
533
|
+
'SOL': 'SOL',
|
533
534
|
'BTC': 'BTC',
|
534
535
|
'TRC20': 'TRC20',
|
535
536
|
# todo: should be TRX after unification
|
@@ -552,7 +553,6 @@ class bitmart(Exchange, ImplicitAPI):
|
|
552
553
|
'FIO': 'FIO',
|
553
554
|
'SCRT': 'SCRT',
|
554
555
|
'IOTX': 'IOTX',
|
555
|
-
'SOL': 'SOL',
|
556
556
|
'ALGO': 'ALGO',
|
557
557
|
'ATOM': 'ATOM',
|
558
558
|
'DOT': 'DOT',
|
@@ -2886,6 +2886,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2886
2886
|
def fetch_deposit_address(self, code: str, params={}):
|
2887
2887
|
"""
|
2888
2888
|
fetch the deposit address for a currency associated with self account
|
2889
|
+
:see: https://developer-pro.bitmart.com/en/spot/#deposit-address-keyed
|
2889
2890
|
:param str code: unified currency code
|
2890
2891
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2891
2892
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -2906,39 +2907,55 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2906
2907
|
params = self.omit(params, 'network')
|
2907
2908
|
response = self.privateGetAccountV1DepositAddress(self.extend(request, params))
|
2908
2909
|
#
|
2909
|
-
#
|
2910
|
-
#
|
2911
|
-
#
|
2912
|
-
#
|
2913
|
-
#
|
2914
|
-
#
|
2915
|
-
#
|
2916
|
-
#
|
2917
|
-
#
|
2918
|
-
#
|
2919
|
-
#
|
2910
|
+
# {
|
2911
|
+
# "message": "OK",
|
2912
|
+
# "code": 1000,
|
2913
|
+
# "trace": "0e6edd79-f77f-4251-abe5-83ba75d06c1a",
|
2914
|
+
# "data": {
|
2915
|
+
# currency: 'ETH',
|
2916
|
+
# chain: 'Ethereum',
|
2917
|
+
# address: '0x99B5EEc2C520f86F0F62F05820d28D05D36EccCf',
|
2918
|
+
# address_memo: ''
|
2919
|
+
# }
|
2920
|
+
# }
|
2920
2921
|
#
|
2921
2922
|
data = self.safe_value(response, 'data', {})
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2923
|
+
return self.parse_deposit_address(data, currency)
|
2924
|
+
|
2925
|
+
def parse_deposit_address(self, depositAddress, currency=None):
|
2926
|
+
#
|
2927
|
+
# {
|
2928
|
+
# currency: 'ETH',
|
2929
|
+
# chain: 'Ethereum',
|
2930
|
+
# address: '0x99B5EEc2C520f86F0F62F05820d28D05D36EccCf',
|
2931
|
+
# address_memo: ''
|
2932
|
+
# }
|
2933
|
+
#
|
2934
|
+
currencyId = self.safe_string(depositAddress, 'currency')
|
2935
|
+
address = self.safe_string(depositAddress, 'address')
|
2936
|
+
chain = self.safe_string(depositAddress, 'chain')
|
2925
2937
|
network = None
|
2938
|
+
currency = self.safe_currency(currencyId, currency)
|
2926
2939
|
if chain is not None:
|
2927
2940
|
parts = chain.split('-')
|
2928
|
-
|
2929
|
-
|
2941
|
+
partsLength = len(parts)
|
2942
|
+
networkId = self.safe_string(parts, partsLength - 1)
|
2943
|
+
network = self.safe_network_code(networkId, currency)
|
2930
2944
|
self.check_address(address)
|
2931
2945
|
return {
|
2932
|
-
'
|
2946
|
+
'info': depositAddress,
|
2947
|
+
'currency': self.safe_string(currency, 'code'),
|
2933
2948
|
'address': address,
|
2934
|
-
'tag':
|
2949
|
+
'tag': self.safe_string(depositAddress, 'address_memo'),
|
2935
2950
|
'network': network,
|
2936
|
-
'info': response,
|
2937
2951
|
}
|
2938
2952
|
|
2939
|
-
def
|
2940
|
-
|
2941
|
-
|
2953
|
+
def safe_network_code(self, networkId, currency=None):
|
2954
|
+
name = self.safe_string(currency, 'name')
|
2955
|
+
if networkId == name:
|
2956
|
+
code = self.safe_string(currency, 'code')
|
2957
|
+
return code
|
2958
|
+
return self.network_id_to_code(networkId)
|
2942
2959
|
|
2943
2960
|
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2944
2961
|
"""
|
ccxt/blofin.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.blofin import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Leverage, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Leverage, Leverages, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, 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 ArgumentsRequired
|
@@ -89,6 +89,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
89
89
|
'fetchLedger': True,
|
90
90
|
'fetchLedgerEntry': None,
|
91
91
|
'fetchLeverage': True,
|
92
|
+
'fetchLeverages': True,
|
92
93
|
'fetchLeverageTiers': False,
|
93
94
|
'fetchMarketLeverageTiers': False,
|
94
95
|
'fetchMarkets': True,
|
@@ -193,6 +194,7 @@ class blofin(Exchange, ImplicitAPI):
|
|
193
194
|
'account/balance': 1,
|
194
195
|
'account/positions': 1,
|
195
196
|
'account/leverage-info': 1,
|
197
|
+
'account/batch-leverage-info': 1,
|
196
198
|
'trade/orders-tpsl-pending': 1,
|
197
199
|
'trade/orders-history': 1,
|
198
200
|
'trade/orders-tpsl-history': 1,
|
@@ -1757,10 +1759,58 @@ class blofin(Exchange, ImplicitAPI):
|
|
1757
1759
|
'takeProfitPrice': None,
|
1758
1760
|
})
|
1759
1761
|
|
1762
|
+
def fetch_leverages(self, symbols: List[str] = None, params={}) -> Leverages:
|
1763
|
+
"""
|
1764
|
+
fetch the set leverage for all contract markets
|
1765
|
+
:see: https://docs.blofin.com/index.html#get-multiple-leverage
|
1766
|
+
:param str[] symbols: a list of unified market symbols, required on blofin
|
1767
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1768
|
+
:param str [params.marginMode]: 'cross' or 'isolated'
|
1769
|
+
:returns dict: a list of `leverage structures <https://docs.ccxt.com/#/?id=leverage-structure>`
|
1770
|
+
"""
|
1771
|
+
self.load_markets()
|
1772
|
+
if symbols is None:
|
1773
|
+
raise ArgumentsRequired(self.id + ' fetchLeverages() requires a symbols argument')
|
1774
|
+
marginMode = None
|
1775
|
+
marginMode, params = self.handle_margin_mode_and_params('fetchLeverages', params)
|
1776
|
+
if marginMode is None:
|
1777
|
+
marginMode = self.safe_string(params, 'marginMode', 'cross') # cross marginMode
|
1778
|
+
if (marginMode != 'cross') and (marginMode != 'isolated'):
|
1779
|
+
raise BadRequest(self.id + ' fetchLeverages() requires a marginMode parameter that must be either cross or isolated')
|
1780
|
+
symbols = self.market_symbols(symbols)
|
1781
|
+
instIds = ''
|
1782
|
+
for i in range(0, len(symbols)):
|
1783
|
+
entry = symbols[i]
|
1784
|
+
entryMarket = self.market(entry)
|
1785
|
+
if i > 0:
|
1786
|
+
instIds = instIds + ',' + entryMarket['id']
|
1787
|
+
else:
|
1788
|
+
instIds = instIds + entryMarket['id']
|
1789
|
+
request = {
|
1790
|
+
'instId': instIds,
|
1791
|
+
'marginMode': marginMode,
|
1792
|
+
}
|
1793
|
+
response = self.privateGetAccountBatchLeverageInfo(self.extend(request, params))
|
1794
|
+
#
|
1795
|
+
# {
|
1796
|
+
# "code": "0",
|
1797
|
+
# "msg": "success",
|
1798
|
+
# "data": [
|
1799
|
+
# {
|
1800
|
+
# "leverage": "3",
|
1801
|
+
# "marginMode": "cross",
|
1802
|
+
# "instId": "BTC-USDT"
|
1803
|
+
# },
|
1804
|
+
# ]
|
1805
|
+
# }
|
1806
|
+
#
|
1807
|
+
leverages = self.safe_list(response, 'data', [])
|
1808
|
+
return self.parse_leverages(leverages, symbols, 'instId')
|
1809
|
+
|
1760
1810
|
def fetch_leverage(self, symbol: str, params={}) -> Leverage:
|
1761
1811
|
"""
|
1762
1812
|
fetch the set leverage for a market
|
1763
|
-
:see: https://blofin.com/
|
1813
|
+
:see: https://docs.blofin.com/index.html#get-leverage
|
1764
1814
|
:param str symbol: unified market symbol
|
1765
1815
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1766
1816
|
:param str [params.marginMode]: 'cross' or 'isolated'
|
ccxt/hitbtc.py
CHANGED
@@ -2508,7 +2508,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
2508
2508
|
if (network is not None) and (code == 'USDT'):
|
2509
2509
|
parsedNetwork = self.safe_string(networks, network)
|
2510
2510
|
if parsedNetwork is not None:
|
2511
|
-
request['
|
2511
|
+
request['network_code'] = parsedNetwork
|
2512
2512
|
params = self.omit(params, 'network')
|
2513
2513
|
withdrawOptions = self.safe_value(self.options, 'withdraw', {})
|
2514
2514
|
includeFee = self.safe_bool(withdrawOptions, 'includeFee', False)
|
ccxt/htx.py
CHANGED
@@ -2506,7 +2506,9 @@ class htx(Exchange, ImplicitAPI):
|
|
2506
2506
|
amountString = self.safe_string(trade, 'trade_volume', amountString)
|
2507
2507
|
costString = self.safe_string(trade, 'trade_turnover')
|
2508
2508
|
fee = None
|
2509
|
-
feeCost = self.
|
2509
|
+
feeCost = self.safe_string(trade, 'filled-fees')
|
2510
|
+
if feeCost is None:
|
2511
|
+
feeCost = Precise.string_neg(self.safe_string(trade, 'trade_fee'))
|
2510
2512
|
feeCurrencyId = self.safe_string_2(trade, 'fee-currency', 'fee_asset')
|
2511
2513
|
feeCurrency = self.safe_currency_code(feeCurrencyId)
|
2512
2514
|
filledPoints = self.safe_string(trade, 'filled-points')
|
ccxt/kraken.py
CHANGED
@@ -39,7 +39,10 @@ class kraken(Exchange, ImplicitAPI):
|
|
39
39
|
'name': 'Kraken',
|
40
40
|
'countries': ['US'],
|
41
41
|
'version': '0',
|
42
|
-
|
42
|
+
# rate-limits: https://support.kraken.com/hc/en-us/articles/206548367-What-are-the-API-rate-limits-#1
|
43
|
+
# for public: 1 req/s
|
44
|
+
# for private: every second 0.33 weight added to your allowed capacity(some private endpoints need 1 weight, some need 2)
|
45
|
+
'rateLimit': 1000,
|
43
46
|
'certified': False,
|
44
47
|
'pro': True,
|
45
48
|
'has': {
|
@@ -169,7 +172,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
169
172
|
},
|
170
173
|
'public': {
|
171
174
|
'get': {
|
172
|
-
#
|
175
|
+
# rate-limits explained in comment in the top of self file
|
173
176
|
'Assets': 1,
|
174
177
|
'AssetPairs': 1,
|
175
178
|
'Depth': 1,
|
@@ -185,48 +188,48 @@ class kraken(Exchange, ImplicitAPI):
|
|
185
188
|
'post': {
|
186
189
|
'AddOrder': 0,
|
187
190
|
'AddOrderBatch': 0,
|
188
|
-
'AddExport':
|
189
|
-
'Balance':
|
190
|
-
'CancelAll':
|
191
|
-
'CancelAllOrdersAfter':
|
191
|
+
'AddExport': 3,
|
192
|
+
'Balance': 3,
|
193
|
+
'CancelAll': 3,
|
194
|
+
'CancelAllOrdersAfter': 3,
|
192
195
|
'CancelOrder': 0,
|
193
196
|
'CancelOrderBatch': 0,
|
194
|
-
'ClosedOrders':
|
195
|
-
'DepositAddresses':
|
196
|
-
'DepositMethods':
|
197
|
-
'DepositStatus':
|
197
|
+
'ClosedOrders': 3,
|
198
|
+
'DepositAddresses': 3,
|
199
|
+
'DepositMethods': 3,
|
200
|
+
'DepositStatus': 3,
|
198
201
|
'EditOrder': 0,
|
199
|
-
'ExportStatus':
|
200
|
-
'GetWebSocketsToken':
|
201
|
-
'Ledgers':
|
202
|
-
'OpenOrders':
|
203
|
-
'OpenPositions':
|
204
|
-
'QueryLedgers':
|
205
|
-
'QueryOrders':
|
206
|
-
'QueryTrades':
|
207
|
-
'RetrieveExport':
|
208
|
-
'RemoveExport':
|
209
|
-
'BalanceEx':
|
210
|
-
'TradeBalance':
|
211
|
-
'TradesHistory':
|
212
|
-
'TradeVolume':
|
213
|
-
'Withdraw':
|
214
|
-
'WithdrawCancel':
|
215
|
-
'WithdrawInfo':
|
216
|
-
'WithdrawMethods':
|
217
|
-
'WithdrawAddresses':
|
218
|
-
'WithdrawStatus':
|
219
|
-
'WalletTransfer':
|
202
|
+
'ExportStatus': 3,
|
203
|
+
'GetWebSocketsToken': 3,
|
204
|
+
'Ledgers': 6,
|
205
|
+
'OpenOrders': 3,
|
206
|
+
'OpenPositions': 3,
|
207
|
+
'QueryLedgers': 3,
|
208
|
+
'QueryOrders': 3,
|
209
|
+
'QueryTrades': 3,
|
210
|
+
'RetrieveExport': 3,
|
211
|
+
'RemoveExport': 3,
|
212
|
+
'BalanceEx': 3,
|
213
|
+
'TradeBalance': 3,
|
214
|
+
'TradesHistory': 6,
|
215
|
+
'TradeVolume': 3,
|
216
|
+
'Withdraw': 3,
|
217
|
+
'WithdrawCancel': 3,
|
218
|
+
'WithdrawInfo': 3,
|
219
|
+
'WithdrawMethods': 3,
|
220
|
+
'WithdrawAddresses': 3,
|
221
|
+
'WithdrawStatus': 3,
|
222
|
+
'WalletTransfer': 3,
|
220
223
|
# sub accounts
|
221
|
-
'CreateSubaccount':
|
222
|
-
'AccountTransfer':
|
224
|
+
'CreateSubaccount': 3,
|
225
|
+
'AccountTransfer': 3,
|
223
226
|
# earn
|
224
|
-
'Earn/Allocate':
|
225
|
-
'Earn/Deallocate':
|
226
|
-
'Earn/AllocateStatus':
|
227
|
-
'Earn/DeallocateStatus':
|
228
|
-
'Earn/Strategies':
|
229
|
-
'Earn/Allocations':
|
227
|
+
'Earn/Allocate': 3,
|
228
|
+
'Earn/Deallocate': 3,
|
229
|
+
'Earn/AllocateStatus': 3,
|
230
|
+
'Earn/DeallocateStatus': 3,
|
231
|
+
'Earn/Strategies': 3,
|
232
|
+
'Earn/Allocations': 3,
|
230
233
|
},
|
231
234
|
},
|
232
235
|
},
|
ccxt/kucoinfutures.py
CHANGED
ccxt/pro/__init__.py
CHANGED
ccxt/pro/binance.py
CHANGED
@@ -2382,8 +2382,17 @@ class binance(ccxt.async_support.binance):
|
|
2382
2382
|
# }
|
2383
2383
|
#
|
2384
2384
|
marketId = self.safe_string(position, 's')
|
2385
|
+
contracts = self.safe_string(position, 'pa')
|
2386
|
+
contractsAbs = Precise.string_abs(self.safe_string(position, 'pa'))
|
2385
2387
|
positionSide = self.safe_string_lower(position, 'ps')
|
2386
|
-
hedged =
|
2388
|
+
hedged = True
|
2389
|
+
if positionSide == 'both':
|
2390
|
+
hedged = False
|
2391
|
+
if not Precise.string_eq(contracts, '0'):
|
2392
|
+
if Precise.string_lt(contracts, '0'):
|
2393
|
+
positionSide = 'short'
|
2394
|
+
else:
|
2395
|
+
positionSide = 'long'
|
2387
2396
|
return self.safe_position({
|
2388
2397
|
'info': position,
|
2389
2398
|
'id': None,
|
@@ -2394,7 +2403,7 @@ class binance(ccxt.async_support.binance):
|
|
2394
2403
|
'entryPrice': self.safe_number(position, 'ep'),
|
2395
2404
|
'unrealizedPnl': self.safe_number(position, 'up'),
|
2396
2405
|
'percentage': None,
|
2397
|
-
'contracts': self.
|
2406
|
+
'contracts': self.parse_number(contractsAbs),
|
2398
2407
|
'contractSize': None,
|
2399
2408
|
'markPrice': None,
|
2400
2409
|
'side': positionSide,
|
ccxt/pro/deribit.py
CHANGED
@@ -714,7 +714,7 @@ class deribit(ccxt.async_support.deribit):
|
|
714
714
|
self.safe_number(ohlcv, 'volume'),
|
715
715
|
]
|
716
716
|
|
717
|
-
async def watch_multiple_wrapper(self, channelName: str, channelDescriptor:
|
717
|
+
async def watch_multiple_wrapper(self, channelName: str, channelDescriptor: Str, symbolsArray=None, params={}):
|
718
718
|
await self.load_markets()
|
719
719
|
url = self.urls['api']['ws']
|
720
720
|
rawSubscriptions = []
|
ccxt/wazirx.py
CHANGED
@@ -121,7 +121,7 @@ class wazirx(Exchange, ImplicitAPI):
|
|
121
121
|
'public': {
|
122
122
|
'get': {
|
123
123
|
'exchangeInfo': 1,
|
124
|
-
'depth':
|
124
|
+
'depth': 0.5,
|
125
125
|
'ping': 1,
|
126
126
|
'systemStatus': 1,
|
127
127
|
'tickers/24hr': 1,
|
@@ -140,6 +140,11 @@ class wazirx(Exchange, ImplicitAPI):
|
|
140
140
|
'openOrders': 1,
|
141
141
|
'order': 0.5,
|
142
142
|
'myTrades': 0.5,
|
143
|
+
'coins': 12,
|
144
|
+
'crypto/withdraws': 12,
|
145
|
+
'crypto/deposits/address': 60,
|
146
|
+
'sub_account/fund_transfer/history': 1,
|
147
|
+
'sub_account/accounts': 1,
|
143
148
|
},
|
144
149
|
'post': {
|
145
150
|
'order': 0.1,
|