ccxt 4.3.68__py2.py3-none-any.whl → 4.3.70__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/coinbaseinternational.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +2 -2
- ccxt/async_support/bingx.py +129 -73
- ccxt/async_support/bitget.py +2 -2
- ccxt/async_support/bitmart.py +2 -2
- ccxt/async_support/bitrue.py +2 -2
- ccxt/async_support/blofin.py +63 -6
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/bybit.py +3 -3
- ccxt/async_support/coinbaseinternational.py +227 -3
- ccxt/async_support/coinex.py +2 -2
- ccxt/async_support/coinlist.py +2 -2
- ccxt/async_support/cryptocom.py +12 -1
- ccxt/async_support/deribit.py +2 -2
- ccxt/async_support/digifinex.py +2 -2
- ccxt/async_support/hyperliquid.py +0 -2
- ccxt/async_support/kucoin.py +11 -5
- ccxt/async_support/latoken.py +2 -2
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/okx.py +2 -2
- ccxt/async_support/oxfun.py +1 -1
- ccxt/async_support/phemex.py +2 -2
- ccxt/async_support/poloniex.py +34 -33
- ccxt/async_support/poloniexfutures.py +26 -26
- ccxt/async_support/woo.py +2 -2
- ccxt/base/exchange.py +334 -117
- ccxt/base/types.py +21 -3
- ccxt/binance.py +2 -2
- ccxt/bingx.py +129 -73
- ccxt/bitget.py +2 -2
- ccxt/bitmart.py +2 -2
- ccxt/bitrue.py +2 -2
- ccxt/blofin.py +63 -6
- ccxt/btcbox.py +1 -1
- ccxt/bybit.py +3 -3
- ccxt/coinbaseinternational.py +227 -3
- ccxt/coinex.py +2 -2
- ccxt/coinlist.py +2 -2
- ccxt/cryptocom.py +12 -1
- ccxt/deribit.py +2 -2
- ccxt/digifinex.py +2 -2
- ccxt/hyperliquid.py +0 -2
- ccxt/kucoin.py +11 -5
- ccxt/latoken.py +2 -2
- ccxt/mexc.py +2 -2
- ccxt/okx.py +2 -2
- ccxt/oxfun.py +1 -1
- ccxt/phemex.py +2 -2
- ccxt/poloniex.py +34 -33
- ccxt/poloniexfutures.py +26 -26
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/blofin.py +608 -0
- ccxt/pro/coinbaseinternational.py +142 -11
- ccxt/pro/cryptocom.py +4 -1
- ccxt/pro/hitbtc.py +20 -8
- ccxt/pro/okx.py +6 -0
- ccxt/pro/poloniex.py +45 -23
- ccxt/pro/poloniexfutures.py +5 -5
- ccxt/pro/woo.py +5 -4
- ccxt/woo.py +2 -2
- {ccxt-4.3.68.dist-info → ccxt-4.3.70.dist-info}/METADATA +7 -7
- {ccxt-4.3.68.dist-info → ccxt-4.3.70.dist-info}/RECORD +68 -67
- {ccxt-4.3.68.dist-info → ccxt-4.3.70.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.68.dist-info → ccxt-4.3.70.dist-info}/WHEEL +0 -0
- {ccxt-4.3.68.dist-info → ccxt-4.3.70.dist-info}/top_level.txt +0 -0
@@ -74,7 +74,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
74
74
|
'fetchCrossBorrowRates': False,
|
75
75
|
'fetchCurrencies': True,
|
76
76
|
'fetchDeposits': True,
|
77
|
-
'fetchFundingHistory':
|
77
|
+
'fetchFundingHistory': True,
|
78
78
|
'fetchFundingRate': False,
|
79
79
|
'fetchFundingRateHistory': True,
|
80
80
|
'fetchFundingRates': False,
|
@@ -92,7 +92,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
92
92
|
'fetchMyBuys': True,
|
93
93
|
'fetchMySells': True,
|
94
94
|
'fetchMyTrades': True,
|
95
|
-
'fetchOHLCV':
|
95
|
+
'fetchOHLCV': True,
|
96
96
|
'fetchOpenInterestHistory': False,
|
97
97
|
'fetchOpenOrders': True,
|
98
98
|
'fetchOrder': True,
|
@@ -111,6 +111,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
111
111
|
'fetchTrades': False,
|
112
112
|
'fetchTradingFee': False,
|
113
113
|
'fetchTradingFees': False,
|
114
|
+
'fetchTransfers': True,
|
114
115
|
'fetchWithdrawals': True,
|
115
116
|
'reduceMargin': False,
|
116
117
|
'sandbox': True,
|
@@ -153,7 +154,7 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
153
154
|
'instruments/{instrument}',
|
154
155
|
'instruments/{instrument}/quote',
|
155
156
|
'instruments/{instrument}/funding',
|
156
|
-
'',
|
157
|
+
'instruments/{instrument}/candles',
|
157
158
|
],
|
158
159
|
},
|
159
160
|
'private': {
|
@@ -351,6 +352,75 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
351
352
|
'info': account,
|
352
353
|
}
|
353
354
|
|
355
|
+
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = 100, params={}) -> List[list]:
|
356
|
+
"""
|
357
|
+
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
358
|
+
:see: https://docs.cdp.coinbase.com/intx/reference/getinstrumentcandles
|
359
|
+
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
360
|
+
:param str timeframe: the length of time each candle represents
|
361
|
+
:param int [since]: timestamp in ms of the earliest candle to fetch
|
362
|
+
:param int [limit]: the maximum amount of candles to fetch, default 100 max 10000
|
363
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
364
|
+
:returns int[][]: A list of candles ordered, open, high, low, close, volume
|
365
|
+
:param int [params.until]: timestamp in ms of the latest candle to fetch
|
366
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
367
|
+
"""
|
368
|
+
await self.load_markets()
|
369
|
+
paginate = False
|
370
|
+
paginate, params = self.handle_option_and_params(params, 'fetchOHLCV', 'paginate')
|
371
|
+
if paginate:
|
372
|
+
return await self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 10000)
|
373
|
+
market = self.market(symbol)
|
374
|
+
request: dict = {
|
375
|
+
'instrument': market['id'],
|
376
|
+
'granularity': self.safe_string(self.timeframes, timeframe, timeframe),
|
377
|
+
}
|
378
|
+
if since is not None:
|
379
|
+
request['start'] = self.iso8601(since)
|
380
|
+
else:
|
381
|
+
raise ArgumentsRequired(self.id + ' fetchOHLCV() requires a since argument')
|
382
|
+
unitl = self.safe_integer(params, 'until')
|
383
|
+
if unitl is not None:
|
384
|
+
params = self.omit(params, 'until')
|
385
|
+
request['end'] = self.iso8601(unitl)
|
386
|
+
response = await self.v1PublicGetInstrumentsInstrumentCandles(self.extend(request, params))
|
387
|
+
#
|
388
|
+
# {
|
389
|
+
# "aggregations": [
|
390
|
+
# {
|
391
|
+
# "start": "2024-04-23T00:00:00Z",
|
392
|
+
# "open": "62884.4",
|
393
|
+
# "high": "64710.6",
|
394
|
+
# "low": "62884.4",
|
395
|
+
# "close": "63508.4",
|
396
|
+
# "volume": "3253.9983"
|
397
|
+
# }
|
398
|
+
# ]
|
399
|
+
# }
|
400
|
+
#
|
401
|
+
candles = self.safe_list(response, 'aggregations', [])
|
402
|
+
return self.parse_ohlcvs(candles, market, timeframe, since, limit)
|
403
|
+
|
404
|
+
def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
|
405
|
+
#
|
406
|
+
# {
|
407
|
+
# "start": "2024-04-23T00:00:00Z",
|
408
|
+
# "open": "62884.4",
|
409
|
+
# "high": "64710.6",
|
410
|
+
# "low": "62884.4",
|
411
|
+
# "close": "63508.4",
|
412
|
+
# "volume": "3253.9983"
|
413
|
+
# }
|
414
|
+
#
|
415
|
+
return [
|
416
|
+
self.parse8601(self.safe_string_2(ohlcv, 'start', 'time')),
|
417
|
+
self.safe_number(ohlcv, 'open'),
|
418
|
+
self.safe_number(ohlcv, 'high'),
|
419
|
+
self.safe_number(ohlcv, 'low'),
|
420
|
+
self.safe_number(ohlcv, 'close'),
|
421
|
+
self.safe_number(ohlcv, 'volume'),
|
422
|
+
]
|
423
|
+
|
354
424
|
async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
355
425
|
"""
|
356
426
|
fetches historical funding rate prices
|
@@ -433,6 +503,160 @@ class coinbaseinternational(Exchange, ImplicitAPI):
|
|
433
503
|
'previousFundingDatetime': None,
|
434
504
|
}
|
435
505
|
|
506
|
+
async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
507
|
+
"""
|
508
|
+
fetch the history of funding payments paid and received on self account
|
509
|
+
:see: https://docs.cdp.coinbase.com/intx/reference/gettransfers
|
510
|
+
:param str [symbol]: unified market symbol
|
511
|
+
:param int [since]: the earliest time in ms to fetch funding history for
|
512
|
+
:param int [limit]: the maximum number of funding history structures to retrieve
|
513
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
514
|
+
:returns dict: a `funding history structure <https://docs.ccxt.com/#/?id=funding-history-structure>`
|
515
|
+
"""
|
516
|
+
await self.load_markets()
|
517
|
+
request: dict = {
|
518
|
+
'type': 'FUNDING',
|
519
|
+
}
|
520
|
+
market: Market = None
|
521
|
+
if symbol is not None:
|
522
|
+
market = self.market(symbol)
|
523
|
+
portfolios = None
|
524
|
+
portfolios, params = self.handle_option_and_params(params, 'fetchFundingHistory', 'portfolios')
|
525
|
+
if portfolios is not None:
|
526
|
+
request['portfolios'] = portfolios
|
527
|
+
if since is not None:
|
528
|
+
request['time_from'] = self.iso8601(since)
|
529
|
+
if limit is not None:
|
530
|
+
request['result_limit'] = limit
|
531
|
+
else:
|
532
|
+
request['result_limit'] = 100
|
533
|
+
response = await self.v1PrivateGetTransfers(self.extend(request, params))
|
534
|
+
fundings = self.safe_list(response, 'results', [])
|
535
|
+
return self.parse_incomes(fundings, market, since, limit)
|
536
|
+
|
537
|
+
def parse_income(self, income, market: Market = None):
|
538
|
+
#
|
539
|
+
# {
|
540
|
+
# "amount":"0.0008",
|
541
|
+
# "asset":"USDC",
|
542
|
+
# "created_at":"2024-02-22T16:00:00Z",
|
543
|
+
# "from_portfolio":{
|
544
|
+
# "id":"13yuk1fs-1-0",
|
545
|
+
# "name":"Eng Test Portfolio - 2",
|
546
|
+
# "uuid":"018712f2-5ff9-7de3-9010-xxxxxxxxx"
|
547
|
+
# },
|
548
|
+
# "instrument_id":"149264164756389888",
|
549
|
+
# "instrument_symbol":"ETH-PERP",
|
550
|
+
# "position_id":"1xy4v51m-1-2",
|
551
|
+
# "status":"PROCESSED",
|
552
|
+
# "to_portfolio":{
|
553
|
+
# "name":"CB_FUND"
|
554
|
+
# },
|
555
|
+
# "transfer_type":"FUNDING",
|
556
|
+
# "transfer_uuid":"a6b708df-2c44-32c5-bb98-xxxxxxxxxx",
|
557
|
+
# "updated_at":"2024-02-22T16:00:00Z"
|
558
|
+
# }
|
559
|
+
#
|
560
|
+
marketId = self.safe_string(income, 'symbol')
|
561
|
+
market = self.safe_market(marketId, market, None, 'contract')
|
562
|
+
datetime = self.safe_integer(income, 'created_at')
|
563
|
+
timestamp = self.parse8601(datetime)
|
564
|
+
currencyId = self.safe_string(income, 'asset')
|
565
|
+
code = self.safe_currency_code(currencyId)
|
566
|
+
return {
|
567
|
+
'info': income,
|
568
|
+
'symbol': market['symbol'],
|
569
|
+
'code': code,
|
570
|
+
'timestamp': timestamp,
|
571
|
+
'datetime': self.iso8601(timestamp),
|
572
|
+
'id': self.safe_string(income, 'transfer_uuid'),
|
573
|
+
'amount': self.safe_number(income, 'amount'),
|
574
|
+
'rate': None,
|
575
|
+
}
|
576
|
+
|
577
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
578
|
+
"""
|
579
|
+
fetch a history of internal transfers made on an account
|
580
|
+
:see: https://docs.cdp.coinbase.com/intx/reference/gettransfers
|
581
|
+
:param str code: unified currency code of the currency transferred
|
582
|
+
:param int [since]: the earliest time in ms to fetch transfers for
|
583
|
+
:param int [limit]: the maximum number of transfers structures to retrieve
|
584
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
585
|
+
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
586
|
+
"""
|
587
|
+
await self.load_markets()
|
588
|
+
request: dict = {
|
589
|
+
'type': 'INTERNAL',
|
590
|
+
}
|
591
|
+
currency = None
|
592
|
+
if code is not None:
|
593
|
+
currency = self.currency(code)
|
594
|
+
portfolios = None
|
595
|
+
portfolios, params = self.handle_option_and_params(params, 'fetchTransfers', 'portfolios')
|
596
|
+
if portfolios is not None:
|
597
|
+
request['portfolios'] = portfolios
|
598
|
+
if since is not None:
|
599
|
+
request['time_from'] = self.iso8601(since)
|
600
|
+
if limit is not None:
|
601
|
+
request['result_limit'] = limit
|
602
|
+
else:
|
603
|
+
request['result_limit'] = 100
|
604
|
+
response = await self.v1PrivateGetTransfers(self.extend(request, params))
|
605
|
+
transfers = self.safe_list(response, 'results', [])
|
606
|
+
return self.parse_transfers(transfers, currency, since, limit)
|
607
|
+
|
608
|
+
def parse_transfer(self, transfer: dict, currency: Currency = None) -> TransferEntry:
|
609
|
+
#
|
610
|
+
# {
|
611
|
+
# "amount":"0.0008",
|
612
|
+
# "asset":"USDC",
|
613
|
+
# "created_at":"2024-02-22T16:00:00Z",
|
614
|
+
# "from_portfolio":{
|
615
|
+
# "id":"13yuk1fs-1-0",
|
616
|
+
# "name":"Eng Test Portfolio - 2",
|
617
|
+
# "uuid":"018712f2-5ff9-7de3-9010-xxxxxxxxx"
|
618
|
+
# },
|
619
|
+
# "instrument_id":"149264164756389888",
|
620
|
+
# "instrument_symbol":"ETH-PERP",
|
621
|
+
# "position_id":"1xy4v51m-1-2",
|
622
|
+
# "status":"PROCESSED",
|
623
|
+
# "to_portfolio":{
|
624
|
+
# "name":"CB_FUND"
|
625
|
+
# },
|
626
|
+
# "transfer_type":"FUNDING",
|
627
|
+
# "transfer_uuid":"a6b708df-2c44-32c5-bb98-xxxxxxxxxx",
|
628
|
+
# "updated_at":"2024-02-22T16:00:00Z"
|
629
|
+
# }
|
630
|
+
#
|
631
|
+
datetime = self.safe_integer(transfer, 'created_at')
|
632
|
+
timestamp = self.parse8601(datetime)
|
633
|
+
currencyId = self.safe_string(transfer, 'asset')
|
634
|
+
code = self.safe_currency_code(currencyId)
|
635
|
+
fromPorfolio = self.safe_dict(transfer, 'from_portfolio', {})
|
636
|
+
fromId = self.safe_string(fromPorfolio, 'id')
|
637
|
+
toPorfolio = self.safe_dict(transfer, 'to_portfolio', {})
|
638
|
+
toId = self.safe_string(toPorfolio, 'id')
|
639
|
+
return {
|
640
|
+
'info': transfer,
|
641
|
+
'id': self.safe_string(transfer, 'transfer_uuid'),
|
642
|
+
'timestamp': timestamp,
|
643
|
+
'datetime': self.iso8601(timestamp),
|
644
|
+
'currency': code,
|
645
|
+
'amount': self.safe_number(transfer, 'amount'),
|
646
|
+
'fromAccount': fromId,
|
647
|
+
'toAccount': toId,
|
648
|
+
'status': self.parse_transfer_status(self.safe_string(transfer, 'status')),
|
649
|
+
}
|
650
|
+
|
651
|
+
def parse_transfer_status(self, status: Str) -> Str:
|
652
|
+
statuses: dict = {
|
653
|
+
'FAILED': 'failed',
|
654
|
+
'PROCESSED': 'ok',
|
655
|
+
'NEW': 'pending',
|
656
|
+
'STARTED': 'pending',
|
657
|
+
}
|
658
|
+
return self.safe_string(statuses, status, status)
|
659
|
+
|
436
660
|
async def create_deposit_address(self, code: str, params={}):
|
437
661
|
"""
|
438
662
|
create a currency deposit address
|
ccxt/async_support/coinex.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinex import ImplicitAPI
|
8
8
|
import asyncio
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, IsolatedBorrowRate, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -4680,7 +4680,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
4680
4680
|
'status': self.parse_transfer_status(self.safe_string_2(transfer, 'code', 'status')),
|
4681
4681
|
}
|
4682
4682
|
|
4683
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
4683
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
4684
4684
|
"""
|
4685
4685
|
fetch a history of internal transfers made on an account
|
4686
4686
|
:see: https://docs.coinex.com/api/v2/assets/transfer/http/list-transfer-history
|
ccxt/async_support/coinlist.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.coinlist import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -1703,7 +1703,7 @@ class coinlist(Exchange, ImplicitAPI):
|
|
1703
1703
|
transfer = self.parse_transfer(response, currency)
|
1704
1704
|
return transfer
|
1705
1705
|
|
1706
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
1706
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
1707
1707
|
"""
|
1708
1708
|
fetch a history of internal transfers between CoinList.co and CoinList Pro. It does not return external deposits or withdrawals
|
1709
1709
|
:see: https://trade-docs.coinlist.co/?javascript--nodejs#list-transfers
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -17,10 +17,13 @@ from ccxt.base.errors import BadRequest
|
|
17
17
|
from ccxt.base.errors import BadSymbol
|
18
18
|
from ccxt.base.errors import InsufficientFunds
|
19
19
|
from ccxt.base.errors import InvalidOrder
|
20
|
+
from ccxt.base.errors import OrderNotFound
|
20
21
|
from ccxt.base.errors import NotSupported
|
21
22
|
from ccxt.base.errors import DDoSProtection
|
23
|
+
from ccxt.base.errors import RateLimitExceeded
|
22
24
|
from ccxt.base.errors import OnMaintenance
|
23
25
|
from ccxt.base.errors import InvalidNonce
|
26
|
+
from ccxt.base.errors import RequestTimeout
|
24
27
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
25
28
|
from ccxt.base.precise import Precise
|
26
29
|
|
@@ -401,7 +404,15 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
401
404
|
'40006': BadRequest,
|
402
405
|
'40007': BadRequest,
|
403
406
|
'40101': AuthenticationError,
|
404
|
-
'
|
407
|
+
'40102': InvalidNonce, # Nonce value differs by more than 60 seconds from server
|
408
|
+
'40103': AuthenticationError, # IP address not whitelisted
|
409
|
+
'40104': AuthenticationError, # Disallowed based on user tier
|
410
|
+
'40107': BadRequest, # Session subscription limit has been exceeded
|
411
|
+
'40401': OrderNotFound,
|
412
|
+
'40801': RequestTimeout,
|
413
|
+
'42901': RateLimitExceeded,
|
414
|
+
'43005': InvalidOrder, # Rejected POST_ONLY create-order request(normally happened when exec_inst contains POST_ONLY but time_in_force is NOT GOOD_TILL_CANCEL)
|
415
|
+
'50001': ExchangeError,
|
405
416
|
'9010001': OnMaintenance, # {"code":9010001,"message":"SYSTEM_MAINTENANCE","details":"Crypto.com Exchange is currently under maintenance. Please refer to https://status.crypto.com for more details."}
|
406
417
|
},
|
407
418
|
'broad': {},
|
ccxt/async_support/deribit.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.deribit import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, Greeks, Int, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -2618,7 +2618,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
2618
2618
|
})
|
2619
2619
|
return result
|
2620
2620
|
|
2621
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
2621
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
2622
2622
|
"""
|
2623
2623
|
fetch a history of internal transfers made on an account
|
2624
2624
|
:see: https://docs.deribit.com/#private-get_transfers
|
ccxt/async_support/digifinex.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.digifinex import ImplicitAPI
|
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
|
+
from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import AuthenticationError
|
@@ -3462,7 +3462,7 @@ class digifinex(Exchange, ImplicitAPI):
|
|
3462
3462
|
# }
|
3463
3463
|
#
|
3464
3464
|
|
3465
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
3465
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
3466
3466
|
"""
|
3467
3467
|
fetch the transfer history, only transfers between spot and swap accounts are supported
|
3468
3468
|
:see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#transferrecord
|
@@ -817,8 +817,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
817
817
|
until = self.safe_integer(params, 'until', self.milliseconds())
|
818
818
|
if since is None:
|
819
819
|
since = 0
|
820
|
-
if limit is None:
|
821
|
-
limit = 500
|
822
820
|
params = self.omit(params, ['until'])
|
823
821
|
request: dict = {
|
824
822
|
'type': 'candleSnapshot',
|
ccxt/async_support/kucoin.py
CHANGED
@@ -1514,20 +1514,26 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1514
1514
|
},
|
1515
1515
|
'networks': {},
|
1516
1516
|
}
|
1517
|
-
isWithdrawEnabled = self.safe_bool(fee, 'isWithdrawEnabled')
|
1517
|
+
isWithdrawEnabled = self.safe_bool(fee, 'isWithdrawEnabled', True)
|
1518
|
+
minFee = None
|
1518
1519
|
if isWithdrawEnabled:
|
1519
|
-
result['withdraw']['fee'] = self.safe_number_2(fee, 'withdrawalMinFee', 'withdrawMinFee')
|
1520
1520
|
result['withdraw']['percentage'] = False
|
1521
|
-
|
1522
|
-
|
1521
|
+
chains = self.safe_list(fee, 'chains', [])
|
1522
|
+
for i in range(0, len(chains)):
|
1523
|
+
chain = chains[i]
|
1524
|
+
networkId = self.safe_string(chain, 'chainId')
|
1523
1525
|
networkCode = self.network_id_to_code(networkId, self.safe_string(currency, 'code'))
|
1526
|
+
withdrawFee = self.safe_string(chain, 'withdrawalMinFee')
|
1527
|
+
if minFee is None or (Precise.string_lt(withdrawFee, minFee)):
|
1528
|
+
minFee = withdrawFee
|
1524
1529
|
result['networks'][networkCode] = {
|
1525
|
-
'withdraw':
|
1530
|
+
'withdraw': self.parse_number(withdrawFee),
|
1526
1531
|
'deposit': {
|
1527
1532
|
'fee': None,
|
1528
1533
|
'percentage': None,
|
1529
1534
|
},
|
1530
1535
|
}
|
1536
|
+
result['withdraw']['fee'] = self.parse_number(minFee)
|
1531
1537
|
return result
|
1532
1538
|
|
1533
1539
|
def is_futures_method(self, methodName, params):
|
ccxt/async_support/latoken.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.latoken import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -1476,7 +1476,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1476
1476
|
}
|
1477
1477
|
return self.safe_string(types, type, type)
|
1478
1478
|
|
1479
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
1479
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
1480
1480
|
"""
|
1481
1481
|
fetch a history of internal transfers made on an account
|
1482
1482
|
:see: https://api.latoken.com/doc/v2/#tag/Transfer/operation/getUsersTransfers
|
ccxt/async_support/mexc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.mexc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
9
|
+
from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -4690,7 +4690,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4690
4690
|
raise BadRequest(self.id + ' fetchTransfer() is not supported for ' + marketType)
|
4691
4691
|
return None
|
4692
4692
|
|
4693
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
4693
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
4694
4694
|
"""
|
4695
4695
|
fetch a history of internal transfers made on an account
|
4696
4696
|
:param str code: unified currency code of the currency transferred
|
ccxt/async_support/okx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, Leverage, LeverageTier, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Account, Balances, Conversion, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Greeks, Int, Leverage, LeverageTier, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from typing import Any
|
13
13
|
from ccxt.base.errors import ExchangeError
|
@@ -5524,7 +5524,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5524
5524
|
transfer = self.safe_dict(data, 0)
|
5525
5525
|
return self.parse_transfer(transfer)
|
5526
5526
|
|
5527
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
5527
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
5528
5528
|
"""
|
5529
5529
|
fetch a history of internal transfers made on an account
|
5530
5530
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-get-bills-details-last-3-months
|
ccxt/async_support/oxfun.py
CHANGED
@@ -1969,7 +1969,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
1969
1969
|
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
|
1970
1970
|
"""
|
1971
1971
|
make a withdrawal
|
1972
|
-
:see: https://docs.
|
1972
|
+
:see: https://docs.ox.fun/?json#post-v3-withdrawal
|
1973
1973
|
:param str code: unified currency code
|
1974
1974
|
:param float amount: the amount to withdraw
|
1975
1975
|
:param str address: the address to withdraw to
|
ccxt/async_support/phemex.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.phemex import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import numbers
|
10
|
-
from ccxt.base.types import Balances, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
10
|
+
from ccxt.base.types import Balances, Currencies, Currency, Int, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import AuthenticationError
|
@@ -4233,7 +4233,7 @@ class phemex(Exchange, ImplicitAPI):
|
|
4233
4233
|
transfer['currency'] = code
|
4234
4234
|
return transfer
|
4235
4235
|
|
4236
|
-
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) ->
|
4236
|
+
async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[TransferEntry]:
|
4237
4237
|
"""
|
4238
4238
|
fetch a history of internal transfers made on an account
|
4239
4239
|
:param str code: unified currency code of the currency transferred
|