Get an FX Trade (Legacy)
Overview
This service is used to retrieve trade order details and status by specifying the orderId. It returns currency amounts, exchange rate, client reference, and the current transaction state.
Resource Access
- HTTP Method:
GET - Endpoint:
/orders/v2.1/fx/{orderId} - Authentication: Bearer token required
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
x-api-key | string | No | API key for additional authentication |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | number | Yes | Unique identifier of the foreign exchange order (e.g. 140). |
Response
Success Response (200 OK)
{
"success": true,
"order": {
"id": 140,
"reference": "EN-16062022-003",
"amountFrom": 106,
"amountTo": 67.75,
"rate": "0.6391593000",
"transactionState": "inward_remittance_pending",
"clientReference": "Test-1000",
"currencyFrom": "USD",
"currencyTo": "GBP"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Flag indicating whether the request was successful. |
order.id | number | Unique transaction order identifier. |
order.reference | string | Ahrvo transaction reference. |
order.amountFrom | number | Source currency amount debited. |
order.amountTo | number | Target currency amount credited. |
order.rate | string | Applied conversion rate. |
order.transactionState | string | Current state (e.g. inward_remittance_pending). |
order.clientReference | string | Client reference string. |
order.currencyFrom | string | Source currency. |
order.currencyTo | string | Target currency. |
Error Responses
- 400 Bad Request: Invalid parameters or malformed request
- 401 Unauthorized: Missing or invalid Bearer authentication token
- 403 Forbidden: Insufficient account permissions
- 404 Not Found: Resource not found
- 500 Internal Server Error: An internal server error occurred
Code Examples
Base URL
Production: https://api.ahrvo.network
Staging: https://gateway.ahrvo.network
cURL
curl -X GET \
'https://gateway.ahrvo.network/banking/ibans/v2/orders/v2.1/fx/140' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/orders/v2.1/fx/140"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const orderId = 140;
const url = `https://gateway.ahrvo.network/banking/ibans/v2/orders/v2.1/fx/${orderId}`;
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
};
axios.get(url, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error.response ? error.response.data : error.message));
Usage Notes
- Use the
idreturned from the Create FX Trade endpoint as theorderId. - Useful for polling or checking trade settlement progress.