返回接口目录

接口详情

全球指数与热门市场

GET
接口 ID
globalcommon-globalindex
分组
全球市场
调用地址
/v1/endpoints/globalcommon-globalindex/call
可传参数
参数名称说明必填类型示例值
view视图范围视图或市场范围,默认使用示例值。string1,2,3,4,5,6

在线测试

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

响应结构

基于最近一次接口体检样本自动生成,仅展示主要字段。

HTTP 200 · object
字段路径类型样例值
CYWWZS[].cnstring0
CYWWZS[].codestringDJI
CYWWZS[].increase_amountstring363.49
CYWWZS[].increase_ratestring0.72%
CYWWZS[].last_pxstring51032.460
CYWWZS[].prod_namestring道琼斯
CYWWZS[].statestring0
CYWWZS[].turnoverstring0.000
CYWWZS[].typestring4
HLZS[].cnstring0
HLZS[].codestringEURUSD
HLZS[].increase_amountstring0.00
HLZS[].increase_ratestring0.10%
HLZS[].last_pxstring1.166
HLZS[].prod_namestring欧元兑美元
HLZS[].statestring0
HLZS[].turnoverstring0.000
HLZS[].typestring1
QQSP[].cnstring0
QQSP[].codestring@GC0W
QQSP[].increase_amountstring42.40
QQSP[].increase_ratestring0.94%
QQSP[].last_pxstring4569.400
QQSP[].prod_namestring纽约金
QQSP[].statestring0
QQSP[].turnoverstring0.000
QQSP[].typestring3
RMGP[].codestringUS:NTAP
RMGP[].increase_ratestring22.39%
RMGP[].last_pxstring174.290
RMGP[].pidTypeinteger1
RMGP[].prod_namestring美国网存
RMGP[].statestring0
RMGP[].turnoverstring2850461680.000
RMGZ[].cnstring0
RMGZ[].codestring@YM0Y
RMGZ[].increase_amountstring295.00
RMGZ[].increase_ratestring0.58%
RMGZ[].last_pxstring51052.000
RMGZ[].prod_namestring迷你道琼斯连续

调用示例

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)
}