v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03101355448.4 KB
OpenMeter Currencies

Create cost basis

Create a cost basis for a currency.

post/openmeter/currencies/custom/{currencyId}/cost-bases

Path parameters

currencyIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

fiat_codestring required

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

ratestring required

Numeric represents an arbitrary precision number.

effective_fromstring date-time

RFC3339 formatted date-time string in UTC.

effective_tostring date-time

RFC3339 formatted date-time string in UTC.

Example request

{
  "fiat_code": "USD",
  "effective_from": "2023-01-01T01:01:01.001Z",
  "effective_to": "2023-01-01T01:01:01.001Z"
}

Response

CostBasis created response.

idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

fiat_codestring required

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

ratestring required

Numeric represents an arbitrary precision number.

effective_fromstring date-time

RFC3339 formatted date-time string in UTC.

effective_tostring date-time

RFC3339 formatted date-time string in UTC.

created_atstring date-time required

RFC3339 formatted date-time string in UTC.

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "fiat_code": "USD",
  "effective_from": "2023-01-01T01:01:01.001Z",
  "effective_to": "2023-01-01T01:01:01.001Z",
  "created_at": "2023-01-01T01:01:01.001Z"
}