FinData4AI

Quickstart

Validate the first financial-agent workflow with sourced financial context.

FinData4AI should be evaluated by workflow, not by endpoint count. Start with the user task your agent must complete, call only the datasets that are available for that task, then pass compact source-aware context to the model.

1. Pick the user job first

The first workflows to validate are:

User jobData neededCoverage stage
Explain margin or cash-flow riskFinancial statements, filing links, market notesP0
Extract risk changes from filingsSEC filings and company announcementsP0
Monitor a portfolio for eventsMarket bars, SEC filings, company announcements, newsP0
Add deeper research contextOwnership, transcripts, estimates, operating KPIsRoadmap

2. Create a server-side API key

Create a key in the dashboard and keep it on your server. Do not expose the key in browser code, notebooks shared with users, or model prompts.

export FINDATA4AI_API_KEY="fd4a_..."

3. Choose the market before planning tools

Most equity workflows should carry explicit market context:

US equities     market=us   ticker=AAPL
Hong Kong       market=hk   ticker=00700
A-shares        market=cn   ticker=600519
Crypto pairs    roadmap

If a market is marked as preview or roadmap, keep it out of autonomous agent plans until your application has a fallback.

4. Run one grounded request

Start with a simple request and confirm the response shape before building a multi-step agent.

curl "https://api.findata4ai.com/financials/income-statements?market=hk&ticker=00700&period=annual" \
  -H "X-API-Key: $FINDATA4AI_API_KEY"

Server-side fetch:

const response = await fetch(
  'https://api.findata4ai.com/financials/income-statements?market=hk&ticker=00700&period=annual',
  {
    headers: {
      'X-API-Key': process.env.FINDATA4AI_API_KEY!,
    },
  },
);

if (!response.ok) {
  throw new Error(`FinData4AI request failed: ${response.status}`);
}

const data = await response.json();

5. Pass compact context to your agent

Do not paste entire filings, announcements, or news pages into the prompt. Retrieve the fields and source metadata your task needs, then pass a compact object.

const context = {
  task: 'Explain operating margin risk for Tencent',
  market: 'hk',
  ticker: '00700',
  fields: data.fields ?? data.items?.[0],
  sources: data.sources ?? [{ type: 'financial_statement', url: data.items?.[0]?.filing_url }],
  marketNotes: data.market_notes ?? ['Confirm market coverage before autonomous use.'],
};

6. Use the machine-readable contract

  • API reference: /docs/api
  • OpenAPI schema: /openapi.json
  • Agent-readable index: /llms.txt
  • Agent integration guide: /docs/agent-integration

Error handling

StatusMeaningWhat to do
400Invalid market, ticker, or parameterValidate endpoint docs and supported market badges.
401Missing or invalid API keyCheck X-API-Key and keep it server-side.
404No matching resourceConfirm ticker format, market, and coverage stage.
429Rate limit or credits exhaustedBack off, inspect dashboard usage, or upgrade.
5xxService-side failureRetry with backoff and keep request IDs for support.

On this page