FinBridge DB Schema
get_db_schemaInspect the schema of the local finbridge database (SQLite with ingested KR/US company fundamentals, filings, and daily prices): tables, views, columns, per-table row counts (counted in the background and refreshed every 30 minutes; null with rows_note "counting…" right after a server start), and ready-to-run example queries for query_db.
Read this before writing a query_db statement. It returns no company data itself — get_db_schema describes the tables, query_db runs the SELECT.
Args: (none)
Returns: {tables: [{name, columns: [{name, type}], rows}], views: [{name, columns: [{name, type}]}], examples: [sql_string]}
Key objects:
companies: KR companies have source='dart' + stock_code (6-digit), US companies source='edgar' + ticker
financials: one row per company x fiscal_year x quarter (quarter=0 = annual); raw unscaled KRW/USD amounts
prices_daily: daily OHLCV per company_id
views v_financials (financials joined with company name/ticker/stock_code) and v_latest_annual (latest annual row per company) — prefer these in query_db
Examples:
Call before writing SQL for query_db, to learn table/column names.
Check row counts to see how much data the nightly ingest has loaded.
Use when: preparing a query_db, or checking ingest coverage. Don't use for market data itself (get_stock_prices / get_valuation / the screeners read the same tables with the right joins already done). FinBridge has no real-time equity quote tool — equity prices here are end-of-day closes from the nightly ingest; the only live data is crypto (get_crypto_ticker) and regulator filings (get_dart_filings / get_edgar_filings). Errors: 'database has not been built yet' — the ingest pipeline has not run on the server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| views | Yes | ||
| tables | Yes | ||
| examples | No | ||
| rows_note | No |