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.
Price History
Historical OHLCV price data for a single ticker.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol (e.g. AAPL). Required. |
| period | string | 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max. Default: 1mo |
| interval | 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) |
| prepost | bool | Include pre/post market data. Default: false |
Quote
Current quote and company information.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| fast | bool | Fast mode — fewer fields, 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 Status
Current market open/close status and 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. |
| freq | string | yearly, quarterly, or trailing. Default: yearly |
Balance Sheet
Assets, liabilities, equity, and capital structure.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| freq | string | yearly or quarterly. Default: yearly |
Cash Flow
Operating, investing, and financing activities.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| freq | string | yearly, quarterly, or trailing. Default: yearly |
Earnings
Historical earnings data.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| freq | string | yearly, quarterly, or trailing. Default: yearly |
Price Targets
Consensus analyst price targets — current, low, high, mean, median.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Recommendations
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. |
Growth
Growth rate estimates and sustainability metrics.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
Holders
Major holders, institutional positions, and mutual fund ownership.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| type | string | major, institutional, or mutualfund. Default: major |
Insiders
Insider transactions, purchases, and company insider roster.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| view | string | transactions, purchases, or roster. Default: transactions |
Search
Search instruments by name, symbol, or keyword.
| Parameter | Type | Description |
|---|---|---|
| q | string | Search query. Required. |
| max_results | int | 1–25. Default: 8 |
Screener
Run a predefined stock screener.
| Parameter | Type | Description |
|---|---|---|
| query | string | Predefined 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 |
| size | int | 1–250. Default: 25 |
| sort_field | string | Field to sort by. Default: ticker |
| sort_asc | bool | Sort ascending. Default: false |
Custom screener
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
Sector overview — top companies, ETFs, mutual funds, and industries.
| Parameter | Type | Description |
|---|---|---|
| key | string | Sector key. Required. e.g. technology, healthcare, financial-services |
Industries
Industry data — top performing and growth companies.
| Parameter | Type | Description |
|---|---|---|
| key | string | Industry key. Required. e.g. software-application, biotechnology |
News
Latest news articles for a ticker.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol. Required. |
| count | int | 1–50. Default: 10 |
Calendar
Earnings dates, IPOs, economic events, and stock splits. Pass symbol for company-specific or type for market-wide.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Ticker symbol (company-specific calendar) |
| type | 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 |