ccxt 4.4.3__py2.py3-none-any.whl → 4.4.4__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.
Files changed (79) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/async_support/__init__.py +1 -1
  3. ccxt/async_support/base/exchange.py +24 -13
  4. ccxt/async_support/base/ws/cache.py +1 -0
  5. ccxt/async_support/binance.py +40 -15
  6. ccxt/async_support/bingx.py +1 -0
  7. ccxt/async_support/bitfinex2.py +10 -9
  8. ccxt/async_support/bitget.py +13 -9
  9. ccxt/async_support/bitmex.py +14 -13
  10. ccxt/async_support/bitso.py +8 -7
  11. ccxt/async_support/bitstamp.py +12 -12
  12. ccxt/async_support/blofin.py +24 -26
  13. ccxt/async_support/bybit.py +24 -23
  14. ccxt/async_support/coinbase.py +31 -10
  15. ccxt/async_support/coinbaseexchange.py +14 -14
  16. ccxt/async_support/coinlist.py +9 -8
  17. ccxt/async_support/coinmetro.py +6 -6
  18. ccxt/async_support/cryptocom.py +10 -8
  19. ccxt/async_support/currencycom.py +9 -9
  20. ccxt/async_support/delta.py +8 -8
  21. ccxt/async_support/digifinex.py +11 -9
  22. ccxt/async_support/gate.py +9 -8
  23. ccxt/async_support/hashkey.py +12 -10
  24. ccxt/async_support/htx.py +16 -19
  25. ccxt/async_support/hyperliquid.py +70 -117
  26. ccxt/async_support/kraken.py +12 -10
  27. ccxt/async_support/kucoin.py +12 -11
  28. ccxt/async_support/luno.py +13 -12
  29. ccxt/async_support/mexc.py +34 -2
  30. ccxt/async_support/ndax.py +9 -8
  31. ccxt/async_support/okcoin.py +21 -30
  32. ccxt/async_support/okx.py +21 -29
  33. ccxt/async_support/woo.py +10 -9
  34. ccxt/async_support/woofipro.py +11 -9
  35. ccxt/async_support/xt.py +7 -6
  36. ccxt/async_support/zonda.py +9 -8
  37. ccxt/base/exchange.py +3 -1
  38. ccxt/binance.py +40 -15
  39. ccxt/bingx.py +1 -0
  40. ccxt/bitfinex2.py +10 -9
  41. ccxt/bitget.py +13 -9
  42. ccxt/bitmex.py +14 -13
  43. ccxt/bitso.py +8 -7
  44. ccxt/bitstamp.py +12 -12
  45. ccxt/blofin.py +24 -26
  46. ccxt/bybit.py +24 -23
  47. ccxt/coinbase.py +31 -10
  48. ccxt/coinbaseexchange.py +14 -14
  49. ccxt/coinlist.py +9 -8
  50. ccxt/coinmetro.py +6 -6
  51. ccxt/cryptocom.py +10 -8
  52. ccxt/currencycom.py +9 -9
  53. ccxt/delta.py +8 -8
  54. ccxt/digifinex.py +11 -9
  55. ccxt/gate.py +9 -8
  56. ccxt/hashkey.py +12 -10
  57. ccxt/htx.py +16 -19
  58. ccxt/hyperliquid.py +70 -117
  59. ccxt/kraken.py +12 -10
  60. ccxt/kucoin.py +12 -11
  61. ccxt/luno.py +13 -12
  62. ccxt/mexc.py +33 -2
  63. ccxt/ndax.py +9 -8
  64. ccxt/okcoin.py +21 -30
  65. ccxt/okx.py +21 -29
  66. ccxt/pro/__init__.py +1 -1
  67. ccxt/pro/bybit.py +51 -0
  68. ccxt/pro/mexc.py +78 -0
  69. ccxt/test/tests_async.py +1 -1
  70. ccxt/test/tests_sync.py +1 -1
  71. ccxt/woo.py +10 -9
  72. ccxt/woofipro.py +11 -9
  73. ccxt/xt.py +7 -6
  74. ccxt/zonda.py +9 -8
  75. {ccxt-4.4.3.dist-info → ccxt-4.4.4.dist-info}/METADATA +5 -5
  76. {ccxt-4.4.3.dist-info → ccxt-4.4.4.dist-info}/RECORD +79 -79
  77. {ccxt-4.4.3.dist-info → ccxt-4.4.4.dist-info}/LICENSE.txt +0 -0
  78. {ccxt-4.4.3.dist-info → ccxt-4.4.4.dist-info}/WHEEL +0 -0
  79. {ccxt-4.4.3.dist-info → ccxt-4.4.4.dist-info}/top_level.txt +0 -0
ccxt/delta.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currencies, Currency, Greeks, Int, LedgerEntry, Leverage, MarginMode, MarginModification, Market, MarketInterface, Num, Option, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -2104,13 +2104,13 @@ class delta(Exchange, ImplicitAPI):
2104
2104
  result = self.safe_list(response, 'result', [])
2105
2105
  return self.parse_trades(result, market, since, limit)
2106
2106
 
2107
- def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2107
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
2108
2108
  """
2109
- fetch the history of changes, actions done by the user or operations that altered balance of the user
2109
+ fetch the history of changes, actions done by the user or operations that altered the balance of the user
2110
2110
  :see: https://docs.delta.exchange/#get-wallet-transactions
2111
- :param str code: unified currency code, default is None
2111
+ :param str [code]: unified currency code, default is None
2112
2112
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2113
- :param int [limit]: max number of ledger entrys to return, default is None
2113
+ :param int [limit]: max number of ledger entries to return, default is None
2114
2114
  :param dict [params]: extra parameters specific to the exchange API endpoint
2115
2115
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2116
2116
  """
@@ -2168,7 +2168,7 @@ class delta(Exchange, ImplicitAPI):
2168
2168
  }
2169
2169
  return self.safe_string(types, type, type)
2170
2170
 
2171
- def parse_ledger_entry(self, item: dict, currency: Currency = None):
2171
+ def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
2172
2172
  #
2173
2173
  # {
2174
2174
  # "amount":"29.889184",
@@ -2205,7 +2205,7 @@ class delta(Exchange, ImplicitAPI):
2205
2205
  after = self.safe_string(item, 'balance')
2206
2206
  before = Precise.string_max('0', Precise.string_sub(after, amount))
2207
2207
  status = 'ok'
2208
- return {
2208
+ return self.safe_ledger_entry({
2209
2209
  'info': item,
2210
2210
  'id': id,
2211
2211
  'direction': direction,
@@ -2221,7 +2221,7 @@ class delta(Exchange, ImplicitAPI):
2221
2221
  'timestamp': timestamp,
2222
2222
  'datetime': self.iso8601(timestamp),
2223
2223
  'fee': None,
2224
- }
2224
+ }, currency)
2225
2225
 
2226
2226
  def fetch_deposit_address(self, code: str, params={}):
2227
2227
  """
ccxt/digifinex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.digifinex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- 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
10
+ from ccxt.base.types import Balances, CrossBorrowRate, CrossBorrowRates, Currencies, Currency, Int, LedgerEntry, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import AuthenticationError
@@ -2383,7 +2383,7 @@ class digifinex(Exchange, ImplicitAPI):
2383
2383
  types: dict = {}
2384
2384
  return self.safe_string(types, type, type)
2385
2385
 
2386
- def parse_ledger_entry(self, item: dict, currency: Currency = None):
2386
+ def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
2387
2387
  #
2388
2388
  # spot and margin
2389
2389
  #
@@ -2405,13 +2405,15 @@ class digifinex(Exchange, ImplicitAPI):
2405
2405
  # }
2406
2406
  #
2407
2407
  type = self.parse_ledger_entry_type(self.safe_string_2(item, 'type', 'finance_type'))
2408
- code = self.safe_currency_code(self.safe_string_2(item, 'currency_mark', 'currency'), currency)
2408
+ currencyId = self.safe_string_2(item, 'currency_mark', 'currency')
2409
+ code = self.safe_currency_code(currencyId, currency)
2410
+ currency = self.safe_currency(currencyId, currency)
2409
2411
  amount = self.safe_number_2(item, 'num', 'change')
2410
2412
  after = self.safe_number(item, 'balance')
2411
2413
  timestamp = self.safe_timestamp(item, 'time')
2412
2414
  if timestamp is None:
2413
2415
  timestamp = self.safe_integer(item, 'timestamp')
2414
- return {
2416
+ return self.safe_ledger_entry({
2415
2417
  'info': item,
2416
2418
  'id': None,
2417
2419
  'direction': None,
@@ -2427,16 +2429,16 @@ class digifinex(Exchange, ImplicitAPI):
2427
2429
  'timestamp': timestamp,
2428
2430
  'datetime': self.iso8601(timestamp),
2429
2431
  'fee': None,
2430
- }
2432
+ }, currency)
2431
2433
 
2432
- def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2434
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
2433
2435
  """
2434
- fetch the history of changes, actions done by the user or operations that altered balance of the user
2436
+ fetch the history of changes, actions done by the user or operations that altered the balance of the user
2435
2437
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#spot-margin-otc-financial-logs
2436
2438
  :see: https://docs.digifinex.com/en-ww/swap/v2/rest.html#bills
2437
- :param str code: unified currency code, default is None
2439
+ :param str [code]: unified currency code, default is None
2438
2440
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2439
- :param int [limit]: max number of ledger entrys to return, default is None
2441
+ :param int [limit]: max number of ledger entries to return, default is None
2440
2442
  :param dict [params]: extra parameters specific to the exchange API endpoint
2441
2443
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
2442
2444
  """
ccxt/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Balances, Currencies, Currency, FundingHistory, Greeks, Int, LedgerEntry, Leverage, Leverages, LeverageTier, LeverageTiers, MarginModification, Market, MarketInterface, Num, Option, OptionChain, Order, OrderBook, OrderRequest, CancellationRequest, 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
@@ -6138,7 +6138,7 @@ class gate(Exchange, ImplicitAPI):
6138
6138
  result.append(self.parse_settlement(settlements[i], market))
6139
6139
  return result
6140
6140
 
6141
- def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
6141
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
6142
6142
  """
6143
6143
  fetch the history of changes, actions done by the user or operations that altered the balance of the user
6144
6144
  :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book
@@ -6146,12 +6146,12 @@ class gate(Exchange, ImplicitAPI):
6146
6146
  :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-2
6147
6147
  :see: https://www.gate.io/docs/developers/apiv4/en/#query-account-book-3
6148
6148
  :see: https://www.gate.io/docs/developers/apiv4/en/#list-account-changing-history
6149
- :param str code: unified currency code
6149
+ :param str [code]: unified currency code
6150
6150
  :param int [since]: timestamp in ms of the earliest ledger entry
6151
6151
  :param int [limit]: max number of ledger entries to return
6152
6152
  :param dict [params]: extra parameters specific to the exchange API endpoint
6153
6153
  :param int [params.until]: end time in ms
6154
- :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)
6154
+ :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)
6155
6155
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
6156
6156
  """
6157
6157
  self.load_markets()
@@ -6242,7 +6242,7 @@ class gate(Exchange, ImplicitAPI):
6242
6242
  #
6243
6243
  return self.parse_ledger(response, currency, since, limit)
6244
6244
 
6245
- def parse_ledger_entry(self, item: dict, currency: Currency = None):
6245
+ def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
6246
6246
  #
6247
6247
  # spot
6248
6248
  #
@@ -6295,6 +6295,7 @@ class gate(Exchange, ImplicitAPI):
6295
6295
  else:
6296
6296
  direction = 'in'
6297
6297
  currencyId = self.safe_string(item, 'currency')
6298
+ currency = self.safe_currency(currencyId, currency)
6298
6299
  type = self.safe_string(item, 'type')
6299
6300
  rawTimestamp = self.safe_string(item, 'time')
6300
6301
  timestamp = None
@@ -6305,7 +6306,8 @@ class gate(Exchange, ImplicitAPI):
6305
6306
  balanceString = self.safe_string(item, 'balance')
6306
6307
  changeString = self.safe_string(item, 'change')
6307
6308
  before = self.parse_number(Precise.string_sub(balanceString, changeString))
6308
- return {
6309
+ return self.safe_ledger_entry({
6310
+ 'info': item,
6309
6311
  'id': self.safe_string(item, 'id'),
6310
6312
  'direction': direction,
6311
6313
  'account': None,
@@ -6320,8 +6322,7 @@ class gate(Exchange, ImplicitAPI):
6320
6322
  'after': self.safe_number(item, 'balance'),
6321
6323
  'status': None,
6322
6324
  'fee': None,
6323
- 'info': item,
6324
- }
6325
+ }, currency)
6325
6326
 
6326
6327
  def parse_ledger_entry_type(self, type):
6327
6328
  ledgerType: dict = {
ccxt/hashkey.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hashkey import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, LastPrice, LastPrices, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Bool, Currencies, Currency, Int, LastPrice, LastPrices, LedgerEntry, Leverage, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, 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
@@ -2147,13 +2147,13 @@ class hashkey(Exchange, ImplicitAPI):
2147
2147
  }
2148
2148
  return self.safe_integer(types, type, type)
2149
2149
 
2150
- def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
2150
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
2151
2151
  """
2152
- fetch the history of changes, actions done by the user or operations that altered balance of the user
2152
+ fetch the history of changes, actions done by the user or operations that altered the balance of the user
2153
2153
  :see: https://hashkeyglobal-apidoc.readme.io/reference/get-account-transaction-list
2154
- :param str code: unified currency code, default is None(not used)
2154
+ :param str [code]: unified currency code, default is None(not used)
2155
2155
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
2156
- :param int [limit]: max number of ledger entrys to return, default is None
2156
+ :param int [limit]: max number of ledger entries to return, default is None
2157
2157
  :param dict [params]: extra parameters specific to the exchange API endpoint
2158
2158
  :param int [params.until]: the latest time in ms to fetch entries for
2159
2159
  :param int [params.flowType]: trade, fee, transfer, deposit, withdrawal
@@ -2213,7 +2213,7 @@ class hashkey(Exchange, ImplicitAPI):
2213
2213
  }
2214
2214
  return self.safe_string(types, type, type)
2215
2215
 
2216
- def parse_ledger_entry(self, item: dict, currency: Currency = None):
2216
+ def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
2217
2217
  #
2218
2218
  # {
2219
2219
  # "id": "1740844413612065537",
@@ -2233,7 +2233,9 @@ class hashkey(Exchange, ImplicitAPI):
2233
2233
  account = self.safe_string(item, 'accountId')
2234
2234
  timestamp = self.safe_integer(item, 'created')
2235
2235
  type = self.parse_ledger_entry_type(self.safe_string(item, 'flowTypeValue'))
2236
- code = self.safe_currency_code(self.safe_string(item, 'coin'), currency)
2236
+ currencyId = self.safe_string(item, 'coin')
2237
+ code = self.safe_currency_code(currencyId, currency)
2238
+ currency = self.safe_currency(currencyId, currency)
2237
2239
  amountString = self.safe_string(item, 'change')
2238
2240
  amount = self.parse_number(amountString)
2239
2241
  direction = 'in'
@@ -2242,9 +2244,9 @@ class hashkey(Exchange, ImplicitAPI):
2242
2244
  afterString = self.safe_string(item, 'total')
2243
2245
  after = self.parse_number(afterString)
2244
2246
  status = 'ok'
2245
- return {
2246
- 'id': id,
2247
+ return self.safe_ledger_entry({
2247
2248
  'info': item,
2249
+ 'id': id,
2248
2250
  'timestamp': timestamp,
2249
2251
  'datetime': self.iso8601(timestamp),
2250
2252
  'account': account,
@@ -2259,7 +2261,7 @@ class hashkey(Exchange, ImplicitAPI):
2259
2261
  'after': after,
2260
2262
  'status': status,
2261
2263
  'fee': None,
2262
- }
2264
+ }, currency)
2263
2265
 
2264
2266
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}) -> Order:
2265
2267
  """
ccxt/htx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.htx import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction, TransferEntry
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, Int, IsolatedBorrowRate, IsolatedBorrowRates, LedgerEntry, LeverageTier, LeverageTiers, Market, Num, Order, OrderBook, OrderRequest, 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
@@ -7392,7 +7392,7 @@ class htx(Exchange, ImplicitAPI):
7392
7392
  }
7393
7393
  return self.safe_string(types, type, type)
7394
7394
 
7395
- def parse_ledger_entry(self, item: dict, currency: Currency = None):
7395
+ def parse_ledger_entry(self, item: dict, currency: Currency = None) -> LedgerEntry:
7396
7396
  #
7397
7397
  # {
7398
7398
  # "accountId": 10000001,
@@ -7406,44 +7406,41 @@ class htx(Exchange, ImplicitAPI):
7406
7406
  # "transferee": 13496526
7407
7407
  # }
7408
7408
  #
7409
- id = self.safe_string(item, 'transactId')
7410
7409
  currencyId = self.safe_string(item, 'currency')
7411
7410
  code = self.safe_currency_code(currencyId, currency)
7412
- amount = self.safe_number(item, 'transactAmt')
7411
+ currency = self.safe_currency(currencyId, currency)
7412
+ id = self.safe_string(item, 'transactId')
7413
7413
  transferType = self.safe_string(item, 'transferType')
7414
- type = self.parse_ledger_entry_type(transferType)
7415
- direction = self.safe_string(item, 'direction')
7416
7414
  timestamp = self.safe_integer(item, 'transactTime')
7417
- datetime = self.iso8601(timestamp)
7418
7415
  account = self.safe_string(item, 'accountId')
7419
- return {
7416
+ return self.safe_ledger_entry({
7417
+ 'info': item,
7420
7418
  'id': id,
7421
- 'direction': direction,
7419
+ 'direction': self.safe_string(item, 'direction'),
7422
7420
  'account': account,
7423
7421
  'referenceId': id,
7424
7422
  'referenceAccount': account,
7425
- 'type': type,
7423
+ 'type': self.parse_ledger_entry_type(transferType),
7426
7424
  'currency': code,
7427
- 'amount': amount,
7425
+ 'amount': self.safe_number(item, 'transactAmt'),
7428
7426
  'timestamp': timestamp,
7429
- 'datetime': datetime,
7427
+ 'datetime': self.iso8601(timestamp),
7430
7428
  'before': None,
7431
7429
  'after': None,
7432
7430
  'status': None,
7433
7431
  'fee': None,
7434
- 'info': item,
7435
- }
7432
+ }, currency)
7436
7433
 
7437
- def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
7434
+ def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
7438
7435
  """
7436
+ fetch the history of changes, actions done by the user or operations that altered the balance of the user
7439
7437
  :see: https://huobiapi.github.io/docs/spot/v1/en/#get-account-history
7440
- fetch the history of changes, actions done by the user or operations that altered balance of the user
7441
- :param str code: unified currency code, default is None
7438
+ :param str [code]: unified currency code, default is None
7442
7439
  :param int [since]: timestamp in ms of the earliest ledger entry, default is None
7443
- :param int [limit]: max number of ledger entrys to return, default is None
7440
+ :param int [limit]: max number of ledger entries to return, default is None
7444
7441
  :param dict [params]: extra parameters specific to the exchange API endpoint
7445
7442
  :param int [params.until]: the latest time in ms to fetch entries for
7446
- :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)
7443
+ :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)
7447
7444
  :returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
7448
7445
  """
7449
7446
  self.load_markets()