Resources
Currencies

Currencies API

The Currencies API allows you to retrieve information about all supported currencies in the system. This is useful for building currency selection dropdowns, validating currency codes, and understanding which currencies are available for transactions.

List All Currencies

Retrieve a list of all supported currencies, including their status (active/inactive) and metadata.

Endpoint

GET /api/v1/currencies

Authentication

This endpoint requires JWT authentication. Include your access token in the Authorization header:

Authorization: Bearer <your-access-token>

Success Response (200 OK)

Returns an array of currency objects:

[
  {
    "code": "USD",
    "name": "US Dollar",
    "active": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "code": "NGN",
    "name": "Nigerian Naira",
    "active": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "code": "EUR",
    "name": "Euro",
    "active": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  },
  {
    "code": "GBP",
    "name": "British Pound",
    "active": false,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-20T14:20:00Z"
  }
]

Response Fields

FieldTypeDescription
codestringThree-letter currency code (ISO 4217 standard, e.g., "USD", "EUR", "NGN")
namestringFull name of the currency
activebooleanWhether the currency is currently active and available for transactions
created_atstring (ISO 8601)Timestamp when the currency was added to the system
updated_atstring (ISO 8601)Timestamp when the currency was last updated

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing JWT token
500Internal server error

Example: cURL

curl -X GET /api/v1/currencies \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Example: HTTP Request

GET /api/v1/currencies HTTP/1.1
Host: api.sznd.app
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json

Use Cases

  1. Currency Selection - Populate currency dropdowns in your application
  2. Validation - Validate currency codes before making API requests
  3. Display Names - Show user-friendly currency names instead of codes
  4. Active Status Check - Filter out inactive currencies from user selections
  5. Currency Lookup - Create lookup tables for currency code to name mapping

Best Practices

  1. Cache Results - Currency lists don't change frequently, so cache the response
  2. Filter Active Only - Only show active currencies to users in selection dropdowns
  3. Store Currency Codes - Use ISO 4217 currency codes consistently throughout your application
  4. Handle Inactive Currencies - If a previously active currency becomes inactive, handle it gracefully in your UI

Supported Currency Codes

Common currency codes include:

  • USD - US Dollar
  • EUR - Euro
  • GBP - British Pound
  • NGN - Nigerian Naira
  • CAD - Canadian Dollar
  • KES - Kenyan Shilling
  • GHS - Ghanaian Cedi
  • ZAR - South African Rand

Note: The full list of supported currencies may vary. Always use the API to get the current list of available currencies.


Next Steps

  • Exchange Rates - Get current exchange rates between currencies
  • Wallets API - View wallet balances for different currencies
  • Quotes API - Create quotes for currency conversions