Currency

Manage currency codes and exchange rates for multi-currency support.

Path Parameter::CODE (string) — the currency code in the URL path

Endpoints

GET
/currency

List all currencies with pagination

GET
/currency/:CODE

Get single currency by code

POST
/currency

Create new currency

PUT
/currency/:CODE

Update currency (by code in URL)

DELETE
/currency/:CODE

Delete currency (by code in URL)

Fields

FieldTypeRequiredNotes
codestring
Yes
Unique currency code. Use standard 3-letter codes (e.g., USD, EUR, MYR).
descriptionstring
Yes
Full display name of the currency.
symbolstringNoCurrency symbol shown in reports. If omitted, copies from code field.
Default: Copies from code
isocodestringNoISO 4217 three-letter currency code for international banking.
Default: null
buyingratestringNoExchange rate to buy this currency. Stored as string. For base currency, use '1'.
Default: "1"
sellingratestringNoExchange rate to sell this currency. Stored as string.
Default: "1"
fcgainaccountstringNoAccount code for foreign exchange gains. Get from GET /account.
Default: null
fclossaccountstringNoAccount code for foreign exchange losses. Get from GET /account.
Default: null

Get All Currencies

curl "https://api.sql.my/v1/currency?offset=0&limit=10" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Authorization: AWS4-HMAC-SHA256 Credential=..."

RESPONSES

Success - List of currencies returned

{
  "data": [
    {
      "code": "MYR",
      "description": "Malaysian Ringgit",
      "symbol": "RM",
      "isocode": "MYR",
      "buyingrate": "1.00",
      "sellingrate": "1.00",
      "fcgainaccount": null,
      "fclossaccount": null
    },
    {
      "code": "USD",
      "description": "US Dollar",
      "symbol": "$",
      "isocode": "USD",
      "buyingrate": "4.35",
      "sellingrate": "4.45",
      "fcgainaccount": "400-001",
      "fclossaccount": "500-001"
    }
  ],
  "totalCount": 2
}

Create New Currency

curl -X POST "https://api.sql.my/v1/currency" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Authorization: AWS4-HMAC-SHA256 Credential=..." \
  -H "Content-Type: application/json" \
  -d '{
    "code": "SGD",
    "description": "Singapore Dollar",
    "symbol": "S$",
    "buyingrate": "3.20",
    "sellingrate": "3.30"
  }'

RESPONSES

Success - Currency created successfully

{
  "code": "SGD",
  "description": "Singapore Dollar",
  "symbol": "S$",
  "isocode": null,
  "buyingrate": "3.20",
  "sellingrate": "3.30",
  "fcgainaccount": null,
  "fclossaccount": null,
  "attachments": null
}

Examples

PUT — Update Exchange Rates

PUT /currency/USD
{
  "buyingrate": "4.35",
  "sellingrate": "4.45"
}

DELETE Currency

DELETE /currency/USD

Response: "OK" (plain text)