获取实时行情
curl --request GET \
--url https://api.quantdash.net/v1/quotes \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.quantdash.net/v1/quotes"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.quantdash.net/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quantdash.net/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.quantdash.net/v1/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.quantdash.net/v1/quotes")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quantdash.net/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": 123,
"high": 123,
"last_price": 123,
"low": 123,
"open": 123,
"prev_close": 123,
"symbol": "600519.SH",
"timestamp": 123,
"volume": 123,
"ext": {
"amplitude": 123,
"change_amount": 123,
"change_pct": 123,
"name": "<string>",
"turnover_rate": 123,
"type": "<string>"
}
}
]
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 429,
"message": "<string>",
"retry_after_ms": 123
}接口文档
获取实时行情
获取最新实时报价。支持按标的代码查询或按标的池查询。两种方式二选一。
GET
/
v1
/
quotes
获取实时行情
curl --request GET \
--url https://api.quantdash.net/v1/quotes \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.quantdash.net/v1/quotes"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.quantdash.net/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.quantdash.net/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.quantdash.net/v1/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.quantdash.net/v1/quotes")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quantdash.net/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": 123,
"high": 123,
"last_price": 123,
"low": 123,
"open": 123,
"prev_close": 123,
"symbol": "600519.SH",
"timestamp": 123,
"volume": 123,
"ext": {
"amplitude": 123,
"change_amount": 123,
"change_pct": 123,
"name": "<string>",
"turnover_rate": 123,
"type": "<string>"
}
}
]
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 429,
"message": "<string>",
"retry_after_ms": 123
}授权
ApiKeyHeaderApiKeyQuery
在请求头 X-API-Key 中传递 API Key
查询参数
标的代码,逗号分隔(如 600000.SH,000001.SZ,AAPL.US)
标的池ID,逗号分隔。可选值:CN_Stock(A股)、US_Stock(美股)、HK_Stock(港股)、CN_ETF(ETF)
可用选项:
CN_Stock, US_Stock, HK_Stock, CN_ETF 响应
行情数据
Show child attributes
Show child attributes
⌘I