Unknown currency error

Hi

We use the /v2/accounts endpoint to get a list of accounts (which are effectively holdings, they correspond to individual currencies that are held on an overarching user account).

the intended way to then query transactions is to take the UUIDs and put them into /v2/accounts//transactions.

Sometimes, when we are doing this, we get an error response from coinbase saying “Unknown currency” - this obviously doesn’t make sense because the id came from coinbase itself, so how is it providing us something that it doesn’t know about? What’s the issue here?

Hey @pouryas, Welcome to the Developer Forum Community!

We understand that you sometimes get error while calling the List Transactions endpoint. Can you let us know if you get any error code (like 401, 404 etc) in the response body? Also, can you please share screenshots of the request body and response body capturing the error details, omitting any personal info.

Thank you!

screenshots i don’t have since it’s done programmatically, but i can share the bodies of request and response:

request:

GET /accounts/8706d39f-f4d7-503b-a109-3ed8edbd353b/transactions?limit=25

response:

{“response_text”:"{“errors”:[{“id”:“validation_error”,“message”:“Unknown currency”}]}

with a status code of 400

the UUID in the request path is from a previous call to /v2/accounts, and so is coming directly from coinbase, which is why it’s confusing why it would then cause an error

Hi @rishabh,

I am encountering the same problem. Is there any way that this could be caused by user-error or should we expect a fix for this behavior?

Reproduction steps:

  1. List Accounts
    Request: GET https://api.coinbase.com/v2/accounts
    Response:
{
   ...
   "data": 
   [
   	{
   		"id": "account-id-returned-from-GET-accounts",
   		...
   		"currency": "XYZ",
   		...
   		"resource_path": "/v2/accounts/account-id-returned-from-GET-accounts",
   		...
   	}
   ]
}
  1. List Transactions
    Request: GET https://api.coinbase.com/v2/accounts/account-id-returned-from-GET-accounts/transactions
    Response:
{
    "response_text":
    {
        "errors":
        [
            {
                "id": "validation_error",
                "message": "Unknown currency"
            }
        ]
    }
}

How can Unknown currency or validation_error, and an associated 4XX status code guide the user to fix the request being made when the only input here is resource linked by the List Accounts endpoint?