获取交易所的标的列表
curl --request GET \
--url https://api.tickflow.org/v1/exchanges/{exchange}/instruments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tickflow.org/v1/exchanges/{exchange}/instruments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tickflow.org/v1/exchanges/{exchange}/instruments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tickflow.org/v1/exchanges/{exchange}/instruments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tickflow.org/v1/exchanges/{exchange}/instruments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tickflow.org/v1/exchanges/{exchange}/instruments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickflow.org/v1/exchanges/{exchange}/instruments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"code": "<string>",
"exchange": "<string>",
"region": "<string>",
"symbol": "<string>",
"ext": {
"type": "cn_equity",
"float_shares": 123,
"limit_down": 123,
"limit_up": 123,
"listing_date": "<string>",
"name_en": "<string>",
"tick_size": 123,
"total_shares": 123
},
"name": "<string>"
}
],
"exchange": "<string>"
}{
"code": "INVALID_PERIOD",
"message": "Invalid period: 2d",
"details": "<unknown>"
}{
"code": "INVALID_PERIOD",
"message": "Invalid period: 2d",
"details": "<unknown>"
}交易所
获取交易所的标的列表
返回指定交易所的所有标的,可选按类型过滤。
GET
/
v1
/
exchanges
/
{exchange}
/
instruments
获取交易所的标的列表
curl --request GET \
--url https://api.tickflow.org/v1/exchanges/{exchange}/instruments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.tickflow.org/v1/exchanges/{exchange}/instruments"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.tickflow.org/v1/exchanges/{exchange}/instruments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tickflow.org/v1/exchanges/{exchange}/instruments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tickflow.org/v1/exchanges/{exchange}/instruments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tickflow.org/v1/exchanges/{exchange}/instruments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickflow.org/v1/exchanges/{exchange}/instruments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"code": "<string>",
"exchange": "<string>",
"region": "<string>",
"symbol": "<string>",
"ext": {
"type": "cn_equity",
"float_shares": 123,
"limit_down": 123,
"limit_up": 123,
"listing_date": "<string>",
"name_en": "<string>",
"tick_size": 123,
"total_shares": 123
},
"name": "<string>"
}
],
"exchange": "<string>"
}{
"code": "INVALID_PERIOD",
"message": "Invalid period: 2d",
"details": "<unknown>"
}{
"code": "INVALID_PERIOD",
"message": "Invalid period: 2d",
"details": "<unknown>"
}⌘I
