> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avraapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CBSL Rates

> Use CBSL indicative, buying, and selling LKR rate types through the Currency API.

AvraAPI gives developers a free, no-credit way to use published Central Bank of Sri Lanka (CBSL) LKR rate types without scraping a daily table. Select the rate type through the `target` path value on the normal pair and amount-conversion endpoints.

<Note>
  The CBSL experience uses the same project credentials, request envelope, and Currency endpoints as a standard conversion. No separate provider account or CBSL-specific key is required.
</Note>

## CBSL API endpoints

Use one of these complete URLs. Replace `{base}`, `{target}`, and `{amount}` with your request values.

### Rate only

```text title="GET — rate only" theme={null}
https://avraapi.com/api/v1/utility/currency/pair/{base}/{target}
```

### Convert an amount at a CBSL rate

```text title="GET — rate and converted amount" theme={null}
https://avraapi.com/api/v1/utility/currency/pair/{base}/{target}/{amount}
```

## The three CBSL target codes

<CardGroup cols={3}>
  <Card title="LKR-SELL" icon="arrow-up-right">
    CBSL Telegraphic Transfer selling rate: the published rate at which a bank sells the foreign currency.
  </Card>

  <Card title="LKR-BUY" icon="arrow-down-left">
    CBSL Telegraphic Transfer buying rate: the published rate at which a bank buys the foreign currency.
  </Card>

  <Card title="LKR-CBSL" icon="chart-line">
    CBSL indicative rate: the published indicative LKR rate for the selected base currency.
  </Card>
</CardGroup>

## LKR-SELL — Telegraphic Transfer selling rate

Use `LKR-SELL` when you need the CBSL Telegraphic Transfer selling rate for the selected base currency.

```bash curl theme={null} theme={null}
curl "https://avraapi.com/api/v1/utility/currency/pair/USD/LKR-SELL/10" \
  -H "X-API-KEY: YOUR_PROJECT_CLIENT_ID" \
  -H "X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET" \
  -H "X-ENV: development" \
  -H "Accept: application/json"
```

```json title="Response" theme={null}
{
  "success": true,
  "request_id": "61014f68-8bb7-483a-bec6-7dfe23b3d6af",
  "data": {
    "base": "USD",
    "target": "LKR-SELL",
    "rate": 332.6643,
    "amount": 10,
    "conversion_result": 3326.643,
    "last_updated": "2026-09-29 11:01:21"
  }
}
```

## LKR-BUY — Telegraphic Transfer buying rate

Use `LKR-BUY` when you need the CBSL Telegraphic Transfer buying rate for the selected base currency.

```bash curl theme={null} theme={null}
curl "https://avraapi.com/api/v1/utility/currency/pair/USD/LKR-BUY/10" \
  -H "X-API-KEY: YOUR_PROJECT_CLIENT_ID" \
  -H "X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET" \
  -H "X-ENV: development" \
  -H "Accept: application/json"
```

```json title="Response shape" theme={null}
{
  "success": true,
  "request_id": "61014f68-8bb7-483a-bec6-7dfe23b3d6af",
  "data": {
    "base": "USD",
    "target": "LKR-BUY",
    "rate": 332.6643,
    "amount": 10,
    "conversion_result": 3326.643,
    "last_updated": "2026-09-29 11:01:21"
  }
}
```

## LKR-CBSL — indicative rate

Use `LKR-CBSL` when you need the CBSL indicative LKR rate for the selected base currency.

```bash curl theme={null} theme={null}
curl "https://avraapi.com/api/v1/utility/currency/pair/USD/LKR-CBSL/10" \
  -H "X-API-KEY: YOUR_PROJECT_CLIENT_ID" \
  -H "X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET" \
  -H "X-ENV: development" \
  -H "Accept: application/json"
```

```json title="Response shape" theme={null}
{
  "success": true,
  "request_id": "61014f68-8bb7-483a-bec6-7dfe23b3d6af",
  "data": {
    "base": "USD",
    "target": "LKR-CBSL",
    "rate": 332.6643,
    "amount": 10,
    "conversion_result": 3326.643,
    "last_updated": "2026-09-29 11:01:21"
  }
}
```

<Note>
  Rates, request IDs, and update times are dynamic. The `LKR-BUY` and `LKR-CBSL` examples show the real response structure; do not reuse the illustrated `LKR-SELL` value as a buy or indicative rate.
</Note>

## Direct CBSL data and fallback behaviour

AvraAPI currently stores direct CBSL records for these base currencies:

`USD`, `GBP`, `EUR`, `JPY`, `CNY`, and `AUD`.

For one of these bases, a CBSL target code selects the matching published CBSL buy, sell, or indicative value. If the base is outside that set, or AvraAPI has no usable direct CBSL record at that moment, the API deliberately falls back to the normal LKR cross-rate and still returns `200`.

This means a target such as `LKR-SELL` is a **request for that CBSL rate type**, not a response field that proves the result came from a direct CBSL record. The current response does not include a `source` or `fallback` flag. If your workflow requires proof of a particular published CBSL value, retain the response, check `last_updated`, and apply your own business approval before using it.

## What `last_updated` means

Every rate response contains `last_updated`: the source-update value AvraAPI currently holds for the rate data. It helps you decide whether data is recent enough for your use case, but its string format is not a versioned API guarantee. It is not a settlement timestamp and it does not replace your own pricing, reconciliation, or audit controls.

## CBSL terminology

CBSL describes its buying and selling values as daily Telegraphic Transfer (TT) exchange rates quoted by commercial banks in Colombo, while the USD/LKR spot indicative value is a weighted average of domestic inter-bank transactions. AvraAPI keeps those rate types separate through `LKR-BUY`, `LKR-SELL`, and `LKR-CBSL`; do not substitute one for another without understanding your business requirement. [CBSL exchange-rate information](https://www.cbsl.gov.lk/en/node/146) and [CBSL daily buying and selling rate page](https://www.cbsl.gov.lk/cbsl_custom/param/ratewindowta.php) explain the source terminology.

<Warning>
  Currency data is informational. It can change, may be unavailable, and may not be suitable for a customer quote, a bank settlement, tax treatment, or a regulated financial calculation without your own validation.
</Warning>

## Next steps

* Browse the four Currency endpoints in the sidebar for their exact request and response contracts.
* Start with [List supported currency codes](/api-reference/currency/list-codes) when you need to validate a code before calling a pair endpoint.
* Read [REST API](/api-reference/rest-api) for credential and environment rules.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.