Documentation Index
Fetch the complete documentation index at: https://docs.ivory.finance/llms.txt
Use this file to discover all available pages before exploring further.
What are smart blocks?
Smart blocks are special Tiptap node types that carry live financial data inside theirattrs object. Instead of static text, they embed SEC filing excerpts, market metrics, AI analysis, SQL results, interactive charts, comps tables, valuation models, and 30+ other financial artifact types directly into a document.
Every smart block shares this base shape:
| Field | Values | Description |
|---|---|---|
block_id | UUID | Stable identifier for this block instance |
status | pending | loading | loaded | error | Resolver lifecycle state |
error | string | null | Error message when status == "error" |
Block lifecycle
/blocks/save immediately after resolving to make a block persistent (survives navigation and session loss).
Block persistence endpoints
All persistence endpoints requireX-API-Key and Authorization: Bearer <jwt>.
Save a block
| Field | Required | Default | Description |
|---|---|---|---|
block | ✓ | — | The full block dict returned by any /resolve/* endpoint |
source | No | "chat" | Where the block was generated: "chat" | "editor" | "api" |
doc_id | No | null | Document UUID the block was generated for |
label | No | Auto-derived | Human-readable label (falls back to attrs.title or attrs.company_name) |
List saved blocks
| Query param | Default | Description |
|---|---|---|
block_type | (all) | Filter to a specific type, e.g. ivory_chart, comps_table |
source | (all) | chat | editor | api |
limit | 50 | Max 100 per page |
offset | 0 | Pagination offset |
Copy a block
Duplicates a saved block — creates a new DB row and a newblock_id inside attrs. The original is unchanged.
Pin a block to the dashboard
Idempotent — calling again updatesposition. Supports multiple named dashboards via the dashboard field.
Get dashboard pins
Returns all pinned blocks for a dashboard ordered byposition then pinned_at. Full attrs included — no second fetch needed to render.
Unpin a block
Delete a saved block
Soft-deletes the block. Pins cascade-delete automatically — no need to unpin first.Get all block schemas
Returns the fullattrs schema for all 30+ block types — no auth required. Use this to generate TypeScript types.
Block type resolvers
To auto-write a block into a document in one call, passdoc_id in the request body with an Authorization: Bearer <jwt> header. The resolver appends the block to doc_ast automatically.
sec_citation — SEC filing excerpt
sec_citation — SEC filing excerpt
| Field | Required | Default | Description |
|---|---|---|---|
accession_number | ✓ | — | SEC filing accession number |
query | ✓ | — | Semantic search query |
chunk_limit | No | 5 | Max excerpts to include (1–10) |
doc_id | No | null | Auto-append block to this document |
market_data — Live financial metrics
market_data — Live financial metrics
cik or ticker.Available metrics
| Key | Description |
|---|---|
revenue_ttm_usd_millions | Trailing-12-month revenue ($ millions) |
net_income_ttm_usd_millions | Net income TTM |
total_assets_usd_millions | Total assets |
total_liabilities_usd_millions | Total liabilities |
cash_and_equivalents_usd_millions | Cash and equivalents |
operating_income_ttm_usd_millions | Operating income TTM |
eps_ttm | Basic EPS TTM |
net_margin | Net margin % |
ai_insight — AI-generated analysis
ai_insight — AI-generated analysis
doc_id is provided, the document’s text is automatically used as context. Pass context_text to override.sql_query — Interactive SQL table
sql_query — Interactive SQL table
SELECT query. Write operations are rejected with 422. Max 200 rows. Auth required.Query failures return an error block (not 500) so the document can display the error inline.ivory_chart — Interactive Plotly chart
ivory_chart — Interactive Plotly chart
chart_type / spec format as the orchestrator generate_chart tool.Chart types: dual_axis, bar, line, heatmapcomps_table — Comparable companies
comps_table — Comparable companies
valuation_model — DCF / LBO / Comps / Merger
valuation_model — DCF / LBO / Comps / Merger
model_type: dcf | lbo | comps | mergerrisk_heatmap — Filing risk matrix
risk_heatmap — Filing risk matrix
filing_forensics and returns a 6-category × N-period risk matrix with flags and drift scores.Categories: Litigation, Liquidity, Regulatory, Market, Operational, Governanceearnings_brief — Earnings call summary
earnings_brief — Earnings call summary
thesis_block — Investment thesis
thesis_block — Investment thesis
context_text is, the LLM generates them automatically. Auth required.revenue_breakdown — Segment revenue
revenue_breakdown — Segment revenue
revenue_breakdowns + revenue_segment_lines for hierarchical segment data.breakdown_type: segment | geography | product — omit for all.ownership_snapshot — Insider trades
ownership_snapshot — Insider trades
Other block types
Other block types
POST /v1/editor/blocks/resolve/<type>:| Type | Description |
|---|---|
revenue_trend | Time-series revenue sparkline from the financials table |
deal_tracker | M&A timeline with parties, events, advisors, key terms |
quality_of_earnings | QoE adjustments → adjusted EBITDA bridge |
audit_finding | Structured audit finding (condition / criteria / cause / effect) |
due_diligence_checklist | DD workstream checklist with completion tracking |
materiality_calculation | ASC 320 / ISA 320 materiality thresholds |
icfr_control | SOX / ICFR control with test results and auto-derived conclusion |
tax_provision | ASC 740 / IAS 12 tax provision with ETR reconciliation |
benchmarking_table | Operational benchmarking with quartile ranks |
project_status | Engagement status, milestones, RAG, budget vs actual |
regulatory_tracker | Compliance gap tracker per regulation |
process_narrative | Walkthrough / process flow with control points |
executive_kpi_dashboard | RAG KPI grid with AI-generated highlights |
competitive_landscape | Market map with optional Plotly scatter positioning |
esg_scorecard | ESG ratings (MSCI / Sustainalytics / S&P), controversies |
analyst_consensus | Buy/Hold/Sell consensus, price target distribution |
capital_structure | Debt waterfall, credit ratings, covenant headroom |
news_sentiment | News articles with sentiment scoring |
activist_watch | Activist investor positions and campaign status |
strategic_initiative | Initiative tracker with milestones and KPIs |
macro_environment | Macro indicators (rates, FX, commodities, PMI) |
scenario_analysis | Bull/base/bear scenario comparison table |
financial_statement_comparison | Multi-company income statement side-by-side |
earnings_quality_forensics | Accruals, operating leverage, working capital flags |
filing_change_tracker | YoY wording diff on SEC filing sections |
knowledge_graph_map | Network graph from FalkorDB (entity relationships) |
credit_memo | Credit analysis memo with recommendation |
capital_allocation_analysis | CapEx / dividends / buybacks / M&A mix with ROIC vs WACC |
deal_economics | M&A / LBO term sheet with synergies and accretion |
document_intelligence | Key terms, defined terms, obligations extraction |
portfolio_snapshot | Portfolio positions with sector/geography exposure |
meeting_notes | Structured meeting notes with action items |
GET /v1/editor/blocks/schemas for the full attrs schema of each type.Generic pattern:Registering custom Tiptap extensions
Each smart block requires a matching TiptapNode extension. Use GET /v1/editor/blocks/schemas to get the exact attrs list for each type.

