For developers & quants
Market Data & Execution APIs
Build on the infrastructure of a SECP-licensed broker: the complete PSX dataset behind this site, live level-2 market data, and order execution through our own in-house OMS. One integration, from research to fills.

Market Data API
Every dataset in our platform, as clean REST and WebSocket endpoints: prices and adjusted history, fundamentals, indices, investor flows, and live level-2 depth for every listed company.
- REST + WebSocket
- EOD history + intraday
- Level-2 order book
Execution API
Place, track, amend and cancel PSX orders programmatically through BSL's own OMS, with institutional-grade pre-trade risk controls built in. Start in a full sandbox; go live as a BSL brokerage client.
- Full order lifecycle
- Live status WebSocket
- Sandbox first
An OMS we built, not bought
Nearly every brokerage in Pakistan runs its trading on a vendor's platform. BSL does not. Our order management system is engineered in-house, end to end, and tuned for sub-30-millisecond order handling. The same system our own desk trades on is the one your algorithms connect to.
<30ms
Order-handling latency target
100%
Built in-house
FIX
Execution-report semantics

Everything your algo needs, programmatically
Full order lifecycle
LIMIT and MARKET orders with the complete time-in-force set (DAY, GTC, IOC, FOK, GTD) across PSX boards, including Regular, Futures, NDM and Square-up.
Cancel & replace
Amend price or quantity, or cancel outright, with full FIX semantics. Every request is tracked to a confirmed terminal state.
Live status stream
A WebSocket pushes every order-state transition as it happens, backed by a complete FIX execution-report timeline you can reconcile against.
Positions, fills & capital
Query positions, fills, buying power and a full capital ledger in real time. Capital is reserved at submit and settled on fills, automatically.
Scheduled orders
Park an order for a future release time and let the OMS submit it for you, inside the same risk checks as any other order.
Entity-based access
Each strategy trades under its own entity, carrying its own capital allocation, risk limits and kill switch, isolated from every other strategy.
Risk controls, built in
Every order passes a pre-trade risk chain before it reaches the exchange, and every decision is audited. Your algorithm runs fast, inside guardrails.
Pre-trade risk chain · runs on every order
- Capital reservation and buying-power checks on every buyENFORCED
- Price collars against the last traded priceENFORCED
- Order-rate and duplicate-order limits per entityENFORCED
- Position, exposure and open-order capsENFORCED
- A daily-loss stop that halts trading for the dayARMED
- Wash-trade prevention and an entity-level kill switchARMED
The whole market, one API
BSL data catalogue
550+ securities · REST + WebSocket
Level 2, liveLive
Full order-book depth, best bid and ask with spread, tick-by-tick trades, intraday OHLC and VWAP quotes, session phase and halt status. REST plus per-symbol WebSocket subscriptions with snapshot and incremental updates.
Prices & history
Full EOD OHLC history and intraday snapshots for 550+ listed securities, with 52-week statistics and returns.
Fundamentals
Annual and quarterly statements, EPS, and computed ratios including P/E, P/B, ROE and dividend yield, built from company filings.
Corporate actions
Split- and bonus-adjusted price history, backed by a nightly detection guard so derived metrics stay honest.
Indices
KSE-100, KSE-30, KMI-30 and KMI All Shares levels, historical series, constituents and weights.
Microstructure & rates
MTS and MFS leverage, T+1 settlement metrics, FIPI and LIPI investor flows, and KIBOR rates.
Reference & events
Company profiles, announcements, board meetings, ex-dates and dividend records for the whole market.
Integration at a glance
- 1AuthenticateToken-based authentication secures every session and call.
- 2Load the universePull the complete list of instruments open to trading.
- 3Open the status streamOne WebSocket pushes every order-state change live.
- 4Place ordersSubmit an order and get back an ID you can track to the fill.
- 5Track to terminalFollow the stream, or poll and reconcile execution reports.
- 6Cancel or replaceAmend price and quantity, or cancel, with FIX semantics.
- 7Monitor the accountPositions, fills, buying power and the capital ledger.
Full integration guide and OpenAPI specification provided at onboarding.
> submit order BUY 500 OGDC @ 95.50 (DAY)
risk chain 6/6 checks passed
accepted order #184
> status stream
PENDING_NEW -> NEW
FILL 500 @ 95.50
position updated · capital settled
Start in the sandbox
Every integration begins in a full sandbox: the complete API surface, real market data, simulated fills, and no live orders. Build, test and tune your strategy end to end. When you are ready to trade live, we onboard you as a BSL brokerage client and provision your production entity, capital and risk limits.
Complete API surface, identical to production
Real market data, simulated executions
No brokerage account needed to start building
From first call to first fill
Talk to us
Tell us what you are building and the coverage you need.
Sandbox credentials
We provision sandbox access with the integration guide and OpenAPI spec.
Build & test
Develop your strategy against the full API surface with simulated fills.
Go live
Complete brokerage onboarding; we provision your production entity, capital and risk limits.
Questions, answered
What does the Market Data API include?
Everything this platform runs on: EOD and intraday prices for 550+ listed securities, corporate-action-adjusted history, fundamentals and ratios, index series and constituents, leverage and settlement metrics, investor flows, KIBOR rates, and live level-2 order-book data over REST and WebSocket.
What order types does the Execution API support?
LIMIT and MARKET orders with DAY, GTC, IOC, FOK and GTD time-in-force, across PSX boards including Regular, Futures, NDM and Square-up, plus scheduled orders, cancel and replace.
Is there a sandbox?
Yes. Every integration starts in a full sandbox with the complete API surface, real market data and simulated fills. No brokerage account is needed to start building.
Do I need a BSL account?
Not for the sandbox or for data-only access, which is provisioned under a license agreement. Live order execution requires a BSL brokerage account with standard KYC and account agreements.
How fast is the execution path?
The OMS is engineered in-house and tuned for sub-30-millisecond order handling, with a pre-trade risk chain that runs on every order before it reaches the exchange.
How do I get the documentation?
The full integration guide and OpenAPI specification are provided when we set up your sandbox access. Contact us with a short note on what you are building.
Bring your strategy to the PSX
Tell us what you are building. We will set up sandbox access, share the documentation, and map the path to live trading.