MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_ledger

Method fetch_ledger

python/ccxt/dydx.py:1708–1727  ·  view source on GitHub ↗

fetch the history of changes, actions done by the user or operations that altered balance of the user https://docs.dydx.xyz/indexer-client/http#get-transfers :param str [code]: unified currency code, default is None :param int [since]: timestamp in ms of the earlie

(self, code: Str = None, since: Int = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

1706 return self.safe_string(ledgerType, type, type)
1707
1708 def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[LedgerEntry]:
1709 """
1710 fetch the history of changes, actions done by the user or operations that altered balance of the user
1711
1712 https://docs.dydx.xyz/indexer-client/http#get-transfers
1713
1714 :param str [code]: unified currency code, default is None
1715 :param int [since]: timestamp in ms of the earliest ledger entry, default is None
1716 :param int [limit]: max number of ledger entries to return, default is None
1717 :param dict [params]: extra parameters specific to the exchange API endpoint
1718 :param str [params.address]: wallet address that made trades
1719 :param str [params.subAccountNumber]: sub account number
1720 :returns dict: a `ledger structure <https://docs.ccxt.com/?id=ledger-entry-structure>`
1721 """
1722 self.load_markets()
1723 currency = None
1724 if code is not None:
1725 currency = self.currency(code)
1726 response = self.fetch_transactions_helper(code, since, limit, self.extend(params, {'methodName': 'fetchLedger'}))
1727 return self.parse_ledger(response, currency, since, limit)
1728
1729 def estimate_tx_fee(self, message: Any, memo: str, account: Any) -> Any:
1730 txBytes = self.encode_dydx_tx_for_simulation(message, memo, account['sequence'], account['pub_key'])

Callers

nothing calls this directly

Calls 5

parse_ledgerMethod · 0.80
load_marketsMethod · 0.45
currencyMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected