Main Balances

Overview

The Main balance in an account serves to execute currency trades, send funds to other bank accounts, and make deposits. Main balances are named after their corresponding currency code, therefore if the account holds GBP and USD balances, they are named 'GBP' and 'USD' respectively.

How to list Main balances

Main balances can be in a number of currencies. To see which ones are activated on the account:

  1. Call GET - All Main Balances.

REQUEST

curl --location 'https://caxapi-integration.azurewebsites.net/api/account/balances/' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <access_token>' \
--header 'userapitoken: <userapitoken>' \

RESPONSE

The following response illustrates an account with active GBP, EUR, and USD Main balances:

{
    "Content": {
        "Model": {
            "Balances": [
                {
                    "Balance": 2974.86,
                    "CcyCode": "GBP",
                    "BaseCcyCode": "GBP",
                    "AlphabeticCode": "GBP",
                    "Description": "British Pound Sterling",
                    "NumericCode": "826",
                    "Symbol": "£",
                    "ApiStatusCode": 100,
                    "ApiStatus": "IsValid",
                    "ApiStatusDescription": "Valid Operation"
                },
                {
                    "Balance": 1819.03,
                    "CcyCode": "EUR",
                    "BaseCcyCode": "EUR",
                    "AlphabeticCode": "EUR",
                    "Description": "Euro",
                    "NumericCode": "978",
                    "Symbol": "€",
                    "ApiStatusCode": 100,
                    "ApiStatus": "IsValid",
                    "ApiStatusDescription": "Valid Operation"
                },
                {
                    "Balance": 19800.00,
                    "CcyCode": "USD",
                    "BaseCcyCode": "USD",
                    "AlphabeticCode": "USD",
                    "Description": "US Dollar",
                    "NumericCode": "840",
                    "Symbol": "$",
                    "ApiStatusCode": 100,
                    "ApiStatus": "IsValid",
                    "ApiStatusDescription": "Valid Operation"
                }
            ],
            "ApiStatusCode": 100,
            "ApiStatus": "IsValid",
            "ApiStatusDescription": "Valid Operation"
        },
        "ExpectedResponses": [
            "IsValid"
        ]
    },
    "AuthorisedClientModel": {
        "ClientId": "<clientid>",
        "ClientRef": "<clientref>",
        "UserId": "<userid>",
        "TokenStartDate": "2023-11-06T10:06:28.1175216",
        "TokenEndDate": "2024-01-11T02:35:44.8988491",
        "ApiStatusCode": 100,
        "ApiStatus": "IsValid",
        "ApiStatusDescription": "Valid Operation"
    },
    "AuthorisedUserModel": {
        "UserId": "<userid>",
        "AppVersion": null,
        "TokenStartDate": "2023-11-13T00:00:00",
        "TokenEndDate": "2023-12-13T00:00:00",
        "LoginTimestamp": "2023-12-06T11:05:59.255352",
        "ApiLoginType": 0,
        "ApiStatusCode": 100,
        "ApiStatus": "IsValid",
        "ApiStatusDescription": "Valid Operation"
    }
}

List balances by Currency

To retrieve a particular currency balance:

  1. Call GET - List a specific currency balance.

In the example below, the GBP currency balance is retrieved.

REQUEST

curl --location 'https://caxapi-integration.azurewebsites.net/api/account/balances//GBP' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer <access_token>' \
--header 'userapitoken: <userapitoken>' \

RESPONSE

{
    "Content": {
        "Model": {
            "Balances": [
                {
                    "Balance": 1030.31,
                    "CcyCode": "GBP",
                    "BaseCcyCode": "GBP",
                    "AlphabeticCode": "GBP",
                    "Description": "British Pound Sterling",
                    "NumericCode": "826",
                    "Symbol": "£",
                    "ApiStatusCode": 100,
                    "ApiStatus": "IsValid",
                    "ApiStatusDescription": "Valid Operation"
                }
            ],
            "ApiStatusCode": 100,
            "ApiStatus": "IsValid",
            "ApiStatusDescription": "Valid Operation"
        },
        "ExpectedResponses": [
            "IsValid"
        ]
    },
    "AuthorisedClientModel": {
        "ClientId": "<clientid>",
        "ClientRef": "<clientref>",
        "UserId": "<userid>",
        "TokenStartDate": "2023-11-06T10:06:28.1175216",
        "TokenEndDate": "2024-01-11T02:35:44.8988491",
        "ApiStatusCode": 100,
        "ApiStatus": "IsValid",
        "ApiStatusDescription": "Valid Operation"
    },
    "AuthorisedUserModel": {
        "UserId": "<userid>",
        "AppVersion": null,
        "TokenStartDate": "2023-11-13T00:00:00",
        "TokenEndDate": "2023-12-13T00:00:00",
        "LoginTimestamp": "2023-12-06T11:05:59.255352",
        "ApiLoginType": 0,
        "ApiStatusCode": 100,
        "ApiStatus": "IsValid",
        "ApiStatusDescription": "Valid Operation"
    }
}