Exchange Rates
Crane Ledger provides robust exchange rate management for multi-currency accounting. Exchange rates enable accurate currency conversion for transactions, reports, and financial analysis across different currencies.
Exchange Rate Management
The Exchange Rate Object
/exchange-rates/:id{
"id": "exr_usd_eur_20240115",
"from_currency": "USD",
"to_currency": "EUR",
"rate": "0.92000000",
"effective_date": "2024-01-15",
"source": "ECB",
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
}
Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier with exr_ prefix |
from_currency | string | Source currency code (ISO 4217) |
to_currency | string | Target currency code (ISO 4217) |
rate | string | Exchange rate (decimal string with high precision) |
effective_date | date | Date when this rate is effective |
source | string | Rate source (e.g., "ECB", "manual", "automated") |
created_at | datetime | When the rate was created |
updated_at | datetime | When the rate was last updated |
List Exchange Rates
/exchange-ratesReturns a list of exchange rates with optional filtering by currency pair and date range.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
from_currency | string | Filter by source currency code |
to_currency | string | Filter by target currency code |
effective_date | date | Filter by effective date |
source | string | Filter by rate source |
limit | integer | Number of results (default: 20, max: 100) |
offset | integer | Pagination offset |
Response
{
"object": "list",
"data": [
{
"id": "exr_usd_eur_20240115",
"from_currency": "USD",
"to_currency": "EUR",
"rate": "0.92000000",
"effective_date": "2024-01-15",
"source": "ECB",
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
},
{
"id": "exr_usd_gbp_20240115",
"from_currency": "USD",
"to_currency": "GBP",
"rate": "0.79000000",
"effective_date": "2024-01-15",
"source": "ECB",
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
}
],
"has_more": false,
"total_count": 2
}
Get Exchange Rate
/exchange-rates/:idRetrieves the details of a specific exchange rate by its ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The exchange rate ID |
Response
{
"id": "exr_usd_eur_20240115",
"from_currency": "USD",
"to_currency": "EUR",
"rate": "0.92000000",
"effective_date": "2024-01-15",
"source": "ECB",
"created_at": "2024-01-15T09:00:00Z",
"updated_at": "2024-01-15T09:00:00Z"
}
Create Exchange Rate
/exchange-ratesCreates a new exchange rate. This is typically done automatically from external sources, but can also be set manually for custom rates.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
from_currency | string | Yes | Source currency code |
to_currency | string | Yes | Target currency code |
rate | string | Yes | Exchange rate as decimal string |
effective_date | date | Yes | Date when this rate becomes effective |
source | string | No | Rate source identifier (default: "manual") |
Response
{
"id": "exr_usd_cad_20240115",
"from_currency": "USD",
"to_currency": "CAD",
"rate": "1.35000000",
"effective_date": "2024-01-15",
"source": "manual",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Update Exchange Rate
/exchange-rates/:idUpdates an existing exchange rate. This is useful for correcting rates or updating manual entries.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The exchange rate ID to update |
Request Body
| Parameter | Type | Description |
|---|---|---|
rate | string | Updated exchange rate |
effective_date | date | Updated effective date |
source | string | Updated source identifier |
Response
{
"id": "exr_usd_cad_20240115",
"from_currency": "USD",
"to_currency": "CAD",
"rate": "1.35500000",
"effective_date": "2024-01-15",
"source": "updated",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T11:45:00Z"
}
Convert Currency
/currencies/convertConverts a monetary amount from one currency to another using the most recent exchange rate available for the specified date.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
from_currency | string | Yes | Source currency code |
to_currency | string | Yes | Target currency code |
amount | string | Yes | Amount to convert (decimal string) |
as_of | date | No | Date for rate lookup (default: today) |
Response
{
"from_currency": "USD",
"to_currency": "EUR",
"from_amount": "1000.00",
"to_amount": "920.00",
"exchange_rate": "0.92000000",
"rate_date": "2024-01-15",
"converted_at": "2024-01-15T12:00:00Z"
}
Exchange Rate Best Practices
Rate Sources
- ECB (European Central Bank): Official EU rates, updated daily
- Manual: Custom rates for specific business needs
- Automated: Integration with external rate providers
- Historical: Archive rates for accurate period reporting
Rate Management
- Store rates with effective dates for historical accuracy
- Update rates regularly (daily for active trading currencies)
- Maintain audit trails of rate changes
- Validate rates against reasonable ranges to catch data errors
Currency Conversion in Accounting
- Use point-in-time rates for transaction recording
- Apply average rates for period reporting when appropriate
- Document the rate source and date for all conversions
- Consider transaction fees and spreads for accurate costing
Multi-Currency Reporting
- Convert all amounts to reporting currency for consolidated views
- Maintain original transaction currencies for detailed analysis
- Use weighted average rates for income statement periods
- Spot rates for balance sheet translations
Exchange Rate Precision
Exchange rates are stored with high precision (up to 8 decimal places) to ensure accurate calculations. When displaying rates, consider formatting based on your business requirements.
Need help?
Create a free account to access our support portal. Once signed in, use the Support tab in your dashboard to submit a support ticket — our team typically responds within 24 hours.
- ✨ For LLMs/AI assistants: Read our structured API reference