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 free without an account or API key, limited to 60 requests/minute and 1,200/hour per IP.

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

60 requests/minute and 1,200/hour per IP

API Key RequiredPrivate Endpoints
  • /client/*

API keys add a monthly quota and webhooks, and verified requests bypass the shared IP limit.

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, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "CHF", "buy": 0.8798, "sell": 0.8851, "mid": 0.8824, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "EGP", "buy": 49.721, "sell": 50.019, "mid": 49.870, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "EUR", "buy": 0.9174, "sell": 0.9229, "mid": 0.9201, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "GBP", "buy": 0.7820, "sell": 0.7867, "mid": 0.7843, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "KWD", "buy": 0.3066, "sell": 0.3085, "mid": 0.3075, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "SAR", "buy": 3.7477, "sell": 3.7702, "mid": 3.7590, "timestampUtc": "2026-03-10T11:59:00Z" },
    { "currency": "TRY", "buy": 43.945, "sell": 44.209, "mid": 44.077, "timestampUtc": "2026-03-10T11:59:00Z" }
  ]
}
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

rates[].timestampUtc

Update time

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

Public calls are limited per IP. Verified calls are limited to 60/minute per key plus the plan monthly quota.

TierAuthMonthlyPer MinutePer Hour
Free (by IP)No Auth—60 / IP1,200 / IP
FreeAPI Key Required30060 / key—
StarterAPI Key Required10,00060 / key—
ProfessionalAPI Key Required500,00060 / key—
EnterpriseAPI Key RequiredUnlimited60 / key—

Paid plans increase the monthly quota and webhook allowance. View Plans

Rate Limit Headers

All API responses include rate limit information:

HTTP
X-Rate-Limit-Limit: 60
X-Rate-Limit-Remaining: 58
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/webhooks— List all webhooks
POST/client/webhooks— Create 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-Version: 2
X-LiraScope-Timestamp: <unix-seconds>
X-LiraScope-Signature-256: <hex-hmac>
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 HMAC-SHA256 with the show-once signing secret over timestamp.rawBody, and reject timestamps older than five minutes.

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

function verifySignature(body, timestamp, received, signingSecret) {
  if (Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp)) > 300) return false;
  const expected = crypto.createHmac('sha256', signingSecret)
    .update(timestamp + '.' + body).digest('hex');
  const a = Buffer.from(expected, 'hex');
  const b = Buffer.from(received, 'hex');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

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.

Integrations

Use LiraScope in WordPress and WHMCS, or build an embeddable rate card.

LiraScope for WordPress

Add official and market SYP rates, gap tables, charts, converters, blocks, widgets, exports, and WooCommerce rate feeds.

LiraScope for WHMCS

Display official and market Syrian Pound rates in the admin and client areas, and update the SYP billing rate through an optional guarded and auditable feed.

Embed builder

Configure a hosted rate card for any website without installing a plugin.

Open embed builder

Support

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