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.
Prices
Historical OHLCV price data for a single ticker.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol (e.g. AAPL). Required. |
| range | string | 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Default: 1mo |
| resolution | string | 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo. Default: 1d |
| start | string | Start date (YYYY-MM-DD) |
| end | string | End date (YYYY-MM-DD) |
| extended | bool | Include extended-hours trading data. Default: false |
Snapshot
Current snapshot and company information.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| lite | bool | Lite mode — key metrics only, lower latency. Default: false |
Options
Option chain — calls, puts, and available expirations.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| expiration | string | Expiration date (YYYY-MM-DD), or omit for nearest. |
Market Session
Current market session status — open/closed, session times.
| Parameter | Type | Description |
|---|---|---|
| market | string | Market code (e.g. US, GB, JP). Default: US |
Income Statement
Revenue, net income, operating expenses, and margins.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| period | string | annual, quarterly, or ttm. Default: annual |
Balance Sheet
Assets, liabilities, equity, and capital structure.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| period | string | annual or quarterly. Default: annual |
Cash Flow
Operating, investing, and financing activities.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| period | string | annual, quarterly, or ttm. Default: annual |
Earnings
Historical earnings data.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| period | string | annual, quarterly, or ttm. Default: annual |
Targets
Consensus analyst price targets — current, low, high, mean, median.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Ratings
Analyst buy/sell/hold ratings and upgrade/downgrade history.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Estimates
Consensus earnings and revenue estimates with EPS trends.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Outlook
Forward growth projections and sustainability metrics.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Ownership
Ownership summary, institutional positions, and fund holdings.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| scope | string | summary, institutional, or fund. Default: summary |
Insiders
Insider transactions, purchases, and company insider roster.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| view | string | transactions, purchases, or roster. Default: transactions |
Lookup
Search instruments by name, symbol, or keyword.
| Parameter | Type | Description |
|---|---|---|
| query | string | Search query. Required. |
| limit | int | 1–25. Default: 8 |
Screen
Run a predefined equity screen.
| Parameter | Type | Description |
|---|---|---|
| preset | string | Predefined 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 |
| size | int | 1–250. Default: 25 |
| sort_by | string | Field to sort by. Default: ticker |
| ascending | bool | Sort ascending. Default: false |
Custom screen
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
Sector overview — top companies, ETFs, mutual funds, and industries.
| Parameter | Type | Description |
|---|---|---|
| id | string | Sector identifier. Required. e.g. technology, healthcare, financial-services |
Industries
Industry data — top performing and growth companies.
| Parameter | Type | Description |
|---|---|---|
| id | string | Industry identifier. Required. e.g. software-application, biotechnology |
News
Latest news articles for a ticker.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| limit | int | 1–50. Default: 10 |
Calendar
Earnings dates, IPOs, economic events, and stock splits. Pass symbol for company-specific or kind for market-wide.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol (company-specific calendar) |
| kind | string | earnings, ipo, economic, or splits. Default: earnings |
| start | string | Start date (YYYY-MM-DD) |
| end | string | End date (YYYY-MM-DD) |
| limit | int | 1–100. Default: 25 |