Skip to main content

Foreign Exchange & Conversion

Convert between supported currencies using validated FX quotes, with transparent exchange rates and controlled conversion execution.

Generate FX Quote

Generates an FX quote for converting one currency into another.

{{baseUrl}}/hashdt/banking/api/v1/conversions/quote

Description

This API is used to generate a validated FX quote for converting one currency into another. The quote specifies the exchange rate, source and converted amounts, and remains valid for approximately 75 seconds. Once generated, the quote can be used to execute the currency conversion at the quoted rate, provided it has not expired or been invalidated.

📩 Request Headers

x-api-key string required

Shared X-API key

x-product-id string required

Shared Product ID

x-request-id string required

Idempotency key for request tracking

x-user-id string required

User identification key

Content-Type string required

Must be application/json

Authorization string required

Bearer access token

📦 Request Body

companyCode string required

Shared Company Code.

direction string required

Specifies the type of transaction. Use FX_CONVERT for a currency conversion.

sourceAssetCode string required

3-letter ISO 4217 currency code of the currency to be converted from.

targetAssetCode string required

3-letter ISO 4217 currency code of the currency to be converted to.

amount double required

Amount to be converted in the source currency.

side string required

Specifies whether the amount is based on the source or target currency. Allowed values: SOURCE, TARGET.

Request Example

curl --location --request POST \
--url '{{baseUrl}}/hashdt/banking/api/v1/conversions/quote' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'x-product-id: {{Shared ProductID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{AccessToken}}' \
--data '{
"companyCode": "{{Shared Company Code}}",
"direction": "FX_CONVERT",
"sourceAssetCode": "USD",
"targetAssetCode": "EUR",
"amount": 100,
"side": "SOURCE"
}'

Response Example

{
"code": 200,
"status": "SUCCESS",
"message": "Success",
"data": {
"quoteId": "4a50cb58-ca2d-43b8-9437-ae32ed3783d2",
"direction": "FX_CONVERT",
"sourceAssetCode": "USD",
"targetAssetCode": "EUR",
"sourceAmount": 100,
"targetAmount": 84.27,
"rate": 0.8426880000,
"inverseRate": 1.1866788183,
"currencyPair": "USDEUR",
"processingFee": null,
"networkFee": null,
"feeAssetCode": null,
"expiresAt": "2026-08-25T06:46:39.339Z"
}
}

Create Conversion

Executes a currency conversion using a previously generated FX quote.

{{baseUrl}}/hashdt/banking/api/v1/conversions

Description

This API is used to execute a currency conversion between two supported currencies. The conversion debits the source currency and credits the target currency using the exchange rate from a previously generated and valid FX quote. The API returns 202 Accepted, indicating that the conversion has been accepted for processing but is not yet settled.
Once processed, the conversion appears in the account statement as two entries sharing the same reference: a debit for the source currency and a credit for the target currency. Use the reference to group and identify both sides of the conversion.

📩 Request Headers

x-api-key string required

Shared X-API key

x-product-id string required

Shared Product ID

x-request-id string required

Idempotency key for request tracking

x-user-id string required

User identification key

Content-Type string required

Must be application/json

Authorization string required

Bearer access token

📦 Request Body

companyCode string required

Shared Company Code.

quoteId string required

Identifier of the previously generated and valid FX quote to be used for the conversion.

clientReference string

Optional reference.

Request Example

curl --location --request POST \
--url '{{baseUrl}}/hashdt/banking/api/v1/conversions' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'x-product-id: {{Shared ProductID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{AccessToken}}' \
--data '{
"companyCode": "{{Shared Company Code}}",
"quoteId": "generated-quote-id"
}'

Response Example

{
"code": 202,
"status": "SUCCESS",
"message": "Accepted",
"data": {
"conversionId": "4cb64367-afe0-4801-bc27-4e04c5ca9777",
"externalReference": "5e1ef964-8242-4d2c-9381-f1fa13e36ac2",
"status": "EXECUTING"
}
}

Conversion Status

Retrieves the current status and details of a currency conversion.

{{baseUrl}}/hashdt/banking/api/v1/conversions/:conversionID

Description

This API is used to check the processing status of a previously initiated currency conversions. It provides the conversion status and associated transaction details for tracking the conversion.

🔗 Path Parameters

conversionID string required

Unique identifier for currency conversion.

📩 Request Headers

x-api-key string required

Shared X-API key

x-product-id string required

Shared Product ID

x-request-id string required

Idempotency key for request tracking

x-user-id string required

User identification key

Content-Type string required

Must be application/json

Authorization string required

Bearer access token

Request Example

curl --location --request GET \
--url '{{baseUrl}}/hashdt/banking/api/v1/conversions/:conversionID' \
--header 'x-api-key: {{Shared X-API key}}' \
--header 'x-product-id: {{Shared ProductID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{AccessToken}}'

Response Example

{
"code": 200,
"status": "SUCCESS",
"message": "Success",
"data": {
"conversionId": "4cb64367-afe0-4801-bc27-4e04c5ca9777",
"externalReference": "5e1ef964-8242-4d2c-9381-f1fa13e36ac2",
"status": "EXECUTING"
}
}