Currency
Manage currency codes and exchange rates for multi-currency support.
Path Parameter:
:CODE (string) — the currency code in the URL pathEndpoints
GET
/currencyList all currencies with pagination
GET
/currency/:CODEGet single currency by code
POST
/currencyCreate new currency
PUT
/currency/:CODEUpdate currency (by code in URL)
DELETE
/currency/:CODEDelete currency (by code in URL)
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| code | string | Yes | Unique currency code. Use standard 3-letter codes (e.g., USD, EUR, MYR). |
| description | string | Yes | Full display name of the currency. |
| symbol | string | No | Currency symbol shown in reports. If omitted, copies from code field. Default: Copies from code |
| isocode | string | No | ISO 4217 three-letter currency code for international banking. Default: null |
| buyingrate | string | No | Exchange rate to buy this currency. Stored as string. For base currency, use '1'. Default: "1" |
| sellingrate | string | No | Exchange rate to sell this currency. Stored as string. Default: "1" |
| fcgainaccount | string | No | Account code for foreign exchange gains. Get from GET /account. Default: null |
| fclossaccount | string | No | Account 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)Important: POST returns 200 (not 201). PUT response excludes the sdscurrencyrate array. DELETE returns plain text "OK", not JSON.
