Hold and convert currencies
Suitable for SMEs with businesses spread across geographies and want to manage their FX risk.
With our APIs, hold and manage different currencies in one place. We offer multi-currency accounts in 29+ currencies in 20+ countries.
Also, the API suite allows spot trades and also trades with a commitment towards a future date (fixed forwards). We enable FX spots in 130+ currencies and bespoke hedging solutions to help you manage your FX risk.
API endpoints call sequence
Here is an example of how the APIs can be initiated in a specific sequence to address the use case described above. Feel free to align with our Implementation team if you are looking for additional requirements and optimisations:
- Request for quote
- Create a trade
- Getting accounts
- Getting balances
Code snippets
Step 1
Trigger the Get a quote endpoint in order to obtain a rate (to be used when booking your Trade) for the amount you would like to convert into the desired currency.
curl --location -g '{{APP_URL}}/quotes?quote_type=quote&client_id={{client_id}}' \ --header 'Authorization: Bearer {{token}}' \ --header 'X-Contact-ID: {{contact_id}}' \ --header 'Content-Type: application/json' \ --header 'x-api-key: {{api_key}}' \ --data '{ "trade_type": "spot", "sell_currency": "GBP", "buy_currency": "EUR", "amount": 1500, "operation": "buy", "value_date": "2018-08-31" }'
Step 2
Trigger the Book the Trade, using the quote_id you got in the previous step. For this specific use case, it is critical to set the variable, convert = true. It is this flag which makes sure the funds are moved between your wallets. Without this flag, the trade will be created but you will see no fund movement.
curl --location -g '{{APP_URL}}/trades?quote_id={{quote_id}}&client_id={{client_id}}' \ --header 'X-Contact-ID: {{contact_id}}' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{token}}' \ --header 'x-api-key: {{api_key}}' \ --data '{ "trade_type": "spot", "reason": "Any reason", “external_reference_id”: “your ID to track trade”, “convert”: “true” }'
Step 3
Trigger the Get accounts endpoint. This will lead you to the next endpoint which can confirm if the conversion of funds between wallets worked or not.
{ "account_id": "379a87e0-cae7-4486-af2c-34f6af2abd09", "status": "Enabled", "currency": "EUR", "account_holder": "Amos Braun", "account_name": "Investment Account", "nickname": "incubate", "account": [ { "bank_identifier_type": "BIC", "bank_identifier": "HRUUDEP1", "account_number": "85585949", "account_number_code": "IBAN" } ] }
Step 4
Finally, trigger the Get balances endpoint to confirm the updated bank account balance.
curl --location -g '{{baseUrl}}/accounts/<string>/balances?client_id=%3Cstring%3E' \ --header 'x-api-key;' \ --header 'Authorization: <string>' \ --header 'X-Contact-ID: <string>'