|
9104 | 9104 | "properties": { |
9105 | 9105 | "ticker": { "type": "string", "example": "NVDA" }, |
9106 | 9106 | "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 } |
9112 | 9123 | } |
9113 | 9124 | } |
9114 | 9125 | } |
9115 | 9126 | } |
9116 | 9127 | } |
9117 | 9128 | }, |
9118 | 9129 | "401": { "description": "Unauthorized" }, |
| 9130 | + "404": { "description": "Companies with summary not found" }, |
9119 | 9131 | "500": { "description": "Internal server error" } |
9120 | 9132 | } |
9121 | 9133 | } |
|
9699 | 9711 | "x-api-plan-only": true, |
9700 | 9712 | "x-scalar-stability": "beta", |
9701 | 9713 | "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).", |
9703 | 9715 | "security": [{ "ApiKeyAuth": [] }], |
9704 | 9716 | "parameters": [ |
9705 | 9717 | { |
9706 | 9718 | "name": "ticker", |
9707 | 9719 | "in": "query", |
9708 | 9720 | "description": "Stock ticker symbol (case-insensitive)", |
9709 | 9721 | "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 | + } |
9711 | 9735 | } |
9712 | 9736 | ], |
9713 | 9737 | "responses": { |
|
9717 | 9741 | "application/json": { |
9718 | 9742 | "schema": { |
9719 | 9743 | "type": "array", |
| 9744 | + "description": "Each item is `[timestamp, price]`: ISO 8601 string, then closing price.", |
9720 | 9745 | "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"] |
9725 | 9773 | } |
9726 | 9774 | } |
9727 | 9775 | } |
9728 | 9776 | } |
9729 | 9777 | } |
9730 | 9778 | }, |
9731 | | - "400": { "description": "Missing required ticker parameter" }, |
9732 | 9779 | "401": { "description": "Unauthorized" }, |
9733 | 9780 | "404": { "description": "Prices not found for ticker" }, |
9734 | 9781 | "500": { "description": "Internal server error" } |
9735 | 9782 | } |
9736 | 9783 | } |
9737 | 9784 | }, |
| 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 | + }, |
9738 | 9860 | "/equities/v1/summary": { |
9739 | 9861 | "get": { |
9740 | 9862 | "tags": ["Equities"], |
9741 | 9863 | "x-api-plan-only": true, |
9742 | 9864 | "x-scalar-stability": "beta", |
9743 | 9865 | "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.", |
9745 | 9867 | "security": [{ "ApiKeyAuth": [] }], |
9746 | 9868 | "parameters": [ |
9747 | 9869 | { |
9748 | 9870 | "name": "ticker", |
9749 | 9871 | "in": "query", |
9750 | 9872 | "description": "Stock ticker symbol (case-insensitive)", |
9751 | 9873 | "required": true, |
9752 | | - "schema": { "type": "string", "example": "COIN" } |
| 9874 | + "schema": { "type": "string", "example": "AAPL" } |
9753 | 9875 | } |
9754 | 9876 | ], |
9755 | 9877 | "responses": { |
|
9760 | 9882 | "schema": { |
9761 | 9883 | "type": "object", |
9762 | 9884 | "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 } |
9772 | 9901 | } |
9773 | 9902 | } |
9774 | 9903 | } |
|
0 commit comments