ilovepsxAPI
Build with the API / Evidence before fluent answers

Build a Pakistan Mutual Fund Research Assistant with a REST API

Design a REST-backed Pakistan fund research assistant with canonical discovery, dated FMR facts, portfolio evidence and explicit missing-data boundaries.

On this page

A fund research assistant becomes useful when it can retrieve evidence and explain its limits. It should distinguish a daily NAV from a monthly portfolio, resolve the right fund and cite the reporting period behind a holding or allocation. A confident answer built from an ambiguous fund name is a data-quality failure even when its prose sounds convincing.

This guide builds a provider-neutral REST retrieval layer around the published ILovePSX operations. It is an application pattern, not an existing official ChatGPT integration, hosted assistant or MCP server. The fictional evaluation examples demonstrate the expected behaviour; an AI model and its production orchestration remain choices for your own application.

The useful part, upfront.

  • Expose a small allowlist of server-side retrieval functions, not arbitrary URL fetching.
  • Carry canonical identity, NAV date, report date, section status and source context into answers.
  • Use mock data for labelled demos and explicit unknown states for missing production facts.

Define the assistant's research job#

Start with questions the published records can answer: which fund matches this name, what is its reported profile, which holdings appear in an available FMR, and what reporting period supports an allocation? Keep investment suitability, future returns and inferred credit decisions outside this retrieval contract. A holding table can support a factual summary without proving that a fund is appropriate for a particular person.

Define an answer shape before adding a model: resolved fund, requested question, evidence period, observations, missing facts and source references. This makes an assistant response reviewable. It also gives your UI room for a profile card, reported performance table and portfolio evidence panel instead of compressing every fact into an untraceable conversational sentence.

Give the model bounded retrieval tools#

Your server can expose discovery, fund detail, latest or historical NAV, and complete FMR retrieval as narrow functions. Validate arguments against the documented contract and your application's limits. Resolve a slug from returned registry records before requesting the report. A free-form name supplied in a chat should never become a guessed API path or an instruction to query every fund in the catalog.

Keep X-API-Key on the server and outside prompts, tool results, browser bundles and logs. Return only the fields needed for the answer plus provenance. Restrict tools to the configured API host and known routes. Source document links are evidence references; a model should not be able to turn an arbitrary link embedded in a document into an authenticated request with your API key.

Application toolPublished building blockRequired boundary
discover_funds/v1/mutual-funds/fundsBounded query and pagination; require disambiguation
read_fund/v1/mutual-funds/funds/{fund_slug}Slug from resolved canonical identity
read_reportDated or latest fmr-reports operationExplicit period mode and include=all for portfolio
read_nav_history/v1/mutual-funds/funds/{fund_slug}/navBounded dates, pages and observation count
These tool names belong to your application. They are not new public API endpoints.

References: ILovePSX public API reference

Build a small server-side evidence function#

The Python example below uses the standard library and requires a resolved fund slug. It reads the latest available complete report and returns a deliberately small application evidence packet. Its credit_quality field is an application convenience derived from allocations where allocation_type is CREDIT_QUALITY; it is not a separate public FMR expansion. The source array remains intact because a report may contain several page fragments and a source document may be null.

The opener rejects redirects so an authenticated request cannot follow a new destination with the key attached. Treat the function as a minimal retrieval building block: production code should also validate the envelope and rows, distinguish documented errors, bound response size and apply an explicit retry policy. Do not log the request object or header. The output's latest_available mode identifies a period selected by available data rather than today's calendar month.

Provider-neutral FMR evidence retrieval
import json
import os
from urllib.parse import quote
from urllib.request import HTTPRedirectHandler, Request, build_opener

BASE = "https://funds.api.ilovepsx.com"

class NoRedirect(HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None

opener = build_opener(NoRedirect())

def report_evidence(resolved_slug):
    if not isinstance(resolved_slug, str) or not resolved_slug:
        raise ValueError("Resolve a canonical fund first")
    slug = quote(resolved_slug, safe="")
    path = f"/v1/mutual-funds/funds/{slug}/fmr-reports/latest?include=all"
    request = Request(BASE + path, headers={
        "Accept": "application/json",
        "X-API-Key": os.environ["ILOVEPSX_API_KEY"],
    })
    with opener.open(request, timeout=20) as response:
        envelope = json.load(response)
    report = envelope["data"]
    return {
        "period_mode": "latest_available",
        "fund": report["fund"],
        "report_date": report["report_date"],
        "data_version": report["data_version"],
        "profile": report.get("profile", {}),
        "reported_returns": report.get("reported_returns", []),
        "holdings": report.get("holdings", []),
        "allocations": report.get("allocations", []),
        "credit_quality": [row for row in report.get("allocations", [])
                           if row.get("allocation_type") == "CREDIT_QUALITY"],
        "sections": report.get("sections", {}),
        "source": report.get("source", []),
    }

References: ILovePSX public API reference

Keep the evidence packet richer than the answer#

Portfolio rows need their original labels, percentage bases and available page context. Reported performance needs its interval and return basis. A NAV observation needs nav_date separately from report_date. Preserve these fields in the retrieval packet even when the answer only displays two short sentences; otherwise follow-up questions require guessing what the original number meant.

Separate extracted observations from application calculations. If your application computes a subtotal of selected holdings, label it as a subtotal of returned rows, state its basis and do not imply complete portfolio coverage. If sections.holdings is NOT_REPORTED, explain that no promoted holdings rows are available in this API record; do not claim that the issuer held no investments or omitted a disclosure.

References: ILovePSX public API reference

A source-aware answer with fictional data#

Consider a fictional question: What were Example Research Fund's largest reported holdings in September? A teaching fixture contains three top holdings with total-assets weights of 18%, 12% and 8%, a report_date of 2026-09-30 and a null source document. A correct demo answer can summarize those rows while explicitly saying the example is synthetic and no real document link exists.

The 38% subtotal is a calculation over three selected rows, not a complete-portfolio concentration measure or the equity allocation. The remaining 62% is unspecified by this selected table. The answer must not invent an issuer source URL, classify the residual as cash or call the portfolio current in October. Its limits are part of the result, not an afterthought hidden below the chat.

Synthetic evidencePermitted answerUnsupported leap
Three rows: 18%, 12%, 8% of total assetsSelected reported holdings sum to 38%The entire equity book is 38%
Report date 2026-09-30The fixture describes the September report periodThese are today's holdings
source.document is nullNo real source link exists for this mockAn invented AMC PDF citation
Missing credit-quality rowsCredit-quality evidence unavailable hereThe portfolio has no credit risk
Fictional evaluation fixture. Every fund name, holding and value in this example is synthetic.

Ask for clarification when identity or period conflicts#

If discovery returns multiple plausible funds, ask the user to choose from official names and AMC labels before retrieving portfolio evidence. If the requested report date is unavailable, say which date was requested and offer available periods. If NAV and FMR dates differ, keep both dates visible rather than rewriting them into a single as-of label.

Set a deliberate stale-data policy for your application. It can warn when an observation is older than a configured threshold, but it cannot assume a missing calendar date proves a failed ingestion or a closed market. Keep missing, stale and conflicting states distinct. A fluent answer should never turn an unavailable fact into a general statement about a fund's safety, return or investment strategy.

Evaluate grounded behaviour, not conversational style alone#

Build a small evaluation set with an ambiguous name, an unknown fund, a missing period, an empty portfolio section, mismatched NAV and FMR dates and a report revision. Check that each answer resolves identity, preserves dates, cites available evidence and marks unsupported facts. Include a source note containing instruction-like text; it must remain document content rather than change the assistant's tools or authorization rules.

Test the network layer separately using mocked responses and failures. No live key is needed to evaluate these states. Then review the UI on a narrow screen: evidence labels, dates and null states should remain visible without opening a hidden debug panel. These checks produce a more useful assistant than asking a model to write an impressive answer and hoping its facts align with the retrieved record.

Make the application's limits part of its interface#

Use a clear research-oriented welcome message, show the selected fund identity, and provide a compact evidence drawer for dates, source pages and unavailable sections. Keep API errors separate from normal no-data states. Offer a retry for a temporary failure without repeatedly calling the API until a desired answer appears. Current access is free with unlimited monthly usage and a 600-weighted-unit-per-minute burst limit; free access still needs bounded tool execution.

A launch-ready assistant explains which published records it uses and which conclusions it cannot support. Keep any synthetic demo mode visibly separate from real retrieval. If you later add a model provider, an MCP server or investment-related functionality, validate those actual integrations and document their behaviour independently. This tutorial provides the evidence layer on which those choices depend.

References: API integration documentation

MOCK DATA / REAL RESPONSE STRUCTURE

Try a complete example.

Use these fictional records to prototype a full fund view: profile, reported returns, holdings, asset and sector allocations, credit quality, fees and ratings. Every name, identifier and number is invented. This is educational mock data, with no connection to a real fund, source document or agency opinion.

The JSON mirrors the public response structure. The complete FMR example includes all supported expansions; empty arrays and nulls demonstrate valid missing-data states. Your live integration must still request the sections it needs and check the returned coverage.

Inspect the complete FMR model
Complete synthetic FMR response · fictional data
{
  "success": true,
  "data": {
    "id": "00000000-0000-4000-8000-000000000101",
    "report_ids": [
      "00000000-0000-4000-8000-000000000101"
    ],
    "fund": {
      "id": "00000000-0000-4000-8000-000000000201",
      "slug": "example-research-fund",
      "name": "Example Research Fund",
      "mufap_fund_id": null,
      "amc": {
        "id": "00000000-0000-4000-8000-000000000301",
        "slug": "example-asset-management",
        "name": "Example Asset Management"
      }
    },
    "report_date": "2026-09-30",
    "currency": "PKR",
    "data_version": 1,
    "identity": {
      "fund_name_as_reported": "Example Research Fund",
      "fund_short_name_as_reported": "ERF",
      "parent_fund_name_as_reported": null,
      "plan_name_as_reported": null,
      "fund_type_as_reported": "Open-end",
      "category_as_reported": "Illustrative mixed-asset category",
      "risk_profile_as_reported": "Illustrative higher-risk profile",
      "is_shariah_compliant": false,
      "is_plan": false,
      "is_pension_scheme": false,
      "is_etf": false
    },
    "fund_size": {
      "nav_per_unit": "100.500000",
      "nav_date": "2026-09-30",
      "offer_price": "100.500000",
      "redemption_price": "100.500000",
      "repurchase_price": "100.500000",
      "market_price": null,
      "net_assets_pkr": "1005000000.0000",
      "fund_size_pkr": "1005000000.0000",
      "fund_size_including_fof_pkr": "1005000000.0000",
      "fund_size_excluding_fof_pkr": "1005000000.0000",
      "amount_invested_by_fof_pkr": "0.0000",
      "units_outstanding": "10000000.000000"
    },
    "profile": {
      "launch_date": "2025-01-01",
      "inception_date": "2025-01-01",
      "maturity_date": null,
      "benchmark": "Example composite benchmark",
      "old_benchmark": null,
      "new_benchmark": null,
      "benchmark_effective_date": null,
      "risk_of_principal_erosion": "Principal may fluctuate; synthetic disclosure.",
      "pricing_mechanism": "Forward pricing — illustrative",
      "dealing_days": "Monday to Friday — illustrative",
      "dealing_time": "09:00 to 14:00 Pakistan time — illustrative",
      "cutoff_time": "14:00 Pakistan time — illustrative",
      "settlement_period": "T+2 — illustrative, not an actual dealing policy",
      "minimum_initial_investment_pkr": "5000.0000",
      "minimum_subsequent_investment_pkr": "1000.0000",
      "minimum_redemption_pkr": "1000.0000",
      "unit_classes": [
        "Illustrative standard units"
      ],
      "leverage": "None in this synthetic example"
    },
    "report_fragments": [
      {
        "id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "schema_version": "fmr_page_v3",
        "data_version": 1,
        "promoted_at": "2026-10-08T08:00:00Z",
        "report_date": "2026-09-30",
        "report_month": "September 2026",
        "page_type": "FUND_REPORT",
        "extraction_mode": "PROFILE_PERFORMANCE_PORTFOLIO",
        "amc_name_raw": "Example Asset Management",
        "fund_name_raw": "Example Research Fund",
        "fund_short_name_raw": "ERF",
        "parent_fund_name_raw": null,
        "plan_name_raw": null,
        "fund_type_raw": "Open-end",
        "category_raw": "Illustrative mixed-asset category",
        "risk_profile_raw": "Illustrative higher-risk profile",
        "risk_of_principal_erosion_raw": "Principal may fluctuate; synthetic disclosure.",
        "is_shariah_compliant": false,
        "is_plan": false,
        "is_pension_scheme": false,
        "is_etf": false,
        "launch_date": "2025-01-01",
        "inception_date": "2025-01-01",
        "maturity_date": null,
        "benchmark_raw": "Example composite benchmark",
        "old_benchmark_raw": null,
        "new_benchmark_raw": null,
        "benchmark_effective_date": null,
        "par_value": "100.000000",
        "listing_raw": null,
        "leverage_raw": "None in this synthetic example",
        "nav_per_unit": "100.500000",
        "nav_date": "2026-09-30",
        "offer_price": "100.500000",
        "redemption_price": "100.500000",
        "repurchase_price": "100.500000",
        "market_price": null,
        "net_assets": "1005000000.0000",
        "fund_size": "1005000000.0000",
        "fund_size_including_fof": "1005000000.0000",
        "fund_size_excluding_fof": "1005000000.0000",
        "amount_invested_by_fof": "0.0000",
        "units_outstanding": "10000000.000000",
        "currency": "PKR",
        "pricing_mechanism_raw": "Forward pricing — illustrative",
        "dealing_days_raw": "Monday to Friday — illustrative",
        "dealing_time_raw": "09:00 to 14:00 Pakistan time — illustrative",
        "cutoff_time_raw": "14:00 Pakistan time — illustrative",
        "settlement_period_raw": "T+2 — illustrative, not an actual dealing policy",
        "minimum_initial_investment": "5000.0000",
        "minimum_subsequent_investment": "1000.0000",
        "minimum_redemption": "1000.0000",
        "unit_classes": [
          "Illustrative standard units"
        ]
      }
    ],
    "sub_funds": [],
    "reported_returns": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "period_label_raw": "1 year",
        "period_key": "1Y",
        "fund_return_percent": "12.00000000",
        "benchmark_return_percent": "10.00000000",
        "peer_return_percent": null,
        "return_type": "ABSOLUTE",
        "is_annualized": false,
        "is_since_inception": false,
        "calculation_basis_raw": "Synthetic cumulative return for the stated period"
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 2,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "period_label_raw": "Month to date",
        "period_key": "MTD",
        "fund_return_percent": "0.50000000",
        "benchmark_return_percent": "0.40000000",
        "peer_return_percent": null,
        "return_type": "ABSOLUTE",
        "is_annualized": false,
        "is_since_inception": false,
        "calculation_basis_raw": "Synthetic cumulative September return"
      }
    ],
    "allocations": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "ASSET_ALLOCATION",
        "label_raw": "Equities",
        "label_normalized": null,
        "percent_of_total_assets": "60.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "603000000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 2,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "ASSET_ALLOCATION",
        "label_raw": "Cash",
        "label_normalized": null,
        "percent_of_total_assets": "20.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "201000000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 3,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "ASSET_ALLOCATION",
        "label_raw": "Government securities",
        "label_normalized": null,
        "percent_of_total_assets": "15.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "150750000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 4,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "ASSET_ALLOCATION",
        "label_raw": "Other assets",
        "label_normalized": null,
        "percent_of_total_assets": "5.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "50250000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 5,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "SECTOR_ALLOCATION",
        "label_raw": "Technology",
        "label_normalized": null,
        "percent_of_total_assets": "25.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "251250000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 6,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "SECTOR_ALLOCATION",
        "label_raw": "Fertilizer",
        "label_normalized": null,
        "percent_of_total_assets": "20.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "201000000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 7,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "SECTOR_ALLOCATION",
        "label_raw": "Banks",
        "label_normalized": null,
        "percent_of_total_assets": "15.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": "150750000.0000",
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 8,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "CREDIT_QUALITY",
        "label_raw": "Government securities — illustrative bucket",
        "label_normalized": null,
        "percent_of_total_assets": "15.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": null,
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 9,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "allocation_type": "CREDIT_QUALITY",
        "label_raw": "Unrated / no rating assigned in this example",
        "label_normalized": null,
        "percent_of_total_assets": "85.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "amount": null,
        "current_period": null,
        "previous_period": null,
        "change_percent": null,
        "bucket_start_days": null,
        "bucket_end_days": null,
        "bucket_start_years": null,
        "bucket_end_years": null
      }
    ],
    "holdings": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "holding_group": "TOP_HOLDINGS",
        "rank": 1,
        "name_raw": "Example Technology Company",
        "holding_type": "EQUITY",
        "asset_class": "Equities",
        "issuer_name_raw": "Example Technology Company",
        "security_name_raw": "Example Technology Company ordinary shares",
        "symbol_raw": "EXTECH",
        "sector_raw": "Technology",
        "percent_of_total_assets": "18.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "percent_held": null,
        "market_value": "180900000.0000",
        "value_before_provisioning": null,
        "provisioning_amount": null,
        "value_after_provisioning": null,
        "quantity": "1000000.000000",
        "units": "shares",
        "credit_rating": null,
        "rating_agency": null,
        "instrument_type_raw": "Ordinary shares",
        "coupon_rate": null,
        "yield_percent": null,
        "ytm_percent": null,
        "issue_date": null,
        "maturity_date": null,
        "listed_or_unlisted": "Listed — illustrative",
        "secured_or_unsecured": null,
        "is_shariah_compliant": null,
        "is_top_holding": true,
        "is_non_compliant": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 2,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "holding_group": "TOP_HOLDINGS",
        "rank": 2,
        "name_raw": "Example Fertilizer Company",
        "holding_type": "EQUITY",
        "asset_class": "Equities",
        "issuer_name_raw": "Example Fertilizer Company",
        "security_name_raw": "Example Fertilizer Company ordinary shares",
        "symbol_raw": "EXFERT",
        "sector_raw": "Fertilizer",
        "percent_of_total_assets": "12.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "percent_held": null,
        "market_value": "120600000.0000",
        "value_before_provisioning": null,
        "provisioning_amount": null,
        "value_after_provisioning": null,
        "quantity": "800000.000000",
        "units": "shares",
        "credit_rating": null,
        "rating_agency": null,
        "instrument_type_raw": "Ordinary shares",
        "coupon_rate": null,
        "yield_percent": null,
        "ytm_percent": null,
        "issue_date": null,
        "maturity_date": null,
        "listed_or_unlisted": "Listed — illustrative",
        "secured_or_unsecured": null,
        "is_shariah_compliant": null,
        "is_top_holding": true,
        "is_non_compliant": null
      },
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 3,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "holding_group": "TOP_HOLDINGS",
        "rank": 3,
        "name_raw": "Example Banking Company",
        "holding_type": "EQUITY",
        "asset_class": "Equities",
        "issuer_name_raw": "Example Banking Company",
        "security_name_raw": "Example Banking Company ordinary shares",
        "symbol_raw": "EXBANK",
        "sector_raw": "Banks",
        "percent_of_total_assets": "8.000000",
        "percent_of_net_assets": null,
        "percent_of_gross_assets": null,
        "percent_held": null,
        "market_value": "80400000.0000",
        "value_before_provisioning": null,
        "provisioning_amount": null,
        "value_after_provisioning": null,
        "quantity": "500000.000000",
        "units": "shares",
        "credit_rating": null,
        "rating_agency": null,
        "instrument_type_raw": "Ordinary shares",
        "coupon_rate": null,
        "yield_percent": null,
        "ytm_percent": null,
        "issue_date": null,
        "maturity_date": null,
        "listed_or_unlisted": "Listed — illustrative",
        "secured_or_unsecured": null,
        "is_shariah_compliant": null,
        "is_top_holding": true,
        "is_non_compliant": null
      }
    ],
    "metrics": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "metric_key": "NUMBER_OF_HOLDINGS",
        "label_raw": "Illustrative number of equity holdings",
        "value": "12.00000000",
        "unit": "count",
        "period": "September 2026",
        "benchmark_value": null
      }
    ],
    "fees": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "fee_type": "TOTAL_EXPENSE_RATIO",
        "label_raw": "Illustrative annualized total expense ratio",
        "value_percent": "2.000000",
        "value_amount": null,
        "currency": "PKR",
        "period": "September 2026 — annualized illustration",
        "with_government_levies": true,
        "government_levy_percent": null,
        "secp_fee_percent": null,
        "is_actual_charged": true,
        "is_maximum_allowed": false
      }
    ],
    "ratings": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "rating_type": "ILLUSTRATIVE",
        "rating_raw": "Illustrative rating — not an agency opinion",
        "rating_agency": "Example agency (fictional)",
        "rating_date": null,
        "outlook_raw": null
      }
    ],
    "parties": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "role": "FUND_MANAGER",
        "name_raw": "Example Research Team",
        "designation_raw": "Illustrative fund-management team",
        "organization_raw": "Example Asset Management"
      }
    ],
    "special_terms": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "term_type": "INVESTMENT_OBJECTIVE",
        "label_raw": "Illustrative investment objective",
        "value_raw": "A fictional mixed-asset portfolio used only to demonstrate the response model.",
        "value_numeric": null,
        "value_percent": null,
        "value_amount": null,
        "value_date": null,
        "currency": "PKR"
      }
    ],
    "compliance": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "compliance_type": "ILLUSTRATIVE_DISCLOSURE",
        "name_raw": "Synthetic compliance disclosure",
        "limit_type_raw": null,
        "regulatory_limit_percent": null,
        "actual_exposure_percent": null,
        "excess_percent": null,
        "gross_assets_percent": null,
        "net_assets_percent": null,
        "status_raw": "Illustrative only — no regulatory assessment has been performed"
      }
    ],
    "notes": [
      {
        "sub_fund_key": null,
        "sub_fund_name_raw": null,
        "row_order": 1,
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "note_kind": "NOTE",
        "section_type": "PORTFOLIO",
        "note_type": "ILLUSTRATIVE",
        "text": "All figures and entities are synthetic. The three reported top holdings are a partial list. Sector percentages use total assets. Credit-quality labels and rating text are not agency opinions."
      }
    ],
    "source": [
      {
        "report_id": "00000000-0000-4000-8000-000000000101",
        "page_number": 1,
        "document": null,
        "promoted_at": "2026-10-08T08:00:00Z",
        "data_version": 1
      }
    ],
    "sections": {
      "sub_funds": {
        "status": "NOT_REPORTED",
        "row_count": 0
      },
      "reported_returns": {
        "status": "AVAILABLE",
        "row_count": 2
      },
      "allocations": {
        "status": "AVAILABLE",
        "row_count": 9
      },
      "holdings": {
        "status": "AVAILABLE",
        "row_count": 3
      },
      "metrics": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "fees": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "ratings": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "parties": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "special_terms": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "compliance": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "notes": {
        "status": "AVAILABLE",
        "row_count": 1
      },
      "source": {
        "status": "AVAILABLE",
        "row_count": 1
      }
    },
    "available_expansions": [
      "allocations",
      "compliance",
      "fees",
      "holdings",
      "metrics",
      "notes",
      "parties",
      "ratings",
      "reported_returns",
      "source",
      "special_terms",
      "sub_funds"
    ]
  },
  "meta": {
    "request_id": "00000000000040008000000000000401",
    "generated_at": "2026-10-08T08:00:00Z",
    "data_as_of": "2026-09-30",
    "data_freshness_days": 8
  }
}
Inspect the latest NAV model
Synthetic latest NAV response · fictional data
{
  "success": true,
  "data": [
    {
      "fund_id": "00000000-0000-4000-8000-000000000201",
      "fund_slug": "example-research-fund",
      "fund_name": "Example Research Fund",
      "mufap_fund_id": null,
      "nav_date": "2026-09-30",
      "nav": "100.500000",
      "offer_price": "100.500000",
      "repurchase_price": "100.500000",
      "market_price": null,
      "front_end_load_pct": "0.000000",
      "back_end_load_pct": "0.000000",
      "contingent_load_pct": null,
      "nav_change_abs": null,
      "nav_change_pct": null,
      "currency": "PKR"
    }
  ],
  "meta": {
    "request_id": "00000000000040008000000000000402",
    "generated_at": "2026-10-08T08:00:00Z",
    "data_as_of": "2026-09-30",
    "data_freshness_days": 8
  }
}
TRACE THE EVIDENCE

Sources & further reading

Check the published contract for current fields and limits. Source documents describe reported facts; API availability still depends on promoted production coverage.

  1. ILovePSX public API reference

    Routes, response shapes and query parameters reviewed against the published contract on 8 October 2026.

  2. Structured Fund Manager Reports API
  3. API integration documentation

Put the guide to work.

Start with the documented contract, keep your key server-side, and make dates and missing data visible in your product.

Build with the published REST API