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

EntityIdstringUse this ID to only return currency accounts for a given account
IbanstringSpecify the IBAN to only return currency accounts using that particular IBAN
CurrencystringReturn currency accounts for a particular currency
PageNumberintegerSpecifies 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

NameTypeDescription
EntityIdstringThis is the ID for entity for which the currency account belongs to
AccountIdstringThis is the unique ID for the currency account
NamestringThe name given to the currency account by Alpha
FriendlyNamestringThe name given to the currency account by the client
ReferencestringA user-friendly description of the account
CountrystringThe country where the currency account is in ISO 3166 format
CurrencystringThe currency of the currency account in ISO 4217 format
SwiftBicstringThe SWIFT BIC code for this currency account
TypestringDescribes the type of currency account ["Account", "Margin", "Wallet"]
IbanstringThe International Bank Account Number used to pay into this currency account. Only applicable for IBAN countries
AccountNumberstringThe bank account number used to pay into this currency account. Not required when IBAN is present
NationalBankCodestringThe bank code used to pay into this currency account. Not required when IBAN is present
Permissionsstring arrayA 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"
  ]
}