美股 ETF 文件
Longbridge US 賬戶
此方法僅適用於美國數據中心賬戶。
列出美股 ETF 的監管文件——招股書、事實說明書和年報。
SDK Links
Python |
Rust |
Go |
Node.js |
Java |
C++ |
Parameters
SDK 方法參數。
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| symbol | string | 是 | ETF 代碼,如 IVV.US |
| size | int | 否 | 最大返回文件數,不填則返回全部 |
Request Example
from longbridge.openapi import FundamentalContext, Config, OAuthBuilder
oauth = OAuthBuilder("your-client-id").build(lambda url: print("請訪問:", url))
config = Config.from_oauth(oauth)
ctx = FundamentalContext(config)
resp = ctx.us_etf_files("IVV.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("請訪問:", url))
config = Config.from_oauth(oauth)
ctx = AsyncFundamentalContext.create(config)
resp = await ctx.us_etf_files("IVV.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('請訪問此 URL 授權:' + url)
})
const config = Config.fromOAuth(oauth)
const ctx = FundamentalContext.new(config)
const resp = await ctx.usEtfFiles("IVV.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.getUsEtfFiles("IVV.US", null).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!("請訪問:{url}")).await?;
let config = Arc::new(Config::from_oauth(oauth));
let ctx = FundamentalContext::new(config);
let resp = ctx.us_etf_files("IVV.US", None).await?;
println!("{:?}", resp);
Ok(())
}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.ETFFiles(context.Background(), "IVV.US", nil)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", resp)
}Response
Response Example
{
"files": [
{
"file_name": "iShares Core S&P 500 ETF Prospectus",
"file_path": "https://www.iShares.com/content/dam/iShares/prospectus/en/IVV.pdf",
"update_date": "2024-01-15",
"code": "IVV_PROSPECTUS",
"format": "pdf"
},
{
"file_name": "iShares Core S&P 500 ETF Annual Report",
"file_path": "https://www.iShares.com/content/dam/iShares/reports/en/IVV_AR.pdf",
"update_date": "2024-02-01",
"code": "IVV_ANNUAL",
"format": "pdf"
}
]
}
Response Status
| 狀態碼 | 描述 | 結構 |
|---|---|---|
| 200 | 成功 | UsETFFileList |
| 400 | 請求錯誤 | None |
Schemas
UsETFFilesResponse
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| files | USETFFile[] | 是 | ETF 監管文件列表 |
USETFFile
| 名稱 | 類型 | 描述 |
|---|---|---|
| file_name | string | 文件名稱 |
| file_path | string | 文件路徑或 URL |
| update_date | string | 最後更新日期 |
| code | string | 文件代碼 |
| format | string | 文件格式(如 pdf) |