Skip to main content

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

HeaderValueRequiredDescription
Acceptapplication/jsonYesContent type for the response
AuthorizationBearer {access_token}YesBearer token for authentication
x-api-keystringNoAPI key for additional authentication

Path Parameters

ParameterTypeRequiredDescription
orderIdnumberYesUnique 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

FieldTypeDescription
successbooleanFlag indicating whether the request was successful.
order.idnumberUnique transaction order identifier.
order.referencestringAhrvo transaction reference.
order.amountFromnumberSource currency amount debited.
order.amountTonumberTarget currency amount credited.
order.ratestringApplied conversion rate.
order.transactionStatestringCurrent state (e.g. inward_remittance_pending).
order.clientReferencestringClient reference string.
order.currencyFromstringSource currency.
order.currencyTostringTarget 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 id returned from the Create FX Trade endpoint as the orderId.
  • Useful for polling or checking trade settlement progress.

Interactive API Explorer