接口详情
全球指数与热门市场
- 接口 ID
- globalcommon-globalindex
- 分组
- 全球市场
- 调用地址
- /v1/endpoints/globalcommon-globalindex/call
可传参数
| 参数 | 名称 | 说明 | 必填 | 类型 | 示例值 |
|---|---|---|---|---|---|
| view | 视图范围 | 视图或市场范围,默认使用示例值。 | 否 | string | 1,2,3,4,5,6 |
在线测试
在线测试需要登录,会使用控制台中的默认 API Key 并计入用量。
响应结构
基于最近一次接口体检样本自动生成,仅展示主要字段。
| 字段路径 | 类型 | 样例值 |
|---|---|---|
| CYWWZS[].cn | string | 0 |
| CYWWZS[].code | string | DJI |
| CYWWZS[].increase_amount | string | 363.49 |
| CYWWZS[].increase_rate | string | 0.72% |
| CYWWZS[].last_px | string | 51032.460 |
| CYWWZS[].prod_name | string | 道琼斯 |
| CYWWZS[].state | string | 0 |
| CYWWZS[].turnover | string | 0.000 |
| CYWWZS[].type | string | 4 |
| HLZS[].cn | string | 0 |
| HLZS[].code | string | EURUSD |
| HLZS[].increase_amount | string | 0.00 |
| HLZS[].increase_rate | string | 0.10% |
| HLZS[].last_px | string | 1.166 |
| HLZS[].prod_name | string | 欧元兑美元 |
| HLZS[].state | string | 0 |
| HLZS[].turnover | string | 0.000 |
| HLZS[].type | string | 1 |
| QQSP[].cn | string | 0 |
| QQSP[].code | string | @GC0W |
| QQSP[].increase_amount | string | 42.40 |
| QQSP[].increase_rate | string | 0.94% |
| QQSP[].last_px | string | 4569.400 |
| QQSP[].prod_name | string | 纽约金 |
| QQSP[].state | string | 0 |
| QQSP[].turnover | string | 0.000 |
| QQSP[].type | string | 3 |
| RMGP[].code | string | US:NTAP |
| RMGP[].increase_rate | string | 22.39% |
| RMGP[].last_px | string | 174.290 |
| RMGP[].pidType | integer | 1 |
| RMGP[].prod_name | string | 美国网存 |
| RMGP[].state | string | 0 |
| RMGP[].turnover | string | 2850461680.000 |
| RMGZ[].cn | string | 0 |
| RMGZ[].code | string | @YM0Y |
| RMGZ[].increase_amount | string | 295.00 |
| RMGZ[].increase_rate | string | 0.58% |
| RMGZ[].last_px | string | 51052.000 |
| RMGZ[].prod_name | string | 迷你道琼斯连续 |
调用示例
curl -X POST http://127.0.0.1:8080/v1/endpoints/globalcommon-globalindex/call \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"params":{"view":"1,2,3,4,5,6"}}'import requests
resp = requests.post(
"http://127.0.0.1:8080/v1/endpoints/globalcommon-globalindex/call",
headers={"X-API-Key": "<api_key>"},
json={"params": {"view":"1,2,3,4,5,6"}},
)
print(resp.status_code)
print(resp.text)package main
import (
"bytes"
"fmt"
"net/http"
)
func main() {
body := []byte(`{"params":{"view":"1,2,3,4,5,6"}}`)
req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/v1/endpoints/globalcommon-globalindex/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)
}