跳转到主要内容
POST
https://api.aisa.one/apis/v1/financial
/
financials
/
search
/
line-items
搜索特定财务指标
curl --request POST \
  --url https://api.aisa.one/apis/v1/financial/financials/search/line-items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "line_items": [
    "<string>"
  ],
  "tickers": [
    "<string>"
  ],
  "period": "ttm",
  "limit": 1
}
'
import requests

url = "https://api.aisa.one/apis/v1/financial/financials/search/line-items"

payload = {
"line_items": ["<string>"],
"tickers": ["<string>"],
"period": "ttm",
"limit": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({line_items: ['<string>'], tickers: ['<string>'], period: 'ttm', limit: 1})
};

fetch('https://api.aisa.one/apis/v1/financial/financials/search/line-items', 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/financials/search/line-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'line_items' => [
'<string>'
],
'tickers' => [
'<string>'
],
'period' => 'ttm',
'limit' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.aisa.one/apis/v1/financial/financials/search/line-items"

payload := strings.NewReader("{\n \"line_items\": [\n \"<string>\"\n ],\n \"tickers\": [\n \"<string>\"\n ],\n \"period\": \"ttm\",\n \"limit\": 1\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/financial/financials/search/line-items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"line_items\": [\n \"<string>\"\n ],\n \"tickers\": [\n \"<string>\"\n ],\n \"period\": \"ttm\",\n \"limit\": 1\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.aisa.one/apis/v1/financial/financials/search/line-items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"line_items\": [\n \"<string>\"\n ],\n \"tickers\": [\n \"<string>\"\n ],\n \"period\": \"ttm\",\n \"limit\": 1\n}"

response = http.request(request)
puts response.read_body
{
  "search_results": [
    {
      "ticker": "<string>",
      "report_period": "2023-12-25",
      "currency": "<string>"
    }
  ]
}
{
"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"
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
line_items
string[]
必填

要应用于搜索的行项目数组。

Minimum array length: 1

要搜索的财务指标。

tickers
string[]
必填

要应用于搜索的股票代码数组。

Minimum array length: 1

要搜索的股票代码。

period
enum<string>
默认值:ttm

财务数据的时间段。

可用选项:
annual,
quarterly,
ttm
limit
integer
默认值:1

要返回的最大结果数量。

必填范围: x >= 1

响应

搜索成功响应

search_results
object[]