读取股票研究结果
curl --request GET \
--url https://api.glasser.ai/v1/solutions/finance/stock_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/finance/stock_research/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.glasser.ai/v1/solutions/finance/stock_research/result', 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.glasser.ai/v1/solutions/finance/stock_research/result",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.glasser.ai/v1/solutions/finance/stock_research/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.glasser.ai/v1/solutions/finance/stock_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/finance/stock_research/result")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {},
"output": {
"ticker": "<string>",
"cik": "<string>",
"name": "<string>",
"industry": "<string>",
"sector": "<string>",
"exchange": "<string>",
"location": "<string>",
"sic_code": "<string>",
"sic_sector": "<string>",
"sic_industry": "<string>",
"is_active": true,
"sec_filings_url": "<string>",
"market_cap": 123,
"currency": "<string>"
},
"provider_response": {
"http_status": 349,
"error": null
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"action": "company",
"result_status": "success",
"error": {
"code": "<string>",
"message": "<string>"
},
"runs": [
{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {
"omitted": true
},
"output": {
"omitted": true
},
"provider_response": {
"http_status": 349
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
}
}
],
"result_url": "<string>",
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
},
"review_invitation": {
"run_id": "<string>",
"ratings": [
"exceeds_expectations"
],
"instruction": "<string>"
},
"request_charge": {
"charge_usd": "<string>",
"created_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"replayed_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unknown_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"code": "validation_failed",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "forbidden",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}Solutions
读取股票研究结果
读取同一批股票研究 Run,不再调用 Provider,也不产生新的 Charge。
GET
/
v1
/
solutions
/
finance
/
stock_research
/
result
读取股票研究结果
curl --request GET \
--url https://api.glasser.ai/v1/solutions/finance/stock_research/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.glasser.ai/v1/solutions/finance/stock_research/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.glasser.ai/v1/solutions/finance/stock_research/result', 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.glasser.ai/v1/solutions/finance/stock_research/result",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.glasser.ai/v1/solutions/finance/stock_research/result"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.glasser.ai/v1/solutions/finance/stock_research/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.glasser.ai/v1/solutions/finance/stock_research/result")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {},
"output": {
"ticker": "<string>",
"cik": "<string>",
"name": "<string>",
"industry": "<string>",
"sector": "<string>",
"exchange": "<string>",
"location": "<string>",
"sic_code": "<string>",
"sic_sector": "<string>",
"sic_industry": "<string>",
"is_active": true,
"sec_filings_url": "<string>",
"market_cap": 123,
"currency": "<string>"
},
"provider_response": {
"http_status": 349,
"error": null
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"action": "company",
"result_status": "success",
"error": {
"code": "<string>",
"message": "<string>"
},
"runs": [
{
"id": "<string>",
"run_url": "<string>",
"provider": "<string>",
"endpoint": "<string>",
"endpoint_version": 123,
"status": "QUEUED",
"failure": {
"kind": "TIMED_OUT",
"message": "<string>"
},
"input": {
"omitted": true
},
"output": {
"omitted": true
},
"provider_response": {
"http_status": 349
},
"charge_usd": "<string>",
"charge_basis": {
"clause": "rule",
"quantity": 1
},
"stoppable": true,
"stop_requested_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"task_id": "<string>",
"metadata": {},
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
}
}
],
"result_url": "<string>",
"response_file": {
"body_field": "output",
"state": "available",
"download_url": "<string>",
"link_expires_at": "2023-11-07T05:31:56Z",
"file_expires_at": "2023-11-07T05:31:56Z",
"bytes": 1,
"sha256": "<string>",
"content_type": "application/json"
},
"review_invitation": {
"run_id": "<string>",
"ratings": [
"exceeds_expectations"
],
"instruction": "<string>"
},
"request_charge": {
"charge_usd": "<string>",
"created_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"replayed_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unknown_run_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}{
"error": {
"code": "validation_failed",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "forbidden",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "not_found",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"reason": "<string>",
"control": "<string>",
"retry_after_ms": 123,
"details": {}
},
"request_id": "<string>"
}使用同一 Workspace 和仍允许来源 Endpoint 的 Key 访问带签名的
result_url。响应保留归一输出和实际 Charge;pending 不触发新执行。查询参数
响应
财务金额保留币种;比率与增长率保持原始小数(0.3 表示 30%)。宏观利率与股价 day_change_percent 是百分数。缺失字段为 null。Run completed_at 是取数时间,不能代替观察日期。
财务金额保留币种;比率与增长率保持原始小数(0.3 表示 30%)。宏观利率与股价 day_change_percent 是百分数。缺失字段为 null。Run completed_at 是取数时间,不能代替观察日期。
以 JSON 文件完整交付较大的 Provider 正文。Glasser 对接收的正文和序列化文件应用 32 MiB 的运行时资源保护。body_field 指明被替代的字段;output 为 null,或省略 provider_response.error。下载链接最多一小时后过期。在文件的 7 天可用期内,通过已认证的 Get Run 刷新链接。读取和下载不会再次执行 Run 或重复收费。state 为 link_pending 时,读取同一 Run 即可准备链接,不会再次执行或重复收费。链接授予临时读取权限,请仅与预期接收者分享。
Show child attributes
Show child attributes