Get FX rate
POST
/api/v1/bank/wallet/fx/rate/Bearer TokenRequest headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer {A55_ACCESS_TOKEN} | Yes |
Content-Type | application/json | Yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
from_currency | string | Yes | Source currency ISO 4217 code |
to_currency | string | Yes | Target currency ISO 4217 code |
Supported currencies
| Code | Currency |
|---|---|
USD | US Dollar |
BRL | Brazilian Real |
EUR | Euro |
MXN | Mexican Peso |
ARS | Argentine Peso |
COP | Colombian Peso |
CLP | Chilean Peso |
PEN | Peruvian Sol |
56 conversion pairs are available across all combinations.
Response fields
| Field | Type | Description |
|---|---|---|
price | float | Exchange rate rounded to 2 decimal places. 1 unit of from_currency = price units of to_currency |
HTTP status codes
| Status | Description |
|---|---|
| 200 | Rate returned successfully |
| 400 | Invalid currency code or same from/to |
| 401 | Invalid or expired Bearer token |
| 403 | FX not enabled for this wallet |
| 422 | Unsupported currency pair |
| 429 | Rate limit exceeded |
| 500 | Internal server error — retry with exponential backoff |
Code examples
- cURL
- Python
- Node.js
curl -s -X POST https://core-manager.a55.tech/api/v1/bank/wallet/fx/rate/ \
-H "Authorization: Bearer $A55_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"from_currency": "USD",
"to_currency": "BRL"
}'
import requests
import os
token = os.environ["A55_ACCESS_TOKEN"]
base = os.environ.get("A55_API_URL", "https://core-manager.a55.tech")
try:
response = requests.post(
f"{base}/api/v1/bank/wallet/fx/rate/",
json={
"from_currency": "USD",
"to_currency": "BRL",
},
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
},
)
response.raise_for_status()
fx = response.json()
print(f"Rate: 1 USD = {fx['price']} BRL")
except requests.exceptions.HTTPError as e:
print(f"HTTP {e.response.status_code}: {e.response.json()}")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
const token = process.env.A55_ACCESS_TOKEN;
const base = process.env.A55_API_URL || "https://core-manager.a55.tech";
try {
const response = await fetch(`${base}/api/v1/bank/wallet/fx/rate/`, {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
from_currency: "USD",
to_currency: "BRL",
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const fx = await response.json();
console.log(`Rate: 1 USD = ${fx.price} BRL`);
} catch (error) {
console.error("FX rate failed:", error.message);
}
Response example
{
"price": 5.73
}
Error response example
{
"status": "error",
"message": [
{
"code": "UNSUPPORTED_PAIR",
"source": "fx",
"description": "Currency pair GBP/BRL is not supported"
}
]
}