返回接口目录

接口详情

个股资讯搜索

GET
接口 ID
stock-news-search
分组
资讯题材
调用地址
/v1/endpoints/stock-news-search/call
可传参数
参数名称说明必填类型示例值
page_size返回数量返回资讯列表数量,默认 20,最大 100。integer20
stock_code证券代码6 位 A 股证券代码,支持带市场前缀的输入,系统会提取其中的 6 位代码。string300059

在线测试

在线测试需要登录,会使用控制台中的默认 API Key 并计入用量。

调用示例

curl -X POST http://127.0.0.1:8080/v1/endpoints/stock-news-search/call \
  -H "X-API-Key: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"params":{"page_size":"20","stock_code":"300059"}}'
import requests

resp = requests.post(
    "http://127.0.0.1:8080/v1/endpoints/stock-news-search/call",
    headers={"X-API-Key": "<api_key>"},
    json={"params": {"page_size":"20","stock_code":"300059"}},
)
print(resp.status_code)
print(resp.text)
package main

import (
  "bytes"
  "fmt"
  "net/http"
)

func main() {
  body := []byte(`{"params":{"page_size":"20","stock_code":"300059"}}`)
  req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/v1/endpoints/stock-news-search/call", bytes.NewReader(body))
  req.Header.Set("X-API-Key", "<api_key>")
  req.Header.Set("Content-Type", "application/json")
  resp, err := http.DefaultClient.Do(req)
  fmt.Println(resp.StatusCode, err)
}