Skip to content

My Cardano balance doesn’t show up in the REST client’s output #119

@andrejpodzimek

Description

@andrejpodzimek

I’m reading my balances this way:

rest_client: RESTClient = RESTClient(api_key=API_KEY, api_secret=SIGNING_KEY)

cursor: str | None = None
balances: Dict[str, Tuple[str, str]] = {}

while True:
  response: ListAccountsResponse = rest_client.get_accounts(cursor=cursor)
  for account in response.accounts:
    balances[account.currency] = (account.available_balance['value'],
                                  account.hold['value'])
  if not response.has_next:
    break
  cursor = response.cursor

for currency, (balance, hold) in sorted(balances.items(),
                                        key=lambda x: x[0]):
  print(currency, balance, hold)
  • For Solana (SOL), I get reasonable numbers, exactly what the web UI is showing.
  • For Cardano (ADA), I get ADA 0 0, although the web UI shows non-zero values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions