運行股票選股器
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/screener/search \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/screener/search"
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://openapi.fcontext.com/api/market-data/screener/search', 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://openapi.fcontext.com/api/market-data/screener/search",
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://openapi.fcontext.com/api/market-data/screener/search"
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://openapi.fcontext.com/api/market-data/screener/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/screener/search")
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{
"results": {
"data": "<string>"
}
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}選股器
運行股票選股器
按策略 ID 或自定義條件運行選股器。
GET
/
api
/
market-data
/
screener
/
search
運行股票選股器
curl --request GET \
--url https://openapi.fcontext.com/api/market-data/screener/search \
--header 'x-api-key: <api-key>'import requests
url = "https://openapi.fcontext.com/api/market-data/screener/search"
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://openapi.fcontext.com/api/market-data/screener/search', 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://openapi.fcontext.com/api/market-data/screener/search",
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://openapi.fcontext.com/api/market-data/screener/search"
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://openapi.fcontext.com/api/market-data/screener/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.fcontext.com/api/market-data/screener/search")
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{
"results": {
"data": "<string>"
}
}{
"error": "<string>"
}{
"error": "Unauthorized: missing API key"
}授權
ApiKeyHeaderBearerAuth
在帳戶設置中生成的 Financial Context key。請以 x-api-key: <key> 形式發送。
查詢參數
市場代碼。自定義條件選股預設使用 US;按策略 ID 運行時可省略。
策略 ID;提供後,選股器會運行該策略。
必填範圍:
x >= 1strategy_id 的兼容別名。
必填範圍:
x >= 1自定義篩選條件;支持 KEY:MIN:MAX 或 JSON 數組。
conditions 的兼容別名。
額外顯示的指標,逗號分隔或 JSON 數組。
從 0 開始的頁碼,預設 0。
必填範圍:
x >= 0每頁項目數,預設 20,最大 100。
必填範圍:
1 <= x <= 100size 的兼容別名。
必填範圍:
1 <= x <= 100回應
選股結果
- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I