接口详情
自然语言选股
- 接口 ID
- natural-language-stock-select
- 分组
- 智能选股
- 调用地址
- /v1/endpoints/natural-language-stock-select/call
可传参数
| 参数 | 名称 | 说明 | 必填 | 类型 | 示例值 |
|---|---|---|---|---|---|
| condition | 自然语言选股条件 | 使用自然语言描述选股条件,例如今日涨幅超过5%。 | 是 | string | 今日涨幅超过5% |
在线测试
在线测试需要登录,会使用控制台中的默认 API Key 并计入用量。
调用示例
curl -X POST http://127.0.0.1:8080/v1/endpoints/natural-language-stock-select/call \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"params":{"condition":"今日涨幅超过5%"}}'import requests
resp = requests.post(
"http://127.0.0.1:8080/v1/endpoints/natural-language-stock-select/call",
headers={"X-API-Key": "<api_key>"},
json={"params": {"condition":"今日涨幅超过5%"}},
)
print(resp.status_code)
print(resp.text)package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
body := []byte(`{"params":{"condition":"今日涨幅超过5%"}}`)
req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/v1/endpoints/natural-language-stock-select/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)
}