Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

api.getAccountBalances AccountNotFoundError (400) #507

@aaronmboyd

Description

@aaronmboyd

Solo api.getAccountBalances facade to the API does not work, always returns 400.

Using the example account from the documentation, the following works and returns an empty account:

curl https://api.dydx.exchange/v1/accounts/0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5
{
    "owner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
    "accountUuids": [],
    "accounts": []
}

Using solo, for example:

const account : ApiAccount = await solo.api.getAccountBalances(
    {accountOwner:"0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5", accountNumber: "0"});

Always fails with

{"response":{"data":{"errors":[{"name":"AccountNotFoundError"}]},"status":400,"statusText":"Bad Request"}}

I have tried using accountNumber: new BigNumber("0") which also fails, have also tried using my own account which does have some balances, and also returns a full JSON response simply hitting the API directly.

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