Longbridge Developers
立即開始

美股 ETF 文件

Longbridge US 賬戶

此方法僅適用於美國數據中心賬戶。

列出美股 ETF 的監管文件——招股書、事實說明書和年報。

>_ CLI
# 美股 ETF 監管文件
longbridge etf-docs IVV.US
longbridge etf-docs SPY.US

Parameters

SDK 方法參數。

名稱類型必填描述
symbolstringETF 代碼,如 IVV.US
sizeint最大返回文件數,不填則返回全部

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

名稱類型必填描述
filesUSETFFile[]ETF 監管文件列表

USETFFile

名稱類型描述
file_namestring文件名稱
file_pathstring文件路徑或 URL
update_datestring最後更新日期
codestring文件代碼
formatstring文件格式(如 pdf