Skip to content

Commit 94d84e7

Browse files
committed
add recent changes
1 parent 3bbcb30 commit 94d84e7

2 files changed

Lines changed: 208 additions & 47 deletions

File tree

defillama-openapi-pro.json

Lines changed: 152 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9104,18 +9104,30 @@
91049104
"properties": {
91059105
"ticker": { "type": "string", "example": "NVDA" },
91069106
"name": { "type": "string", "example": "NVIDIA Corporation" },
9107-
"currentPrice": { "type": "number", "example": 177.88 },
9108-
"volume": { "type": "number", "example": 189021949 },
9109-
"marketCap": { "type": "number", "example": 4323494854656 },
9110-
"priceChangePercentage": { "type": "number", "example": -2.94 },
9111-
"lastUpdatedAt": { "type": "string", "example": "2026-03-09 12:12:22" }
9107+
"currentPrice": { "type": "number", "example": 172.7 },
9108+
"volume": { "type": "number", "example": 209815684 },
9109+
"marketCap": { "type": "number", "example": 4197473583104 },
9110+
"priceChangePercentage1d": { "type": "number", "example": -3.28 },
9111+
"trailingPE": { "type": "number", "nullable": true, "example": 35.24 },
9112+
"dividendYield": { "type": "number", "nullable": true, "example": 0.0224 },
9113+
"priceToBook": { "type": "number", "nullable": true, "example": 26.68 },
9114+
"lastUpdatedAt": { "type": "string", "format": "date-time", "example": "2026-03-21T13:33:10Z" },
9115+
"priceChangePercentage7d": { "type": "number", "example": -5.74 },
9116+
"priceChangePercentage1m": { "type": "number", "example": -8.08 },
9117+
"revenueTTM": { "type": "number", "nullable": true, "example": 215938000000 },
9118+
"grossProfitTTM": { "type": "number", "nullable": true, "example": 153463000000 },
9119+
"totalAssets": { "type": "number", "nullable": true, "example": 206803000000 },
9120+
"earningsTTM": { "type": "number", "nullable": true, "example": 120067000000 },
9121+
"operatingProfitMargin": { "type": "number", "nullable": true, "example": 60.38 },
9122+
"totalLiabilities": { "type": "number", "nullable": true, "example": 49510000000 }
91129123
}
91139124
}
91149125
}
91159126
}
91169127
}
91179128
},
91189129
"401": { "description": "Unauthorized" },
9130+
"404": { "description": "Companies with summary not found" },
91199131
"500": { "description": "Internal server error" }
91209132
}
91219133
}
@@ -9699,15 +9711,27 @@
96999711
"x-api-plan-only": true,
97009712
"x-scalar-stability": "beta",
97019713
"summary": "Get historical price data for a company",
9702-
"description": "Returns an array of daily closing prices for the given ticker, sorted by date descending (newest first)",
9714+
"description": "Returns daily closing prices as two-element arrays: ISO 8601 date-time string, then numeric price. Sorted by date descending (newest first).",
97039715
"security": [{ "ApiKeyAuth": [] }],
97049716
"parameters": [
97059717
{
97069718
"name": "ticker",
97079719
"in": "query",
97089720
"description": "Stock ticker symbol (case-insensitive)",
97099721
"required": true,
9710-
"schema": { "type": "string", "example": "COIN" }
9722+
"schema": { "type": "string", "example": "AAPL" }
9723+
},
9724+
{
9725+
"name": "timeframe",
9726+
"in": "query",
9727+
"description": "Optional lookback window (case-insensitive). Omit or empty for full history (`MAX`).",
9728+
"required": false,
9729+
"schema": {
9730+
"type": "string",
9731+
"enum": ["1W", "1M", "6M", "1Y", "5Y", "MAX"],
9732+
"default": "MAX",
9733+
"example": "1Y"
9734+
}
97119735
}
97129736
],
97139737
"responses": {
@@ -9717,39 +9741,137 @@
97179741
"application/json": {
97189742
"schema": {
97199743
"type": "array",
9744+
"description": "Each item is `[timestamp, price]`: ISO 8601 string, then closing price.",
97209745
"items": {
9721-
"type": "object",
9722-
"properties": {
9723-
"date": { "type": "string", "format": "date", "example": "2024-12-31" },
9724-
"price": { "type": "number", "example": 125.5 }
9746+
"type": "array",
9747+
"minItems": 2,
9748+
"maxItems": 2,
9749+
"items": {
9750+
"anyOf": [
9751+
{ "type": "string", "description": "ISO 8601 date-time" },
9752+
{ "type": "number", "description": "Closing price" }
9753+
]
9754+
}
9755+
},
9756+
"example": [["2026-03-21T13:33:10Z", 197.5], ["2026-03-20T00:00:00Z", 196.2]]
9757+
}
9758+
}
9759+
}
9760+
},
9761+
"400": {
9762+
"description": "Missing required `ticker` or invalid `timeframe`",
9763+
"content": {
9764+
"application/json": {
9765+
"schema": {
9766+
"type": "object",
9767+
"properties": {
9768+
"error": { "type": "string", "example": "Invalid timeframe" },
9769+
"validTimeframes": {
9770+
"type": "array",
9771+
"items": { "type": "string" },
9772+
"example": ["1W", "1M", "6M", "1Y", "5Y", "MAX"]
97259773
}
97269774
}
97279775
}
97289776
}
97299777
}
97309778
},
9731-
"400": { "description": "Missing required ticker parameter" },
97329779
"401": { "description": "Unauthorized" },
97339780
"404": { "description": "Prices not found for ticker" },
97349781
"500": { "description": "Internal server error" }
97359782
}
97369783
}
97379784
},
9785+
"/equities/v1/ohlcv": {
9786+
"get": {
9787+
"tags": ["Equities"],
9788+
"x-api-plan-only": true,
9789+
"x-scalar-stability": "beta",
9790+
"summary": "Get OHLCV candle data for a company",
9791+
"description": "Returns daily OHLCV bars as six-number arrays: Unix timestamp in seconds (UTC), open, high, low, close, volume. Sorted by time descending (newest first). Optional `timeframe` filters how far back data goes; omit or empty for full history (`MAX`).",
9792+
"security": [{ "ApiKeyAuth": [] }],
9793+
"parameters": [
9794+
{
9795+
"name": "ticker",
9796+
"in": "query",
9797+
"description": "Stock ticker symbol (case-insensitive)",
9798+
"required": true,
9799+
"schema": { "type": "string", "example": "AAPL" }
9800+
},
9801+
{
9802+
"name": "timeframe",
9803+
"in": "query",
9804+
"description": "Optional lookback window (case-insensitive). Same values as price history. Omit or empty for full history (`MAX`).",
9805+
"required": false,
9806+
"schema": {
9807+
"type": "string",
9808+
"enum": ["1W", "1M", "6M", "1Y", "5Y", "MAX"],
9809+
"default": "MAX",
9810+
"example": "6M"
9811+
}
9812+
}
9813+
],
9814+
"responses": {
9815+
"200": {
9816+
"description": "Successful operation",
9817+
"content": {
9818+
"application/json": {
9819+
"schema": {
9820+
"type": "array",
9821+
"description": "Each item is `[timestamp, open, high, low, close, volume]`. `timestamp` is Unix epoch seconds (UTC).",
9822+
"items": {
9823+
"type": "array",
9824+
"minItems": 6,
9825+
"maxItems": 6,
9826+
"items": { "type": "number" }
9827+
},
9828+
"example": [
9829+
[1773964800, 247.98, 249.2, 246, 247.99, 88268000],
9830+
[1773878400, 249.4, 251.83, 247.3, 248.96, 34864100]
9831+
]
9832+
}
9833+
}
9834+
}
9835+
},
9836+
"400": {
9837+
"description": "Missing required `ticker` or invalid `timeframe`",
9838+
"content": {
9839+
"application/json": {
9840+
"schema": {
9841+
"type": "object",
9842+
"properties": {
9843+
"error": { "type": "string", "example": "Invalid timeframe" },
9844+
"validTimeframes": {
9845+
"type": "array",
9846+
"items": { "type": "string" },
9847+
"example": ["1W", "1M", "6M", "1Y", "5Y", "MAX"]
9848+
}
9849+
}
9850+
}
9851+
}
9852+
}
9853+
},
9854+
"401": { "description": "Unauthorized" },
9855+
"404": { "description": "OHLCV not found for ticker" },
9856+
"500": { "description": "Internal server error" }
9857+
}
9858+
}
9859+
},
97389860
"/equities/v1/summary": {
97399861
"get": {
97409862
"tags": ["Equities"],
97419863
"x-api-plan-only": true,
97429864
"x-scalar-stability": "beta",
97439865
"summary": "Get live market summary for a company",
9744-
"description": "Returns current market data for the given ticker including price, volume, market cap, 52-week range, dividend yield, and P/E ratio.",
9866+
"description": "Returns current market data for a single ticker. This is a compact snapshot (no `ticker` / `name` fields); use `GET /equities/v1/companies` for the list shape that includes company identity and balance-sheet highlights.",
97459867
"security": [{ "ApiKeyAuth": [] }],
97469868
"parameters": [
97479869
{
97489870
"name": "ticker",
97499871
"in": "query",
97509872
"description": "Stock ticker symbol (case-insensitive)",
97519873
"required": true,
9752-
"schema": { "type": "string", "example": "COIN" }
9874+
"schema": { "type": "string", "example": "AAPL" }
97539875
}
97549876
],
97559877
"responses": {
@@ -9760,15 +9882,22 @@
97609882
"schema": {
97619883
"type": "object",
97629884
"properties": {
9763-
"currentPrice": { "type": "number", "example": 250.13 },
9764-
"volume": { "type": "number", "example": 1841923 },
9765-
"marketCap": { "type": "number", "example": 100677328896 },
9766-
"fiftyTwoWeekHigh": { "type": "number", "example": 267.31 },
9767-
"fiftyTwoWeekLow": { "type": "number", "example": 105.04 },
9768-
"dividendYield": { "type": "number", "nullable": true, "example": 0.1743 },
9769-
"trailingPE": { "type": "number", "nullable": true, "example": 67.6 },
9770-
"priceChangePercentage": { "type": "number", "example": -0.9 },
9771-
"updatedAt": { "type": "string", "example": "2026-03-09 12:12:22" }
9885+
"currentPrice": { "type": "number", "example": 247.99 },
9886+
"volume": { "type": "number", "example": 87981315 },
9887+
"marketCap": { "type": "number", "example": 3644938780672 },
9888+
"fiftyTwoWeekHigh": { "type": "number", "example": 288.62 },
9889+
"fiftyTwoWeekLow": { "type": "number", "example": 169.21 },
9890+
"dividendYield": { "type": "number", "nullable": true, "example": 0.4137 },
9891+
"trailingPE": { "type": "number", "nullable": true, "example": 31.35 },
9892+
"priceChangePercentage1d": { "type": "number", "example": -0.39 },
9893+
"priceToBook": { "type": "number", "nullable": true, "example": 41.35 },
9894+
"updatedAt": { "type": "string", "format": "date-time", "example": "2026-03-21T07:31:15Z" },
9895+
"priceChangePercentage7d": { "type": "number", "example": -1.91 },
9896+
"priceChangePercentage1m": { "type": "number", "example": -4.83 },
9897+
"revenueTTM": { "type": "number", "nullable": true, "example": 435617000000 },
9898+
"grossProfitTTM": { "type": "number", "nullable": true, "example": 206157000000 },
9899+
"totalAssets": { "type": "number", "nullable": true, "example": 379297000000 },
9900+
"earningsTTM": { "type": "number", "nullable": true, "example": 117777000000 }
97729901
}
97739902
}
97749903
}

llms.txt

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,17 +1926,28 @@ Authentication: API key injected in path — `https://pro-api.llama.fi/<YOUR_API
19261926
72. 🔒 **GET /equities/v1/companies**
19271927
Purpose: Get list of all tracked public companies with current market summary, sorted by market cap (largest first)
19281928
Parameters: None
1929-
Response:
1929+
Response (each element includes ticker, name, price metrics, TTM financials, and balance-sheet highlights):
19301930
```json
19311931
[
19321932
{
19331933
"ticker": "NVDA",
19341934
"name": "NVIDIA Corporation",
1935-
"currentPrice": 177.88,
1936-
"volume": 189021949,
1937-
"marketCap": 4323494854656,
1938-
"priceChangePercentage": -2.94,
1939-
"lastUpdatedAt": "2026-03-09 12:12:22"
1935+
"currentPrice": 172.7,
1936+
"volume": 209815684,
1937+
"marketCap": 4197473583104,
1938+
"priceChangePercentage1d": -3.28,
1939+
"trailingPE": 35.24,
1940+
"dividendYield": 0.0224,
1941+
"priceToBook": 26.68,
1942+
"lastUpdatedAt": "2026-03-21T13:33:10Z",
1943+
"priceChangePercentage7d": -5.74,
1944+
"priceChangePercentage1m": -8.08,
1945+
"revenueTTM": 215938000000,
1946+
"grossProfitTTM": 153463000000,
1947+
"totalAssets": 206803000000,
1948+
"earningsTTM": 120067000000,
1949+
"operatingProfitMargin": 60.38,
1950+
"totalLiabilities": 49510000000
19401951
}
19411952
]
19421953
```
@@ -2057,38 +2068,59 @@ Authentication: API key injected in path — `https://pro-api.llama.fi/<YOUR_API
20572068
}
20582069
```
20592070

2060-
74. 🔒 **GET /equities/v1/price-history?ticker={ticker}**
2061-
Purpose: Returns an array of daily closing prices for the given ticker, sorted by date descending (newest first)
2071+
74. 🔒 **GET /equities/v1/price-history?ticker={ticker}&timeframe={timeframe}**
2072+
Purpose: Daily closes as `[ISO8601 date-time string, price]` pairs, sorted by date descending (newest first)
20622073
Parameters:
2063-
- ticker (query, required): Stock ticker symbol e.g. COIN
2074+
- ticker (query, required): Stock ticker symbol e.g. AAPL
2075+
- timeframe (query, optional): `1W` | `1M` | `6M` | `1Y` | `5Y` | `MAX` (case-insensitive). Omit or empty for full history.
20642076
Response:
20652077
```json
20662078
[
2067-
{ "date": "2024-12-31", "price": 125.50 },
2068-
{ "date": "2024-12-30", "price": 124.75 }
2079+
["2026-03-21T13:33:10Z", 197.5],
2080+
["2026-03-20T00:00:00Z", 196.2]
20692081
]
20702082
```
20712083

2072-
75. 🔒 **GET /equities/v1/summary?ticker={ticker}**
2073-
Purpose: Get live market summary including price, volume, market cap, 52-week range, P/E ratio
2084+
75. 🔒 **GET /equities/v1/ohlcv?ticker={ticker}&timeframe={timeframe}**
2085+
Purpose: Daily OHLCV bars as `[Unix timestamp (seconds UTC), open, high, low, close, volume]`, sorted newest first
20742086
Parameters:
2075-
- ticker (query, required): Stock ticker symbol e.g. COIN
2087+
- ticker (query, required): Stock ticker symbol e.g. AAPL
2088+
- timeframe (query, optional): Same as price history (`1W`, `1M`, `6M`, `1Y`, `5Y`, `MAX`). Omit or empty for full history.
2089+
Response:
2090+
```json
2091+
[
2092+
[1773964800, 247.98, 249.2, 246, 247.99, 88268000],
2093+
[1773878400, 249.4, 251.83, 247.3, 248.96, 34864100]
2094+
]
2095+
```
2096+
2097+
76. 🔒 **GET /equities/v1/summary?ticker={ticker}**
2098+
Purpose: Live market snapshot for one ticker (no `ticker` / `name`; includes 52-week range, 1d/7d/1m change, valuation, TTM revenue/gross profit/earnings, total assets). For the list shape with company identity and liabilities/margin, use `GET /equities/v1/companies`.
2099+
Parameters:
2100+
- ticker (query, required): Stock ticker symbol e.g. AAPL
20762101
Response:
20772102
```json
20782103
{
2079-
"currentPrice": 250.13,
2080-
"volume": 1841923,
2081-
"marketCap": 100677328896,
2082-
"fiftyTwoWeekHigh": 267.31,
2083-
"fiftyTwoWeekLow": 105.04,
2084-
"dividendYield": 0.1743,
2085-
"trailingPE": 67.6,
2086-
"priceChangePercentage": -0.9,
2087-
"updatedAt": "2026-03-09 12:12:22"
2104+
"currentPrice": 247.99,
2105+
"volume": 87981315,
2106+
"marketCap": 3644938780672,
2107+
"fiftyTwoWeekHigh": 288.62,
2108+
"fiftyTwoWeekLow": 169.21,
2109+
"dividendYield": 0.4137,
2110+
"trailingPE": 31.35,
2111+
"priceChangePercentage1d": -0.39,
2112+
"priceToBook": 41.35,
2113+
"updatedAt": "2026-03-21T07:31:15Z",
2114+
"priceChangePercentage7d": -1.91,
2115+
"priceChangePercentage1m": -4.83,
2116+
"revenueTTM": 435617000000,
2117+
"grossProfitTTM": 206157000000,
2118+
"totalAssets": 379297000000,
2119+
"earningsTTM": 117777000000
20882120
}
20892121
```
20902122

2091-
76. 🔒 **GET /equities/v1/filings?ticker={ticker}**
2123+
77. 🔒 **GET /equities/v1/filings?ticker={ticker}**
20922124
Purpose: Get SEC filings (10-K, 10-Q, etc.) sorted by filing date descending
20932125
Parameters:
20942126
- ticker (query, required): Stock ticker symbol e.g. COIN

0 commit comments

Comments
 (0)