BNB Quotes
Retrieve Pakistan Stock Exchange Bills & Bonds (BNB) market quotes and pricing data.
GET/2.0/bnb/quote
Description
This endpoint provides real-time and historical market quotes for bills and bonds traded on the Pakistan Stock Exchange. Includes bid/ask prices, trading volumes, yields, and market activity data.
Request
Authentication
- Type: Bearer Token
- Required: Yes
Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
symbol | string | No | Specific BNB symbol/ISIN to fetch quotes for. | PIB-16-2025 |
date | string (date) | No | Single date to fetch quotes for (YYYY-MM-DD). If omitted, latest quotes are returned. | 2025-12-24 |
from | string (date) | No | Start date for range queries (YYYY-MM-DD). | 2025-12-01 |
to | string (date) | No | End date for range queries (YYYY-MM-DD). | 2025-12-24 |
type | string | No | Filter by instrument type: tbill (Treasury Bills), bond (Government Bonds), corporate (Corporate Bonds), or all. | bond |
limit | integer | No | Maximum number of records to return. Defaults to 100. | 50 |
Note: Provide either symbol for specific security, OR date/from+to for market snapshot/range.
Response
Success Response (200)
{
"status": "ok",
"data": [
{
"date": "2025-12-24",
"symbol": "PIB-16-2025",
"isin": "PKGBL2025PIB",
"type": "bond",
"maturityDate": "2025-12-16",
"maturityYears": 0.001,
"bidPrice": 99.850,
"askPrice": 99.950,
"lastPrice": 99.900,
"bidVolume": 5000000,
"askVolume": 7500000,
"volume": 15000000,
"ytm": 12.45,
"duration": 0.001
},
{
"date": "2025-12-24",
"symbol": "PIB-30-2026",
"isin": "PKGBL2026PIB",
"type": "bond",
"maturityDate": "2026-03-01",
"maturityYears": 0.25,
"bidPrice": 98.500,
"askPrice": 98.750,
"lastPrice": 98.625,
"bidVolume": 10000000,
"askVolume": 12500000,
"volume": 25000000,
"ytm": 13.20,
"duration": 0.24
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Response status (ok or error) |
data | array | Array of BNB quote records |
date | string | Date of the quote (YYYY-MM-DD) |
symbol | string | PSX symbol/code for the security |
isin | string | International Securities Identification Number |
type | string | Instrument type (tbill, bond, corporate) |
maturityDate | string | Maturity date of the security (YYYY-MM-DD) |
maturityYears | number | Years to maturity |
bidPrice | number | Bid price (clean price) |
askPrice | number | Ask price (clean price) |
lastPrice | number | Last traded price |
bidVolume | number | Volume available at bid price |
askVolume | number | Volume available at ask price |
volume | number | Total trading volume |
ytm | number | Yield to maturity (percent) |
duration | number | Modified duration (years) |
Error Responses
For detailed Common Error responses, see the Error Handling.
Examples
Get Latest BNB Market Quotes
curl -X GET "https://csapis.com/2.0/bnb/quote" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get Quotes for Specific Bond
curl -X GET "https://csapis.com/2.0/bnb/quotes?symbol=PIB-16-2025" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get Treasury Bill Quotes for Date Range
curl -X GET "https://csapis.com/2.0/bnb/quotes?from=2025-12-01&to=2025-12-24&type=tbill" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Get Government Bond Quotes for Specific Date
curl -X GET "https://csapis.com/2.0/bnb/quotes?date=2025-12-24&type=bond&limit=20" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Cases
- Market Trading: Monitor real-time prices and volumes for trading decisions
- Relative Value Analysis: Compare yields across maturities and issuers
- Portfolio Valuation: Mark-to-market portfolio holdings with latest quotes
- Market Analysis: Track yield movements and trading activity
- Price Discovery: Find execution levels for buy/sell orders
- Risk Management: Monitor bid-ask spreads and market liquidity