Financial Report
Fetch income statement, balance sheet, and cash flow statement for any public company.
SDK Links
Python |
Rust |
Go |
Node.js |
Java |
C++ |
Parameters
SDK method parameters.
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | string | YES | Security symbol, e.g. AAPL.US |
| kind | string | YES | Report type: IncomeStatement, BalanceSheet, CashFlow, All |
| period | string | YES | Report period: Annual, SemiAnnual, Q1, Q2, Q3, ThreeQ, QuarterlyFull |
Request Example
from longbridge.openapi import FundamentalContext, Config, OAuthBuilder
oauth = OAuthBuilder("your-client-id").build(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = FundamentalContext(config)
resp = ctx.financial_report("AAPL.US")
print(resp)import asyncio
from longbridge.openapi import AsyncFundamentalContext, Config, OAuthBuilder
async def main() -> None:
oauth = await OAuthBuilder("your-client-id").build_async(lambda url: print("Visit:", url))
config = Config.from_oauth(oauth)
ctx = AsyncFundamentalContext.create(config)
resp = await ctx.financial_report("AAPL.US")
print(resp)
if __name__ == "__main__":
asyncio.run(main())const { Config, FundamentalContext, OAuth } = require('longbridge')
async function main() {
const oauth = await OAuth.build('your-client-id', (_, url) => {
console.log('Open this URL to authorize: ' + url)
})
const config = Config.fromOAuth(oauth)
const ctx = FundamentalContext.new(config)
const resp = await ctx.financial_report('AAPL.US')
console.log(resp)
}
main().catch(console.error)import com.longbridge.*;
import com.longbridge.fundamental.*;
class Main {
public static void main(String[] args) throws Exception {
try (OAuth oauth = new OAuthBuilder("your-client-id").build(url -> System.out.println("Open to authorize: " + url)).get();
Config config = Config.fromOAuth(oauth);
FundamentalContext ctx = FundamentalContext.create(config)) {
var resp = ctx.getFinancialReport("AAPL.US").get();
System.out.println(resp);
}
}
}use std::sync::Arc;
use longbridge::{oauth::OAuthBuilder, fundamental::FundamentalContext, Config};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let oauth = OAuthBuilder::new("your-client-id").build(|url| println!("Open: {url}")).await?;
let config = Arc::new(Config::from_oauth(oauth));
let ctx = FundamentalContext::new(config);
let resp = ctx.financial_report("AAPL.US").await?;
println!("{:?}", resp);
Ok(())
}#include <iostream>
#include <longbridge.hpp>
using namespace longbridge;
using namespace longbridge::fundamental;
int main() {
OAuthBuilder("your-client-id").build(
[](const std::string& url) { std::cout << "Open: " << url << std::endl; },
[](auto res) {
if (!res) return;
Config config = Config::from_oauth(*res);
FundamentalContext ctx = FundamentalContext::create(config);
ctx.financial_report("AAPL.US", [](auto resp) {
if (resp) std::cout << "OK" << std::endl;
});
});
std::cin.get();
}package main
import (
"context"
"fmt"
"log"
"github.com/longbridge/openapi-go/config"
"github.com/longbridge/openapi-go/oauth"
"github.com/longbridge/openapi-go/fundamental"
)
func main() {
o := oauth.New("your-client-id").
OnOpenURL(func(url string) { fmt.Println("Open this URL to authorize:", url) })
if err := o.Build(context.Background()); err != nil {
log.Fatal(err)
}
conf, err := config.New(config.WithOAuthClient(o))
if err != nil {
log.Fatal(err)
}
c, err := fundamental.NewFromCfg(conf)
if err != nil {
log.Fatal(err)
}
defer c.Close()
resp, err := c.FinancialReport(context.Background(), "AAPL.US")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}Response
Response Example
{
"code": 0,
"message": "success",
"data": {
"list": {
"IS": {
"indicators": [
{
"title": "Income Statement",
"short_title": "IS",
"currency": "USD",
"has_yoy": true,
"entry": "IS",
"periods": [
"FY2025",
"FY2024"
],
"accounts": [
{
"field": "EPS",
"name": "Earnings Per Share(USD)",
"percent": false,
"tip": "",
"values": [
{
"period": "FY 2025",
"year": 2025,
"fp_end": "1758945600",
"value": "7.46",
"ratio": "",
"yoy": "0.227"
}
]
}
]
}
]
}
}
}
}
Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | FinancialReportsResponse |
| 400 | Bad request | None |
Schemas
FinancialReportsResponse
| Name | Type | Required | Description |
|---|---|---|---|
| list | object | true | Report data grouped by kind (key: report type code, e.g. IS, BS, CF) |
FinancialReportIndicator
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | false | Indicator title |
| short_title | string | false | Short title |
| currency | string | false | Currency |
| has_yoy | boolean | false | Whether year-over-year data is available |
| entry | string | false | Entry identifier |
| periods | string[] | false | Available reporting periods |
| accounts | object[] | false | List of financial line items, see FinancialAccount |
FinancialAccount
| Name | Type | Required | Description |
|---|---|---|---|
| field | string | true | Field identifier |
| name | string | false | Field display name |
| percent | boolean | false | Whether the value is a percentage |
| tip | string | false | Tooltip description |
| values | object[] | false | Historical values by period, see FinancialValue |
FinancialValue
| Name | Type | Required | Description |
|---|---|---|---|
| period | string | true | Period label (e.g. FY 2024) |
| year | integer | false | Fiscal year |
| fp_end | string | false | Period end timestamp |
| value | string | false | Reported value |
| ratio | string | false | Ratio value |
| yoy | string | false | Year-over-year growth rate |