Skip to main content
Servix Iran market data API

Endpoints

Available asset routes

These routes match the current backend implementation.

GET /api/v1/assets/USD_RLS

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "X-API-Key: <your-api-key>"

Authentication

Use the issued key on every assets request.

The protected API accepts two API key formats. Pick one and use it consistently in your client or backend worker.

  • Every successful assets request counts toward the daily quota included in your plan.
  • The full assets list, a single asset lookup, a dated lookup, and a historical date-range request are all available under the same assets API.

Use the issued key on every assets request.

X-API-Key: <your-api-key>
Authorization: ApiKey <your-api-key>

API Key Safety

Keep API keys out of URLs.

URLs are easy to copy, bookmark, log, and share by accident. Keep the secret in a request header instead.

  • Browser history, reverse proxy logs, server access logs, monitoring tools, analytics, referrer headers, screenshots, and support messages can all preserve full URLs.
  • If the API key is part of the URL, anyone who sees that URL may be able to use the key.

How this app handles it

  • Protected assets endpoints read API keys from X-API-Key or Authorization: ApiKey headers.
  • If conflicting API key headers are sent, or a bearer token is mixed with an API key, the request is rejected.
  • Normal non-secret filters, such as from and to dates, can stay in the URL while the API key stays in the header.

Do not use: API key in URL

https://servix.cc/api/v1/assets/USD_RLS?api_key=<your-api-key>

Use headers instead

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "X-API-Key: <your-api-key>"

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "Authorization: ApiKey <your-api-key>"

Safe query filters with header auth

curl -sS "https://servix.cc/api/v1/assets/USD_RLS/history?from=2026-04-01&to=2026-04-13" \
  -H "X-API-Key: <your-api-key>"

Endpoints

Endpoints

GET /api/v1/assets

Return the latest full list of supported assets.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Optional query parameter codes; omit it for the full list.
Quota
One quota unit after valid authentication, even if later validation or processing returns an error.
Important errors
400 invalid codes; 401 invalid or missing key; 403 unavailable account access; 404 current observation unavailable; 429 daily limit.

cURL request

curl -sS https://servix.cc/api/v1/assets \
  -H "X-API-Key: <your-api-key>"

Safe example response

[
  {
    "code": "USD_RLS",
    "name": "USD_RLS",
    "slug": "usd_rls",
    "labelEn": "US Dollar / Iranian Rial",
    "labelFa": "دلار آمریکا / ریال ایران",
    "quoteUnit": "RLS",
    "value": "<protected-market-value>",
    "businessTime": "<source-timestamp>"
  }
]
GET /api/v1/assets/supported

Return the supported asset catalog with labels, provider coverage, and freshness status.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Optional query parameters category and quoteUnit; when both are present they are intersected.
Quota
One quota unit.
Important errors
400 invalid filter; 401 invalid or missing key; 403 unavailable account access; 429 daily limit.

cURL request

curl -sS "https://servix.cc/api/v1/assets/supported?category=CRYPTO&quoteUnit=RLS" \
  -H "X-API-Key: <your-api-key>"

Safe example response

{
  "updatedAt": "<response-timestamp>",
  "staleThresholdMinutes": 60,
  "assets": [
    {
      "code": "USD_RLS",
      "baseCode": "USD",
      "category": "FX",
      "labelEn": "US Dollar / Iranian Rial",
      "labelFa": "دلار آمریکا / ریال ایران",
      "quoteUnit": "RLS",
      "providers": ["SERVIX"],
      "providerSupported": true,
      "latestValueAvailable": true,
      "latestValue": "<protected-market-value>",
      "businessTime": "<source-timestamp>",
      "sourceTime": "<source-timestamp>",
      "insertTime": "<response-timestamp>",
      "qualityStatus": "ACCEPTED",
      "qualityMessage": "",
      "availabilityStatus": "AVAILABLE",
      "stale": false,
      "ohlcAvailable": true,
      "ohlcAvailableFrom": "<source-timestamp>"
    }
  ]
}
GET /api/v1/assets/USD_RLS

Return the latest value for one asset code.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Path assetName: a code from the supported catalog.
Quota
One quota unit.
Important errors
401 invalid or missing key; 403 unavailable account access; 404 unknown asset or missing current observation; 429 daily limit.

cURL request

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "X-API-Key: <your-api-key>"

Safe example response

{
  "code": "USD_RLS",
  "name": "USD_RLS",
  "slug": "usd_rls",
  "labelEn": "US Dollar / Iranian Rial",
  "labelFa": "دلار آمریکا / ریال ایران",
  "quoteUnit": "RLS",
  "value": "<protected-market-value>",
  "businessTime": "<source-timestamp>"
}
GET /api/v1/assets/USD_RLS/2026-04-13

Return the value for one asset on a specific date.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Path assetName and date in YYYY-MM-DD format.
Quota
One quota unit.
Important errors
400 malformed date; 401; 403; 404 unknown asset or no record for the date; 429.

cURL request

curl -sS https://servix.cc/api/v1/assets/USD_RLS/2026-04-13 \
  -H "X-API-Key: <your-api-key>"

Safe example response

{
  "code": "USD_RLS",
  "name": "USD_RLS",
  "slug": "usd_rls",
  "labelEn": "US Dollar / Iranian Rial",
  "labelFa": "دلار آمریکا / ریال ایران",
  "quoteUnit": "RLS",
  "value": "<protected-market-value>",
  "businessTime": "<source-timestamp>"
}
GET /api/v1/assets/USD_RLS/history?from=2026-04-01&to=2026-04-13

Use query parameters to receive historical values for one asset over a date range.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Path assetName; JSON body with required fromDate and toDate in YYYY-MM-DD format.
Quota
One quota unit for the complete range response.
Important errors
400 missing or malformed body; 401; 403; 404; 417 invalid or overlong range; 429.

cURL request

curl -sS "https://servix.cc/api/v1/assets/USD_RLS/history?from=2026-04-01&to=2026-04-13" \
  -H "X-API-Key: <your-api-key>"

Safe example response

[
  {
    "code": "USD_RLS",
    "name": "USD_RLS",
    "slug": "usd_rls",
    "labelEn": "US Dollar / Iranian Rial",
    "labelFa": "دلار آمریکا / ریال ایران",
    "quoteUnit": "RLS",
    "value": "<protected-market-value>",
    "businessTime": "<source-timestamp>"
  }
]
GET /api/v1/assets/USD_RLS/ohlc?interval=15m&from=2026-08-26T00:00:00Z&to=2026-08-27T00:00:00Z

Return open, high, low, and close candles for one asset in a concrete half-open UTC time range.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Path assetCode; interval is 15m, 1h, 4h, or 1d; from and to use ISO 8601 UTC timestamps, for example from=2026-08-26T00:00:00Z and to=2026-08-27T00:00:00Z. The to boundary is excluded.
Quota
One quota unit for the complete candle response.
Important errors
400 missing, malformed, or unsupported interval/range; 401; 403; 404 unknown asset or no observations; 429.

cURL request

curl -sS "https://servix.cc/api/v1/assets/USD_RLS/ohlc?interval=15m&from=2026-08-26T00:00:00Z&to=2026-08-27T00:00:00Z" \
  -H "X-API-Key: <your-api-key>"

Safe example response

{
  "code": "USD_RLS",
  "baseCode": "USD",
  "labelEn": "US Dollar / Iranian Rial",
  "labelFa": "دلار آمریکا / ریال ایران",
  "quoteUnit": "RLS",
  "interval": "15m",
  "from": "2026-08-26T00:00:00Z",
  "to": "2026-08-27T00:00:00Z",
  "availableFrom": "<source-timestamp>",
  "candles": [
    {
      "start": "2026-08-26T00:00:00Z",
      "end": "2026-08-26T00:15:00Z",
      "open": "<protected-market-value>",
      "high": "<protected-market-value>",
      "low": "<protected-market-value>",
      "close": "<protected-market-value>",
      "observationCount": 4,
      "complete": true
    }
  ]
}
POST /api/v1/assets/USD_RLS

Send a JSON date range body to receive historical values for one asset.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
Path assetName; required query parameters from and to in YYYY-MM-DD format.
Quota
One quota unit for the complete range response.
Important errors
400 missing or malformed input; 401; 403; 404; 417 invalid or overlong range; 429.

cURL request

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "X-API-Key: <your-api-key>" \
  -H "Content-Type: application/json" \
  --data '{"fromDate":"2026-04-01","toDate":"2026-04-13"}'

Safe example response

[
  {
    "code": "USD_RLS",
    "name": "USD_RLS",
    "slug": "usd_rls",
    "labelEn": "US Dollar / Iranian Rial",
    "labelFa": "دلار آمریکا / ریال ایران",
    "quoteUnit": "RLS",
    "value": "<protected-market-value>",
    "businessTime": "<source-timestamp>"
  }
]
GET /api/v1/status

Return public service metadata such as API version, server time, documentation link, and available endpoint names.

Authentication
Public; no API key.
Parameters or body
None.
Quota
Does not consume quota.
Important errors
500 internal service error.

cURL request

curl -sS https://servix.cc/api/v1/status

Safe example response

{
  "status": "OK",
  "application": "price_app",
  "apiVersion": "v1",
  "serverTime": "<response-timestamp>",
  "documentationUrl": "<documentation-url>",
  "endpoints": [
    "GET /api/v1/assets",
    "GET /api/v1/assets/supported",
    "GET /api/v1/assets/{assetName}",
    "GET /api/v1/assets/{assetName}/{date}",
    "GET /api/v1/assets/{assetName}/history?from=YYYY-MM-DD&to=YYYY-MM-DD",
    "GET /api/v1/assets/{assetCode}/ohlc?interval=15m&from=<UTC-time>&to=<UTC-time>",
    "POST /api/v1/assets/{assetName}",
    "GET /api/v1/status",
    "GET /api/v1/access"
  ]
}
GET /api/v1/access

Return the authenticated account's current access type and attribution requirement.

Authentication
API key in X-API-Key or Authorization: ApiKey.
Parameters or body
None.
Quota
Does not consume assets quota.
Important errors
401 invalid or missing key; 403 restricted account; 500 internal service error.

cURL request

curl -sS https://servix.cc/api/v1/access \
  -H "X-API-Key: <your-api-key>"

Safe example response

{
  "accessType": "FREE_STARTER",
  "attributionRequired": true
}

Examples

Ready-to-use request and response samples

All technical snippets are formatted like editor panes so they are easy to copy into your own tooling.

Single asset request

curl -sS https://servix.cc/api/v1/assets/USD_RLS \
  -H "X-API-Key: <your-api-key>"

JavaScript fetch example

const response = await fetch("https://servix.cc/api/v1/assets/USD_RLS", {
  headers: { "X-API-Key": "<your-api-key>" }
});
const data = await response.json();

Response payload

{
  "code": "USD_RLS",
  "name": "USD_RLS",
  "slug": "usd_rls",
  "labelEn": "US Dollar / Iranian Rial",
  "labelFa": "دلار آمریکا / ریال ایران",
  "quoteUnit": "RLS",
  "value": "<protected-market-value>",
  "businessTime": "<source-timestamp>"
}

Historical date range body

curl -sS "https://servix.cc/api/v1/assets/USD_RLS/history?from=2026-04-01&to=2026-04-13" \
  -H "X-API-Key: <your-api-key>"

Error response shape

{
  "status": 417,
  "code": "INVALID_DATE_RANGE",
  "message": "The requested date range is not valid.",
  "timestamp": "<response-timestamp>",
  "path": "/api/v1/assets/USD_RLS/history",
  "requestId": "req_example"
}

Compact supported assets list

USD_RLS  |  US Dollar / Iranian Rial
EUR_RLS  |  Euro / Iranian Rial
SEKKEH_RLS  |  Emami Coin / Iranian Rial
NIM_SEKKEH_RLS  |  Half Coin / Iranian Rial
ROB_SEKKEH_RLS  |  Quarter Coin / Iranian Rial
BAHAR_RLS  |  Bahar Azadi Coin / Iranian Rial
GOLD_18_RLS  |  18K Gold / Iranian Rial
GOLD_OUNCE_USD  |  Gold Ounce / US Dollar
SILVER_OUNCE_USD  |  Silver Ounce / US Dollar
PLATINUM_OUNCE_USD  |  Platinum Ounce / US Dollar
BTC_USD  |  Bitcoin / US Dollar
ETH_USD  |  Ethereum / US Dollar
USDT_USD  |  Tether / US Dollar
BNB_USD  |  BNB / US Dollar
XRP_USD  |  XRP / US Dollar
USDC_USD  |  USD Coin / US Dollar
SOL_USD  |  Solana / US Dollar
TRX_USD  |  TRON / US Dollar
HYPE_USD  |  Hyperliquid / US Dollar
DOGE_USD  |  Dogecoin / US Dollar
ZEC_USD  |  Zcash / US Dollar
LINK_USD  |  Chainlink / US Dollar
ADA_USD  |  Cardano / US Dollar
XLM_USD  |  Stellar / US Dollar
DAI_USD  |  Dai / US Dollar
BCH_USD  |  Bitcoin Cash / US Dollar
USDE_USD  |  Ethena USDe / US Dollar
USD1_USD  |  USD1 / US Dollar
CC_USD  |  Canton Coin / US Dollar
LTC_USD  |  Litecoin / US Dollar
USDG_USD  |  Global Dollar / US Dollar
HBAR_USD  |  Hedera / US Dollar
AVAX_USD  |  Avalanche / US Dollar
SUI_USD  |  Sui / US Dollar
SHIB_USD  |  Shiba Inu / US Dollar
PYUSD_USD  |  PayPal USD / US Dollar
XAUT_USD  |  Tether Gold / US Dollar
CRO_USD  |  Cronos / US Dollar
TAO_USD  |  Bittensor / US Dollar
UNI_USD  |  Uniswap / US Dollar
NEAR_USD  |  NEAR Protocol / US Dollar
OKB_USD  |  OKB / US Dollar
PAXG_USD  |  PAX Gold / US Dollar
WLFI_USD  |  World Liberty Financial / US Dollar
RLUSD_USD  |  Ripple USD / US Dollar
ASTER_USD  |  Aster / US Dollar
ONDO_USD  |  Ondo / US Dollar
MNT_USD  |  Mantle / US Dollar
M_USD  |  M / US Dollar
USDD_USD  |  USDD / US Dollar
AAVE_USD  |  Aave / US Dollar
PUMP_USD  |  Pump.fun / US Dollar
SKY_USD  |  Sky / US Dollar
DOT_USD  |  Polkadot / US Dollar
WLD_USD  |  Worldcoin / US Dollar
ICP_USD  |  Internet Computer / US Dollar
PEPE_USD  |  Pepe / US Dollar
ATOM_USD  |  Cosmos / US Dollar
BTC_RLS  |  Bitcoin / Iranian Rial
ETH_RLS  |  Ethereum / Iranian Rial
USDT_RLS  |  Tether / Iranian Rial
BNB_RLS  |  BNB / Iranian Rial
XRP_RLS  |  XRP / Iranian Rial
USDC_RLS  |  USD Coin / Iranian Rial
SOL_RLS  |  Solana / Iranian Rial
TRX_RLS  |  TRON / Iranian Rial
HYPE_RLS  |  Hyperliquid / Iranian Rial
DOGE_RLS  |  Dogecoin / Iranian Rial
ZEC_RLS  |  Zcash / Iranian Rial
LINK_RLS  |  Chainlink / Iranian Rial
ADA_RLS  |  Cardano / Iranian Rial
XLM_RLS  |  Stellar / Iranian Rial
DAI_RLS  |  Dai / Iranian Rial
BCH_RLS  |  Bitcoin Cash / Iranian Rial
USDE_RLS  |  Ethena USDe / Iranian Rial
USD1_RLS  |  USD1 / Iranian Rial
CC_RLS  |  Canton Coin / Iranian Rial
LTC_RLS  |  Litecoin / Iranian Rial
USDG_RLS  |  Global Dollar / Iranian Rial
HBAR_RLS  |  Hedera / Iranian Rial
AVAX_RLS  |  Avalanche / Iranian Rial
SUI_RLS  |  Sui / Iranian Rial
SHIB_RLS  |  Shiba Inu / Iranian Rial
PYUSD_RLS  |  PayPal USD / Iranian Rial
XAUT_RLS  |  Tether Gold / Iranian Rial
CRO_RLS  |  Cronos / Iranian Rial
TAO_RLS  |  Bittensor / Iranian Rial
UNI_RLS  |  Uniswap / Iranian Rial
NEAR_RLS  |  NEAR Protocol / Iranian Rial
OKB_RLS  |  OKB / Iranian Rial
PAXG_RLS  |  PAX Gold / Iranian Rial
WLFI_RLS  |  World Liberty Financial / Iranian Rial
RLUSD_RLS  |  Ripple USD / Iranian Rial
ASTER_RLS  |  Aster / Iranian Rial
ONDO_RLS  |  Ondo / Iranian Rial
MNT_RLS  |  Mantle / Iranian Rial
M_RLS  |  M / Iranian Rial
USDD_RLS  |  USDD / Iranian Rial
AAVE_RLS  |  Aave / Iranian Rial
PUMP_RLS  |  Pump.fun / Iranian Rial
SKY_RLS  |  Sky / Iranian Rial
DOT_RLS  |  Polkadot / Iranian Rial
WLD_RLS  |  Worldcoin / Iranian Rial
ICP_RLS  |  Internet Computer / Iranian Rial
PEPE_RLS  |  Pepe / Iranian Rial
ATOM_RLS  |  Cosmos / Iranian Rial
GOLD_MESGHAL_RLS  |  Gold Mesghal / Iranian Rial
GOLD_24_RLS  |  24K Gold / Iranian Rial
STOCK_IR  |  Iran Stock Index
AFN_RLS  |  Afghan Afghani / Iranian Rial
AED_RLS  |  UAE Dirham / Iranian Rial
AMD_RLS  |  Armenian Dram / Iranian Rial
AZN_RLS  |  Azerbaijani Manat / Iranian Rial
BHD_RLS  |  Bahraini Dinar / Iranian Rial
BRL_RLS  |  Brazilian Real / Iranian Rial
GBP_RLS  |  British Pound / Iranian Rial
CAD_RLS  |  Canadian Dollar / Iranian Rial
CHF_RLS  |  Swiss Franc / Iranian Rial
DKK_RLS  |  Danish Krone / Iranian Rial
GEL_RLS  |  Georgian Lari / Iranian Rial
GERAMI_SEKKEH_RLS  |  One Gram Coin / Iranian Rial
HKD_RLS  |  Hong Kong Dollar / Iranian Rial
INR_RLS  |  Indian Rupee / Iranian Rial
IQD_RLS  |  Iraqi Dinar / Iranian Rial
KWD_RLS  |  Kuwaiti Dinar / Iranian Rial
MYR_RLS  |  Malaysian Ringgit / Iranian Rial
NOK_RLS  |  Norwegian Krone / Iranian Rial
NZD_RLS  |  New Zealand Dollar / Iranian Rial
OMR_RLS  |  Omani Rial / Iranian Rial
PKR_RLS  |  Pakistani Rupee / Iranian Rial
QAR_RLS  |  Qatari Riyal / Iranian Rial
SAR_RLS  |  Saudi Riyal / Iranian Rial
SEK_RLS  |  Swedish Krona / Iranian Rial
SGD_RLS  |  Singapore Dollar / Iranian Rial
THB_RLS  |  Thai Baht / Iranian Rial
TRY_RLS  |  Turkish Lira / Iranian Rial
AUD_RLS  |  Australian Dollar / Iranian Rial
JPY_RLS  |  Japanese Yen / Iranian Rial
CNY_RLS  |  Chinese Yuan / Iranian Rial
RUB_RLS  |  Russian Ruble / Iranian Rial