品种代码查询
全球品种代码查询:按名称/关键词搜股票、期货、外汇、加密货币等的合约代码
Documentation
品种代码信息查询
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
全球品种代码查询:按名称/关键词搜股票、期货、外汇、加密货币等的合约代码
品种代码信息查询
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
curl --request GET \
--url 'https://openapi.toolkk.com/v1/aliyunmarket-cmapi029045-query-symbols' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{\n "pidx": "页码,每页最多50",\n "rout": "分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...",\n "keywords": "模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)",\n "futmain": "是否筛选主力合约(1是0否),针对期货分类有效"\n}'import os
import requests
url = "https://openapi.toolkk.com/v1/aliyunmarket-cmapi029045-query-symbols"
payload = {
"pidx": "页码,每页最多50",
"rout": "分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...",
"keywords": "模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)",
"futmain": "是否筛选主力合约(1是0否),针对期货分类有效"
}
headers = {
"Content-Type": "application/json",
"X-API-Key": os.getenv("TOOLKK_API_KEY", "YOUR_API_KEY"),
}
response = requests.get(url, headers=headers, params=payload, timeout=30)
response.raise_for_status()
print(response.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
endpoint := "https://openapi.toolkk.com/v1/aliyunmarket-cmapi029045-query-symbols"
payload := []byte("{\n \"pidx\": \"页码,每页最多50\",\n \"rout\": \"分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...\",\n \"keywords\": \"模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)\",\n \"futmain\": \"是否筛选主力合约(1是0否),针对期货分类有效\"\n}")
req, err := http.NewRequest("GET", endpoint, bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(body))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ToolkkExample {
public static void main(String[] args) throws Exception {
String payload = "{\n \"pidx\": \"页码,每页最多50\",\n \"rout\": \"分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...\",\n \"keywords\": \"模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)\",\n \"futmain\": \"是否筛选主力合约(1是0否),针对期货分类有效\"\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://openapi.toolkk.com/v1/aliyunmarket-cmapi029045-query-symbols"))
.method("GET", HttpRequest.BodyPublishers.ofString(payload))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}{
"pidx": "页码,每页最多50",
"rout": "分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...",
"keywords": "模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)",
"futmain": "是否筛选主力合约(1是0否),针对期货分类有效"
}{}The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.pidx | object | {...} |
| properties.pidx.type | string | int |
| properties.pidx.description | string | 页码,每页最多50 |
| properties.rout | object | {...} |
| properties.rout.type | string | string |
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
<?php
$endpoint = 'https://openapi.toolkk.com/v1/aliyunmarket-cmapi029045-query-symbols';
$payload = "{\n \"pidx\": \"页码,每页最多50\",\n \"rout\": \"分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,C...\",\n \"keywords\": \"模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个)\",\n \"futmain\": \"是否筛选主力合约(1是0否),针对期货分类有效\"\n}";
$ch = curl_init($endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;| properties.rout.description | string | 分类rout和keywords两参数中至少输入其中一个,参考(CNST,USST,HKST,GBFSB,GBCFD,GBFT,CNFT,GBDC,GBIDX,CNCFD,CNFOP,CMDTY,TB,JPST,INST,TWST,CNZZ,CNFD...) 美股,港股,外汇,商品股指CFD,国际期货,期货,数字货币,全球股指,黄金市场,期货期权,商品贵金属,政府债券,日股,印股,台股,基金... |
| properties.keywords | object | {...} |
| properties.keywords.type | string | string |
| properties.keywords.description | string | 模糊关键字,拼音首字母/代码等(rout和keywords两参数中必须至少输入其中一个) |
| properties.futmain | object | {...} |
| properties.futmain.type | string | int |
| properties.futmain.description | string | 是否筛选主力合约(1是0否),针对期货分类有效 |
| required | array | "pidx" |
| required[] | string | pidx |