Build with Pakistan’s fund data
One versioned API for canonical fund profiles, daily NAV records, and validated monthly Fund Manager Reports. This guide takes you from your existing ILovePSX account to your first integration.
Your first request
- Sign in using your existing ILovePSX account and enable fund API access.
- Create an API key with the read scopes your application needs.
- Store the secret on your server as
ILOVEPSX_API_KEY. - Make a request and inspect its JSON response.
curl --header "X-API-Key: $ILOVEPSX_API_KEY" \ "https://funds.api.ilovepsx.com/v1/mutual-funds/funds?per_page=10"
Python
import os
import httpx
response = httpx.get(
"https://funds.api.ilovepsx.com/v1/mutual-funds/nav/latest",
headers={"X-API-Key": os.environ["ILOVEPSX_API_KEY"]},
timeout=15,
)
response.raise_for_status()
records = response.json()["data"]JavaScript · server-side
const response = await fetch(
"https://funds.api.ilovepsx.com/v1/mutual-funds/funds",
{ headers: { "X-API-Key": process.env.ILOVEPSX_API_KEY } }
);
if (!response.ok) throw await response.json();
const { data, meta } = await response.json();Authentication and scopes
Send your API key in the X-API-Key header. Secrets are displayed once and stored as cryptographic digests. Keep them out of frontend code, public repositories, URLs, and application logs. Rotate a compromised key; rotation immediately revokes the previous secret.
Scopes include catalog:read, funds:read, nav:read, fmr:read, and updates:read. The portal displays the scopes currently available to your account.
Free unlimited usage and operational limits
The current release provides free unlimited monthly usage across your keys and explorer requests. There are no monthly quotas, usage charges, subscriptions, or payment-card requirements. Activity units measure endpoint workload, not a bill: standard reads use one unit and complete FMR reads use two.
Burst protection allows 600 weighted units per minute per key, with a separate session-explorer bucket. Pagination, date-range and payload bounds still apply. Responses include RateLimit-* headers; monthly quota headers sayunlimited. A 429 response includes Retry-After; honor it before retrying. Any future pricing will be communicated separately.
Understand the data
- Financial decimals are JSON strings, preserving precision. Use decimal arithmetic for calculations.
- Dates use
YYYY-MM-DD; timestamps use UTC ISO-8601. - Currency is identified where applicable. NAV prices are in PKR.
- Percentage values represent percentage points:
5.25means 5.25%. - Missing values are
nullor absent. Never interpret missing data as zero. - NAV dates and monthly FMR reporting dates describe different periods.
- Responses include available
data_as_ofand freshness metadata. Coverage varies by fund. - Only canonical registry/NAV data and active promoted FMR records are served. Staging and extraction evidence remain private.
Pagination, synchronization, and caching
Registry lists use page and per_page. Time-series and update feeds use opaque cursors; pass them unchanged. Consult each endpoint’s reference for bounds and supported filters.
Cacheable reads provide an ETag. Send If-None-Match on subsequent requests and handle 304 responses without a body. Requests still follow the published access and burst-protection policy. Corrections use new public data versions; consumers should process update events idempotently.
Troubleshoot with a request ID
Errors use application/problem+json with a stable code, a readable detail, and request_id. Request history records status, latency, cache outcome, and activity units.
- 401: key invalid, expired, or revoked.
- 403: account unavailable, insufficient scope, or missing entitlement.
- 404: fund or promoted reporting period unavailable.
- 422: invalid parameters, bounds, or requested expansion.
- 429: the current burst-protection limit was exceeded. Observe the retry headers.
- 503: service unavailable; retry with backoff.
Support and account requirements
For integration assistance, include your fund API account ID, request ID, endpoint, UTC timestamp, and a short description. Never send your full API key.
Email zia639329@gmail.com or contact us on WhatsApp (+923194583904) for API support and plan-change requests.
Exports, webhook controls, automated billing, and stock data are planned for later releases. They are not part of this portal’s first release.