Skip to main content

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

NameTypeRequiredDescriptionExample
symbolstringNoSpecific BNB symbol/ISIN to fetch quotes for.PIB-16-2025
datestring (date)NoSingle date to fetch quotes for (YYYY-MM-DD). If omitted, latest quotes are returned.2025-12-24
fromstring (date)NoStart date for range queries (YYYY-MM-DD).2025-12-01
tostring (date)NoEnd date for range queries (YYYY-MM-DD).2025-12-24
typestringNoFilter by instrument type: tbill (Treasury Bills), bond (Government Bonds), corporate (Corporate Bonds), or all.bond
limitintegerNoMaximum 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

FieldTypeDescription
statusstringResponse status (ok or error)
dataarrayArray of BNB quote records
datestringDate of the quote (YYYY-MM-DD)
symbolstringPSX symbol/code for the security
isinstringInternational Securities Identification Number
typestringInstrument type (tbill, bond, corporate)
maturityDatestringMaturity date of the security (YYYY-MM-DD)
maturityYearsnumberYears to maturity
bidPricenumberBid price (clean price)
askPricenumberAsk price (clean price)
lastPricenumberLast traded price
bidVolumenumberVolume available at bid price
askVolumenumberVolume available at ask price
volumenumberTotal trading volume
ytmnumberYield to maturity (percent)
durationnumberModified 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