# fin-proxy-client

Typed async Rust client for the [fin-proxy](../) financial-data API (`/v1`).

## Usage

    cargo add fin-proxy-client

```rust
use fin_proxy_client::{FinProxy, fmp::{StatementParams, Period}};

# async fn run() -> Result<(), fin_proxy_client::SdkError> {
let client = FinProxy::new("https://api.example.com")?.with_api_key("unkey_xxx");

let inc = client.fmp()
    .income_statement(&StatementParams::new("AAPL").period(Period::Annual).limit(8))
    .await?;
# Ok(()) }
```

Responses reuse the upstream `motosan-finance` types, re-exported under
`fin_proxy_client::types`. Equity/FMP/Polygon/FRED endpoints return
`FinanceResult<Vec<…>>`; TWSE endpoints return bare `Vec<T>` or a single object.

## Coverage

- FMP: equity historical/quote/profile + income/balance/cash-flow + earnings-calendar + analyst-grades.
- Polygon: equity historical/quote + news (no profile/financials upstream).
- FRED: macro series observations + series search.
- SEC: equity profile, filings, insider-transactions, eps-history (no API key; contact-email UA).
- TWSE: stock-day-all, institutional, margin, otc-institutional, otc-margin,
  foreign-ownership, shareholder (no API key; OTC endpoints 503 upstream).
- FinMind: all 54 datasets (rows as `serde_json::Value`, `finmind::Rows`).
- galaxyark: Ark (14), Owl2 (37), Owl5 (27) via `galaxyark().ark()/.owl2()/.owl5()`
  (results as `serde_json::Value`). Proprietary — requires server-side credentials.

All providers covered.
