ccxt 4.4.71__py2.py3-none-any.whl → 4.4.72__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 -1
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bingx.py +2 -2
- ccxt/async_support/bitfinex.py +1 -1
- ccxt/async_support/bitfinex1.py +1 -1
- ccxt/async_support/bl3p.py +2 -2
- ccxt/async_support/cex.py +1 -0
- ccxt/async_support/coinbase.py +3 -2
- ccxt/async_support/coinbaseexchange.py +3 -2
- ccxt/async_support/coinbaseinternational.py +3 -2
- ccxt/async_support/coinex.py +1 -1
- ccxt/async_support/deribit.py +2 -1
- ccxt/async_support/derive.py +11 -7
- ccxt/async_support/gate.py +3 -0
- ccxt/async_support/gemini.py +2 -1
- ccxt/async_support/hitbtc.py +1 -1
- ccxt/async_support/hyperliquid.py +38 -0
- ccxt/async_support/kraken.py +1 -1
- ccxt/async_support/krakenfutures.py +4 -0
- ccxt/async_support/kucoin.py +1 -1
- ccxt/async_support/kuna.py +1 -1
- ccxt/async_support/mexc.py +1 -1
- ccxt/async_support/ndax.py +1 -1
- ccxt/async_support/okcoin.py +4 -0
- ccxt/async_support/okx.py +21 -30
- ccxt/async_support/paradex.py +65 -7
- ccxt/async_support/paymium.py +1 -1
- ccxt/async_support/poloniex.py +2 -1
- ccxt/async_support/upbit.py +1 -1
- ccxt/async_support/whitebit.py +98 -2
- ccxt/async_support/woo.py +3 -1
- ccxt/async_support/woofipro.py +1 -1
- ccxt/async_support/yobit.py +2 -1
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +9 -2
- ccxt/binance.py +1 -1
- ccxt/bingx.py +2 -2
- ccxt/bitfinex.py +1 -1
- ccxt/bitfinex1.py +1 -1
- ccxt/bl3p.py +2 -2
- ccxt/cex.py +1 -0
- ccxt/coinbase.py +3 -2
- ccxt/coinbaseexchange.py +3 -2
- ccxt/coinbaseinternational.py +3 -2
- ccxt/coinex.py +1 -1
- ccxt/deribit.py +2 -1
- ccxt/derive.py +11 -7
- ccxt/gate.py +3 -0
- ccxt/gemini.py +2 -1
- ccxt/hitbtc.py +1 -1
- ccxt/hyperliquid.py +38 -0
- ccxt/kraken.py +1 -1
- ccxt/krakenfutures.py +4 -0
- ccxt/kucoin.py +1 -1
- ccxt/kuna.py +1 -1
- ccxt/mexc.py +1 -1
- ccxt/ndax.py +1 -1
- ccxt/okcoin.py +4 -0
- ccxt/okx.py +21 -30
- ccxt/paradex.py +65 -7
- ccxt/paymium.py +1 -1
- ccxt/poloniex.py +2 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/bingx.py +1 -1
- ccxt/pro/bitmart.py +15 -7
- ccxt/pro/derive.py +2 -2
- ccxt/pro/krakenfutures.py +1 -1
- ccxt/upbit.py +1 -1
- ccxt/whitebit.py +98 -2
- ccxt/woo.py +3 -1
- ccxt/woofipro.py +1 -1
- ccxt/yobit.py +2 -1
- {ccxt-4.4.71.dist-info → ccxt-4.4.72.dist-info}/METADATA +4 -4
- {ccxt-4.4.71.dist-info → ccxt-4.4.72.dist-info}/RECORD +82 -82
- {ccxt-4.4.71.dist-info → ccxt-4.4.72.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.71.dist-info → ccxt-4.4.72.dist-info}/WHEEL +0 -0
- {ccxt-4.4.71.dist-info → ccxt-4.4.72.dist-info}/top_level.txt +0 -0
ccxt/__init__.py
CHANGED
ccxt/abstract/bingx.py
CHANGED
@@ -16,7 +16,6 @@ class ImplicitAPI:
|
|
16
16
|
spot_v1_private_get_trade_mytrades = spotV1PrivateGetTradeMyTrades = Entry('trade/myTrades', ['spot', 'v1', 'private'], 'GET', {'cost': 2})
|
17
17
|
spot_v1_private_get_user_commissionrate = spotV1PrivateGetUserCommissionRate = Entry('user/commissionRate', ['spot', 'v1', 'private'], 'GET', {'cost': 5})
|
18
18
|
spot_v1_private_get_account_balance = spotV1PrivateGetAccountBalance = Entry('account/balance', ['spot', 'v1', 'private'], 'GET', {'cost': 2})
|
19
|
-
spot_v1_private_get_account_allaccountbalance = spotV1PrivateGetAccountAllAccountBalance = Entry('account/allAccountBalance', ['spot', 'v1', 'private'], 'GET', {'cost': 2})
|
20
19
|
spot_v1_private_post_trade_order = spotV1PrivatePostTradeOrder = Entry('trade/order', ['spot', 'v1', 'private'], 'POST', {'cost': 2})
|
21
20
|
spot_v1_private_post_trade_cancel = spotV1PrivatePostTradeCancel = Entry('trade/cancel', ['spot', 'v1', 'private'], 'POST', {'cost': 2})
|
22
21
|
spot_v1_private_post_trade_batchorders = spotV1PrivatePostTradeBatchOrders = Entry('trade/batchOrders', ['spot', 'v1', 'private'], 'POST', {'cost': 5})
|
@@ -141,6 +140,7 @@ class ImplicitAPI:
|
|
141
140
|
account_v1_private_get_uid = accountV1PrivateGetUid = Entry('uid', ['account', 'v1', 'private'], 'GET', {'cost': 1})
|
142
141
|
account_v1_private_get_apikey_query = accountV1PrivateGetApiKeyQuery = Entry('apiKey/query', ['account', 'v1', 'private'], 'GET', {'cost': 2})
|
143
142
|
account_v1_private_get_account_apipermissions = accountV1PrivateGetAccountApiPermissions = Entry('account/apiPermissions', ['account', 'v1', 'private'], 'GET', {'cost': 5})
|
143
|
+
account_v1_private_get_allaccountbalance = accountV1PrivateGetAllAccountBalance = Entry('allAccountBalance', ['account', 'v1', 'private'], 'GET', {'cost': 2})
|
144
144
|
account_v1_private_post_innertransfer_authorizesubaccount = accountV1PrivatePostInnerTransferAuthorizeSubAccount = Entry('innerTransfer/authorizeSubAccount', ['account', 'v1', 'private'], 'POST', {'cost': 1})
|
145
145
|
account_transfer_v1_private_get_subaccount_asset_transferhistory = accountTransferV1PrivateGetSubAccountAssetTransferHistory = Entry('subAccount/asset/transferHistory', ['account', 'transfer', 'v1', 'private'], 'GET', {'cost': 1})
|
146
146
|
account_transfer_v1_private_post_subaccount_transferasset_supportcoins = accountTransferV1PrivatePostSubAccountTransferAssetSupportCoins = Entry('subAccount/transferAsset/supportCoins', ['account', 'transfer', 'v1', 'private'], 'POST', {'cost': 1})
|
ccxt/ascendex.py
CHANGED
@@ -1959,7 +1959,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1959
1959
|
# "code": 0,
|
1960
1960
|
# "data": [
|
1961
1961
|
# {
|
1962
|
-
# "avgPx": "0",
|
1962
|
+
# "avgPx": "0", # Average filled price of the order
|
1963
1963
|
# "cumFee": "0", # cumulative fee paid for self order
|
1964
1964
|
# "cumFilledQty": "0", # cumulative filled quantity
|
1965
1965
|
# "errorCode": "", # error code; could be empty
|
ccxt/async_support/__init__.py
CHANGED
ccxt/async_support/ascendex.py
CHANGED
@@ -1960,7 +1960,7 @@ class ascendex(Exchange, ImplicitAPI):
|
|
1960
1960
|
# "code": 0,
|
1961
1961
|
# "data": [
|
1962
1962
|
# {
|
1963
|
-
# "avgPx": "0",
|
1963
|
+
# "avgPx": "0", # Average filled price of the order
|
1964
1964
|
# "cumFee": "0", # cumulative fee paid for self order
|
1965
1965
|
# "cumFilledQty": "0", # cumulative filled quantity
|
1966
1966
|
# "errorCode": "", # error code; could be empty
|
ccxt/async_support/binance.py
CHANGED
@@ -4086,7 +4086,7 @@ class binance(Exchange, ImplicitAPI):
|
|
4086
4086
|
# "symbol": "BTCUSDT",
|
4087
4087
|
# "markPrice": "11793.63104562", # mark price
|
4088
4088
|
# "indexPrice": "11781.80495970", # index price
|
4089
|
-
# "estimatedSettlePrice": "11781.16138815", # Estimated Settle Price, only useful in the last hour before the settlement starts
|
4089
|
+
# "estimatedSettlePrice": "11781.16138815", # Estimated Settle Price, only useful in the last hour before the settlement starts
|
4090
4090
|
# "lastFundingRate": "0.00038246", # This is the lastest estimated funding rate
|
4091
4091
|
# "nextFundingTime": 1597392000000,
|
4092
4092
|
# "interestRate": "0.00010000",
|
ccxt/async_support/bingx.py
CHANGED
@@ -176,7 +176,6 @@ class bingx(Exchange, ImplicitAPI):
|
|
176
176
|
'trade/myTrades': 2,
|
177
177
|
'user/commissionRate': 5,
|
178
178
|
'account/balance': 2,
|
179
|
-
'account/allAccountBalance': 2,
|
180
179
|
},
|
181
180
|
'post': {
|
182
181
|
'trade/order': 2,
|
@@ -403,6 +402,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
403
402
|
'uid': 1,
|
404
403
|
'apiKey/query': 2,
|
405
404
|
'account/apiPermissions': 5,
|
405
|
+
'allAccountBalance': 2,
|
406
406
|
},
|
407
407
|
'post': {
|
408
408
|
'innerTransfer/authorizeSubAccount': 1,
|
@@ -832,7 +832,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
832
832
|
# {
|
833
833
|
# "symbol": "GEAR-USDT",
|
834
834
|
# "minQty": 735, # deprecated
|
835
|
-
# "maxQty": 2941177, # deprecated
|
835
|
+
# "maxQty": 2941177, # deprecated.
|
836
836
|
# "minNotional": 5,
|
837
837
|
# "maxNotional": 20000,
|
838
838
|
# "status": 1,
|
ccxt/async_support/bitfinex.py
CHANGED
@@ -2203,7 +2203,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
2203
2203
|
tradesList.append({'result': response[i]}) # convert to array of dicts to match parseOrder signature
|
2204
2204
|
return self.parse_trades(tradesList, market, since, limit)
|
2205
2205
|
|
2206
|
-
async def create_deposit_address(self, code: str, params={}):
|
2206
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2207
2207
|
"""
|
2208
2208
|
create a currency deposit address
|
2209
2209
|
|
ccxt/async_support/bitfinex1.py
CHANGED
@@ -1395,7 +1395,7 @@ class bitfinex1(Exchange, ImplicitAPI):
|
|
1395
1395
|
return self.options['currencyNames'][code]
|
1396
1396
|
raise NotSupported(self.id + ' ' + code + ' not supported for withdrawal')
|
1397
1397
|
|
1398
|
-
async def create_deposit_address(self, code: str, params={}):
|
1398
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1399
1399
|
"""
|
1400
1400
|
create a currency deposit address
|
1401
1401
|
|
ccxt/async_support/bl3p.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.bl3p import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Currency, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
9
|
+
from ccxt.base.types import Any, Balances, Currency, DepositAddress, IndexType, Int, Market, Num, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, TradingFees
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
12
12
|
from ccxt.base.precise import Precise
|
@@ -477,7 +477,7 @@ class bl3p(Exchange, ImplicitAPI):
|
|
477
477
|
'info': response,
|
478
478
|
})
|
479
479
|
|
480
|
-
async def create_deposit_address(self, code: str, params={}):
|
480
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
481
481
|
"""
|
482
482
|
create a currency deposit address
|
483
483
|
|
ccxt/async_support/cex.py
CHANGED
ccxt/async_support/coinbase.py
CHANGED
@@ -735,7 +735,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
735
735
|
'info': account,
|
736
736
|
}
|
737
737
|
|
738
|
-
async def create_deposit_address(self, code: str, params={}):
|
738
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
739
739
|
"""
|
740
740
|
create a currency deposit address
|
741
741
|
|
@@ -803,6 +803,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
803
803
|
'currency': code,
|
804
804
|
'tag': tag,
|
805
805
|
'address': address,
|
806
|
+
'network': None,
|
806
807
|
'info': response,
|
807
808
|
}
|
808
809
|
|
@@ -2301,7 +2302,7 @@ class coinbase(Exchange, ImplicitAPI):
|
|
2301
2302
|
# "ending_before":null,
|
2302
2303
|
# "starting_after":null,
|
2303
2304
|
# "previous_ending_before":null,
|
2304
|
-
# "next_starting_after":"6b17acd6-2e68-5eb0-9f45-
|
2305
|
+
# "next_starting_after":"6b17acd6-2e68-5eb0-9f45-72d67cef578a",
|
2305
2306
|
# "limit":100,
|
2306
2307
|
# "order":"desc",
|
2307
2308
|
# "previous_uri":null,
|
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbaseexchange import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -1783,7 +1783,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1783
1783
|
'fee': fee,
|
1784
1784
|
}
|
1785
1785
|
|
1786
|
-
async def create_deposit_address(self, code: str, params={}):
|
1786
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1787
1787
|
"""
|
1788
1788
|
create a currency deposit address
|
1789
1789
|
|
@@ -1814,6 +1814,7 @@ class coinbaseexchange(Exchange, ImplicitAPI):
|
|
1814
1814
|
return {
|
1815
1815
|
'currency': code,
|
1816
1816
|
'address': self.check_address(address),
|
1817
|
+
'network': None,
|
1817
1818
|
'tag': tag,
|
1818
1819
|
'info': response,
|
1819
1820
|
}
|
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinbaseinternational import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Currencies, Currency, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Order, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -736,7 +736,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
736
736
|
}
|
737
737
|
return self.safe_string(statuses, status, status)
|
738
738
|
|
739
|
-
async def create_deposit_address(self, code: str, params={}):
|
739
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
740
740
|
"""
|
741
741
|
create a currency deposit address
|
742
742
|
|
@@ -783,6 +783,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
783
783
|
'currency': code,
|
784
784
|
'tag': tag,
|
785
785
|
'address': address,
|
786
|
+
'network': None,
|
786
787
|
'info': response,
|
787
788
|
}
|
788
789
|
|
ccxt/async_support/coinex.py
CHANGED
@@ -3679,7 +3679,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
3679
3679
|
"""
|
3680
3680
|
return await self.fetch_orders_by_status('finished', symbol, since, limit, params)
|
3681
3681
|
|
3682
|
-
async def create_deposit_address(self, code: str, params={}):
|
3682
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
3683
3683
|
"""
|
3684
3684
|
create a currency deposit address
|
3685
3685
|
|
ccxt/async_support/deribit.py
CHANGED
@@ -1100,7 +1100,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1100
1100
|
result = self.safe_dict(response, 'result', {})
|
1101
1101
|
return self.parse_balance(result)
|
1102
1102
|
|
1103
|
-
async def create_deposit_address(self, code: str, params={}):
|
1103
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1104
1104
|
"""
|
1105
1105
|
create a currency deposit address
|
1106
1106
|
|
@@ -1135,6 +1135,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
1135
1135
|
'currency': code,
|
1136
1136
|
'address': address,
|
1137
1137
|
'tag': None,
|
1138
|
+
'network': None,
|
1138
1139
|
'info': response,
|
1139
1140
|
}
|
1140
1141
|
|
ccxt/async_support/derive.py
CHANGED
@@ -601,6 +601,7 @@ class derive(Exchange, ImplicitAPI):
|
|
601
601
|
swap = False
|
602
602
|
option = False
|
603
603
|
linear: Bool = None
|
604
|
+
inverse: Bool = None
|
604
605
|
baseId = self.safe_string(market, 'base_currency')
|
605
606
|
quoteId = self.safe_string(market, 'quote_currency')
|
606
607
|
base = self.safe_currency_code(baseId)
|
@@ -623,6 +624,7 @@ class derive(Exchange, ImplicitAPI):
|
|
623
624
|
symbol = base + '/' + quote + ':' + settle
|
624
625
|
swap = True
|
625
626
|
linear = True
|
627
|
+
inverse = False
|
626
628
|
marketType = 'swap'
|
627
629
|
elif type == 'option':
|
628
630
|
settleId = 'USDC'
|
@@ -657,7 +659,7 @@ class derive(Exchange, ImplicitAPI):
|
|
657
659
|
'active': self.safe_bool(market, 'is_active'),
|
658
660
|
'contract': (swap or option),
|
659
661
|
'linear': linear,
|
660
|
-
'inverse':
|
662
|
+
'inverse': inverse,
|
661
663
|
'contractSize': None if (spot) else 1,
|
662
664
|
'expiry': expiry,
|
663
665
|
'expiryDatetime': self.iso8601(expiry),
|
@@ -1812,7 +1814,7 @@ class derive(Exchange, ImplicitAPI):
|
|
1812
1814
|
order = self.safe_dict(rawOrder, 'data')
|
1813
1815
|
if order is None:
|
1814
1816
|
order = rawOrder
|
1815
|
-
timestamp = self.
|
1817
|
+
timestamp = self.safe_integer_2(rawOrder, 'creation_timestamp', 'nonce')
|
1816
1818
|
orderId = self.safe_string(order, 'order_id')
|
1817
1819
|
marketId = self.safe_string(order, 'instrument_name')
|
1818
1820
|
if marketId is not None:
|
@@ -2329,17 +2331,19 @@ class derive(Exchange, ImplicitAPI):
|
|
2329
2331
|
result: dict = {
|
2330
2332
|
'info': response,
|
2331
2333
|
}
|
2332
|
-
# TODO:
|
2333
|
-
# checked multiple subaccounts
|
2334
|
-
# checked balance after open orders / positions
|
2335
2334
|
for i in range(0, len(response)):
|
2336
2335
|
subaccount = response[i]
|
2337
2336
|
collaterals = self.safe_list(subaccount, 'collaterals', [])
|
2338
2337
|
for j in range(0, len(collaterals)):
|
2339
2338
|
balance = collaterals[j]
|
2340
2339
|
code = self.safe_currency_code(self.safe_string(balance, 'currency'))
|
2341
|
-
account = self.
|
2342
|
-
account
|
2340
|
+
account = self.safe_dict(result, code)
|
2341
|
+
if account is None:
|
2342
|
+
account = self.account()
|
2343
|
+
account['total'] = self.safe_string(balance, 'amount')
|
2344
|
+
else:
|
2345
|
+
amount = self.safe_string(balance, 'amount')
|
2346
|
+
account['total'] = Precise.string_add(account['total'], amount)
|
2343
2347
|
result[code] = account
|
2344
2348
|
return self.safe_balance(result)
|
2345
2349
|
|
ccxt/async_support/gate.py
CHANGED
@@ -6364,6 +6364,9 @@ class gate(Exchange, ImplicitAPI):
|
|
6364
6364
|
if (method == 'GET') or (method == 'DELETE') or requiresURLEncoding or (method == 'PATCH'):
|
6365
6365
|
if query:
|
6366
6366
|
queryString = self.urlencode(query)
|
6367
|
+
# https://github.com/ccxt/ccxt/issues/25570
|
6368
|
+
if queryString.find('currencies=') >= 0 and queryString.find('%2C') >= 0:
|
6369
|
+
queryString = queryString.replace('%2', ',')
|
6367
6370
|
url += '?' + queryString
|
6368
6371
|
if method == 'PATCH':
|
6369
6372
|
body = self.json(query)
|
ccxt/async_support/gemini.py
CHANGED
@@ -1874,7 +1874,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1874
1874
|
raise ExchangeError(feedback) # unknown message
|
1875
1875
|
return None
|
1876
1876
|
|
1877
|
-
async def create_deposit_address(self, code: str, params={}):
|
1877
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1878
1878
|
"""
|
1879
1879
|
create a currency deposit address
|
1880
1880
|
|
@@ -1896,6 +1896,7 @@ class gemini(Exchange, ImplicitAPI):
|
|
1896
1896
|
'currency': code,
|
1897
1897
|
'address': address,
|
1898
1898
|
'tag': None,
|
1899
|
+
'network': None,
|
1899
1900
|
'info': response,
|
1900
1901
|
}
|
1901
1902
|
|
ccxt/async_support/hitbtc.py
CHANGED
@@ -1020,7 +1020,7 @@ class hitbtc(Exchange, ImplicitAPI):
|
|
1020
1020
|
}
|
1021
1021
|
return result
|
1022
1022
|
|
1023
|
-
async def create_deposit_address(self, code: str, params={}):
|
1023
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1024
1024
|
"""
|
1025
1025
|
create a currency deposit address
|
1026
1026
|
|
@@ -1898,6 +1898,44 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1898
1898
|
statuses = self.safe_list(dataObject, 'statuses', [])
|
1899
1899
|
return self.parse_orders(statuses)
|
1900
1900
|
|
1901
|
+
async def create_vault(self, name: str, description: str, initialUsd: int, params={}):
|
1902
|
+
"""
|
1903
|
+
creates a value
|
1904
|
+
:param str name: The name of the vault
|
1905
|
+
:param str description: The description of the vault
|
1906
|
+
:param number initialUsd: The initialUsd of the vault
|
1907
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1908
|
+
:returns dict: the api result
|
1909
|
+
"""
|
1910
|
+
self.check_required_credentials()
|
1911
|
+
await self.load_markets()
|
1912
|
+
nonce = self.milliseconds()
|
1913
|
+
request: dict = {
|
1914
|
+
'nonce': nonce,
|
1915
|
+
}
|
1916
|
+
usd = self.parse_to_int(Precise.string_mul(self.number_to_string(initialUsd), '1000000'))
|
1917
|
+
action: dict = {
|
1918
|
+
'type': 'createVault',
|
1919
|
+
'name': name,
|
1920
|
+
'description': description,
|
1921
|
+
'initialUsd': usd,
|
1922
|
+
'nonce': nonce,
|
1923
|
+
}
|
1924
|
+
signature = self.sign_l1_action(action, nonce)
|
1925
|
+
request['action'] = action
|
1926
|
+
request['signature'] = signature
|
1927
|
+
response = await self.privatePostExchange(self.extend(request, params))
|
1928
|
+
#
|
1929
|
+
# {
|
1930
|
+
# "status": "ok",
|
1931
|
+
# "response": {
|
1932
|
+
# "type": "createVault",
|
1933
|
+
# "data": "0x04fddcbc9ce80219301bd16f18491bedf2a8c2b8"
|
1934
|
+
# }
|
1935
|
+
# }
|
1936
|
+
#
|
1937
|
+
return response
|
1938
|
+
|
1901
1939
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1902
1940
|
"""
|
1903
1941
|
fetches historical funding rate prices
|
ccxt/async_support/kraken.py
CHANGED
@@ -2900,7 +2900,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
2900
2900
|
data[dataLength - 1] = last
|
2901
2901
|
return data
|
2902
2902
|
|
2903
|
-
async def create_deposit_address(self, code: str, params={}):
|
2903
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2904
2904
|
"""
|
2905
2905
|
create a currency deposit address
|
2906
2906
|
|
@@ -51,6 +51,10 @@ class krakenfutures(Exchange, ImplicitAPI):
|
|
51
51
|
'cancelOrders': True,
|
52
52
|
'createMarketOrder': False,
|
53
53
|
'createOrder': True,
|
54
|
+
'createPostOnlyOrder': True,
|
55
|
+
'createReduceOnlyOrder': True,
|
56
|
+
'createStopLimitOrder': True,
|
57
|
+
'createStopMarketOrder': True,
|
54
58
|
'createStopOrder': True,
|
55
59
|
'createTriggerOrder': True,
|
56
60
|
'editOrder': True,
|
ccxt/async_support/kucoin.py
CHANGED
@@ -1960,7 +1960,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1960
1960
|
data = self.safe_list(response, 'data', [])
|
1961
1961
|
return self.parse_ohlcvs(data, market, timeframe, since, limit)
|
1962
1962
|
|
1963
|
-
async def create_deposit_address(self, code: str, params={}):
|
1963
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1964
1964
|
"""
|
1965
1965
|
|
1966
1966
|
https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
|
ccxt/async_support/kuna.py
CHANGED
@@ -1572,7 +1572,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
1572
1572
|
data = self.safe_dict(response, 'data', {})
|
1573
1573
|
return self.parse_transaction(data)
|
1574
1574
|
|
1575
|
-
async def create_deposit_address(self, code: str, params={}):
|
1575
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
1576
1576
|
"""
|
1577
1577
|
create a currency deposit address
|
1578
1578
|
|
ccxt/async_support/mexc.py
CHANGED
@@ -4538,7 +4538,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4538
4538
|
addressStructures = self.parse_deposit_addresses(response, None, False)
|
4539
4539
|
return self.index_by(addressStructures, 'network')
|
4540
4540
|
|
4541
|
-
async def create_deposit_address(self, code: str, params={}):
|
4541
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
4542
4542
|
"""
|
4543
4543
|
create a currency deposit address
|
4544
4544
|
|
ccxt/async_support/ndax.py
CHANGED
@@ -2083,7 +2083,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2083
2083
|
'tag': tag,
|
2084
2084
|
}
|
2085
2085
|
|
2086
|
-
async def create_deposit_address(self, code: str, params={}):
|
2086
|
+
async def create_deposit_address(self, code: str, params={}) -> DepositAddress:
|
2087
2087
|
"""
|
2088
2088
|
create a currency deposit address
|
2089
2089
|
:param str code: unified currency code of the currency for the deposit address
|
ccxt/async_support/okcoin.py
CHANGED
@@ -56,6 +56,10 @@ class okcoin(Exchange, ImplicitAPI):
|
|
56
56
|
'createMarketOrderWithCost': False,
|
57
57
|
'createMarketSellOrderWithCost': False,
|
58
58
|
'createOrder': True,
|
59
|
+
'createPostOnlyOrder': True,
|
60
|
+
'createReduceOnlyOrder': True,
|
61
|
+
'createStopLimitOrder': True,
|
62
|
+
'createStopMarketOrder': True,
|
59
63
|
'createStopOrder': True,
|
60
64
|
'createTriggerOrder': True,
|
61
65
|
'fetchBalance': True,
|
ccxt/async_support/okx.py
CHANGED
@@ -1624,11 +1624,12 @@ class okx(Exchange, ImplicitAPI):
|
|
1624
1624
|
optionType = None
|
1625
1625
|
if contract:
|
1626
1626
|
symbol = symbol + ':' + settle
|
1627
|
-
expiry = self.safe_integer(market, 'expTime')
|
1628
1627
|
if future:
|
1628
|
+
expiry = self.safe_integer(market, 'expTime')
|
1629
1629
|
ymd = self.yymmdd(expiry)
|
1630
1630
|
symbol = symbol + '-' + ymd
|
1631
1631
|
elif option:
|
1632
|
+
expiry = self.safe_integer(market, 'expTime')
|
1632
1633
|
strikePrice = self.safe_string(market, 'stk')
|
1633
1634
|
optionType = self.safe_string(market, 'optType')
|
1634
1635
|
ymd = self.yymmdd(expiry)
|
@@ -1819,38 +1820,24 @@ class okx(Exchange, ImplicitAPI):
|
|
1819
1820
|
code = currency['code']
|
1820
1821
|
chains = dataByCurrencyId[currencyId]
|
1821
1822
|
networks: dict = {}
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
maxPrecision = None
|
1826
|
-
for j in range(0, len(chains)):
|
1823
|
+
type = 'crypto'
|
1824
|
+
chainsLength = len(chains)
|
1825
|
+
for j in range(0, chainsLength):
|
1827
1826
|
chain = chains[j]
|
1828
|
-
|
1829
|
-
|
1830
|
-
canWithdraw = self.safe_bool(chain, 'canWd')
|
1831
|
-
withdrawEnabled = canWithdraw if (canWithdraw) else withdrawEnabled
|
1832
|
-
canInternal = self.safe_bool(chain, 'canInternal')
|
1833
|
-
active = True if (canDeposit and canWithdraw and canInternal) else False
|
1834
|
-
currencyActive = active if (active) else currencyActive
|
1835
|
-
networkId = self.safe_string(chain, 'chain')
|
1836
|
-
if (networkId is not None) and (networkId.find('-') >= 0):
|
1827
|
+
networkId = self.safe_string(chain, 'chain') # USDT-BEP20, USDT-Avalance-C, etc
|
1828
|
+
if networkId is not None:
|
1837
1829
|
idParts = networkId.split('-')
|
1838
1830
|
parts = self.array_slice(idParts, 1)
|
1839
1831
|
chainPart = '-'.join(parts)
|
1840
1832
|
networkCode = self.network_id_to_code(chainPart, currency['code'])
|
1841
|
-
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
|
1842
|
-
if maxPrecision is None:
|
1843
|
-
maxPrecision = precision
|
1844
|
-
else:
|
1845
|
-
maxPrecision = Precise.string_min(maxPrecision, precision)
|
1846
1833
|
networks[networkCode] = {
|
1847
1834
|
'id': networkId,
|
1848
1835
|
'network': networkCode,
|
1849
|
-
'active':
|
1850
|
-
'deposit':
|
1851
|
-
'withdraw':
|
1836
|
+
'active': None,
|
1837
|
+
'deposit': self.safe_bool(chain, 'canDep'),
|
1838
|
+
'withdraw': self.safe_bool(chain, 'canWd'),
|
1852
1839
|
'fee': self.safe_number(chain, 'fee'),
|
1853
|
-
'precision': self.parse_number(
|
1840
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'wdTickSz'))),
|
1854
1841
|
'limits': {
|
1855
1842
|
'withdraw': {
|
1856
1843
|
'min': self.safe_number(chain, 'minWd'),
|
@@ -1859,25 +1846,29 @@ class okx(Exchange, ImplicitAPI):
|
|
1859
1846
|
},
|
1860
1847
|
'info': chain,
|
1861
1848
|
}
|
1849
|
+
else:
|
1850
|
+
# only happens for FIAT currency
|
1851
|
+
type = 'fiat'
|
1862
1852
|
firstChain = self.safe_dict(chains, 0, {})
|
1863
|
-
result[code] = {
|
1853
|
+
result[code] = self.safe_currency_structure({
|
1864
1854
|
'info': chains,
|
1865
1855
|
'code': code,
|
1866
1856
|
'id': currencyId,
|
1867
1857
|
'name': self.safe_string(firstChain, 'name'),
|
1868
|
-
'active':
|
1869
|
-
'deposit':
|
1870
|
-
'withdraw':
|
1858
|
+
'active': None,
|
1859
|
+
'deposit': None,
|
1860
|
+
'withdraw': None,
|
1871
1861
|
'fee': None,
|
1872
|
-
'precision':
|
1862
|
+
'precision': None,
|
1873
1863
|
'limits': {
|
1874
1864
|
'amount': {
|
1875
1865
|
'min': None,
|
1876
1866
|
'max': None,
|
1877
1867
|
},
|
1878
1868
|
},
|
1869
|
+
'type': type,
|
1879
1870
|
'networks': networks,
|
1880
|
-
}
|
1871
|
+
})
|
1881
1872
|
return result
|
1882
1873
|
|
1883
1874
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|