Currency Accounts
The accounts endpoint allows you to retrieve single or multiple currency accounts held with Alpha along with the associated metadata.
Currency accounts (or just "accounts") can sometimes be referred to as wallets as they hold the balances as well as inbound and outbound transactions.
See the Currency Accounts API reference section for technical implementation.
Return all currency accounts
If no parameters are provided, all currency accounts associated with the connection will be returned. In the scenario where the connection has multiple accounts, all currency accounts will be returned for all accounts.
See this diagram on the reporting API guide for an explanation of the relationship between the different entities.
Return specified currency accounts
Including query parameters in your request will constrain your search, but will be useful if you are looking to return a single or group of currency accounts based on certain criteria, e.g. specifying Currency to return all USD currency accounts.
By using the GET account by ID endpoint, you can return a single object.
You may use any number of query parameters. Please note that using multiple parameters will make them all applicable. Querying parameters acts as an AND function, not OR.
Query Parameters
EntityId | string | Use this ID to only return currency accounts for a given account |
Iban | string | Specify the IBAN to only return currency accounts using that particular IBAN |
Currency | string | Return currency accounts for a particular currency |
PageNumber | integer | Specifies the page to be returned, useful when there are multiple pages of results, see the pagination section for more information |
Response
The response will come in an array of currency accounts
Name | Type | Description |
---|---|---|
EntityId | string | This is the ID for entity for which the currency account belongs to |
AccountId | string | This is the unique ID for the currency account |
Name | string | The name given to the currency account by Alpha |
FriendlyName | string | The name given to the currency account by the client |
Reference | string | A user-friendly description of the account |
Country | string | The country where the currency account is in ISO 3166 format |
Currency | string | The currency of the currency account in ISO 4217 format |
SwiftBic | string | The SWIFT BIC code for this currency account |
Type | string | Describes the type of currency account ["Account", "Margin", "Wallet"] |
Iban | string | The International Bank Account Number used to pay into this currency account. Only applicable for IBAN countries |
AccountNumber | string | The bank account number used to pay into this currency account. Not required when IBAN is present |
NationalBankCode | string | The bank code used to pay into this currency account. Not required when IBAN is present |
Permissions | string array | A list of services enabled for this currency account on the Alpha Connect API Enums: ["Reporting", "Fx", "Payments"] |
Integration Examples
Get all currency accounts for a given currency
To find all USD currency accounts, call theΒ currency account endpoint, passingΒ USDΒ as the Currency parameter.
curl -X 'GET' \
'https://sandbox.api.alphagroup.com/api/v1/accounts?Currency=USD' \
-H 'accept: text/plain' \
-H 'authorization: Bearer BearerTokenGoesHere'
The following response shows all the USD balances that were available on your connection.
{
"Accounts": [
{
"EntityId": "405e7c7c-4cd7-407a-8b70-204285691e17",
"AccountId": "a8c9b73c-e127-452b-9d69-d5160258a62b",
"Name": "USD Account",
"FriendlyName": "USD Account",
"Reference": "A0020154",
"Country": "US",
"Currency": "USD",
"SwiftBic": "BARCGB22",
"Type": "Wallet",
"Iban": "GB34BARC20000087836066",
"AccountNumber": "87836066",
"NationalBankCode": "200000",
"Permissions": [
"Reporting"
]
},
{
"EntityId": "1fa51fab-a903-4be9-9eae-8356641b6fb1",
"AccountId": "695769c3-ea5a-4bea-b762-779519f33bf7",
"Name": "USD Account",
"FriendlyName": "USD Account",
"Reference": "A0020154",
"Country": "US",
"Currency": "USD",
"SwiftBic": "BARCGB22",
"Type": "Wallet",
"Iban": "GB34BARC20000087836066",
"AccountNumber": "87836066",
"NationalBankCode": "200000",
"Permissions": [
"Reporting"
]
}
],
"IsLastPage": true
}
Return a particular currency account
To get a specific currency account specify the AccountId
. In the below example, the ID is taken from one of the currency accounts above.
curl -X 'GET' \
'https://sandbox.api.alphagroup.com/api/v1/accounts/a8c9b73c-e127-452b-9d69-d5160258a62b' \
-H 'accept: text/plain' \
-H 'authorization: Bearer BearerTokenGoesHere'
This response shows the requested currency account and its associated metadata
{
"EntityId": "405e7c7c-4cd7-407a-8b70-204285691e17",
"AccountId": "a8c9b73c-e127-452b-9d69-d5160258a62b",
"Name": "USD Account",
"FriendlyName": "USD Account",
"Reference": "A0020154",
"Country": "US",
"Currency": "USD",
"SwiftBic": "BARCGB22",
"Type": "Wallet",
"Iban": "GB34BARC20000087836066",
"AccountNumber": "87836066",
"NationalBankCode": "200000",
"Permissions": [
"Reporting"
]
}
Updated 2 months ago