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

GET/exchange-rates/:id
Auth required
{
  "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

AttributeTypeDescription
idstringUnique identifier with exr_ prefix
from_currencystringSource currency code (ISO 4217)
to_currencystringTarget currency code (ISO 4217)
ratestringExchange rate (decimal string with high precision)
effective_datedateDate when this rate is effective
sourcestringRate source (e.g., "ECB", "manual", "automated")
created_atdatetimeWhen the rate was created
updated_atdatetimeWhen the rate was last updated

List Exchange Rates

GET/exchange-rates
Auth required

Returns a list of exchange rates with optional filtering by currency pair and date range.

Query Parameters

ParameterTypeDescription
from_currencystringFilter by source currency code
to_currencystringFilter by target currency code
effective_datedateFilter by effective date
sourcestringFilter by rate source
limitintegerNumber of results (default: 20, max: 100)
offsetintegerPagination 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

GET/exchange-rates/:id
Auth required

Retrieves the details of a specific exchange rate by its ID.

Path Parameters

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

POST/exchange-rates
Auth required
1 credits

Creates a new exchange rate. This is typically done automatically from external sources, but can also be set manually for custom rates.

Request Body

ParameterTypeRequiredDescription
from_currencystringYesSource currency code
to_currencystringYesTarget currency code
ratestringYesExchange rate as decimal string
effective_datedateYesDate when this rate becomes effective
sourcestringNoRate 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

PUT/exchange-rates/:id
Auth required
1 credits

Updates an existing exchange rate. This is useful for correcting rates or updating manual entries.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe exchange rate ID to update

Request Body

ParameterTypeDescription
ratestringUpdated exchange rate
effective_datedateUpdated effective date
sourcestringUpdated 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

POST/currencies/convert
Auth required
1 credits

Converts a monetary amount from one currency to another using the most recent exchange rate available for the specified date.

Request Body

ParameterTypeRequiredDescription
from_currencystringYesSource currency code
to_currencystringYesTarget currency code
amountstringYesAmount to convert (decimal string)
as_ofdateNoDate 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.