ccxt 4.3.45__py2.py3-none-any.whl → 4.3.46__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/binance.py +2 -0
- ccxt/abstract/binancecoinm.py +2 -0
- ccxt/abstract/binanceus.py +2 -0
- ccxt/abstract/binanceusdm.py +2 -0
- ccxt/abstract/mexc.py +2 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +2 -0
- ccxt/async_support/bingx.py +26 -18
- ccxt/async_support/bitmart.py +4 -0
- ccxt/async_support/bitteam.py +6 -8
- ccxt/async_support/coinmetro.py +9 -18
- ccxt/async_support/hyperliquid.py +31 -23
- ccxt/async_support/idex.py +1 -0
- ccxt/async_support/mexc.py +8 -6
- ccxt/async_support/okx.py +1 -0
- ccxt/async_support/oxfun.py +2 -2
- ccxt/async_support/tokocrypto.py +9 -11
- ccxt/async_support/wavesexchange.py +1 -0
- ccxt/async_support/woofipro.py +1 -0
- ccxt/base/exchange.py +1 -1
- ccxt/binance.py +2 -0
- ccxt/bingx.py +26 -18
- ccxt/bitmart.py +4 -0
- ccxt/bitteam.py +6 -8
- ccxt/coinmetro.py +9 -18
- ccxt/hyperliquid.py +31 -23
- ccxt/idex.py +1 -0
- ccxt/mexc.py +8 -6
- ccxt/okx.py +1 -0
- ccxt/oxfun.py +2 -2
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binanceus.py +0 -8
- ccxt/tokocrypto.py +9 -11
- ccxt/wavesexchange.py +1 -0
- ccxt/woofipro.py +1 -0
- {ccxt-4.3.45.dist-info → ccxt-4.3.46.dist-info}/METADATA +128 -128
- {ccxt-4.3.45.dist-info → ccxt-4.3.46.dist-info}/RECORD +41 -41
- {ccxt-4.3.45.dist-info → ccxt-4.3.46.dist-info}/WHEEL +0 -0
- {ccxt-4.3.45.dist-info → ccxt-4.3.46.dist-info}/top_level.txt +0 -0
ccxt/base/exchange.py
CHANGED
ccxt/binance.py
CHANGED
ccxt/bingx.py
CHANGED
@@ -21,7 +21,7 @@ from ccxt.base.errors import OrderNotFound
|
|
21
21
|
from ccxt.base.errors import NotSupported
|
22
22
|
from ccxt.base.errors import OperationFailed
|
23
23
|
from ccxt.base.errors import DDoSProtection
|
24
|
-
from ccxt.base.decimal_to_precision import
|
24
|
+
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
25
|
from ccxt.base.precise import Precise
|
26
26
|
|
27
27
|
|
@@ -399,7 +399,7 @@ class bingx(Exchange, ImplicitAPI):
|
|
399
399
|
'1w': '1w',
|
400
400
|
'1M': '1M',
|
401
401
|
},
|
402
|
-
'precisionMode':
|
402
|
+
'precisionMode': TICK_SIZE,
|
403
403
|
'exceptions': {
|
404
404
|
'exact': {
|
405
405
|
'400': BadRequest,
|
@@ -615,18 +615,26 @@ class bingx(Exchange, ImplicitAPI):
|
|
615
615
|
# "msg": "",
|
616
616
|
# "data": [
|
617
617
|
# {
|
618
|
-
#
|
619
|
-
#
|
620
|
-
#
|
621
|
-
#
|
622
|
-
#
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
#
|
618
|
+
# "contractId": "100",
|
619
|
+
# "symbol": "BTC-USDT",
|
620
|
+
# "size": "0.0001",
|
621
|
+
# "quantityPrecision": "4",
|
622
|
+
# "pricePrecision": "1",
|
623
|
+
# "feeRate": "0.0005",
|
624
|
+
# "makerFeeRate": "0.0002",
|
625
|
+
# "takerFeeRate": "0.0005",
|
626
|
+
# "tradeMinLimit": "0",
|
627
|
+
# "tradeMinQuantity": "0.0001",
|
628
|
+
# "tradeMinUSDT": "2",
|
629
|
+
# "maxLongLeverage": "125",
|
630
|
+
# "maxShortLeverage": "125",
|
631
|
+
# "currency": "USDT",
|
632
|
+
# "asset": "BTC",
|
633
|
+
# "status": "1",
|
634
|
+
# "apiStateOpen": "true",
|
635
|
+
# "apiStateClose": "true",
|
636
|
+
# "ensureTrigger": True,
|
637
|
+
# "triggerFeeRate": "0.00020000"
|
630
638
|
# },
|
631
639
|
# ...
|
632
640
|
# ]
|
@@ -644,12 +652,12 @@ class bingx(Exchange, ImplicitAPI):
|
|
644
652
|
quote = self.safe_currency_code(quoteId)
|
645
653
|
currency = self.safe_string(market, 'currency')
|
646
654
|
settle = self.safe_currency_code(currency)
|
647
|
-
pricePrecision = self.
|
655
|
+
pricePrecision = self.safe_number(market, 'tickSize')
|
648
656
|
if pricePrecision is None:
|
649
|
-
pricePrecision = self.
|
650
|
-
quantityPrecision = self.
|
657
|
+
pricePrecision = self.parse_number(self.parse_precision(self.safe_string(market, 'pricePrecision')))
|
658
|
+
quantityPrecision = self.safe_number(market, 'stepSize')
|
651
659
|
if quantityPrecision is None:
|
652
|
-
quantityPrecision = self.
|
660
|
+
quantityPrecision = self.parse_number(self.parse_precision(self.safe_string(market, 'quantityPrecision')))
|
653
661
|
type = 'swap' if (settle is not None) else 'spot'
|
654
662
|
spot = type == 'spot'
|
655
663
|
swap = type == 'swap'
|
ccxt/bitmart.py
CHANGED
@@ -2594,6 +2594,10 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2594
2594
|
request['type'] = 'limit_maker'
|
2595
2595
|
if ioc:
|
2596
2596
|
request['type'] = 'ioc'
|
2597
|
+
clientOrderId = self.safe_string(params, 'clientOrderId')
|
2598
|
+
if clientOrderId is not None:
|
2599
|
+
params = self.omit(params, 'clientOrderId')
|
2600
|
+
request['client_order_id'] = clientOrderId
|
2597
2601
|
return self.extend(request, params)
|
2598
2602
|
|
2599
2603
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
ccxt/bitteam.py
CHANGED
@@ -15,7 +15,7 @@ from ccxt.base.errors import BadSymbol
|
|
15
15
|
from ccxt.base.errors import InsufficientFunds
|
16
16
|
from ccxt.base.errors import OrderNotFound
|
17
17
|
from ccxt.base.errors import ExchangeNotAvailable
|
18
|
-
from ccxt.base.decimal_to_precision import
|
18
|
+
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
19
|
from ccxt.base.precise import Precise
|
20
20
|
|
21
21
|
|
@@ -199,7 +199,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
199
199
|
'maker': self.parse_number('0.002'),
|
200
200
|
},
|
201
201
|
},
|
202
|
-
'precisionMode':
|
202
|
+
'precisionMode': TICK_SIZE,
|
203
203
|
# exchange-specific options
|
204
204
|
'options': {
|
205
205
|
'networksById': {
|
@@ -358,8 +358,6 @@ class bitteam(Exchange, ImplicitAPI):
|
|
358
358
|
base = self.safe_currency_code(baseId)
|
359
359
|
quote = self.safe_currency_code(quoteId)
|
360
360
|
active = self.safe_value(market, 'active')
|
361
|
-
amountPrecision = self.safe_integer(market, 'baseStep')
|
362
|
-
pricePrecision = self.safe_integer(market, 'quoteStep')
|
363
361
|
timeStart = self.safe_string(market, 'timeStart')
|
364
362
|
created = self.parse8601(timeStart)
|
365
363
|
minCost = None
|
@@ -394,8 +392,8 @@ class bitteam(Exchange, ImplicitAPI):
|
|
394
392
|
'strike': None,
|
395
393
|
'optionType': None,
|
396
394
|
'precision': {
|
397
|
-
'amount':
|
398
|
-
'price':
|
395
|
+
'amount': self.parse_number(self.parse_precision(self.safe_string(market, 'baseStep'))),
|
396
|
+
'price': self.parse_number(self.parse_precision(self.safe_string(market, 'quoteStep'))),
|
399
397
|
},
|
400
398
|
'limits': {
|
401
399
|
'leverage': {
|
@@ -549,7 +547,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
549
547
|
numericId = self.safe_integer(currency, 'id')
|
550
548
|
code = self.safe_currency_code(id)
|
551
549
|
active = self.safe_bool(currency, 'active', False)
|
552
|
-
precision = self.
|
550
|
+
precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'precision')))
|
553
551
|
txLimits = self.safe_value(currency, 'txLimits', {})
|
554
552
|
minWithdraw = self.safe_string(txLimits, 'minWithdraw')
|
555
553
|
maxWithdraw = self.safe_string(txLimits, 'maxWithdraw')
|
@@ -569,7 +567,7 @@ class bitteam(Exchange, ImplicitAPI):
|
|
569
567
|
withdraw = self.safe_value(statuses, 'withdrawStatus')
|
570
568
|
networkIds = list(feesByNetworkId.keys())
|
571
569
|
networks: dict = {}
|
572
|
-
networkPrecision = self.
|
570
|
+
networkPrecision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
|
573
571
|
for j in range(0, len(networkIds)):
|
574
572
|
networkId = networkIds[j]
|
575
573
|
networkCode = self.network_id_to_code(networkId, code)
|
ccxt/coinmetro.py
CHANGED
@@ -16,7 +16,7 @@ from ccxt.base.errors import InsufficientFunds
|
|
16
16
|
from ccxt.base.errors import InvalidOrder
|
17
17
|
from ccxt.base.errors import OrderNotFound
|
18
18
|
from ccxt.base.errors import RateLimitExceeded
|
19
|
-
from ccxt.base.decimal_to_precision import
|
19
|
+
from ccxt.base.decimal_to_precision import TICK_SIZE
|
20
20
|
from ccxt.base.precise import Precise
|
21
21
|
|
22
22
|
|
@@ -215,7 +215,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
215
215
|
'maker': self.parse_number('0'),
|
216
216
|
},
|
217
217
|
},
|
218
|
-
'precisionMode':
|
218
|
+
'precisionMode': TICK_SIZE,
|
219
219
|
# exchange-specific options
|
220
220
|
'options': {
|
221
221
|
'currenciesByIdForParseMarket': None,
|
@@ -317,7 +317,6 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
317
317
|
deposit = self.safe_value(currency, 'canDeposit')
|
318
318
|
canTrade = self.safe_value(currency, 'canTrade')
|
319
319
|
active = withdraw if canTrade else True
|
320
|
-
precision = self.safe_integer(currency, 'digits')
|
321
320
|
minAmount = self.safe_number(currency, 'minQty')
|
322
321
|
result[code] = self.safe_currency_structure({
|
323
322
|
'id': id,
|
@@ -328,7 +327,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
328
327
|
'deposit': deposit,
|
329
328
|
'withdraw': withdraw,
|
330
329
|
'fee': None,
|
331
|
-
'precision':
|
330
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'digits'))),
|
332
331
|
'limits': {
|
333
332
|
'amount': {'min': minAmount, 'max': None},
|
334
333
|
'withdraw': {'min': None, 'max': None},
|
@@ -354,19 +353,14 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
354
353
|
#
|
355
354
|
# [
|
356
355
|
# {
|
357
|
-
# "pair": "
|
358
|
-
# "precision": 5,
|
359
|
-
# "margin": False
|
360
|
-
# },
|
361
|
-
# {
|
362
|
-
# "pair": "PERPUSD",
|
356
|
+
# "pair": "YFIEUR",
|
363
357
|
# "precision": 5,
|
364
358
|
# "margin": False
|
365
359
|
# },
|
366
360
|
# {
|
367
|
-
# "pair": "
|
368
|
-
# "precision":
|
369
|
-
# "margin":
|
361
|
+
# "pair": "BTCEUR",
|
362
|
+
# "precision": 2,
|
363
|
+
# "margin": True
|
370
364
|
# },
|
371
365
|
# ...
|
372
366
|
# ]
|
@@ -412,9 +406,7 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
412
406
|
'optionType': None,
|
413
407
|
'precision': {
|
414
408
|
'amount': basePrecisionAndLimits['precision'],
|
415
|
-
'price':
|
416
|
-
'base': basePrecisionAndLimits['precision'],
|
417
|
-
'quote': quotePrecisionAndLimits['precision'],
|
409
|
+
'price': self.parse_number(self.parse_precision(self.safe_string(market, 'precision'))),
|
418
410
|
},
|
419
411
|
'limits': {
|
420
412
|
'leverage': {
|
@@ -464,12 +456,11 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
464
456
|
def parse_market_precision_and_limits(self, currencyId):
|
465
457
|
currencies = self.safe_value(self.options, 'currenciesByIdForParseMarket', {})
|
466
458
|
currency = self.safe_value(currencies, currencyId, {})
|
467
|
-
precision = self.safe_integer(currency, 'precision')
|
468
459
|
limits = self.safe_value(currency, 'limits', {})
|
469
460
|
amountLimits = self.safe_value(limits, 'amount', {})
|
470
461
|
minLimit = self.safe_number(amountLimits, 'min')
|
471
462
|
result: dict = {
|
472
|
-
'precision': precision,
|
463
|
+
'precision': self.safe_number(currency, 'precision'),
|
473
464
|
'minLimit': minLimit,
|
474
465
|
}
|
475
466
|
return result
|
ccxt/hyperliquid.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.hyperliquid import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currencies, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Str, Strings, Trade, TransferEntry
|
8
|
+
from ccxt.base.types import Balances, Currencies, Int, MarginModification, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Str, Strings, Trade, Transaction, TransferEntry
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import ExchangeError
|
11
11
|
from ccxt.base.errors import ArgumentsRequired
|
@@ -31,6 +31,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
31
31
|
'rateLimit': 50, # 1200 requests per minute, 20 request per second
|
32
32
|
'certified': False,
|
33
33
|
'pro': True,
|
34
|
+
'dex': True,
|
34
35
|
'has': {
|
35
36
|
'CORS': None,
|
36
37
|
'spot': True,
|
@@ -948,11 +949,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
948
949
|
signature = self.sign_message(msg, self.privateKey)
|
949
950
|
return signature
|
950
951
|
|
951
|
-
def
|
952
|
+
def sign_user_signed_action(self, messageTypes, message):
|
952
953
|
zeroAddress = self.safe_string(self.options, 'zeroAddress')
|
954
|
+
chainId = 421614 # check self out
|
953
955
|
domain: dict = {
|
954
956
|
'chainId': chainId,
|
955
|
-
'name': '
|
957
|
+
'name': 'HyperliquidSignTransaction',
|
956
958
|
'verifyingContract': zeroAddress,
|
957
959
|
'version': '1',
|
958
960
|
}
|
@@ -961,28 +963,26 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
961
963
|
return signature
|
962
964
|
|
963
965
|
def build_transfer_sig(self, message):
|
964
|
-
isSandboxMode = self.safe_bool(self.options, 'sandboxMode')
|
965
|
-
chainId = 421614 if (isSandboxMode) else 42161
|
966
966
|
messageTypes: dict = {
|
967
|
-
'
|
967
|
+
'HyperliquidTransaction:UsdSend': [
|
968
|
+
{'name': 'hyperliquidChain', 'type': 'string'},
|
968
969
|
{'name': 'destination', 'type': 'string'},
|
969
970
|
{'name': 'amount', 'type': 'string'},
|
970
971
|
{'name': 'time', 'type': 'uint64'},
|
971
972
|
],
|
972
973
|
}
|
973
|
-
return self.
|
974
|
+
return self.sign_user_signed_action(messageTypes, message)
|
974
975
|
|
975
976
|
def build_withdraw_sig(self, message):
|
976
|
-
isSandboxMode = self.safe_bool(self.options, 'sandboxMode')
|
977
|
-
chainId = 421614 if (isSandboxMode) else 42161
|
978
977
|
messageTypes: dict = {
|
979
|
-
'
|
978
|
+
'HyperliquidTransaction:Withdraw': [
|
979
|
+
{'name': 'hyperliquidChain', 'type': 'string'},
|
980
980
|
{'name': 'destination', 'type': 'string'},
|
981
|
-
{'name': '
|
981
|
+
{'name': 'amount', 'type': 'string'},
|
982
982
|
{'name': 'time', 'type': 'uint64'},
|
983
983
|
],
|
984
984
|
}
|
985
|
-
return self.
|
985
|
+
return self.sign_user_signed_action(messageTypes, message)
|
986
986
|
|
987
987
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
988
988
|
"""
|
@@ -2276,8 +2276,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2276
2276
|
if code is not None:
|
2277
2277
|
code = code.upper()
|
2278
2278
|
if code != 'USDC':
|
2279
|
-
raise NotSupported(self.id + '
|
2279
|
+
raise NotSupported(self.id + 'transfer() only support USDC')
|
2280
2280
|
payload: dict = {
|
2281
|
+
'hyperliquidChain': 'Testnet' if isSandboxMode else 'Mainnet',
|
2281
2282
|
'destination': toAccount,
|
2282
2283
|
'amount': self.number_to_string(amount),
|
2283
2284
|
'time': nonce,
|
@@ -2285,9 +2286,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2285
2286
|
sig = self.build_transfer_sig(payload)
|
2286
2287
|
request: dict = {
|
2287
2288
|
'action': {
|
2288
|
-
'
|
2289
|
-
'
|
2290
|
-
'
|
2289
|
+
'hyperliquidChain': payload['hyperliquidChain'],
|
2290
|
+
'signatureChainId': '0x66eee', # check self out
|
2291
|
+
'destination': toAccount,
|
2292
|
+
'amount': str(amount),
|
2293
|
+
'time': nonce,
|
2294
|
+
'type': 'usdSend',
|
2291
2295
|
},
|
2292
2296
|
'nonce': nonce,
|
2293
2297
|
'signature': sig,
|
@@ -2295,7 +2299,7 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2295
2299
|
response = self.privatePostExchange(self.extend(request, params))
|
2296
2300
|
return response
|
2297
2301
|
|
2298
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2302
|
+
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
2299
2303
|
"""
|
2300
2304
|
make a withdrawal(only support USDC)
|
2301
2305
|
:see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#initiate-a-withdrawal-request
|
@@ -2313,25 +2317,29 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2313
2317
|
code = code.upper()
|
2314
2318
|
if code != 'USDC':
|
2315
2319
|
raise NotSupported(self.id + 'withdraw() only support USDC')
|
2316
|
-
isSandboxMode = self.safe_bool(self.options, 'sandboxMode')
|
2320
|
+
isSandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
2317
2321
|
nonce = self.milliseconds()
|
2318
2322
|
payload: dict = {
|
2323
|
+
'hyperliquidChain': 'Testnet' if isSandboxMode else 'Mainnet',
|
2319
2324
|
'destination': address,
|
2320
|
-
'
|
2325
|
+
'amount': str(amount),
|
2321
2326
|
'time': nonce,
|
2322
2327
|
}
|
2323
2328
|
sig = self.build_withdraw_sig(payload)
|
2324
2329
|
request: dict = {
|
2325
2330
|
'action': {
|
2326
|
-
'
|
2327
|
-
'
|
2328
|
-
'
|
2331
|
+
'hyperliquidChain': payload['hyperliquidChain'],
|
2332
|
+
'signatureChainId': '0x66eee', # check self out
|
2333
|
+
'destination': address,
|
2334
|
+
'amount': str(amount),
|
2335
|
+
'time': nonce,
|
2336
|
+
'type': 'withdraw3',
|
2329
2337
|
},
|
2330
2338
|
'nonce': nonce,
|
2331
2339
|
'signature': sig,
|
2332
2340
|
}
|
2333
2341
|
response = self.privatePostExchange(self.extend(request, params))
|
2334
|
-
return response
|
2342
|
+
return self.parse_transaction(response)
|
2335
2343
|
|
2336
2344
|
def format_vault_address(self, address: Str = None):
|
2337
2345
|
if address is None:
|
ccxt/idex.py
CHANGED
ccxt/mexc.py
CHANGED
@@ -235,6 +235,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
235
235
|
'sub-account/margin': 1,
|
236
236
|
'batchOrders': 10,
|
237
237
|
'capital/withdraw/apply': 1,
|
238
|
+
'capital/withdraw': 1,
|
238
239
|
'capital/transfer': 1,
|
239
240
|
'capital/transfer/internal': 1,
|
240
241
|
'capital/deposit/address': 1,
|
@@ -253,6 +254,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
253
254
|
'margin/order': 1,
|
254
255
|
'margin/openOrders': 1,
|
255
256
|
'userDataStream': 1,
|
257
|
+
'capital/withdraw': 1,
|
256
258
|
},
|
257
259
|
},
|
258
260
|
},
|
@@ -1069,7 +1071,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1069
1071
|
chains = self.safe_value(currency, 'networkList', [])
|
1070
1072
|
for j in range(0, len(chains)):
|
1071
1073
|
chain = chains[j]
|
1072
|
-
networkId = self.
|
1074
|
+
networkId = self.safe_string_2(chain, 'network', 'netWork')
|
1073
1075
|
network = self.network_id_to_code(networkId)
|
1074
1076
|
isDepositEnabled = self.safe_bool(chain, 'depositEnable', False)
|
1075
1077
|
isWithdrawEnabled = self.safe_bool(chain, 'withdrawEnable', False)
|
@@ -4894,7 +4896,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4894
4896
|
def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
4895
4897
|
"""
|
4896
4898
|
make a withdrawal
|
4897
|
-
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
|
4899
|
+
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-new
|
4898
4900
|
:param str code: unified currency code
|
4899
4901
|
:param float amount: the amount to withdraw
|
4900
4902
|
:param str address: the address to withdraw to
|
@@ -4904,7 +4906,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4904
4906
|
"""
|
4905
4907
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
4906
4908
|
networks = self.safe_value(self.options, 'networks', {})
|
4907
|
-
network = self.safe_string_2(params, 'network', '
|
4909
|
+
network = self.safe_string_2(params, 'network', 'netWork') # self line allows the user to specify either ERC20 or ETH
|
4908
4910
|
network = self.safe_string(networks, network, network) # handle ETH > ERC-20 alias
|
4909
4911
|
self.check_address(address)
|
4910
4912
|
self.load_markets()
|
@@ -4917,9 +4919,9 @@ class mexc(Exchange, ImplicitAPI):
|
|
4917
4919
|
if tag is not None:
|
4918
4920
|
request['memo'] = tag
|
4919
4921
|
if network is not None:
|
4920
|
-
request['
|
4921
|
-
params = self.omit(params, ['network', '
|
4922
|
-
response = self.
|
4922
|
+
request['netWork'] = network
|
4923
|
+
params = self.omit(params, ['network', 'netWork'])
|
4924
|
+
response = self.spotPrivatePostCapitalWithdraw(self.extend(request, params))
|
4923
4925
|
#
|
4924
4926
|
# {
|
4925
4927
|
# "id":"7213fea8e94b4a5593d507237e5a555b"
|
ccxt/okx.py
CHANGED
@@ -2385,6 +2385,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2385
2385
|
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-get-balance
|
2386
2386
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-balance
|
2387
2387
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2388
|
+
:param str [params.type]: wallet type, ['funding' or 'trading'] default is 'trading'
|
2388
2389
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
2389
2390
|
"""
|
2390
2391
|
self.load_markets()
|
ccxt/oxfun.py
CHANGED
@@ -32,7 +32,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
32
32
|
def describe(self):
|
33
33
|
return self.deep_extend(super(oxfun, self).describe(), {
|
34
34
|
'id': 'oxfun',
|
35
|
-
'name': '
|
35
|
+
'name': 'OXFUN',
|
36
36
|
'countries': ['PA'], # Panama todo check
|
37
37
|
'version': 'v3',
|
38
38
|
'rateLimit': 120, # 100 requests per second and 25000 per 5 minutes
|
@@ -152,7 +152,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
152
152
|
'1d': '86400s',
|
153
153
|
},
|
154
154
|
'urls': {
|
155
|
-
'logo': 'https://github.com/ccxt/ccxt/assets/43336371/
|
155
|
+
'logo': 'https://github.com/ccxt/ccxt/assets/43336371/6a196124-c1ee-4fae-8573-962071b61a85',
|
156
156
|
'referral': 'https://ox.fun/register?shareAccountId=5ZUD4a7G',
|
157
157
|
'api': {
|
158
158
|
'public': 'https://api.ox.fun',
|
ccxt/pro/__init__.py
CHANGED
ccxt/pro/binanceus.py
CHANGED
@@ -45,12 +45,4 @@ class binanceus(binance):
|
|
45
45
|
'defaultType': 'spot',
|
46
46
|
'fetchMarkets': ['spot'],
|
47
47
|
},
|
48
|
-
'fees': {
|
49
|
-
'trading': {
|
50
|
-
'tierBased': False,
|
51
|
-
'percentage': True,
|
52
|
-
'taker': 0.0, # 0.1% trading fee, zero fees for all trading pairs before November 1
|
53
|
-
'maker': 0.0, # 0.1% trading fee, zero fees for all trading pairs before November 1
|
54
|
-
},
|
55
|
-
},
|
56
48
|
})
|
ccxt/tokocrypto.py
CHANGED
@@ -31,7 +31,7 @@ from ccxt.base.errors import OnMaintenance
|
|
31
31
|
from ccxt.base.errors import InvalidNonce
|
32
32
|
from ccxt.base.errors import RequestTimeout
|
33
33
|
from ccxt.base.decimal_to_precision import TRUNCATE
|
34
|
-
from ccxt.base.decimal_to_precision import
|
34
|
+
from ccxt.base.decimal_to_precision import TICK_SIZE
|
35
35
|
from ccxt.base.precise import Precise
|
36
36
|
|
37
37
|
|
@@ -234,7 +234,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
234
234
|
'maker': self.parse_number('0.0075'), # 0.1% trading fee, zero fees for all trading pairs before November 1
|
235
235
|
},
|
236
236
|
},
|
237
|
-
'precisionMode':
|
237
|
+
'precisionMode': TICK_SIZE,
|
238
238
|
'options': {
|
239
239
|
# 'fetchTradesMethod': 'binanceGetTrades', # binanceGetTrades, binanceGetAggTrades
|
240
240
|
'createMarketBuyOrderRequiresPrice': True,
|
@@ -734,10 +734,10 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
734
734
|
'strike': None,
|
735
735
|
'optionType': None,
|
736
736
|
'precision': {
|
737
|
-
'amount': self.
|
738
|
-
'price': self.
|
739
|
-
'base': self.
|
740
|
-
'quote': self.
|
737
|
+
'amount': self.parse_number(self.parse_precision(self.safe_string(market, 'quantityPrecision'))),
|
738
|
+
'price': self.parse_number(self.parse_precision(self.safe_string(market, 'pricePrecision'))),
|
739
|
+
'base': self.parse_number(self.parse_precision(self.safe_string(market, 'baseAssetPrecision'))),
|
740
|
+
'quote': self.parse_number(self.parse_precision(self.safe_string(market, 'quotePrecision'))),
|
741
741
|
},
|
742
742
|
'limits': {
|
743
743
|
'leverage': {
|
@@ -762,8 +762,7 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
762
762
|
}
|
763
763
|
if 'PRICE_FILTER' in filtersByType:
|
764
764
|
filter = self.safe_value(filtersByType, 'PRICE_FILTER', {})
|
765
|
-
|
766
|
-
entry['precision']['price'] = self.precision_from_string(tickSize)
|
765
|
+
entry['precision']['price'] = self.safe_number(filter, 'tickSize')
|
767
766
|
# PRICE_FILTER reports zero values for maxPrice
|
768
767
|
# since they updated filter types in November 2018
|
769
768
|
# https://github.com/ccxt/ccxt/issues/4286
|
@@ -772,11 +771,10 @@ class tokocrypto(Exchange, ImplicitAPI):
|
|
772
771
|
'min': self.safe_number(filter, 'minPrice'),
|
773
772
|
'max': self.safe_number(filter, 'maxPrice'),
|
774
773
|
}
|
775
|
-
entry['precision']['price'] =
|
774
|
+
entry['precision']['price'] = filter['tickSize']
|
776
775
|
if 'LOT_SIZE' in filtersByType:
|
777
776
|
filter = self.safe_value(filtersByType, 'LOT_SIZE', {})
|
778
|
-
|
779
|
-
entry['precision']['amount'] = self.precision_from_string(stepSize)
|
777
|
+
entry['precision']['amount'] = self.safe_number(filter, 'stepSize')
|
780
778
|
entry['limits']['amount'] = {
|
781
779
|
'min': self.safe_number(filter, 'minQty'),
|
782
780
|
'max': self.safe_number(filter, 'maxQty'),
|
ccxt/wavesexchange.py
CHANGED