API Reference

Structured financial intelligence accessible to any HTTP client. All endpoints use the Machine Payments Protocol — no API keys required.

Authentication

Trellis uses MPP (Machine Payments Protocol) for authentication and billing. There are no API keys or accounts to create.

Send a request to any paid endpoint. You'll receive a 402 Payment Required response with a WWW-Authenticate: Payment header. Your client pays the specified amount on Tempo and retries with the payment credential. The whole round-trip takes under a second.

Using the Tempo CLI, this is automatic:

tempo request -X GET https://api.trellismarket.com/v1/quote?symbol=AAPL

Base URL

https://api.trellismarket.com

All endpoints return JSON. Responses include a Payment-Receipt header confirming the transaction.

Pricing

Three tiers, billed per request at the moment of use.

Data
$0.001
search, news, market status
Market
$0.005
quotes, history, holders, calendar
Intelligence
$0.05
financials, analysis, screener, options

Price History

GET /v1/history $0.005

Historical OHLCV price data for a single ticker.

ParameterTypeDescription
symbolstringTicker symbol (e.g. AAPL). Required.
periodstring1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Default: 1mo
intervalstring1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Default: 1d
startstringStart date (YYYY-MM-DD)
endstringEnd date (YYYY-MM-DD)
prepostboolInclude pre/post market data. Default: false

Quote

GET /v1/quote $0.005

Current quote and company information.

ParameterTypeDescription
symbolstringTicker symbol. Required.
fastboolFast mode — fewer fields, lower latency. Default: false

Options

GET /v1/options $0.05

Option chain — calls, puts, and available expirations.

ParameterTypeDescription
symbolstringTicker symbol. Required.
expirationstringExpiration date (YYYY-MM-DD), or omit for nearest.

Market Status

GET /v1/market/status $0.001

Current market open/close status and session times.

ParameterTypeDescription
marketstringMarket code (e.g. US, GB, JP). Default: US

Income Statement

GET /v1/financials/income $0.05

Revenue, net income, operating expenses, and margins.

ParameterTypeDescription
symbolstringTicker symbol. Required.
freqstringyearly, quarterly, or trailing. Default: yearly

Balance Sheet

GET /v1/financials/balance-sheet $0.05

Assets, liabilities, equity, and capital structure.

ParameterTypeDescription
symbolstringTicker symbol. Required.
freqstringyearly or quarterly. Default: yearly

Cash Flow

GET /v1/financials/cash-flow $0.05

Operating, investing, and financing activities.

ParameterTypeDescription
symbolstringTicker symbol. Required.
freqstringyearly, quarterly, or trailing. Default: yearly

Earnings

GET /v1/financials/earnings $0.05

Historical earnings data.

ParameterTypeDescription
symbolstringTicker symbol. Required.
freqstringyearly, quarterly, or trailing. Default: yearly

Price Targets

GET /v1/analysis/price-targets $0.05

Consensus analyst price targets — current, low, high, mean, median.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Recommendations

GET /v1/analysis/recommendations $0.05

Analyst buy/sell/hold ratings and upgrade/downgrade history.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Estimates

GET /v1/analysis/estimates $0.05

Consensus earnings and revenue estimates with EPS trends.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Growth

GET /v1/analysis/growth $0.05

Growth rate estimates and sustainability metrics.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Holders

GET /v1/holders $0.005

Major holders, institutional positions, and mutual fund ownership.

ParameterTypeDescription
symbolstringTicker symbol. Required.
typestringmajor, institutional, or mutualfund. Default: major

Insiders

GET /v1/insiders $0.005

Insider transactions, purchases, and company insider roster.

ParameterTypeDescription
symbolstringTicker symbol. Required.
viewstringtransactions, purchases, or roster. Default: transactions
GET /v1/search $0.001

Search instruments by name, symbol, or keyword.

ParameterTypeDescription
qstringSearch query. Required.
max_resultsint1–25. Default: 8

Screener

GET /v1/screener $0.05

Run a predefined stock screener.

ParameterTypeDescription
querystringPredefined screener name. Required. Options: day_gainers, day_losers, most_actives, most_shorted_stocks, undervalued_growth_stocks, undervalued_large_caps, growth_technology_stocks, aggressive_small_caps, small_cap_gainers, top_mutual_funds
sizeint1–250. Default: 25
sort_fieldstringField to sort by. Default: ticker
sort_ascboolSort ascending. Default: false

Custom screener

POST /v1/screener $0.05

Run a custom equity screener with a query expression.

{
  "operator": "AND",
  "operands": [
    { "operator": "GT", "operands": ["percentchange", 3] },
    { "operator": "EQ", "operands": ["region", "us"] }
  ]
}

Operators: AND, OR, EQ, IS-IN, BTWN, GT, GTE, LT, LTE

Sectors

GET /v1/sectors $0.005

Sector overview — top companies, ETFs, mutual funds, and industries.

ParameterTypeDescription
keystringSector key. Required. e.g. technology, healthcare, financial-services

Industries

GET /v1/industries $0.005

Industry data — top performing and growth companies.

ParameterTypeDescription
keystringIndustry key. Required. e.g. software-application, biotechnology

News

GET /v1/news $0.001

Latest news articles for a ticker.

ParameterTypeDescription
symbolstringTicker symbol. Required.
countint1–50. Default: 10

Calendar

GET /v1/calendar $0.005

Earnings dates, IPOs, economic events, and stock splits. Pass symbol for company-specific or type for market-wide.

ParameterTypeDescription
symbolstringTicker symbol (company-specific calendar)
typestringearnings, ipo, economic, or splits. Default: earnings
startstringStart date (YYYY-MM-DD)
endstringEnd date (YYYY-MM-DD)
limitint1–100. Default: 25