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
x-product-id string required
x-request-id string required
x-user-id string required
Content-Type string required
application/jsonAuthorization string required
📦 Request Body
companyCode string required
direction string required
FX_CONVERT for a currency conversion.sourceAssetCode string required
targetAssetCode string required
amount double required
side string required
amount is based on the source or target currency. Allowed values: SOURCE, TARGET.- 🧩 Examples
Request Example
- cURL
- Python
- Java
- NodeJs
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"
}'
import requests
import json
url = "{{baseUrl}}/hashdt/banking/api/v1/conversions/quote"
payload = json.dumps({
"companyCode": "{{Shared Company Code}}",
"direction": "FX_CONVERT",
"sourceAssetCode": "USD",
"targetAssetCode": "EUR",
"amount": 100,
"side": "SOURCE"
})
headers = {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"companyCode\": \"{{Shared Company Code}}\",\r\n \"direction\": \"FX_CONVERT\",\r\n \"sourceAssetCode\": \"USD\",\r\n \"targetAssetCode\": \"EUR\",\r\n \"amount\": 100,\r\n \"side\": \"SOURCE\"\r\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/hashdt/banking/api/v1/conversions/quote")
.method("POST", body)
.addHeader("x-api-key", "{{Shared X-API key}}")
.addHeader("x-product-id", "{{Shared ProductID}}")
.addHeader("x-request-id", "{{IdempotencyKey}}")
.addHeader("x-user-id", "{{UserID}}")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {{AccessToken}}")
.build();
Response response = client.newCall(request).execute();
const axios = require('axios');
let data = JSON.stringify({
"companyCode": "{{Shared Company Code}}",
"direction": "FX_CONVERT",
"sourceAssetCode": "USD",
"targetAssetCode": "EUR",
"amount": 100,
"side": "SOURCE"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: '{{baseUrl}}/hashdt/banking/api/v1/conversions/quote',
headers: {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response Example
- 200
- 400
{
"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"
}
}
{
"code": 400,
"status": "error",
"message": "Error Message"
}
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
x-product-id string required
x-request-id string required
x-user-id string required
Content-Type string required
application/jsonAuthorization string required
📦 Request Body
companyCode string required
quoteId string required
clientReference string
- 🧩 Examples
Request Example
- cURL
- Python
- Java
- NodeJs
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"
}'
import requests
import json
url = "{{baseUrl}}/hashdt/banking/api/v1/conversions"
payload = json.dumps({
"companyCode": "{{Shared Company Code}}",
"quoteId": "generated-quote-id"
})
headers = {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"companyCode\": \"{{Shared Company Code}}\",\r\n \"quoteId\": \"generated-quote-id\"\r\n }");
Request request = new Request.Builder()
.url("{{baseUrl}}/hashdt/banking/api/v1/conversions")
.method("POST", body)
.addHeader("x-api-key", "{{Shared X-API key}}")
.addHeader("x-product-id", "{{Shared ProductID}}")
.addHeader("x-request-id", "{{IdempotencyKey}}")
.addHeader("x-user-id", "{{UserID}}")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {{AccessToken}}")
.build();
Response response = client.newCall(request).execute();
const axios = require('axios');
let data = JSON.stringify({
"companyCode": "{{Shared Company Code}}",
"quoteId": "generated-quote-id"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: '{{baseUrl}}/hashdt/banking/api/v1/conversions',
headers: {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response Example
- 202
- 400
{
"code": 202,
"status": "SUCCESS",
"message": "Accepted",
"data": {
"conversionId": "4cb64367-afe0-4801-bc27-4e04c5ca9777",
"externalReference": "5e1ef964-8242-4d2c-9381-f1fa13e36ac2",
"status": "EXECUTING"
}
}
{
"code": 400,
"status": "error",
"message": "Error Message"
}
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
📩 Request Headers
x-api-key string required
x-product-id string required
x-request-id string required
x-user-id string required
Content-Type string required
application/jsonAuthorization string required
- 🧩 Examples
Request Example
- cURL
- Python
- Java
- NodeJs
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}}'
import requests
import json
url = "{{baseUrl}}/hashdt/banking/api/v1/conversions/:conversionID"
payload = {}
headers = {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("{{baseUrl}}/hashdt/banking/api/v1/conversions/:conversionID")
.method("GET", body)
.addHeader("x-api-key", "{{Shared X-API key}}")
.addHeader("x-product-id", "{{Shared ProductID}}")
.addHeader("x-request-id", "{{IdempotencyKey}}")
.addHeader("x-user-id", "{{UserID}}")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {{AccessToken}}")
.build();
Response response = client.newCall(request).execute();
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: '{{baseUrl}}/hashdt/banking/api/v1/conversions/:conversionID',
headers: {
'x-api-key': '{{Shared X-API key}}',
'x-product-id': '{{Shared ProductID}}',
'x-request-id': '{{IdempotencyKey}}',
'x-user-id': '{{UserID}}',
'Content-Type': 'application/json',
'Authorization': 'Bearer {{AccessToken}}'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response Example
- 200
- 400
{
"code": 200,
"status": "SUCCESS",
"message": "Success",
"data": {
"conversionId": "4cb64367-afe0-4801-bc27-4e04c5ca9777",
"externalReference": "5e1ef964-8242-4d2c-9381-f1fa13e36ac2",
"status": "EXECUTING"
}
}
{
"code": 400,
"status": "error",
"message": "Error Message"
}