获取财务指标
curl --request GET \
--url https://api.aisa.one/apis/v1/financial/financial-metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/financial/financial-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/financial/financial-metrics', 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.aisa.one/apis/v1/financial/financial-metrics",
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.aisa.one/apis/v1/financial/financial-metrics"
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.aisa.one/apis/v1/financial/financial-metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/financial/financial-metrics")
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{
"financial_metrics": [
{
"ticker": "<string>",
"market_cap": 123,
"enterprise_value": 123,
"price_to_earnings_ratio": 123,
"price_to_book_ratio": 123,
"price_to_sales_ratio": 123,
"enterprise_value_to_ebitda_ratio": 123,
"enterprise_value_to_revenue_ratio": 123,
"free_cash_flow_yield": 123,
"peg_ratio": 123,
"gross_margin": 123,
"operating_margin": 123,
"net_margin": 123,
"return_on_equity": 123,
"return_on_assets": 123,
"return_on_invested_capital": 123,
"asset_turnover": 123,
"inventory_turnover": 123,
"receivables_turnover": 123,
"days_sales_outstanding": 123,
"operating_cycle": 123,
"working_capital_turnover": 123,
"current_ratio": 123,
"quick_ratio": 123,
"cash_ratio": 123,
"operating_cash_flow_ratio": 123,
"debt_to_equity": 123,
"debt_to_assets": 123,
"interest_coverage": 123,
"revenue_growth": 123,
"earnings_growth": 123,
"book_value_growth": 123,
"earnings_per_share_growth": 123,
"free_cash_flow_growth": 123,
"operating_income_growth": 123,
"ebitda_growth": 123,
"payout_ratio": 123,
"earnings_per_share": 123,
"book_value_per_share": 123,
"free_cash_flow_per_share": 123
}
]
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}财务指标
历史财务指标
获取历史财务指标
GET
https://api.aisa.one/apis/v1/financial
/
financial-metrics
获取财务指标
curl --request GET \
--url https://api.aisa.one/apis/v1/financial/financial-metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/financial/financial-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/financial/financial-metrics', 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.aisa.one/apis/v1/financial/financial-metrics",
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.aisa.one/apis/v1/financial/financial-metrics"
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.aisa.one/apis/v1/financial/financial-metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/financial/financial-metrics")
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{
"financial_metrics": [
{
"ticker": "<string>",
"market_cap": 123,
"enterprise_value": 123,
"price_to_earnings_ratio": 123,
"price_to_book_ratio": 123,
"price_to_sales_ratio": 123,
"enterprise_value_to_ebitda_ratio": 123,
"enterprise_value_to_revenue_ratio": 123,
"free_cash_flow_yield": 123,
"peg_ratio": 123,
"gross_margin": 123,
"operating_margin": 123,
"net_margin": 123,
"return_on_equity": 123,
"return_on_assets": 123,
"return_on_invested_capital": 123,
"asset_turnover": 123,
"inventory_turnover": 123,
"receivables_turnover": 123,
"days_sales_outstanding": 123,
"operating_cycle": 123,
"working_capital_turnover": 123,
"current_ratio": 123,
"quick_ratio": 123,
"cash_ratio": 123,
"operating_cash_flow_ratio": 123,
"debt_to_equity": 123,
"debt_to_assets": 123,
"interest_coverage": 123,
"revenue_growth": 123,
"earnings_growth": 123,
"book_value_growth": 123,
"earnings_per_share_growth": 123,
"free_cash_flow_growth": 123,
"operating_income_growth": 123,
"ebitda_growth": 123,
"payout_ratio": 123,
"earnings_per_share": 123,
"book_value_per_share": 123,
"free_cash_flow_per_share": 123
}
]
}{
"error": "Bad Request",
"message": "Invalid request parameters"
}{
"error": "Unauthorized",
"message": "Invalid API key provided"
}{
"error": "Payment Required",
"message": "This endpoint requires a paid subscription. Please upgrade your plan."
}{
"error": "Not Found",
"message": "Ticker XXXX not found"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
公司的股票代码。如果未提供 cik,则此项为必填。
公司的中央索引键(CIK)。可代替 ticker 使用。
财务数据的时间段。
可用选项:
annual, quarterly, ttm 要返回的最大结果数量。
按 YYYY-MM-DD 格式的确切报告期日期筛选。
筛选报告期大于或等于 YYYY-MM-DD 格式指定日期的数据。
筛选报告期小于或等于 YYYY-MM-DD 格式指定日期的数据。
按报告周期筛选,报告周期须晚于 YYYY-MM-DD 格式的日期。
筛选报告周期早于指定日期的报告,日期格式为 YYYY-MM-DD。
响应
某个 ticker 的历史财务指标和比率
所请求股票代码的历史财务指标和比率。
Show child attributes
Show child attributes
⌘I