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/snapshot?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
lookup, news, market session
Market
$0.005
snapshots, prices, ownership, calendar
Intelligence
$0.05
fundamentals, consensus, screening, options

Prices

GET /v1/prices $0.005

Historical OHLCV price data for a single ticker.

ParameterTypeDescription
symbolstringTicker symbol (e.g. AAPL). Required.
rangestring1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Default: 1mo
resolutionstring1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Default: 1d
startstringStart date (YYYY-MM-DD)
endstringEnd date (YYYY-MM-DD)
extendedboolInclude extended-hours trading data. Default: false

Snapshot

GET /v1/snapshot $0.005

Current snapshot and company information.

ParameterTypeDescription
symbolstringTicker symbol. Required.
liteboolLite mode — key metrics only, 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 Session

GET /v1/market/session $0.001

Current market session status — open/closed, session times.

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

Income Statement

GET /v1/fundamentals/income $0.05

Revenue, net income, operating expenses, and margins.

ParameterTypeDescription
symbolstringTicker symbol. Required.
periodstringannual, quarterly, or ttm. Default: annual

Balance Sheet

GET /v1/fundamentals/balance-sheet $0.05

Assets, liabilities, equity, and capital structure.

ParameterTypeDescription
symbolstringTicker symbol. Required.
periodstringannual or quarterly. Default: annual

Cash Flow

GET /v1/fundamentals/cash-flow $0.05

Operating, investing, and financing activities.

ParameterTypeDescription
symbolstringTicker symbol. Required.
periodstringannual, quarterly, or ttm. Default: annual

Earnings

GET /v1/fundamentals/earnings $0.05

Historical earnings data.

ParameterTypeDescription
symbolstringTicker symbol. Required.
periodstringannual, quarterly, or ttm. Default: annual

Targets

GET /v1/consensus/targets $0.05

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

ParameterTypeDescription
symbolstringTicker symbol. Required.

Ratings

GET /v1/consensus/ratings $0.05

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

ParameterTypeDescription
symbolstringTicker symbol. Required.

Estimates

GET /v1/consensus/estimates $0.05

Consensus earnings and revenue estimates with EPS trends.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Outlook

GET /v1/consensus/outlook $0.05

Forward growth projections and sustainability metrics.

ParameterTypeDescription
symbolstringTicker symbol. Required.

Ownership

GET /v1/ownership $0.005

Ownership summary, institutional positions, and fund holdings.

ParameterTypeDescription
symbolstringTicker symbol. Required.
scopestringsummary, institutional, or fund. Default: summary

Insiders

GET /v1/ownership/insiders $0.005

Insider transactions, purchases, and company insider roster.

ParameterTypeDescription
symbolstringTicker symbol. Required.
viewstringtransactions, purchases, or roster. Default: transactions

Lookup

GET /v1/lookup $0.001

Search instruments by name, symbol, or keyword.

ParameterTypeDescription
querystringSearch query. Required.
limitint1–25. Default: 8

Screen

GET /v1/screen $0.05

Run a predefined equity screen.

ParameterTypeDescription
presetstringPredefined screen. Required. Options: top_movers, declining, high_volume, high_short_interest, value_growth, value_large_cap, tech_growth, small_cap_momentum, small_cap_movers, top_funds, high_yield, blue_chip, intl_conservative, large_growth_funds, mid_growth_funds
sizeint1–250. Default: 25
sort_bystringField to sort by. Default: ticker
ascendingboolSort ascending. Default: false

Custom screen

POST /v1/screen $0.05

Run a custom equity screen 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
idstringSector identifier. Required. e.g. technology, healthcare, financial-services

Industries

GET /v1/industries $0.005

Industry data — top performing and growth companies.

ParameterTypeDescription
idstringIndustry identifier. Required. e.g. software-application, biotechnology

News

GET /v1/signals/news $0.001

Latest news articles for a ticker.

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

Calendar

GET /v1/signals/calendar $0.005

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

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