DOCS

Read the docs.

Seven endpoints. Install, query, done. Everything you need to integrate xfinlink into a research pipeline, trading system, or weekend project.

Quick start

Install the package, set your API key, and make your first query in under a minute.

terminal
pip install xfinlink

Create a free account to get your API key, then:

quickstart.py
import xfinlink as xfl

# Set your API key — get a free key at https://xfinlink.com/signup
xfl.set_api_key("YOUR_API_KEY")

# Historical prices
prices = xfl.prices("AAPL", start="2024-01-01")

# Financial statements
fundamentals = xfl.fundamentals("AAPL", period_type="annual")

# Pre-computed metrics (P/E, ROE, margins, ...)
metrics = xfl.metrics("AAPL", period_type="ttm", fields=["valuation", "scores"])

# Index constituents
sp500 = xfl.index("sp500")

# Search for entities
results = xfl.search(q="apple")

# Entity resolution (handles ticker recycling)
entity = xfl.resolve("GM")

Use an API key via the X-API-Key header for full access (the Python client handles this automatically).

Authentication

Most API requests require an API key. Create a free account to get yours. Search and resolve allow restricted unauthenticated calls; use a key for normal limits and full detail.

Pass the key via the X-API-Key header:

curl
curl -H "X-API-Key: your-api-key" \
  https://api.xfinlink.com/v1/prices/AAPL?start=2024-01-01

The Python client handles auth automatically:

auth.py
import xfinlink as xfl

# Set your API key — get a free key at https://xfinlink.com/signup
xfl.set_api_key("YOUR_API_KEY")

Your API key is shown on the dashboard after sign-up. You can regenerate it at any time.

/v1/prices/{ticker}

OHLCV prices with split adjustment, total returns, and dividend/split event data. Coverage back to 1996 for every US-listed stock and ETF. Supports daily through yearly aggregation intervals.

paramtypedefaultdescription
tickerstr | list[str]requiredTicker(s) to fetch.
startstr (ISO date)optionalEarliest date, inclusive.
endstr (ISO date)optionalLatest date, inclusive. Defaults to today.
intervalstr"1d"Aggregation interval: 1d, 3d, 1w, 1mo, 3mo, 6mo, 1y.
fieldslist[str]optionalSubset of columns. Defaults to 11 fields; market_cap is opt-in.
adjuststr"split"Adjustment mode: split (default) or none.

Request:

request.py
df = xfl.prices("AAPL", start="2024-01-01", fields=["close", "volume"])

Response:

stdout
  date        ticker   close      volume
  2024-01-02  AAPL     185.64  45,123,456
  2024-01-03  AAPL     184.25  42,889,012
  2024-01-04  AAPL     181.91  49,301,234
  ...

/v1/fundamentals/{ticker}

Reported financials — income statement, balance sheet, cash flow — back to 1950 for most listed US companies.

paramtypedefaultdescription
tickerstr | list[str]requiredTicker(s) to fetch.
period_typestr"all""annual" | "quarterly" | "all"
fieldslist[str]optionalSubset of 147 available fields.
includestroptional"segments" — adds revenue breakdowns by geography, product, and business segment.
segment_membersstr"primary""primary" or "all". Primary returns segments summing to revenue; all includes subtotals.
startstr (ISO date)optionalEarliest period_end.
endstr (ISO date)optionalLatest period_end.
fiscal_yearintoptionalExact-match filter on fiscal_year (e.g. 2023). Invalid values emit a warning and are ignored.
period_endstr (ISO date)optionalExact-match filter on period_end (e.g. 2023-09-30). Invalid values emit a warning and are ignored.
request.py
df = xfl.fundamentals("AAPL", period_type="annual",
                fields=["revenue", "net_income"])
# With revenue segments
df = xfl.fundamentals("AAPL", include_segments=True)

/v1/resolve/{ticker}

Full entity history for a ticker. Every company that ever used this ticker, with validity dates, classifications, and index membership.

paramtypedefaultdescription
tickerstrrequiredTicker symbol or comma-separated tickers (up to 10).
includestroptionalindex, classifications
request.py
info = xfl.resolve("GM")
for entity in info["data"]["GM"]["entities"]:
    print(entity["name"], entity["ticker_valid_from"], entity["ticker_valid_to"])

/v1/index/{index_name}

Current and historical index constituents. Available indices: sp500, ndx100, djia, russell2000.

paramtypedefaultdescription
index_namestrsp500Index name (path parameter).
as_ofstr (ISO date)todayPoint-in-time membership date.
limitint500Results per page (max 1000).
offsetint0Pagination offset.
request.py
df = xfl.index("sp500")
df = xfl.index("sp500", as_of="2020-01-01")

/v1/insiders/{ticker} Pro

Insider transactions from SEC Form 3, 4, and 5 filings. One row per transaction. Shares and prices are split-adjusted. Coverage 1986 to present. Pro tier only; free-tier keys receive 402.

paramtypedefaultdescription
tickerstrrequiredTicker or comma-separated tickers (up to 100).
startstr (ISO date)1y agoEarliest transaction_date.
endstr (ISO date)optionalLatest transaction_date.
transaction_typestroptionalDecoded type, e.g. open_market_buy, open_market_sell, grant_or_award, option_exercise, tax_withholding, gift. Comma-separated for multiple.
acquisition_or_dispositionstroptional"A" or "D".
ownership_typestroptional"direct" or "indirect".
form_typestroptional"3", "4", "5" (or amended e.g. "4/A").
insider_rolestroptionalSubstring match on role (CEO, CFO, Director, etc.).
insider_namestroptionalSubstring match on name.
min_valuenumoptionalMinimum transaction_value in dollars.
include_amendmentsboolfalseInclude amendment rows.
limitint1000Rows per page, max 5000.

Fields returned: entity_id, ticker, entity_name, transaction_date, filing_date, form_type, insider_name, insider_role, insider_role_other, transaction_code, transaction_type, acquisition_or_disposition, shares, shares_held_after, transaction_price, transaction_value, ownership_type, is_amendment, document_id, sequence_in_filing, data_quality.

request.py
df = xfl.insiders("TSLA", transaction_type="open_market_sell", insider_role="CEO")

/v1/metrics/{ticker}

108 pre-computed financial metrics across 9 categories. All ratios as decimals (0.46 = 46%). Market cap and enterprise value in millions USD. Per-share values in dollars.

paramtypedefaultdescription
tickerstrrequiredTicker or comma-separated tickers (max 100).
period_typestrannualannual, quarterly, ttm (trailing 12-month snapshot), or daily (one row per trading day).
fieldsstrallComma-separated metric names or category names: valuation, profitability, leverage, liquidity, efficiency, per_share, dividends, scores, growth.
growth_basisstryoyGrowth comparison: yoy (year-over-year), qoq (quarter-over-quarter), or ttm_yoy.
startstr (ISO date)optionalStart date. Daily mode defaults to 90 days ago.
endstr (ISO date)optionalEnd date for period_end.
limitint20Rows per page (max 100).

Valuation

fieldformula
market_capclose price x shares_outstanding
market_cap_dilutedclose price x weighted_avg_shares_diluted
enterprise_valuemarket_cap + total_debt - cash
pe_ratioclose price / diluted EPS (TTM)
ps_ratiomarket_cap / revenue (TTM)
pb_ratiomarket_cap / total_equity
price_to_cash_flowmarket_cap / operating_cash_flow (TTM)
ev_ebitdaenterprise_value / EBITDA (TTM)
ev_ebitenterprise_value / EBIT (TTM)
ev_revenueenterprise_value / revenue (TTM)
ev_gross_profitenterprise_value / gross_profit (TTM)
price_to_fcfmarket_cap / free_cash_flow (TTM)
price_to_tangible_bookmarket_cap / (total_equity - goodwill - intangibles)
price_to_cashmarket_cap / cash_and_short_term_investments
price_to_net_working_capitalmarket_cap / (current_assets - current_liabilities)
tobins_qmarket_cap / total_assets
grahams_numbersqrt(22.5 x EPS_diluted x book_value_per_share)
peg_ratioP/E ratio / EPS growth rate
earnings_yieldnet_income (TTM) / market_cap
dividend_yield(DPS x shares) TTM / market_cap

Profitability

fieldformula
gross_margingross_profit / revenue
operating_marginoperating_income / revenue
net_marginnet_income / revenue
ebitda_marginEBITDA / revenue
fcf_marginfree_cash_flow / revenue
pretax_marginpretax_income / revenue
roenet_income / total_equity
roanet_income / total_assets
roic(net_income + interest_expense x 0.79) / (total_equity + long_term_debt)
return_on_tangible_assetsnet_income / avg(total_assets - goodwill - intangibles)
return_on_tangible_equitynet_income / avg(total_equity - goodwill - intangibles)
return_on_common_equity(net_income - preferred_dividends) / avg(total_equity - preferred_equity)
roe_adjusted_to_bookROE / price_to_book
return_on_total_capitaloperating_income / avg(equity + debt + minority_interest)
return_on_capital_employedoperating_income / avg(total_assets - current_liabilities)
operating_earnings_yieldoperating_income (TTM) / market_cap

Leverage

fieldformula
debt_to_equitytotal_debt / total_equity
debt_to_assetstotal_debt / total_assets
long_term_debt_to_equitylong_term_debt / total_equity
long_term_debt_to_assetslong_term_debt / total_assets
debt_to_ebitdatotal_debt / EBITDA (TTM)
debt_to_revenuetotal_debt / revenue (TTM)
net_debt_to_ebitda(total_debt - cash) / EBITDA (TTM)
equity_to_assetstotal_equity / total_assets
assets_to_equitytotal_assets / total_equity
total_debt_to_capitaltotal_debt / (total_equity + total_debt)
cash_to_debtcash_and_short_term_investments / total_debt
effective_interest_rateinterest_expense / avg(total_debt)
interest_coverageEBIT / interest_expense
ebitda_interest_coverageEBITDA / interest_expense
ebitda_less_capex_interest_coverage(EBITDA - |capex|) / interest_expense
goodwill_to_assetsgoodwill / total_assets
tangible_common_equity_ratio(equity - goodwill - intangibles - preferred) / (assets - goodwill - intangibles)

Liquidity

fieldformula
current_ratiocurrent_assets / current_liabilities
quick_ratio(current_assets - inventory) / current_liabilities
cash_ratiocash_and_short_term_investments / current_liabilities
cash_conversion_cycledays_inventory + days_sales_outstanding - days_payable

Efficiency

fieldformula
asset_turnoverrevenue / total_assets
inventory_turnovercost_of_revenue / inventory
cogs_to_revenuecost_of_revenue / revenue
inventory_to_revenueinventory / revenue
days_inventoryinventory / cost_of_revenue x days_in_period
days_payableaccounts_payable / cost_of_revenue x days_in_period
days_sales_outstandingaccounts_receivable / revenue x days_in_period
total_receivables_turnoverrevenue / accounts_receivable
fixed_assets_turnoverrevenue / net_PP&E
rd_to_revenueresearch_and_development / revenue
sga_ratioselling_general_admin / revenue

Per-Share

fieldformula
revenue_per_sharerevenue / shares_outstanding
book_value_per_sharetotal_equity / shares_outstanding
tangible_book_value_per_share(total_equity - goodwill - intangibles) / shares_outstanding
cash_per_sharecash_and_equivalents / shares_outstanding
debt_per_sharetotal_debt / shares_outstanding
ocf_per_shareoperating_cash_flow / shares_outstanding
fcf_per_sharefree_cash_flow / shares_outstanding
ebit_per_shareEBIT / shares_outstanding
ebitda_per_shareEBITDA / shares_outstanding
capex_per_sharecapital_expenditures / shares_outstanding
working_capital_per_share(current_assets - current_liabilities) / shares_outstanding
ncavps(current_assets - total_liabilities - preferred_equity) / shares_outstanding

Dividends

fieldformula
dividend_payout_ratiodividends_per_share / EPS_diluted
buyback_yield(share_repurchases - share_issuance) / market_cap
shares_buyback_ratio(prior_shares - current_shares) / prior_shares
sustainable_growth_rateROE x (1 - dividend_payout_ratio)
cash_dividend_coverageoperating_cash_flow / |dividends_paid|

Scores

fieldformula
accrualsnet_income - operating_cash_flow
quality_ratiogross_profit / total_assets
gross_profit_to_assetsgross_profit / avg(total_assets)
sloan_ratio(net_income - OCF - investing_CF) / total_assets
altman_z_score1.2(WC/A) + 1.4(RE/A) + 3.3(EBIT/A) + 0.6(MC/L) + 1.0(Rev/A)
piotroski_f_scoreSum of 9 binary tests: profitability (4), leverage (3), efficiency (2)
beneish_m_score8-ratio model (DSRI, GMI, AQI, SGI, DEPI, SGAI, LVGI, TATA)
springate_score1.03A + 3.07B + 0.66C + 0.4D
zmijewski_score-4.336 - 4.513(NI/A) + 5.679(TL/A) + 0.004(CA/CL)
fulmer_h_factor9-variable model including log(tangible assets), log(EBIT/interest)
kz_index5-variable model of cash flow, Q, leverage, dividends, cash

Growth

fieldformula
revenue_growth(current - prior) / |prior|. TTM-to-TTM in ttm/daily modes
net_income_growth(current - prior) / |prior|
eps_diluted_growth(current - prior) / |prior|
eps_basic_growth(current - prior) / |prior|
ebitda_growth(current - prior) / |prior|
gross_profit_growth(current - prior) / |prior|
fcf_growth(current - prior) / |prior|
total_assets_growth(current - prior) / |prior| (balance sheet)
total_debt_growth(current - prior) / |prior| (balance sheet)
capex_growth(current - prior) / |prior|
dps_growth(current - prior) / |prior|
market_cap_performance(current_mcap - prior_mcap) / |prior_mcap|
request.py
# Annual valuation + profitability
df = xfl.metrics("AAPL", fields=["valuation", "profitability"])

# TTM snapshot with all financial scores
df = xfl.metrics("AAPL", period_type="ttm", fields=["scores"])

# Daily P/E for the last 90 days
df = xfl.metrics("AAPL", period_type="daily", fields=["pe_ratio", "market_cap"])

# Year-over-year growth
df = xfl.metrics("AAPL", fields=["growth"], growth_basis="yoy")

Field reference

230+ data fields across seven endpoints. See the Explorer on the home page for live values.

• /v1/fundamentals — 147 fields

INCOME STATEMENT (38)

revenuecost_of_revenuecost_of_goods_soldgross_profitresearch_and_developmentselling_general_adminselling_and_marketinggeneral_and_adminstock_based_compensationdepreciation_amortizationdepreciationamortization_intangiblesdepletionrestructuring_chargesimpairment_chargesprovision_for_credit_lossesgain_loss_on_sale_of_assetsother_operating_expensesoperating_expenses_totaloperating_incomeinterest_expenseinterest_incomeincome_from_equity_method_investmentsother_non_operating_incomepretax_incomeincome_tax_expenseincome_from_discontinued_operationsnet_incomeminority_interest_incomenet_income_attributable_to_parentpreferred_dividendsnet_income_available_to_commoncomprehensive_incomeebitebitdaeps_basiceps_diluteddividends_per_share

BALANCE SHEET — ASSETS (23)

cash_and_equivalentsrestricted_cashmarketable_securitiesshort_term_investmentscash_and_short_term_investmentsaccounts_receivablecontract_assetsinventoryprepaid_expensesother_current_assetscurrent_assets_totalproperty_plant_equipment_grossaccumulated_depreciationproperty_plant_equipment_netoperating_lease_assetsfinance_lease_assetslong_term_investmentsequity_method_investmentsgoodwillintangible_assetsdeferred_tax_assetsother_noncurrent_assetstotal_assets

BALANCE SHEET — LIABILITIES (19)

accounts_payableshort_term_debtcurrent_portion_long_term_debtoperating_lease_liabilities_currentfinance_lease_liabilities_currentdeferred_revenue_currentaccrued_liabilitiesother_current_liabilitiescurrent_liabilities_totallong_term_debtoperating_lease_liabilities_noncurrentfinance_lease_liabilities_noncurrentdeferred_revenue_noncurrentdeferred_tax_liabilitiespension_liabilitiesinsurance_loss_reservesother_noncurrent_liabilitiestotal_liabilitiestotal_debt

BALANCE SHEET — EQUITY (10)

common_stock_valuepreferred_equityadditional_paid_in_capitalretained_earningstreasury_stockaccumulated_other_comprehensive_incometemporary_equitytotal_equityminority_interesttotal_equity_including_minority

CASH FLOW (33)

net_income_cfdepreciation_amortization_cfstock_based_compensation_cfdeferred_income_taxeschange_in_accounts_receivablechange_in_inventorychange_in_accounts_payablechange_in_working_capitalother_operating_activitiesoperating_cash_flowcapital_expendituresacquisitions_netproceeds_from_divestiturespurchases_of_investmentssales_of_investmentsother_investing_activitiesinvesting_cash_flowlong_term_debt_issuancelong_term_debt_repaymentshort_term_debt_proceedsshort_term_debt_repaymentsfinance_lease_principal_paymentsshare_issuanceshare_repurchasesdividends_paiddividends_paid_commonother_financing_activitiesfinancing_cash_flowcash_taxes_paidcash_interest_paideffect_of_exchange_rate_on_cashnet_change_in_cashfree_cash_flow

SHARES & CLASSIFICATION (7)

shares_outstandingcommon_shares_issuedweighted_avg_shares_basicweighted_avg_shares_dilutedtreasury_sharessicnaics

Convention: as-filed. Share count fields are returned as the company reported them on the filing date — not retroactively split-adjusted. To derive split-adjusted shares for a period, multiply by the cumulative product of split_ratio from /v1/prices for all splits after period_end.

INDUSTRY — BANKING (9) • INSURANCE (5) • REIT (3)

bank_interest_incomebank_interest_expensebank_net_interest_incomebank_noninterest_incomebank_noninterest_expensebank_loans_netbank_depositsbank_allowance_for_credit_lossesbank_net_charge_offsins_premiums_earnedins_losses_incurredins_underwriting_expenseins_net_investment_incomeins_policy_benefitsreit_rental_revenuereit_fforeit_affo
• /v1/prices — 12 fields
openhighlowcloseadj_closevolumereturn_dailyshares_outstandingexchange_codesplit_ratiodividendmarket_cap
• /v1/metrics — 108 fields

VALUATION (20)

market_capmarket_cap_dilutedenterprise_valuepe_ratiops_ratiopb_ratioprice_to_cash_flowev_ebitdaev_ebitev_revenueev_gross_profitprice_to_fcfprice_to_tangible_bookprice_to_cashprice_to_net_working_capitaltobins_qgrahams_numberpeg_ratioearnings_yielddividend_yield

PROFITABILITY (16)

gross_marginoperating_marginnet_marginebitda_marginfcf_marginpretax_marginroeroaroicreturn_on_tangible_assetsreturn_on_tangible_equityreturn_on_common_equityroe_adjusted_to_bookreturn_on_total_capitalreturn_on_capital_employedoperating_earnings_yield

LEVERAGE (17)

debt_to_equitydebt_to_assetslong_term_debt_to_equitylong_term_debt_to_assetsdebt_to_ebitdadebt_to_revenuenet_debt_to_ebitdaequity_to_assetsassets_to_equitytotal_debt_to_capitalcash_to_debteffective_interest_rateinterest_coverageebitda_interest_coverageebitda_less_capex_interest_coveragegoodwill_to_assetstangible_common_equity_ratio

LIQUIDITY (4)

current_ratioquick_ratiocash_ratiocash_conversion_cycle

EFFICIENCY (11)

asset_turnoverinventory_turnovercogs_to_revenueinventory_to_revenuedays_inventorydays_payabledays_sales_outstandingtotal_receivables_turnoverfixed_assets_turnoverrd_to_revenuesga_ratio

PER-SHARE (12)

revenue_per_sharebook_value_per_sharetangible_book_value_per_sharecash_per_sharedebt_per_shareocf_per_sharefcf_per_shareebit_per_shareebitda_per_sharecapex_per_shareworking_capital_per_sharencavps

DIVIDENDS (5)

dividend_payout_ratiobuyback_yieldshares_buyback_ratiosustainable_growth_ratecash_dividend_coverage

SCORES (11)

accrualsquality_ratiogross_profit_to_assetssloan_ratioaltman_z_scorepiotroski_f_scorebeneish_m_scorespringate_scorezmijewski_scorefulmer_h_factorkz_index

GROWTH (12)

revenue_growthnet_income_growtheps_diluted_growtheps_basic_growthebitda_growthgross_profit_growthfcf_growthtotal_assets_growthtotal_debt_growthcapex_growthdps_growthmarket_cap_performance
• /v1/resolve — 15 fields
entity_idnameentity_typecountryfigicikticker_valid_fromticker_valid_tosic_codenaics_codegics_sectorgics_groupgics_industrygics_subindustryindex_membership
• /v1/insiders — 21 fields (Pro)
entity_identity_nametickertransaction_datefiling_dateform_typeinsider_nameinsider_roleinsider_role_othertransaction_codetransaction_typeacquisition_or_dispositionsharesshares_held_aftertransaction_pricetransaction_valueownership_typeis_amendmentdocument_idsequence_in_filingdata_quality

Understanding price fields

xfinlink follows the academic convention for price data. This matters for backtesting and returns analysis.

fielddescription
closeRaw unadjusted closing price — what actually traded on the exchange that day.
adj_closeSplit-only adjusted close. Adjusted for stock splits but NOT for dividends. Comparable across split events.
return_dailyTotal daily return including dividends. Use this for performance analysis and backtesting.
dividendCash dividend amount on ex-date. Zero on non-dividend days.
split_ratioSplit ratio on split date (e.g., 4.0 for a 4:1 split). 1.0 on non-split days.

Adjustment direction: adj_close is split-only backward-adjusted to the current post-split share basis. To derive a forward-adjusted series from an anchor date, request raw close plus split_ratio, then compound split ratios forward.

forward_adjusted.py
import xfinlink as xfl

df = xfl.prices("AAPL", start="2020-08-27", end="2020-09-02", fields=["close", "split_ratio"], adjust="none")
df = df.sort_values("date")

factor = df["split_ratio"].fillna(1.0).cumprod()
df["forward_adj_close"] = df["close"] * factor
stdout
date        ticker  close      split_ratio  forward_adj_close
2020-08-27  AAPL    500.04001  NaN          500.04001
2020-08-28  AAPL    499.23001  NaN          499.23001
2020-08-31  AAPL    129.03999  4.0          516.15996
2020-09-01  AAPL    134.17999  NaN          536.71996
2020-09-02  AAPL    131.39999  NaN          525.59996

Why no dividend-adjusted prices? Dividend-adjusted prices retroactively change every time a company pays a dividend, making historical values unstable. xfinlink stores stable values (split-only adjusted) plus total returns, which is the academic standard for quantitative research.

How to compute dividend-adjusted prices client-side:

div_adjusted.py
import xfinlink as xfl

df = xfl.prices("AAPL", start="2020-01-01", fields=["adj_close", "return_daily"])

# Build cumulative total return index
df["total_return_index"] = (1 + df["return_daily"]).cumprod()

# Derive dividend-adjusted price series
df["div_adj_close"] = df["adj_close"].iloc[-1] * df["total_return_index"] / df["total_return_index"].iloc[-1]

Data caveats

Price fields and fundamentals fields are on different split-adjustment bases.

adj_close is split-only adjusted (no dividend adjustment). All fundamentals per-share fields (eps_diluted, dividends_per_share) are as-reported with no split adjustment. Do not combine them for ratios (P/E, P/B, etc.) unless no split occurred between the reporting date and today.

Recipes

— Revenue comparison across big tech

compare.py
import xfinlink as xfl

df = xfl.fundamentals(
    ["AAPL", "MSFT", "GOOGL"],
    period_type="annual",
    fields=["revenue", "net_income", "operating_cash_flow"],
    start="2024-01-01",
)
print(df[["ticker", "period_end", "revenue", "net_income"]])

— AAPL cumulative return

backtest.py
import xfinlink as xfl

df = xfl.prices("AAPL", start="2024-01-01", end="2024-12-31")
df["cumulative_return"] = (1 + df["return_daily"]).cumprod() - 1
print(f"AAPL 2024 total return: {df['cumulative_return'].iloc[-1]:.1%}")

— Entity resolution: GM bankruptcy split

resolve.py
import xfinlink as xfl

info = xfl.resolve("GM")
for entity in info["data"]["GM"]["entities"]:
    print(f"{entity['name']}: {entity['ticker_valid_from']} → {entity['ticker_valid_to']}")
# General Motors Corporation (pre-2009 bankruptcy): 1962-07-02 → 2009-06-01
# General Motors Company: None → None (current)

Vibe coding

Path 1 — Code Generation

For developers with Python + IDE

  1. Get your API key (free)
  2. Install: pip install xfinlink
  3. Copy the context block below and paste it into Claude, ChatGPT, or Cursor as system context
  4. Describe what you want — the LLM writes working xfinlink code
context.md
Loading llms.txt…

Path 2 — Direct Access via MCP

Zero code — ask questions, get answers

  1. Get your API key (free)
  2. Pick your AI platform and connect using the server URL below
  3. Ask anything — “What’s AAPL’s P/E ratio?” or “Compare top 5 banks by ROE”

Server URL

MCP server URL
https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY

Replace YOUR_API_KEY with your key from the dashboard.

Available tools: get_prices, get_fundamentals, get_metrics, resolve_ticker, search, get_index, get_insiders

Claude (Anthropic)

Option A — Web (claude.ai)

  1. Go to claude.ai and sign in
  2. Click your profile icon → SettingsConnectors
  3. Click + then Add custom connector
  4. Name: xfinlink, URL: https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY
  5. Click Create
  6. Start a new chat and ask: “What’s NVDA’s P/E ratio?”

Available on Free (1 connector), Pro, Max, Team, and Enterprise plans.

Option B — Claude Desktop

  1. Open Claude Desktop → SettingsDeveloperEdit Config
  2. Add to claude_desktop_config.json:
claude_desktop_config.json
{
  "mcpServers": {
    "xfinlink": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY"]
    }
  }
}
  1. Restart Claude Desktop

ChatGPT (OpenAI)

Requires Plus, Pro, Team, Enterprise, or Edu plan.

  1. Open chatgpt.comSettingsApps & Connectors
  2. Scroll to Advanced Settings → toggle Developer Mode on
  3. Go back to Connectors → click Create
  4. Name: xfinlink, MCP server URL: https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY, Authentication: None
  5. Click Create
  6. Start a new chat → click +MoreDeveloper ModeAdd sources → enable xfinlink
  7. Ask: “Compare AAPL and MSFT revenue growth over the past 3 years”

Grok (xAI)

Option A — Web (grok.com)

Requires a paid Grok account.

  1. Go to grok.comMenuConnectors
  2. Click Add custom connector
  3. Name: xfinlink, URL: https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY
  4. Enable the connector per conversation
  5. Ask: “Screen the S&P 500 for stocks with P/E below 20”

Option B — xAI API (Developer)

python
from openai import OpenAI

client = OpenAI(
    api_key="your-xai-api-key",
    base_url="https://api.x.ai/v1",
)

response = client.responses.create(
    model="grok-4.20-reasoning",
    input=[{"role": "user", "content": "What's AAPL's quarterly revenue trend?"}],
    tools=[{
        "type": "mcp",
        "server_url": "https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY",
        "server_label": "xfinlink",
    }],
)

Perplexity

Requires Pro, Max, or Enterprise plan.

  1. Go to perplexity.aiAccount SettingsConnectors
  2. Click + Custom connector → select Remote
  3. Name: xfinlink, MCP Server URL: https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY, Authentication: None, Transport: Streamable HTTP
  4. Check acknowledgement box → click Add
  5. Click the xfinlink card to enable it
  6. In a new search, toggle xfinlink under Sources
  7. Ask: “What’s NVDA’s gross margin trend over the past 2 years?”

Cursor

Add to .cursor/mcp.json:

.cursor/mcp.json
{
  "mcpServers": {
    "xfinlink": {
      "url": "https://api.xfinlink.com/mcp?api_key=YOUR_API_KEY"
    }
  }
}

Rate limits & usage policy

RATE LIMITS

API key limits: Free: 100/day, Pro: 10,000/day.

Sign up to get your API key. View pricing for higher limits.