Getting Started
Welcome to the Capital Stake API documentation. This comprehensive financial market and mutual funds data API provides real-time and historical data for the Pakistani financial markets.
Overview
The Capital Stake API v3.0.0 provides access to:
Stocks Data
Real-time and historical market data for stocks, indices, and market state.
Mutual Funds
Comprehensive fund data, AMCs, quotes, and payouts.
Forex & Commodities
Foreign exchange rates, mark-to-market pricing, and commodity data.
Fixed Income
KIBOR, yield curves, and policy rates.
Economic Indicators
Macroeconomic indicators and banking aggregates.
Alternate Data
Real-economy signals including microfinance, digital payments, and telecom connectivity data.
Authentication
All API endpoints require Bearer token authentication. Include your API token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
Base URLs
The API is available at:
- Production: https://csapis.com
- UAT: https://uat.csapis.com
- Development: http://localhost:8080
Response Format
All responses follow a consistent JSON format:
{
"status": "ok",
"message": "",
"data": { /* ... */ }
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Response status: ok for success, error for failures |
message | string | Descriptive error message (empty on success) |
data | object/array | Response payload containing the requested data |
count | integer | (Optional) Number of items returned |
Pagination
For endpoints that support pagination, the response includes additional fields for navigation:
{
"status": "ok",
"message": "",
"data": [ /* array of items */ ],
"next": "base64_encoded_cursor",
"offset": 0,
"count": 100,
"total": 1000
}
Pagination Fields
| Field | Type | Description |
|---|---|---|
next | string/null | Cursor for next page (base64 encoded, null if no more) |
offset | integer | Current offset |
count | integer | Number of items in this response |
total | integer | Total number of items available |
Error Handling
The API returns standard HTTP status codes:
| Status | Meaning |
|---|---|
| 200 | Request Successfull |
| 403 | Unauthorized - Invalid or missing bearer token |
| 404 | Resource not found |
| 500 | Server error |
Common Error Responses
Unable to fulfill request (200)
{
"status": "error",
"message": "unable to fulfill request"
}
Unauthorized (403)
{
"status": "error",
"message": "unauthorized_request"
}
Invalid Method (403)
{
"status": "error",
"message": "invalid_method"
}
Resource Not Found (404)
{
"status": "error",
"message": "not_found"
}
Rate Limiting
Please contact support for information about rate limits and usage quotas.
Support
For support, visit: https://csapis.com
API Version: 3.0.0
Last Updated: January 2026