Stock quote API
A live quote for any stock, ETF, fund, index, currency, future or crypto by ticker or name: price, change, volume, ranges, market cap and ratios.
GET /v1/finance/quote2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/finance/quote?keyword=AAPL",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "quote": { "symbol": "AAPL", "quoteType": "EQUITY", "shortName": "Apple Inc.", "longName": "Apple Inc.", "currency": "USD", "exchange": "NMS", "regularMarketPrice": 354.07, "regularMarketChange": 4.9900208, "regularMarketChangePercent": 1.4294778, "regularMarketVolume": 40235897, "regularMarketTime": 1795554001, "marketCap": 5145409617920, "trailingPE": 39.428734, "fiftyTwoWeekHigh": 360.83, "fiftyTwoWeekLow": 243.42, "language": "en-US", "region": "US", "typeDisp": "Equity", "quoteSourceName": "Nasdaq Real Time Price", "triggerable": true, "customPriceAlertConfidence": "HIGH", "hasPrePostMarketData": true, "firstTradeDateMilliseconds": 345479400000, "priceHint": 2, "…": "67 more fields" }}Parameters
| Name | Type | Description |
|---|---|---|
keywordquery · required | string | A ticker (AAPL, ^GSPC, EURUSD=X, BTC-USD) or a company name. Example: AAPL. |
languagequery | string | Language, e.g. en or en-US (default), fr-FR. |
locationquery | string | Two-letter country for regional listings, e.g. US (default), GB, IN. |
Response fields
200 with a FinanceQuoteResponse, in Finance’s own JSON.
| Field | Type | Description |
|---|---|---|
quote | FinanceQuote |
Status codes
| Status | Meaning |
|---|---|
200 | The quote. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No ticker or data matches. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Finance is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Can I pass a company name?
Yes, the best matching ticker is used.
Finance is a trademark of Yahoo Inc. We are not affiliated with or endorsed by Yahoo Inc.