Skip to content
Developer docs

DFX Intelligence · developer docs

API examples: curl, Python, TypeScript

Requests and the answers they return: one-call research, paging, lender groups, change feeds and the JSON API.

Short answer

Each example ran against production on the date shown, and the output under it is what came back, except those marked illustrative, which use made-up entities.

The shape of every call

POST JSON-RPC 2.0 to https://exchange-production-9123.up.railway.app/mcp/core?c=docs with Content-Type: application/json and Accept: application/json, text/event-stream. A tool call is {"method":"tools/call","params":{"name":<tool>,"arguments":{...}}}. The answer arrives twice in result: parsed in structuredContent (every core tool declares an outputSchema) and as a JSON string in content[0].text, for clients that read only text.

Python and TypeScript SDKs

pip install dfx-intel (https://pypi.org/project/dfx-intel/) or npm install dfx-intel (https://www.npmjs.com/package/dfx-intel), MIT, with no runtime dependencies. Both wrap research, verify and resolve_name on the core profile, return refusals as states rather than exceptions, and read a member key from DFX_API_KEY; without one they call anonymously.

Agent frameworks and a notebook

Any framework that speaks MCP over Streamable HTTP can attach DFX by URL, with no DFX package. Runnable scripts for each, with the output of their last production run, are in the public repository under examples/mcp, and quickstart.ipynb shows raw JSON-RPC over httpx and then the OpenAI Agents SDK. Open the notebook in Colab.

FrameworkInstallHow DFX is attached
LangChainpip install "langchain-mcp-adapters==0.3.2"MultiServerMCPClient with "transport": "streamable_http"
OpenAI Agents SDKpip install "openai-agents==0.24.0"MCPServerStreamableHttp in Agent(mcp_servers=[...])
LlamaIndexpip install "llama-index-tools-mcp==0.6.0"BasicMCPClient and McpToolSpec

LangChain (langchain-mcp-adapters)

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({"dfx": {"transport": "streamable_http", "url": "https://exchange-production-9123.up.railway.app/mcp/core?c=docs", "timeout": 120}})
tools = await client.get_tools()
research = next(t for t in tools if t.name == "research")
print(await research.ainvoke({"question": "Which BDCs lend to Acquia, and what are the positions marked at?"}))

OpenAI Agents SDK (MCPServerStreamableHttp)

from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(name="dfx", params={"url": "https://exchange-production-9123.up.railway.app/mcp/core?c=docs", "timeout": 120},
                                   client_session_timeout_seconds=120) as dfx:
    agent = Agent(name="credit analyst", mcp_servers=[dfx],
                  instructions="Answer with DFX research and cite the evidence URL for every figure.")
    print((await Runner.run(agent, "Which BDCs lend to Acquia?")).final_output)

LlamaIndex (llama-index-tools-mcp)

from llama_index.tools.mcp import BasicMCPClient, McpToolSpec

tools = await McpToolSpec(client=BasicMCPClient("https://exchange-production-9123.up.railway.app/mcp/core?c=docs", timeout=120)).to_tool_list_async()
research = next(t for t in tools if t.metadata.name == "research")
print((await research.acall(question="Which BDCs lend to Acquia?")).raw_output.structured_content["answer"]["text"])

Point the client at the exchange URL above, not at a dfxintel.com address: the MCP Python SDK does not follow a redirect to another host. Raise the timeouts as shown, because one research call can take longer than the OpenAI Agents SDK's 5 second session default.

curl: one question, compact answer

detail: "compact" returns the resolved subject, the answer, the claims it rests on and counts, in under 2 KB. Leave it out for the full page.

research, compact

curl -s "https://exchange-production-9123.up.railway.app/mcp/core?c=docs" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"research",
       "arguments":{"question":"Which BDCs lend to Example Borrower, and which of them are current lenders?",
                    "detail":"compact"}}}'

Illustrative, with made-up entities. result.structuredContent in full, re-indented. The same JSON also arrives as text in result.content[0].text. The borrower, lenders, filings and figures are replaced with made-up ones while DFX re-measures lender marks.

{
 "dfx": {
  "capability": "research",
  "layer": "dfx_intelligence",
  "version": "1.0.0",
  "answered_at": "2026-10-11T20:21:43.373145+00:00"
 },
 "ok": true,
 "state": "OK",
 "schema": "dfx.research/2",
 "generated_at": "2026-10-11T20:21:43.373145+00:00",
 "answer_state": "OK",
 "detail": "compact",
 "identities": {
  "state": "RESOLVED",
  "subject": {
   "dfx_id": "dfx:pc:00000000-0000-0000-0000-0000000000e1",
   "name": "Example Borrower Inc",
   "type": "borrower"
  }
 },
 "answer": {
  "text": "At 2026-06-30, 29 BDCs held positions in Example Borrower Inc on their own schedules of investments; the largest: Example Credit Fund A ($120.0M of debt at fair value over 2 tranches; principal $125.0M), Example Credit Fund B ($80.0M of debt at fair value; principal $82.0M), EXAMPLE CAPITAL CORP ($60.0M of debt at fair value; principal $62.0M), Example Private Credit Corp. ($50.0M of debt at fair value; principal $51.0M), and 1 more on the next page (continue with page.continuation); 24 further BDC lenders are withheld for this access tier. Its debt on the tape matures from…",
  "basis": [
   "r1",
   "r2",
   "r3",
   "r4",
   "e1",
   "r6"
  ]
 },
 "claims": [
  {
   "claim_id": "clm_b09515e7250a04a0f9093e3b",
   "row": "r1",
   "predicate": "LENDER_TO",
   "claim_type": "ILLUSTRATIVE"
  },
  {
   "claim_id": "clm_b124865cf2a38a3bd5a0d414",
   "row": "r1",
   "predicate": "LENDER_TO_AMOUNT_USD",
   "claim_type": "ILLUSTRATIVE"
  },
  {
   "claim_id": "clm_87bbceed44972806f2371aad",
   "row": "r2",
   "predicate": "LENDER_TO",
   "claim_type": "ILLUSTRATIVE"
  }
 ],
 "counts": {
  "facts": 1,
  "relationships": 5,
  "events": 0,
  "claims_total": 19,
  "rows_total": 14,
  "uncertainty": 0,
  "coverage_limits": 1
 },
 "withheld": {
  "access": "anonymous",
  "withheld_in_this_answer": {
   "rows": 24,
   "why": "rows whose names the access gate withheld are left out of this answer rather than shown masked"
  }
 },
 "more": "detail=research returns the facts, relationships, claims and limits in full"
}

Python: the full answer, then the next page

Standard library only. The full answer pages whole claims at a time; pass page.continuation back as continue to get the next page. A continuation returns the next page of the same plan; it does not re-run the question.

research and continue

# Python 3.8+, standard library only. One research call, then its next page.
import json
import urllib.request

MCP = "https://exchange-production-9123.up.railway.app/mcp/core?c=docs"


def call(tool, arguments, rpc_id=1):
    body = json.dumps({
        "jsonrpc": "2.0", "id": rpc_id, "method": "tools/call",
        "params": {"name": tool, "arguments": arguments},
    }).encode()
    req = urllib.request.Request(MCP, data=body, headers={
        "Content-Type": "application/json",
        "Accept": "application/json, text/event-stream",
        "User-Agent": "my-research-agent/1.0",
    })
    with urllib.request.urlopen(req, timeout=60) as resp:
        result = json.load(resp)["result"]
    return result["structuredContent"]


page1 = call("research", {
    "question": "Which BDCs lend to Example Borrower, and which of them are current lenders?",
})
print(page1["answer_state"], "|", page1["answer"]["text"][:160])
for row in page1["relationships"]:
    print(" ", row["type"], "|", row["subject"]["name"], "| current:", row.get("current"), "|", row["claim_type"], "|", row["cite"]["url"])
print("page", page1["page"]["index"], "of", page1["page"]["pages"])

if page1["page"].get("continuation"):
    page2 = call("research", {"continue": page1["page"]["continuation"]}, rpc_id=2)
    for row in page2["relationships"]:
        print(" ", row["type"], "|", row["subject"]["name"], "| current:", row.get("current"), "|", row["claim_type"], "|", row["cite"]["url"])
    print("page", page2["page"]["index"], "of", page2["page"]["pages"])

Illustrative, with made-up entities. Standard output in full. The borrower, lenders, filings and figures are replaced with made-up ones while DFX re-measures lender marks.

OK | At 2026-06-30, 29 BDCs held positions in Example Borrower Inc on their own schedules of investments; the largest: Example Credit Fund A ($120.0M of debt at fair
  BDC_SCHEDULE_HOLDING | Example Credit Fund A | current: True | ILLUSTRATIVE | https://example.com/filing-26000001
  BDC_SCHEDULE_HOLDING | Example Credit Fund B | current: True | ILLUSTRATIVE | https://example.com/filing-26000002
  BDC_SCHEDULE_HOLDING | EXAMPLE CAPITAL CORP | current: True | ILLUSTRATIVE | https://example.com/filing-26000003
  BDC_SCHEDULE_HOLDING | Example Private Credit Corp. | current: True | ILLUSTRATIVE | https://example.com/filing-26000004
page 1 of 3
  BDC_SCHEDULE_HOLDING | EXAMPLE INCOME FUND | current: True | ILLUSTRATIVE | https://example.com/filing-26000005
  SPONSOR_OF_BORROWER | Example Sponsor Partners | current: True | REPORTED | https://example.com/press-release
page 2 of 3

TypeScript: from a name to a lender group

Two reads an agent can compose itself: resolve_name turns a name into a DFX id, and get_borrower_facilities with group_by: "lender" returns one row per BDC lender, each summed from that lender's own filing.

resolve_name, then get_borrower_facilities

// Node 18+ (built-in fetch). Save as lenders.mts and run: npx tsx lenders.mts
const MCP = "https://exchange-production-9123.up.railway.app/mcp/core?c=docs";

async function call(name: string, args: Record<string, unknown>, id = 1) {
  const res = await fetch(MCP, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Accept: "application/json, text/event-stream",
      "User-Agent": "my-research-agent/1.0",
    },
    body: JSON.stringify({ jsonrpc: "2.0", id, method: "tools/call", params: { name, arguments: args } }),
  });
  const { result } = await res.json();
  return result.structuredContent;
}

// 1. a name to a DFX id
const found = await call("resolve_name", { name: "Example Borrower" });
const borrower = found.results.find((r: any) => r.domain === "private_credit");
console.log(borrower.name, borrower.dfx_id);

// 2. one row per BDC lender, from each lender's own filing
const group = await call("get_borrower_facilities", { dfx_id: borrower.dfx_id, group_by: "lender", limit: 5 }, 2);
console.log(group.state, "| lenders:", group.total);
for (const r of group.results) {
  console.log(" ", r.lender.name, "|", r.as_of, "|", r.fair_value_usd, "|", r.claim_type, "|", r.cite_url);
}

Illustrative, with made-up entities. Standard output in full. The borrower, lenders, filings and figures are replaced with made-up ones while DFX re-measures lender marks.

Example Borrower Inc dfx:pc:00000000-0000-0000-0000-0000000000e1
OK | lenders: 29
  Example Credit Fund A | 2026-06-30 | 120000000 | ILLUSTRATIVE | https://example.com/filing-26000006
  Example Credit Fund B | 2026-06-30 | 80000000 | ILLUSTRATIVE | https://example.com/filing-26000007
  EXAMPLE CAPITAL CORP | 2026-06-30 | 60000000 | ILLUSTRATIVE | https://example.com/filing-26000008
  Example Private Credit Corp. | 2026-06-30 | 50000000 | ILLUSTRATIVE | https://example.com/filing-26000009
  EXAMPLE INCOME FUND | 2026-06-30 | 30000000 | ILLUSTRATIVE | https://example.com/filing-260000010

curl: what changed since a date

changes_since with a domain, an optional dfx_id and an ISO since returns dated events. Each carries occurred_at (when it happened, and on what basis) and first_seen_at (when DFX first read it), and the answer counts them by novelty so a newly read old quarter is never presented as news. Pass cursor_hint.next_since as the next since to poll.

changes_since

curl -s "https://exchange-production-9123.up.railway.app/mcp/core?c=docs" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"changes_since",
       "arguments":{"domain":"private_credit","dfx_id":"dfx:pc:00000000-0000-0000-0000-0000000000e1",
                    "since":"2026-04-01"}}}'

Illustrative, with made-up entities. Fields excerpted from the answer. The borrower, lenders, filings and figures are replaced with made-up ones while DFX re-measures lender marks.

{
 "state": "OK",
 "count": 1,
 "novelty_filter": {
  "returned_by_novelty": {
   "NEW_EVENT": 1
  }
 },
 "results": [
  {
   "cite_url": "https://example.com/filing-260000011",
   "cite_granularity": "document",
   "claim_type": "ILLUSTRATIVE",
   "event_type": "NEW_LENDER",
   "subject": {
    "dfx_id": "dfx:pc:9ba07849-6ea0-3d70-60a3-ce0d407d8bab",
    "name": "Jefferies Credit Partners BDC Inc.",
    "entity_type": "bdc"
   },
   "related": {
    "dfx_id": "dfx:pc:00000000-0000-0000-0000-0000000000e1",
    "name": "Example Borrower Inc",
    "entity_type": "borrower"
   },
   "headline": "Jefferies Credit Partners BDC Inc. joins Example Borrower Inc term loan (first lien) held by 24 other BDCs",
   "occurred_at": "2026-06-30",
   "occurred_basis": "filing",
   "first_seen_at": "2026-09-21T17:16:09.14437+00:00",
   "materiality": "market",
   "magnitude": 5913000,
   "magnitude_unit": "usd",
   "confidence": 0.9
  }
 ],
 "cursor_hint": {
  "next_since": "2026-10-11T20:24:09.781060+00:00",
  "note": "pass next_since as `since` on the next call to see only what DFX saw after this answer"
 }
}

Market-wide questions: maturities, marks and advisor moves

research answers a question about a named borrower, lender, sponsor or firm. A question that names none, such as "which BDC loans were marked down the most last quarter?", comes back UNKNOWN ("the question names no entity DFX could look up"). Ask those with the search tools below. Two of them are on the full profile, https://exchange-production-9123.up.railway.app/mcp?c=docs, not on core.

Commercial mortgages coming due (full profile)

curl -s "https://exchange-production-9123.up.railway.app/mcp?c=docs" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_property_events",
       "arguments":{"event_type":"LOAN_MATURITY_SCHEDULED","within_days":360,"limit":5}}}'

Soonest first. On 2026-11-02 the first rows read like "191 PEACHTREE, Atlanta, GA: the securitised loan in Bank of America Merrill Lynch Commercial Mortgage Trust 2017 matures 2026-11-05. Scheduled balance $40,500,000." Each row carries debt (original principal, interest rate, instrument) and its source, the SEC ABS-EE loan tape, cited at dataset granularity rather than to one document. Add state (for example "OH") to narrow it. complete: false means there are more rows than the page returned, so an empty answer for a narrow filter is not proof that nothing matures.

BDC positions marked down most between two quarter ends (full profile)

curl -s "https://exchange-production-9123.up.railway.app/mcp?c=docs" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_private_credit_changes",
       "arguments":{"since":"2026-03-31","until":"2026-06-30","event_type":"FAIR_VALUE_MARKDOWN",
                    "sort":"mark_move","limit":5}}}'

An illustrative row, with a made-up lender and borrower: Example Credit Fund marked its first lien term loan to Example Borrower, Inc. from 91.00 to 62.00 cents on cost between 2026-03-31 and 2026-06-30 (fair value $9.10M to $6.20M; principal and cost $10.00M unchanged). Each real row names the BDC's 10-Q and its accession number.

  • Each row compares the same BDC position on that BDC's own schedules at the two quarter ends (claim_basis: two_filings_compared), reports the mark as a ratio of cost before and after (prior_value, new_value), and links the BDC's 10-Q on sec.gov.
  • sort: mark_move needs both since and until (the two quarter ends, earlier first) and event_type FAIR_VALUE_MARKDOWN or FAIR_VALUE_RECOVERY. Without them the answer is INVALID_ARGUMENT with the reason, and the call is not charged.
  • Read a move to zero with care before you repeat it: it can be an exit or a filer's tagging error rather than a markdown. Open the cited 10-Q.

Advisors who changed firms (core)

curl -s "https://exchange-production-9123.up.railway.app/mcp/core?c=docs" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_ria_advisor_moves",
       "arguments":{"since":"2026-09-01","limit":5}}}'

Each row is one advisor's move: the firm left and the firm joined (each with a DFX id and CRD), the two registration dates and a move type (RIA_TO_RIA, IBD_TO_IBD, IBD_TO_RIA), cited to the advisor's IAPD report. Moves on 2026-11-02 included Osaic Wealth to LPL Financial, Wells Fargo Advisors to LPL Financial, and Richard Brothers Financial Advisors to Savant Wealth Management. Narrow it with from_dfx_id or to_dfx_id for one firm, state, or move_type. As the answer says, a move is two registration dates and says nothing about why, and bulk corporate re-registrations are left out unless include_bulk is set.

The JSON API, without MCP

For pipelines that call plain HTTP. https://dfxintel.com/api/data-factory/v1 lists every route. /search and /explore answer without a key; /forward, /changes and /universes need a signed-in session or a key.

GET /v1/search

curl -s "https://dfxintel.com/api/data-factory/v1/search?q=example borrower&limit=3"

Illustrative, with made-up entities. The first of 3 hits; the records array that follows is left out. The borrower, lenders, filings and figures are replaced with made-up ones while DFX re-measures lender marks.

{
 "version": "v1",
 "q": "example borrower",
 "hits": [
  {
   "graph": "pc",
   "entityType": "borrower",
   "id": "00000000-0000-0000-0000-0000000000e1",
   "name": "Example Borrower Inc",
   "matched": null,
   "matchKind": "name",
   "subclass": "Air Freight & Logistics",
   "classState": "PERFORMING",
   "city": null,
   "state": null,
   "context": "Example Sponsor Partners",
   "score": 1.37964,
   "href": "/private-credit/borrowers/00000000-0000-0000-0000-0000000000e1",
   "tier": "observed",
   "also": [],
   "see": null,
   "capital": {
    "status": "CONFIRMED",
    "confidence": 0.95,
    "evidenceCount": 31,
    "lastRaise": "2026-06-30",
    "equitySold": null,
    "identity": "name_only"
   }
  }
 ]
}

Checked against production on . The same page as Markdown, for agents: /api/data-factory/v1/docs/examples.