Sri Lanka Macro Data

CBSL
Ready
API Dashboard
Exchange Rates
Commodity Prices
Food Prices
API Docs
LKR / USD β€” Exchange Rate
No data for selected range
Wholesale Price (LKR)
No data for selected range
Retail Price (LKR)
No data for selected range
Wholesale vs Retail β€” All Markets
No data for selected range

Food Price Intelligence

DCS weekly retail prices — Sri Lanka
Source Status
Loading…
Live Log β€” idle
Pipeline output
Click Run Now on any card to stream logs here.
Schedule Control
Schedules
Source Enabled Interval (h) Last run Next run
Loading…
Backfill
Email Notifications
Recent Pipeline Runs
Source Type Status Started (UTC) Duration Rows Error
Loading…

REST API Documentation

All endpoints return JSON. Base URL: https://macro.coexinbrand.com

GET /health

Liveness check

$ curl https://macro.coexinbrand.com/health
{"status":"healthy","service":"srilanka-macro-api","version":"1.0.0"}
GET /api/v1/macro/exchange-rates

Query daily LKR exchange rates

Query Parameters:
currency_code (string) β€” ISO 4217 code, e.g. USD, EUR
date_from (date) β€” Start date (YYYY-MM-DD)
date_to (date) β€” End date (YYYY-MM-DD)
limit (int, 1–1000, default 100) β€” Page size
offset (int, default 0) β€” Pagination offset
$ curl "https://macro.coexinbrand.com/api/v1/macro/exchange-rates?currency_code=USD&date_from=2026-06-01&limit=2"
[
  {
    "date":"2026-05-29",
    "currency_code":"USD",
    "currency_name":"US Dollar",
    "buying_rate":"324.4550",
    "selling_rate":"334.2444",
    "indicative_rate":"329.3497",
    "is_imputed":false,
    "source_url":"https://www.cbsl.gov.lk/..."
  }
]
GET /api/v1/macro/currencies

List all currencies with date coverage

$ curl https://macro.coexinbrand.com/api/v1/macro/currencies
[
  {
    "currency_code":"USD",
    "currency_name":"US Dollar",
    "earliest_date":"2005-01-03",
    "latest_date":"2026-05-29",
    "record_count":5382
  }
]
GET /api/v1/macro/summary

Latest snapshot of all currencies and commodities (no parameters)

$ curl https://macro.coexinbrand.com/api/v1/macro/summary
{
  "exchange_rates": {
    "as_of":"2026-05-29",
    "rates": [{"currency_code":"USD",...}]
  },
  "commodity_prices": {
    "as_of":"2026-06-13",
    "prices": [{"market_name":"Pettah",...}]
  }
}
GET /api/v1/market/prices

Query commodity market prices from CBSL price reports

Query Parameters:
item_name (string) β€” Partial match, e.g. "Tomato"
market_name (string) β€” Partial match: "Pettah", "Dambulla", "Narahenpita"
item_type (string) β€” Exact match: Rice, Vegetable, Fruit, Fish, Pulse, Spice, Other
date_from, date_to, limit, offset β€” Same as exchange rates
$ curl "https://macro.coexinbrand.com/api/v1/market/prices?item_name=Rice&market_name=Pettah&limit=2"
[
  {
    "date":"2026-06-13",
    "market_name":"Pettah",
    "item_name":"Samba Rice",
    "item_type":"Rice",
    "unit":"Rs./kg",
    "wholesale_price":"185.00",
    "retail_price":"210.00",
    "is_imputed":false
  }
]
GET /api/v1/market/items

List all commodity items with type and date coverage

$ curl https://macro.coexinbrand.com/api/v1/market/items
[
  {
    "item_name":"Samba Rice",
    "item_type":"Rice",
    "earliest_date":"2023-01-05",
    "latest_date":"2026-06-13",
    "market_count":3
  }
]
GET /docs

Interactive API documentation (Swagger UI)

View at: https://macro.coexinbrand.com/docs