Developer API

API Documentation

Use our public API to access real-time Syrian Pound exchange rate data

Getting Started

Base URL
BASE URL
https://lirascope.syria-cloud.sy/api/v1
Free API Access
Public endpoints are freely accessible without any account or API key. Up to 300 requests/month per IP address.

AI Agent & Developer Resources

Machine-readable files that let AI agents and developer tools understand the LiraScope API quickly.

Authentication

The API is public and does not require authentication for public endpoints

No AuthPublic Endpoints
  • /rates/*
  • /crypto/*
  • /gold/*
  • /pricing

300 requests/month per IP — completely free

API Key RequiredPrivate Endpoints
  • /client/*

Subscribe for higher limits and advanced features

Endpoints

GET/rates/latest

Get Latest Rates

Retrieve the latest exchange rates from Central Bank and black market sources

Query Parameters
currenciesOptional

Comma-separated list of currencies (e.g., USD,EUR)

langOptional

Language code (ar, en, de) - Default: ar

Example Request
cURL
curl "https://lirascope.syria-cloud.sy/api/v1/rates/latest?currencies=USD,EUR&lang=en"
Example Response
JSON
{
  "disclaimer": "...",
  "timestampUtc": "2026-01-29T02:00:00Z",
  "cbsRates": [
    {
      "currency": "USD",
      "buy": 110.00,
      "sell": 111.00,
      "mid": 110.50,
      "timestampUtc": "2026-01-29T01:59:47Z",
      "isManualOverride": false
    }
  ],
  "marketRates": [
    {
      "currency": "USD",
      "buy": 116.80,
      "sell": 117.50,
      "mid": 117.15,
      "timestampUtc": "2026-01-29T01:54:46Z",
      "isManualOverride": false
    },
    {
      "currency": "EUR",
      "buy": 138.40,
      "sell": 140.30,
      "mid": 139.35,
      "timestampUtc": "2026-01-29T01:54:46Z",
      "isManualOverride": false
    }
  ],
  "effectiveRates": [...]
}
GET/rates/usd-based

Get USD-Based Rates

Retrieve the latest exchange rates with USD as the base currency

Query Parameters
langOptional

Language code (ar, en, de) - Default: ar

Example Request
cURL
curl "https://lirascope.syria-cloud.sy/api/v1/rates/usd-based?lang=en"
Example Response
JSON
{
  "disclaimer": "...",
  "base": "USD",
  "date": "2026-03-10",
  "timestampUtc": "2026-03-10T12:00:00Z",
  "rates": [
    { "currency": "AED", "buy": 3.6594, "sell": 3.6814, "mid": 3.6704 },
    { "currency": "CHF", "buy": 0.8798, "sell": 0.8851, "mid": 0.8824 },
    { "currency": "EGP", "buy": 49.721, "sell": 50.019, "mid": 49.870 },
    { "currency": "EUR", "buy": 0.9174, "sell": 0.9229, "mid": 0.9201 },
    { "currency": "GBP", "buy": 0.7820, "sell": 0.7867, "mid": 0.7843 },
    { "currency": "KWD", "buy": 0.3066, "sell": 0.3085, "mid": 0.3075 },
    { "currency": "SAR", "buy": 3.7477, "sell": 3.7702, "mid": 3.7590 },
    { "currency": "TRY", "buy": 43.945, "sell": 44.209, "mid": 44.077 }
  ]
}
Response Fields
base

Base currency (USD)

date

Date of the last rate update

rates[].currency

ISO 4217 currency code (e.g. EUR, GBP)

rates[].mid

Mid (reference) rate — 1 USD = X units

rates[].buy

Buy rate derived from market data

rates[].sell

Sell rate derived from market data

GET/crypto/latest

Latest Crypto Prices

Get the latest cryptocurrency prices in USD with 24h change data.

Query Parameters
langOptional

Response language (ar, en, de)

Example Request
cURL
curl "https://lirascope.syria-cloud.sy/api/v1/crypto/latest?lang=en"
GET/gold/latest

Latest Gold Prices

Get the latest gold prices in USD with 24h change data.

Query Parameters
langOptional

Response language (ar, en, de)

Example Request
cURL
curl "https://lirascope.syria-cloud.sy/api/v1/gold/latest?lang=en"

Response Fields

disclaimer

Disclaimer message (localized)

timestampUtc

UTC Timestamp

cbsRates

Central Bank rates

marketRates

Market rates

effectiveRates

Effective rates (manual overrides or market)

[].currency

Currency code

[].buy

Buy rate

[].sell

Sell rate

[].mid

Mid rate

[].timestampUtc

Update time

[].isManualOverride

Whether it's a manual rate

Rate Limits

To protect the API from abuse, the following rate limits are applied to all public endpoints.

TierAuthMonthlyPer MinutePer Hour
Free (by IP)No Auth3005100
StarterAPI Key Required10,0001001,000
ProfessionalAPI Key Required500,00050020,000
EnterpriseAPI Key RequiredUnlimitedUnlimitedUnlimited

Upgrade to a paid plan for higher limits. View Plans

Rate Limit Headers

All API responses include rate limit information:

HTTP
X-Rate-Limit-Limit: 5
X-Rate-Limit-Remaining: 3
X-Rate-Limit-Reset: 2026-02-04T10:15:00Z
HTTP 429 Response

When rate limit is exceeded:

JSON
{
  "error": "Rate limit exceeded. Please retry after 45 seconds.",
  "retryAfter": 45
}

Private API & Webhooks

The Private API lets you build integrations with signed webhook alerts for exchange rate conditions.

Private API Authentication

All /client/* endpoints require a public key and a private key sent in the request headers.

X-Api-Key

Your public key (lsp_pub_...)

X-Api-Secret

Your private key (lsp_prv_...)

cURL
curl -X GET https://lirascope.syria-cloud.sy/api/v1/client/me \
  -H "X-Api-Key: lsp_pub_a1b2c3..." \
  -H "X-Api-Secret: lsp_prv_d4e5f6..."
The private key is shown only once at creation time. Save it immediately in a secure location.
GET/client/me

Client Profile

View your account information and registered webhook count.

Example Response
JSON
{
  "id": "3fa85f64-...",
  "name": "My Integration",
  "publicKey": "lsp_pub_a1b2c3...",
  "isActive": true,
  "createdUtc": "2026-03-08T00:00:00Z",
  "lastUsedUtc": "2026-03-08T12:00:00Z",
  "webhookCount": 2
}

Webhooks

Register URLs to receive automatic alerts when rate conditions are met.

GET/client/webhooksList all webhooks
POST/client/webhooksCreate a new webhook
PUT/client/webhooks/{id}Update a webhook
DELETE/client/webhooks/{id}Delete a webhook
Example Request
cURL
curl -X POST https://lirascope.syria-cloud.sy/api/v1/client/webhooks \
  -H "X-Api-Key: lsp_pub_a1b2c3..." \
  -H "X-Api-Secret: lsp_prv_d4e5f6..." \
  -H "Content-Type: application/json" \
  -d '{
    "webhookUrl": "https://my-server.com/hooks/rate-alert",
    "currency": "USD",
    "source": "MARKET",
    "alertType": 0,
    "thresholdValue": 15000.0,
    "label": "USD high alert"
  }'
Alert Types
0 — ABOVE

Trigger when rate ≥ threshold

1 — BELOW

Trigger when rate ≤ threshold

2 — CHANGE_INCREASE

Trigger when rate increases by threshold %

3 — CHANGE_DECREASE

Trigger when rate decreases by threshold %

Webhook Payload

When an alert condition is met, LiraScope sends a POST request to your configured webhook URL.

Headers
HTTP
Content-Type: application/json
X-LiraScope-Signature: sha256=<hex-digest>
X-LiraScope-Event: rate_alert
Example Response
JSON
{
  "event": "rate_alert",
  "currency": "USD",
  "source": "MARKET",
  "alertType": "ABOVE",
  "threshold": 15000.0,
  "currentRate": 15250.0,
  "previousRate": 14800.0,
  "label": "USD high alert",
  "webhookId": "7c9e6679-...",
  "timestampUtc": "2026-03-08T12:30:00Z"
}

Signature Verification

Verify the payload authenticity using HMAC-SHA256 with your public key as the secret.

Node.js
const crypto = require('crypto');

function verifySignature(body, publicKey, signatureHeader) {
  const expected = crypto.createHmac('sha256', publicKey)
    .update(body).digest('hex');
  const received = signatureHeader.replace('sha256=', '');
  return crypto.timingSafeEqual(
    Buffer.from(expected), Buffer.from(received)
  );
}

Webhook Reliability

  • Webhooks that fail 10 consecutive times are automatically disabled.
  • Re-enable via the dashboard or the PUT /client/webhooks/{id} endpoint.
  • The lastDeliveryStatusCode and consecutiveFailures fields show delivery health.

Support

For support or to report issues, please contact info@omarino.de