Skip to content

Add Currency

Adds a currency to the platform registry. Currency records are add-only: the code, name, and precision cannot be changed after creation, and no currency update or delete operation is available. Configure precision here; group APIs expose the joined precision as read-only money_digits.

POST

https://{broker_domain}/mng/currency

Authorization

Requires an authenticated superadmin session. Ordinary manager permissions do not grant access to this operation.

Request

Content-Type: application/json

{
  "code": "TEST3",
  "name": "Three-digit unit",
  "money_digits": 3
}

Request Parameters

Field Type Required Description
code string Yes Uppercase currency code, 1–16 characters, each from A-Z, 0-9, ., _, or -. Immutable after creation.
name string Yes Display name, 1–128 characters. Immutable after creation.
money_digits integer Yes Fractional digits for monetary values in the currency; range 0–8. Immutable after creation.

Response Parameters

Field Type Description
code string Newly added immutable currency code.
name string Immutable display name.
money_digits integer Immutable money precision, 0–8.

Success response (200)

Returns the new currency record as a flat object after admission to RAM and the ordered background persistence queue. This is not a synchronous database commit acknowledgement.

{
  "code": "TEST3",
  "name": "Three-digit unit",
  "money_digits": 3
}

Errors

HTTP Error Description
400 INVALID_CURRENCY Missing or invalid currency fields.
401 PERMISSION_DENIED Missing or invalid session JWT.
403 RET_NOT_ENOUGH_RIGHTS The authenticated administrator lacks superadmin permission.
409 CURRENCY_ALREADY_EXISTS A currency with this code already exists. Existing records cannot be overwritten.
503 CURRENCY_UNAVAILABLE Currency registry is unavailable or the new record could not be admitted to the persistence queue.