# JPMC-PDP Documentation from https://developer.payments.jpmorgan.com # Get account balances for specific accounts In this tutorial, you will learn how to use the Blockchain Deposit Account (BDA) Balances API to retrieve BDA balances based on the account identifers you provide. By the end of this tutorial, you will know how to: - Create a well-formed balances request payload - Interpret a successful response ## Before you begin To use the BDA Balances API, you will need: - A [registered and fully onboarded](/docs/quick-start) Developer Account on the J.P. Morgan Payments Developer Portal. - An active project that provides you with the credentials used to make a request. ## Send a request Send a `POST` request to the `/accounts/balances/inquiry` endpoint. In the request body, you can specify which accounts and filter by balance types and date. > When retrieving account balances over a historical date range, the maxium amount is up to 45 days. Additionally, the date and time for balances will always be dictated by the time zone in which the account resides. > ### Current day The following example shows a request for current day balances: ```curl curl --request POST \ --url https://api-mock.payments.jpmorgan.com/account/v2/accounts/balances/inquiry \ --header 'Accept: application/json' \ --header 'Authorization: Bearer YOUR TOKEN' \ --header 'Content-Type: application/json' \ --header 'Request-Id: ' \ --data '{ "accountIdentifiers": [ { "number": "1234567890", "financialInstitutionId": { "id": "CHASUS33MCY", "idType": "BIC" } } ] }' ``` ```json { "accountIdentifiers": [ { "number": "1234567890", "financialInstitutionId": { "id": "CHASUS33MCY", "idType": "BIC" } } ] } ``` ### Historical day The following example shows a request for historic date balances.: ```curl curl --request POST \ --url https://api-mock.payments.jpmorgan.com/account/v2/accounts/balances/inquiry \ --header 'Accept: application/json' \ --header 'Authorization: Bearer YOUR TOKEN' \ --header 'Content-Type: application/json' \ --header 'Request-Id: ' \ --data '{ "accountIdentifiers": [ { "number": "1234567890", "financialInstitutionId": { "id": "CHASUS33MCY", "idType": "BIC" } } ], "fromDate": "2024-10-04", "toDate": "2024-10-05" }' ``` ```json { "accountIdentifiers": [ { "number": "1234567890", "financialInstitutionId": { "id": "CHASUS33MCY", "idType": "BIC" } } ], "fromDate": "2024-10-04", "toDate": "2024-10-05" } ``` ## Confirm the response You should receive a successful response payload containing a list of account balances. ### Current day The following example shows a response for current day balances: ```json { "accountBalances": [ { "account": { "number": "1234567890", "type": "BDA", "currency": "USD", "name": "Customer BDA Account", "financialInstitutionIds": [ { "id": "CHASUS33MCY", "idType": "BIC" } ] }, "balances": [ { "type": "INTERIM_AVAILABLE", "amount": "5000.00", "bookDate": "2024-10-06" }, { "type": "INTERIM_BOOKED", "amount": "5000.00", "bookDate": "2024-10-06" } ] } ], "metadata": { "cursor": { "first": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621", "this": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621", "goodUntil": "2024-10-06T00:00:00.000Z" } } } ``` ### Historical day The following example shows a response for historical date balances: ```json { "accountBalances": [ { "account": { "number": "1234567890", "type": "BDA", "currency": "USD", "name": "Customer BDA Account", "financialInstitutionIds": [ { "id": "CHASUS33MCY", "idType": "BIC" } ] }, "balances": [ { "type": "CLOSING_AVAILABLE", "amount": "5000.00", "bookDate": "2024-10-05" }, { "type": "CLOSING_BOOKED", "amount": "5000.00", "bookDate": "2024-10-05" }, { "type": "CLOSING_AVAILABLE", "amount": "5000.00", "bookDate": "2024-10-04" }, { "type": "CLOSING_BOOKED", "amount": "5000.00", "bookDate": "2024-10-04" } ] } ], "metadata": { "cursor": { "first": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621", "this": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621", "goodUntil": "2024-10-05T00:00:00.000Z" } } } ``` > It is possible you may encounter error codes in a response; to view a list of code descriptions; refer to [error codes](/api/liquidity-account-solutions/bda-balances/error-codes) in the API reference. > ## Next Steps Learn how to [get account balances for all eligibile accounts](/docs/liquidity-account-solutions/bda-balances/capabilities/balances/how-to/getting-account-balances).