ccxt 4.4.99__py2.py3-none-any.whl → 4.4.100__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/bingx.py +1 -0
- ccxt/alpaca.py +1 -1
- ccxt/apex.py +1 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/apex.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +44 -9
- ccxt/async_support/base/ws/client.py +3 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +3 -2
- ccxt/async_support/bingx.py +33 -4
- ccxt/async_support/bitbank.py +1 -1
- ccxt/async_support/bitfinex.py +4 -1
- ccxt/async_support/bitflyer.py +1 -1
- ccxt/async_support/bitget.py +32 -14
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitmex.py +3 -2
- ccxt/async_support/bitopro.py +1 -1
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/bitso.py +1 -1
- ccxt/async_support/bitstamp.py +1 -1
- ccxt/async_support/bittrade.py +1 -1
- ccxt/async_support/bitvavo.py +1 -1
- ccxt/async_support/blockchaincom.py +1 -1
- ccxt/async_support/blofin.py +1 -1
- ccxt/async_support/btcmarkets.py +1 -1
- ccxt/async_support/bybit.py +2 -2
- ccxt/async_support/coinbase.py +1 -1
- ccxt/async_support/coinbaseexchange.py +1 -1
- ccxt/async_support/coinbaseinternational.py +1 -1
- ccxt/async_support/coincatch.py +2 -2
- ccxt/async_support/coinex.py +3 -3
- ccxt/async_support/coinmate.py +1 -1
- ccxt/async_support/coinsph.py +1 -1
- ccxt/async_support/cryptocom.py +1 -1
- ccxt/async_support/defx.py +2 -2
- ccxt/async_support/delta.py +1 -1
- ccxt/async_support/deribit.py +1 -1
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/ellipx.py +1 -1
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/foxbit.py +3 -3
- ccxt/async_support/gate.py +17 -2
- ccxt/async_support/gemini.py +1 -1
- ccxt/async_support/hashkey.py +2 -2
- ccxt/async_support/hibachi.py +1 -1
- ccxt/async_support/hitbtc.py +2 -2
- ccxt/async_support/hollaex.py +1 -1
- ccxt/async_support/htx.py +4 -3
- ccxt/async_support/hyperliquid.py +71 -29
- ccxt/async_support/independentreserve.py +1 -1
- ccxt/async_support/indodax.py +1 -1
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +2 -2
- ccxt/async_support/kucoinfutures.py +2 -1
- ccxt/async_support/lbank.py +2 -2
- ccxt/async_support/mercado.py +1 -1
- ccxt/async_support/mexc.py +9 -2
- ccxt/async_support/modetrade.py +93 -2
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/novadax.py +1 -1
- ccxt/async_support/okcoin.py +1 -1
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/onetrading.py +33 -0
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/p2b.py +32 -0
- ccxt/async_support/paradex.py +2 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +2 -2
- ccxt/async_support/probit.py +36 -1
- ccxt/async_support/tokocrypto.py +1 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/vertex.py +1 -1
- ccxt/async_support/wavesexchange.py +1 -1
- ccxt/async_support/whitebit.py +2 -2
- ccxt/async_support/woo.py +4 -4
- ccxt/async_support/woofipro.py +93 -2
- ccxt/async_support/xt.py +2 -2
- ccxt/async_support/yobit.py +1 -1
- ccxt/async_support/zaif.py +1 -1
- ccxt/async_support/zonda.py +1 -1
- ccxt/base/exchange.py +11 -9
- ccxt/base/types.py +1 -0
- ccxt/bigone.py +1 -1
- ccxt/binance.py +3 -2
- ccxt/bingx.py +33 -4
- ccxt/bitbank.py +1 -1
- ccxt/bitfinex.py +4 -1
- ccxt/bitflyer.py +1 -1
- ccxt/bitget.py +32 -14
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +2 -2
- ccxt/bitmex.py +3 -2
- ccxt/bitopro.py +1 -1
- ccxt/bitrue.py +2 -2
- ccxt/bitso.py +1 -1
- ccxt/bitstamp.py +1 -1
- ccxt/bittrade.py +1 -1
- ccxt/bitvavo.py +1 -1
- ccxt/blockchaincom.py +1 -1
- ccxt/blofin.py +1 -1
- ccxt/btcmarkets.py +1 -1
- ccxt/bybit.py +2 -2
- ccxt/coinbase.py +1 -1
- ccxt/coinbaseexchange.py +1 -1
- ccxt/coinbaseinternational.py +1 -1
- ccxt/coincatch.py +2 -2
- ccxt/coinex.py +3 -3
- ccxt/coinmate.py +1 -1
- ccxt/coinsph.py +1 -1
- ccxt/cryptocom.py +1 -1
- ccxt/defx.py +2 -2
- ccxt/delta.py +1 -1
- ccxt/deribit.py +1 -1
- ccxt/digifinex.py +2 -2
- ccxt/ellipx.py +1 -1
- ccxt/exmo.py +1 -1
- ccxt/foxbit.py +3 -3
- ccxt/gate.py +17 -2
- ccxt/gemini.py +1 -1
- ccxt/hashkey.py +2 -2
- ccxt/hibachi.py +1 -1
- ccxt/hitbtc.py +2 -2
- ccxt/hollaex.py +1 -1
- ccxt/htx.py +4 -3
- ccxt/hyperliquid.py +71 -29
- ccxt/independentreserve.py +1 -1
- ccxt/indodax.py +1 -1
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +2 -2
- ccxt/kucoinfutures.py +2 -1
- ccxt/lbank.py +2 -2
- ccxt/mercado.py +1 -1
- ccxt/mexc.py +9 -2
- ccxt/modetrade.py +93 -2
- ccxt/ndax.py +1 -1
- ccxt/novadax.py +1 -1
- ccxt/okcoin.py +1 -1
- ccxt/okx.py +2 -2
- ccxt/onetrading.py +33 -0
- ccxt/oxfun.py +1 -1
- ccxt/p2b.py +32 -0
- ccxt/paradex.py +2 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +2 -1
- ccxt/pro/bitvavo.py +1 -1
- ccxt/pro/bybit.py +1 -0
- ccxt/pro/coinex.py +1 -1
- ccxt/pro/hyperliquid.py +99 -12
- ccxt/pro/kucoin.py +1 -1
- ccxt/pro/kucoinfutures.py +1 -1
- ccxt/pro/mexc.py +328 -139
- ccxt/pro/okx.py +2 -1
- ccxt/pro/oxfun.py +1 -1
- ccxt/probit.py +36 -1
- ccxt/protobuf/__init__.py +0 -0
- ccxt/protobuf/mexc/PrivateAccountV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateDealsV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PrivateOrdersV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicAggreDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicAggreDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicBookTickerBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicBookTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicDealsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsBatchV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicIncreaseDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicLimitDepthsV3Api_pb2.py +39 -0
- ccxt/protobuf/mexc/PublicMiniTickerV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PublicMiniTickersV3Api_pb2.py +38 -0
- ccxt/protobuf/mexc/PublicSpotKlineV3Api_pb2.py +37 -0
- ccxt/protobuf/mexc/PushDataV3ApiWrapper_pb2.py +52 -0
- ccxt/protobuf/mexc/__init__.py +0 -0
- ccxt/tokocrypto.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/vertex.py +1 -1
- ccxt/wavesexchange.py +1 -1
- ccxt/whitebit.py +2 -2
- ccxt/woo.py +4 -4
- ccxt/woofipro.py +93 -2
- ccxt/xt.py +2 -2
- ccxt/yobit.py +1 -1
- ccxt/zaif.py +1 -1
- ccxt/zonda.py +1 -1
- {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/METADATA +5 -5
- {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/RECORD +197 -179
- {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/WHEEL +0 -0
- {ccxt-4.4.99.dist-info → ccxt-4.4.100.dist-info}/top_level.txt +0 -0
ccxt/kraken.py
CHANGED
@@ -3037,7 +3037,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
3037
3037
|
'tag': tag,
|
3038
3038
|
}
|
3039
3039
|
|
3040
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3040
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
3041
3041
|
"""
|
3042
3042
|
make a withdrawal
|
3043
3043
|
|
ccxt/krakenfutures.py
CHANGED
@@ -246,6 +246,7 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
246
246
|
'executions': 'private',
|
247
247
|
'triggers': 'private',
|
248
248
|
'accountlogcsv': 'private',
|
249
|
+
'account-log': 'private',
|
249
250
|
},
|
250
251
|
},
|
251
252
|
},
|
@@ -2606,7 +2607,7 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
2606
2607
|
'toAccount': toAccount,
|
2607
2608
|
})
|
2608
2609
|
|
2609
|
-
def set_leverage(self, leverage:
|
2610
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2610
2611
|
"""
|
2611
2612
|
set the level of leverage for a market
|
2612
2613
|
|
ccxt/kucoin.py
CHANGED
@@ -3386,7 +3386,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3386
3386
|
'tierBased': True,
|
3387
3387
|
}
|
3388
3388
|
|
3389
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
3389
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
3390
3390
|
"""
|
3391
3391
|
make a withdrawal
|
3392
3392
|
|
@@ -4801,7 +4801,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4801
4801
|
data = self.safe_list(response, 'data', [])
|
4802
4802
|
return self.parse_deposit_withdraw_fees(data, codes, 'currency')
|
4803
4803
|
|
4804
|
-
def set_leverage(self, leverage:
|
4804
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
4805
4805
|
"""
|
4806
4806
|
set the level of leverage for a market
|
4807
4807
|
|
ccxt/kucoinfutures.py
CHANGED
@@ -2416,6 +2416,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
2416
2416
|
https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
|
2417
2417
|
|
2418
2418
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2419
|
+
:param dict [params.code]: the unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
|
2419
2420
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
2420
2421
|
"""
|
2421
2422
|
self.load_markets()
|
@@ -3217,7 +3218,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
3217
3218
|
'marginMode': marginMode,
|
3218
3219
|
})
|
3219
3220
|
|
3220
|
-
def set_leverage(self, leverage:
|
3221
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
3221
3222
|
"""
|
3222
3223
|
set the level of leverage for a market
|
3223
3224
|
|
ccxt/lbank.py
CHANGED
@@ -967,7 +967,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
967
967
|
timestamp = self.milliseconds()
|
968
968
|
if market['swap']:
|
969
969
|
return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks', 'price', 'volume')
|
970
|
-
return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks'
|
970
|
+
return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks')
|
971
971
|
|
972
972
|
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
973
973
|
#
|
@@ -2234,7 +2234,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
2234
2234
|
'tag': tag,
|
2235
2235
|
}
|
2236
2236
|
|
2237
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2237
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2238
2238
|
"""
|
2239
2239
|
make a withdrawal
|
2240
2240
|
|
ccxt/mercado.py
CHANGED
@@ -704,7 +704,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
704
704
|
order = self.safe_dict(responseData, 'order')
|
705
705
|
return self.parse_order(order, market)
|
706
706
|
|
707
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
707
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
708
708
|
"""
|
709
709
|
make a withdrawal
|
710
710
|
:param str code: unified currency code
|
ccxt/mexc.py
CHANGED
@@ -487,6 +487,12 @@ class mexc(Exchange, ImplicitAPI):
|
|
487
487
|
'ZKSYNC': 'ZKSYNCERA',
|
488
488
|
'TRC20': 'TRX',
|
489
489
|
'TON': 'TONCOIN',
|
490
|
+
'ARBITRUM': 'ARB',
|
491
|
+
'STX': 'STACKS',
|
492
|
+
'LUNC': 'LUNA',
|
493
|
+
'STARK': 'STARKNET',
|
494
|
+
'APT': 'APTOS',
|
495
|
+
'PEAQ': 'PEAQEVM',
|
490
496
|
'AVAXC': 'AVAX_CCHAIN',
|
491
497
|
'ERC20': 'ETH',
|
492
498
|
'ACA': 'ACALA',
|
@@ -516,6 +522,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
516
522
|
# 'DNX': 'Dynex(DNX)',
|
517
523
|
# 'DOGE': 'Dogecoin(DOGE)',
|
518
524
|
# 'DOT': 'Polkadot(DOT)',
|
525
|
+
'DOT': 'DOTASSETHUB',
|
519
526
|
# 'DYM': 'Dymension(DYM)',
|
520
527
|
'ETHF': 'ETF',
|
521
528
|
'HRC20': 'HECO',
|
@@ -4055,7 +4062,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4055
4062
|
"""
|
4056
4063
|
return self.modify_margin_helper(symbol, amount, 'ADD', params)
|
4057
4064
|
|
4058
|
-
def set_leverage(self, leverage:
|
4065
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
4059
4066
|
"""
|
4060
4067
|
set the level of leverage for a market
|
4061
4068
|
|
@@ -5241,7 +5248,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
5241
5248
|
}
|
5242
5249
|
return self.safe_string(statuses, status, status)
|
5243
5250
|
|
5244
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
5251
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
5245
5252
|
"""
|
5246
5253
|
make a withdrawal
|
5247
5254
|
|
ccxt/modetrade.py
CHANGED
@@ -1025,6 +1025,97 @@ class modetrade(Exchange, ImplicitAPI):
|
|
1025
1025
|
sorted = self.sort_by(rates, 'timestamp')
|
1026
1026
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
1027
1027
|
|
1028
|
+
def parse_income(self, income, market: Market = None):
|
1029
|
+
#
|
1030
|
+
# {
|
1031
|
+
# "symbol": "PERP_ETH_USDC",
|
1032
|
+
# "funding_rate": 0.00046875,
|
1033
|
+
# "mark_price": 2100,
|
1034
|
+
# "funding_fee": 0.000016,
|
1035
|
+
# "payment_type": "Pay",
|
1036
|
+
# "status": "Accrued",
|
1037
|
+
# "created_time": 1682235722003,
|
1038
|
+
# "updated_time": 1682235722003
|
1039
|
+
# }
|
1040
|
+
#
|
1041
|
+
marketId = self.safe_string(income, 'symbol')
|
1042
|
+
symbol = self.safe_symbol(marketId, market)
|
1043
|
+
amount = self.safe_string(income, 'funding_fee')
|
1044
|
+
code = self.safe_currency_code('USDC')
|
1045
|
+
timestamp = self.safe_integer(income, 'updated_time')
|
1046
|
+
rate = self.safe_number(income, 'funding_rate')
|
1047
|
+
paymentType = self.safe_string(income, 'payment_type')
|
1048
|
+
amount = Precise.string_neg(amount) if (paymentType == 'Pay') else amount
|
1049
|
+
return {
|
1050
|
+
'info': income,
|
1051
|
+
'symbol': symbol,
|
1052
|
+
'code': code,
|
1053
|
+
'timestamp': timestamp,
|
1054
|
+
'datetime': self.iso8601(timestamp),
|
1055
|
+
'id': None,
|
1056
|
+
'amount': self.parse_number(amount),
|
1057
|
+
'rate': rate,
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1061
|
+
"""
|
1062
|
+
fetch the history of funding payments paid and received on self account
|
1063
|
+
|
1064
|
+
https://orderly.network/docs/build-on-omnichain/evm-api/restful-api/private/get-funding-fee-history
|
1065
|
+
|
1066
|
+
:param str [symbol]: unified market symbol
|
1067
|
+
:param int [since]: the earliest time in ms to fetch funding history for
|
1068
|
+
:param int [limit]: the maximum number of funding history structures to retrieve
|
1069
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1070
|
+
: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)
|
1071
|
+
:returns dict: a `funding history structure <https://docs.ccxt.com/#/?id=funding-history-structure>`
|
1072
|
+
"""
|
1073
|
+
self.load_markets()
|
1074
|
+
paginate = False
|
1075
|
+
paginate, params = self.handle_option_and_params(params, 'fetchFundingHistory', 'paginate')
|
1076
|
+
if paginate:
|
1077
|
+
return self.fetch_paginated_call_incremental('fetchFundingHistory', symbol, since, limit, params, 'page', 500)
|
1078
|
+
request: dict = {}
|
1079
|
+
market: Market = None
|
1080
|
+
if symbol is not None:
|
1081
|
+
market = self.market(symbol)
|
1082
|
+
request['symbol'] = market['id']
|
1083
|
+
if since is not None:
|
1084
|
+
request['start_t'] = since
|
1085
|
+
until = self.safe_integer(params, 'until') # unified in milliseconds
|
1086
|
+
params = self.omit(params, ['until'])
|
1087
|
+
if until is not None:
|
1088
|
+
request['end_t'] = until
|
1089
|
+
if limit is not None:
|
1090
|
+
request['size'] = min(limit, 500)
|
1091
|
+
response = self.v1PrivateGetFundingFeeHistory(self.extend(request, params))
|
1092
|
+
#
|
1093
|
+
# {
|
1094
|
+
# "success": True,
|
1095
|
+
# "timestamp": 1702989203989,
|
1096
|
+
# "data": {
|
1097
|
+
# "meta": {
|
1098
|
+
# "total": 9,
|
1099
|
+
# "records_per_page": 25,
|
1100
|
+
# "current_page": 1
|
1101
|
+
# },
|
1102
|
+
# "rows": [{
|
1103
|
+
# "symbol": "PERP_ETH_USDC",
|
1104
|
+
# "funding_rate": 0.00046875,
|
1105
|
+
# "mark_price": 2100,
|
1106
|
+
# "funding_fee": 0.000016,
|
1107
|
+
# "payment_type": "Pay",
|
1108
|
+
# "status": "Accrued",
|
1109
|
+
# "created_time": 1682235722003,
|
1110
|
+
# "updated_time": 1682235722003
|
1111
|
+
# }]
|
1112
|
+
# }
|
1113
|
+
# }
|
1114
|
+
#
|
1115
|
+
data = self.safe_dict(response, 'data', {})
|
1116
|
+
rows = self.safe_list(data, 'rows', [])
|
1117
|
+
return self.parse_incomes(rows, market, since, limit)
|
1118
|
+
|
1028
1119
|
def fetch_trading_fees(self, params={}) -> TradingFees:
|
1029
1120
|
"""
|
1030
1121
|
fetch the trading fees for multiple markets
|
@@ -2330,7 +2421,7 @@ class modetrade(Exchange, ImplicitAPI):
|
|
2330
2421
|
def sign_message(self, message, privateKey):
|
2331
2422
|
return self.sign_hash(self.hash_message(message), privateKey[-64:])
|
2332
2423
|
|
2333
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2424
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2334
2425
|
"""
|
2335
2426
|
make a withdrawal
|
2336
2427
|
|
@@ -2460,7 +2551,7 @@ class modetrade(Exchange, ImplicitAPI):
|
|
2460
2551
|
data = self.safe_dict(response, 'data', {})
|
2461
2552
|
return self.parse_leverage(data, market)
|
2462
2553
|
|
2463
|
-
def set_leverage(self, leverage:
|
2554
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2464
2555
|
"""
|
2465
2556
|
set the level of leverage for a market
|
2466
2557
|
|
ccxt/ndax.py
CHANGED
@@ -2357,7 +2357,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2357
2357
|
'network': None,
|
2358
2358
|
}
|
2359
2359
|
|
2360
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2360
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2361
2361
|
"""
|
2362
2362
|
make a withdrawal
|
2363
2363
|
:param str code: unified currency code
|
ccxt/novadax.py
CHANGED
@@ -1301,7 +1301,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1301
1301
|
}
|
1302
1302
|
return self.safe_string(statuses, status, 'failed')
|
1303
1303
|
|
1304
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1304
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
1305
1305
|
"""
|
1306
1306
|
make a withdrawal
|
1307
1307
|
|
ccxt/okcoin.py
CHANGED
@@ -2416,7 +2416,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2416
2416
|
}
|
2417
2417
|
return self.safe_string(statuses, status, status)
|
2418
2418
|
|
2419
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2419
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2420
2420
|
"""
|
2421
2421
|
|
2422
2422
|
https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
|
ccxt/okx.py
CHANGED
@@ -4954,7 +4954,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4954
4954
|
first = self.safe_string(keys, 0)
|
4955
4955
|
return self.safe_dict(response, first)
|
4956
4956
|
|
4957
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4957
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
4958
4958
|
"""
|
4959
4959
|
make a withdrawal
|
4960
4960
|
|
@@ -6351,7 +6351,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6351
6351
|
sorted = self.sort_by(result, 'timestamp')
|
6352
6352
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
6353
6353
|
|
6354
|
-
def set_leverage(self, leverage:
|
6354
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
6355
6355
|
"""
|
6356
6356
|
set the level of leverage for a market
|
6357
6357
|
|
ccxt/onetrading.py
CHANGED
@@ -42,6 +42,9 @@ class onetrading(Exchange, ImplicitAPI):
|
|
42
42
|
'future': False,
|
43
43
|
'option': False,
|
44
44
|
'addMargin': False,
|
45
|
+
'borrowCrossMargin': False,
|
46
|
+
'borrowIsolatedMargin': False,
|
47
|
+
'borrowMargin': False,
|
45
48
|
'cancelAllOrders': True,
|
46
49
|
'cancelOrder': True,
|
47
50
|
'cancelOrders': True,
|
@@ -54,9 +57,14 @@ class onetrading(Exchange, ImplicitAPI):
|
|
54
57
|
'createStopMarketOrder': False,
|
55
58
|
'createStopOrder': True,
|
56
59
|
'fetchAccounts': False,
|
60
|
+
'fetchAllGreeks': False,
|
57
61
|
'fetchBalance': True,
|
62
|
+
'fetchBorrowInterest': False,
|
63
|
+
'fetchBorrowRate': False,
|
58
64
|
'fetchBorrowRateHistories': False,
|
59
65
|
'fetchBorrowRateHistory': False,
|
66
|
+
'fetchBorrowRates': False,
|
67
|
+
'fetchBorrowRatesPerSymbol': False,
|
60
68
|
'fetchClosedOrders': True,
|
61
69
|
'fetchCrossBorrowRate': False,
|
62
70
|
'fetchCrossBorrowRates': False,
|
@@ -68,21 +76,41 @@ class onetrading(Exchange, ImplicitAPI):
|
|
68
76
|
'fetchDeposits': False,
|
69
77
|
'fetchDepositsWithdrawals': False,
|
70
78
|
'fetchFundingHistory': False,
|
79
|
+
'fetchFundingInterval': False,
|
80
|
+
'fetchFundingIntervals': False,
|
71
81
|
'fetchFundingRate': False,
|
72
82
|
'fetchFundingRateHistory': False,
|
73
83
|
'fetchFundingRates': False,
|
84
|
+
'fetchGreeks': False,
|
74
85
|
'fetchIndexOHLCV': False,
|
75
86
|
'fetchIsolatedBorrowRate': False,
|
76
87
|
'fetchIsolatedBorrowRates': False,
|
88
|
+
'fetchIsolatedPositions': False,
|
77
89
|
'fetchLedger': False,
|
78
90
|
'fetchLeverage': False,
|
91
|
+
'fetchLeverages': False,
|
92
|
+
'fetchLeverageTiers': False,
|
93
|
+
'fetchLiquidations': False,
|
94
|
+
'fetchLongShortRatio': False,
|
95
|
+
'fetchLongShortRatioHistory': False,
|
96
|
+
'fetchMarginAdjustmentHistory': False,
|
79
97
|
'fetchMarginMode': False,
|
98
|
+
'fetchMarginModes': False,
|
99
|
+
'fetchMarketLeverageTiers': False,
|
80
100
|
'fetchMarkets': True,
|
81
101
|
'fetchMarkOHLCV': False,
|
102
|
+
'fetchMarkPrice': False,
|
103
|
+
'fetchMarkPrices': False,
|
104
|
+
'fetchMyLiquidations': False,
|
105
|
+
'fetchMySettlementHistory': False,
|
82
106
|
'fetchMyTrades': True,
|
83
107
|
'fetchOHLCV': True,
|
108
|
+
'fetchOpenInterest': False,
|
84
109
|
'fetchOpenInterestHistory': False,
|
110
|
+
'fetchOpenInterests': False,
|
85
111
|
'fetchOpenOrders': True,
|
112
|
+
'fetchOption': False,
|
113
|
+
'fetchOptionChain': False,
|
86
114
|
'fetchOrder': True,
|
87
115
|
'fetchOrderBook': True,
|
88
116
|
'fetchOrders': False,
|
@@ -95,6 +123,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
95
123
|
'fetchPositionsHistory': False,
|
96
124
|
'fetchPositionsRisk': False,
|
97
125
|
'fetchPremiumIndexOHLCV': False,
|
126
|
+
'fetchSettlementHistory': False,
|
98
127
|
'fetchTicker': True,
|
99
128
|
'fetchTickers': True,
|
100
129
|
'fetchTime': True,
|
@@ -106,9 +135,13 @@ class onetrading(Exchange, ImplicitAPI):
|
|
106
135
|
'fetchTransactions': False,
|
107
136
|
'fetchTransfer': False,
|
108
137
|
'fetchTransfers': False,
|
138
|
+
'fetchUnderlyingAssets': False,
|
139
|
+
'fetchVolatilityHistory': False,
|
109
140
|
'fetchWithdrawal': False,
|
110
141
|
'fetchWithdrawals': False,
|
111
142
|
'reduceMargin': False,
|
143
|
+
'repayCrossMargin': False,
|
144
|
+
'repayIsolatedMargin': False,
|
112
145
|
'setLeverage': False,
|
113
146
|
'setMargin': False,
|
114
147
|
'setMarginMode': False,
|
ccxt/oxfun.py
CHANGED
@@ -2023,7 +2023,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
2023
2023
|
}
|
2024
2024
|
return self.safe_string(statuses, status, status)
|
2025
2025
|
|
2026
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2026
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2027
2027
|
"""
|
2028
2028
|
make a withdrawal
|
2029
2029
|
|
ccxt/p2b.py
CHANGED
@@ -34,6 +34,9 @@ class p2b(Exchange, ImplicitAPI):
|
|
34
34
|
'future': False,
|
35
35
|
'option': False,
|
36
36
|
'addMargin': False,
|
37
|
+
'borrowCrossMargin': False,
|
38
|
+
'borrowIsolatedMargin': False,
|
39
|
+
'borrowMargin': False,
|
37
40
|
'cancelAllOrders': False,
|
38
41
|
'cancelOrder': True,
|
39
42
|
'cancelOrders': False,
|
@@ -49,9 +52,14 @@ class p2b(Exchange, ImplicitAPI):
|
|
49
52
|
'createStopMarketOrder': False,
|
50
53
|
'createStopOrder': False,
|
51
54
|
'fetchAccounts': False,
|
55
|
+
'fetchAllGreeks': False,
|
52
56
|
'fetchBalance': True,
|
53
57
|
'fetchBorrowInterest': False,
|
58
|
+
'fetchBorrowRate': False,
|
59
|
+
'fetchBorrowRateHistories': False,
|
54
60
|
'fetchBorrowRateHistory': False,
|
61
|
+
'fetchBorrowRates': False,
|
62
|
+
'fetchBorrowRatesPerSymbol': False,
|
55
63
|
'fetchClosedOrders': True,
|
56
64
|
'fetchCrossBorrowRate': False,
|
57
65
|
'fetchCrossBorrowRates': False,
|
@@ -62,23 +70,42 @@ class p2b(Exchange, ImplicitAPI):
|
|
62
70
|
'fetchDeposits': False,
|
63
71
|
'fetchDepositsWithdrawals': False,
|
64
72
|
'fetchFundingHistory': False,
|
73
|
+
'fetchFundingInterval': False,
|
74
|
+
'fetchFundingIntervals': False,
|
65
75
|
'fetchFundingRate': False,
|
66
76
|
'fetchFundingRateHistory': False,
|
67
77
|
'fetchFundingRates': False,
|
78
|
+
'fetchGreeks': False,
|
68
79
|
'fetchIndexOHLCV': False,
|
69
80
|
'fetchIsolatedBorrowRate': False,
|
70
81
|
'fetchIsolatedBorrowRates': False,
|
82
|
+
'fetchIsolatedPositions': False,
|
71
83
|
'fetchLedger': False,
|
72
84
|
'fetchLedgerEntry': False,
|
85
|
+
'fetchLeverage': False,
|
86
|
+
'fetchLeverages': False,
|
73
87
|
'fetchLeverageTiers': False,
|
88
|
+
'fetchLiquidations': False,
|
89
|
+
'fetchLongShortRatio': False,
|
90
|
+
'fetchLongShortRatioHistory': False,
|
91
|
+
'fetchMarginAdjustmentHistory': False,
|
92
|
+
'fetchMarginMode': False,
|
93
|
+
'fetchMarginModes': False,
|
74
94
|
'fetchMarketLeverageTiers': False,
|
75
95
|
'fetchMarkets': True,
|
76
96
|
'fetchMarkOHLCV': False,
|
97
|
+
'fetchMarkPrice': False,
|
98
|
+
'fetchMarkPrices': False,
|
99
|
+
'fetchMyLiquidations': False,
|
100
|
+
'fetchMySettlementHistory': False,
|
77
101
|
'fetchMyTrades': True,
|
78
102
|
'fetchOHLCV': True,
|
79
103
|
'fetchOpenInterest': False,
|
80
104
|
'fetchOpenInterestHistory': False,
|
105
|
+
'fetchOpenInterests': False,
|
81
106
|
'fetchOpenOrders': True,
|
107
|
+
'fetchOption': False,
|
108
|
+
'fetchOptionChain': False,
|
82
109
|
'fetchOrderBook': True,
|
83
110
|
'fetchOrderBooks': False,
|
84
111
|
'fetchOrders': False,
|
@@ -91,6 +118,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
91
118
|
'fetchPositionsHistory': False,
|
92
119
|
'fetchPositionsRisk': False,
|
93
120
|
'fetchPremiumIndexOHLCV': False,
|
121
|
+
'fetchSettlementHistory': False,
|
94
122
|
'fetchTicker': True,
|
95
123
|
'fetchTickers': True,
|
96
124
|
'fetchTrades': True,
|
@@ -99,10 +127,14 @@ class p2b(Exchange, ImplicitAPI):
|
|
99
127
|
'fetchTransactionFees': False,
|
100
128
|
'fetchTransactions': False,
|
101
129
|
'fetchTransfers': False,
|
130
|
+
'fetchUnderlyingAssets': False,
|
131
|
+
'fetchVolatilityHistory': False,
|
102
132
|
'fetchWithdrawAddresses': False,
|
103
133
|
'fetchWithdrawal': False,
|
104
134
|
'fetchWithdrawals': False,
|
105
135
|
'reduceMargin': False,
|
136
|
+
'repayCrossMargin': False,
|
137
|
+
'repayIsolatedMargin': False,
|
106
138
|
'setLeverage': False,
|
107
139
|
'setMargin': False,
|
108
140
|
'setMarginMode': False,
|
ccxt/paradex.py
CHANGED
@@ -1971,6 +1971,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
1971
1971
|
'contracts': None,
|
1972
1972
|
'contractSize': None,
|
1973
1973
|
'price': None,
|
1974
|
+
'side': None,
|
1974
1975
|
'baseValue': None,
|
1975
1976
|
'quoteValue': None,
|
1976
1977
|
'timestamp': timestamp,
|
@@ -2268,7 +2269,7 @@ class paradex(Exchange, ImplicitAPI):
|
|
2268
2269
|
}
|
2269
2270
|
return self.safe_string(modes, mode, mode)
|
2270
2271
|
|
2271
|
-
def set_leverage(self, leverage:
|
2272
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
2272
2273
|
"""
|
2273
2274
|
set the level of leverage for a market
|
2274
2275
|
|
ccxt/phemex.py
CHANGED
@@ -4331,7 +4331,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4331
4331
|
url = self.implode_hostname(self.urls['api'][api]) + url
|
4332
4332
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
4333
4333
|
|
4334
|
-
def set_leverage(self, leverage:
|
4334
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
4335
4335
|
"""
|
4336
4336
|
set the level of leverage for a market
|
4337
4337
|
|
@@ -4640,7 +4640,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4640
4640
|
sorted = self.sort_by(result, 'timestamp')
|
4641
4641
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
4642
4642
|
|
4643
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
4643
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
4644
4644
|
"""
|
4645
4645
|
make a withdrawal
|
4646
4646
|
|
ccxt/poloniex.py
CHANGED
@@ -2730,7 +2730,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
2730
2730
|
'status': None,
|
2731
2731
|
}
|
2732
2732
|
|
2733
|
-
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2733
|
+
def withdraw(self, code: str, amount: float, address: str, tag: Str = None, params={}) -> Transaction:
|
2734
2734
|
"""
|
2735
2735
|
make a withdrawal
|
2736
2736
|
|
@@ -3125,7 +3125,7 @@ class poloniex(Exchange, ImplicitAPI):
|
|
3125
3125
|
},
|
3126
3126
|
}
|
3127
3127
|
|
3128
|
-
def set_leverage(self, leverage:
|
3128
|
+
def set_leverage(self, leverage: int, symbol: Str = None, params={}):
|
3129
3129
|
"""
|
3130
3130
|
set the level of leverage for a market
|
3131
3131
|
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/binance.py
CHANGED
@@ -409,6 +409,7 @@ class binance(ccxt.async_support.binance):
|
|
409
409
|
'contracts': self.safe_number(liquidation, 'l'),
|
410
410
|
'contractSize': self.safe_number(market, 'contractSize'),
|
411
411
|
'price': self.safe_number(liquidation, 'ap'),
|
412
|
+
'side': self.safe_string_lower(liquidation, 'S'),
|
412
413
|
'baseValue': None,
|
413
414
|
'quoteValue': None,
|
414
415
|
'timestamp': timestamp,
|
@@ -3972,7 +3973,7 @@ class binance(ccxt.async_support.binance):
|
|
3972
3973
|
code = self.safe_integer(error, 'code')
|
3973
3974
|
msg = self.safe_string(error, 'msg')
|
3974
3975
|
try:
|
3975
|
-
self.handle_errors(code, msg, client.url,
|
3976
|
+
self.handle_errors(code, msg, client.url, '', {}, self.json(error), error, {}, {})
|
3976
3977
|
except Exception as e:
|
3977
3978
|
rejected = True
|
3978
3979
|
# private endpoint uses id
|
ccxt/pro/bitvavo.py
CHANGED
@@ -1300,7 +1300,7 @@ class bitvavo(ccxt.async_support.bitvavo):
|
|
1300
1300
|
messageHash = self.safe_string(message, 'requestId', buildMessage)
|
1301
1301
|
rejected = False
|
1302
1302
|
try:
|
1303
|
-
self.handle_errors(code, error, client.url,
|
1303
|
+
self.handle_errors(code, error, client.url, '', {}, error, message, {}, {})
|
1304
1304
|
except Exception as e:
|
1305
1305
|
rejected = True
|
1306
1306
|
client.reject(e, messageHash)
|
ccxt/pro/bybit.py
CHANGED
@@ -1631,6 +1631,7 @@ class bybit(ccxt.async_support.bybit):
|
|
1631
1631
|
'contracts': self.safe_number_2(liquidation, 'size', 'v'),
|
1632
1632
|
'contractSize': self.safe_number(market, 'contractSize'),
|
1633
1633
|
'price': self.safe_number_2(liquidation, 'price', 'p'),
|
1634
|
+
'side': self.safe_string_lower(liquidation, 'side', 'S'),
|
1634
1635
|
'baseValue': None,
|
1635
1636
|
'quoteValue': None,
|
1636
1637
|
'timestamp': timestamp,
|
ccxt/pro/coinex.py
CHANGED
@@ -1257,7 +1257,7 @@ class coinex(ccxt.async_support.coinex):
|
|
1257
1257
|
method = self.safe_string(message, 'method')
|
1258
1258
|
error = self.safe_string(message, 'message')
|
1259
1259
|
if error is not None:
|
1260
|
-
self.handle_errors(
|
1260
|
+
self.handle_errors(1, '', client.url, method, {}, self.json(error), message, {}, {})
|
1261
1261
|
handlers: dict = {
|
1262
1262
|
'state.update': self.handle_ticker,
|
1263
1263
|
'balance.update': self.handle_balance,
|