symbolstringbắt buộc
Stock symbol (e.g. AAPL).
https://api.sandbase.ai/v1/api/nasdaq/stock-quoteReal-time quote for a single equity including last sale price, net change, percentage change, bid/ask, volume, 52-week range, and market status. Response shape varies by asset class (stocks show keyStats; ETFs and.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns a quote for one Nasdaq-listed symbol, including last sale price, bid and ask, market status, and 52-week range. It needs a symbol such as AAPL, and optionally an asset_class.
curl -X POST "https://api.sandbase.ai/v1/api/nasdaq/stock-quote" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"symbol": "AAPL"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock symbol (e.g. AAPL). |
asset_class | string | No | Asset class: stocks, etf, mutualfunds, crypto. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"data": {
"assetClass": "STOCKS",
"companyName": "Apple Inc. Common Stock",
"exchange": "NASDAQ-GS",
"isHeld": false,
"isNasdaq100": true,
"isNasdaqListed": true,
"keyStats": {
"dayrange": {
"label": "High/Low:",
"value": "NA"
},
"fiftyTwoWeekHighLow": {
"label": "52 Week Range:",
"value": "243.42 - 351.73"
}
},
"marketStatus": "Closed",
"notifications": [
{
"eventTypes": [
{
"eventName": "High Technical Attribute",
"id": "tech_attribute",
"message": "AAPL has a High Technical Rating by Nasdaq Dorsey Wright. Discover why technical…",
"url": {
"label": "Discover why technical analysis matters",
"value": "https://www.nasdaq.com/solutions/nasdaq-dorsey-wright/technical-analysis"
}
}
],
"headline": "HIGH TECHNICAL ATTRIBUTE"
}
],
"primaryData": {
"askPrice": "N/A",
"askSize": "N/A",
"bidPrice": "N/A",
"bidSize": "N/A",
"currency": null,
"deltaIndicator": "down",
"isRealTime": false,
"lastSalePrice": "$338.32"
},
"secondaryData": null,
"stockType": "Common Stock"
},
"message": null,
"status": {
"bCodeMessage": null,
"developerMessage": null,
"rCode": 200
}
},
"status": "success"
}
| Field | Meaning |
|---|---|
data.data.symbol | Ticker symbol of the quoted security. |
data.data.companyName | Full name of the company and share class. |
data.data.primaryData.lastSalePrice | Last sale price as a string with a currency sign, for example $338.32. |
data.data.primaryData.deltaIndicator | Direction of the latest price change, such as down. |
data.data.primaryData.bidPrice / askPrice / bidSize / askSize | Current bid and ask price and size. These show N/A when no value is available, as when the market is closed. |
data.data.primaryData.isRealTime | Tells you whether the price is real time. It is false in this response. |
data.data.marketStatus | Market state at the time of the call, for example Closed. |
data.data.keyStats.fiftyTwoWeekHighLow.value | 52-week low and high as one string, for example 243.42 - 351.73. |
data.data.exchange | Exchange or market tier where the symbol trades, for example NASDAQ-GS. |
data.data.isNasdaq100 / isNasdaqListed | Boolean flags for membership in the Nasdaq-100 and for a Nasdaq listing. |
asset_class to stocks, etf, mutualfunds, or crypto. The response shape changes by asset class, so keyStats as shown here applies to stocks.$ sign and split the range text before you calculate with them.data.data. The inner status.rCode is 200 on success.$0.01 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/nasdaq/stock-quote" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbol": "AAPL"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
symbolstringbắt buộcStock symbol (e.g. AAPL).
asset_classstringAsset class: stocks, etf, mutualfunds, crypto.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Nasdaq Stock QuoteAPI này Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Nasdaq | $0.01 mỗi lần gọi | JSON bất đồng bộ |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/nasdaq/stock-quote với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.01 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: symbol (string). Tùy chọn: asset_class (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Kết quả JSON. Endpoint này chạy bất đồng bộ, nên phản hồi sẽ cho bạn biết cách lấy kết quả hoàn tất. README trên trang này có ví dụ phản hồi.
Không. Nasdaq Stock Quote chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Nasdaq.