gloomberb 0.20.11 → 0.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/awards.ts +16 -0
- package/src/api-client/central-bank-rates.ts +5 -0
- package/src/api-client/data.ts +55 -2
- package/src/api-client/index.ts +28 -3
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/request.ts +86 -3
- package/src/api-client/socket-connection.ts +12 -1
- package/src/api-client/socket.ts +21 -3
- package/src/api-client/supply-chain-graph.ts +4 -2
- package/src/api-client/supply-chain.ts +8 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/econ.ts +10 -7
- package/src/api-client/types/filings-and-calls.ts +8 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/app/global-shortcuts.ts +2 -1
- package/src/app/keybindings/actions.ts +19 -0
- package/src/app/pane-runtime/index.tsx +18 -3
- package/src/app/pane-runtime/layout-placement.ts +63 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
- package/src/architecture/floating-promise-allowlist.json +17 -33
- package/src/brokers/signed-in/adapter.ts +2 -2
- package/src/brokers/signed-in/catalog.ts +13 -4
- package/src/capabilities/chart-series.ts +4 -1
- package/src/cli/board-coins.ts +10 -1
- package/src/cli/commands/crypto-hints.ts +3 -2
- package/src/cli/commands/fred-series.ts +0 -54
- package/src/cli/commands/market.ts +260 -63
- package/src/cli/commands/overview.ts +50 -17
- package/src/cli/commands/search.ts +140 -17
- package/src/cli/commands/ticker.ts +37 -17
- package/src/cli/desktop-pane-shot.ts +27 -2
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/fx-quote-rate.ts +1 -1
- package/src/cli/glossary.ts +14 -5
- package/src/cli/history-catalog-series.ts +85 -0
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/list-progress.ts +45 -0
- package/src/cli/listing-arg.ts +176 -25
- package/src/cli/name-entries.ts +8 -4
- package/src/cli/not-a-ticker.ts +2 -2
- package/src/cli/pane-functions/catalog.ts +55 -7
- package/src/cli/pane-functions/dom.ts +8 -1
- package/src/cli/pane-functions/freshness.ts +52 -5
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +8 -5
- package/src/cli/pane-functions/market-session.ts +66 -14
- package/src/cli/pane-functions/options.ts +5 -0
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/pane-functions/resolver.ts +9 -2
- package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
- package/src/cli/pane-functions/screenshot-types.ts +6 -0
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +55 -12
- package/src/cli/quote-list-reads.ts +87 -0
- package/src/cli/report-tables.ts +70 -13
- package/src/cli/result.ts +26 -3
- package/src/cli/symbol-list.ts +31 -4
- package/src/cli/terminal-code-hints.ts +83 -0
- package/src/cli/ticker-resolution.ts +2 -1
- package/src/cli/treasury-yields.ts +5 -0
- package/src/components/chart/composite/axis-overlays.tsx +5 -2
- package/src/components/chart/composite/composite-chart.tsx +1 -0
- package/src/components/chart/composite/format.ts +101 -15
- package/src/components/chart/composite/legend.tsx +60 -25
- package/src/components/chart/composite/time-axis.ts +51 -29
- package/src/components/chart/composite/toolbar.tsx +42 -6
- package/src/components/chart/curve/curve-surface.tsx +5 -5
- package/src/components/command-bar/action-runtime.ts +2 -0
- package/src/components/command-bar/list/badge.ts +8 -5
- package/src/components/command-bar/list/model.ts +0 -5
- package/src/components/command-bar/list/view.tsx +39 -2
- package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
- package/src/components/command-bar/routes/root/provider-search.ts +23 -3
- package/src/components/command-bar/routes/root/results.ts +20 -9
- package/src/components/command-bar/routes/root/start-here.ts +1 -2
- package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
- package/src/components/command-bar/routing/launch-request.ts +2 -1
- package/src/components/command-bar/routing/navigation-state.ts +4 -2
- package/src/components/command-bar/workflow/types.ts +6 -0
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/detached-pane-shell.tsx +3 -0
- package/src/components/layout/double-escape-close.ts +34 -3
- package/src/components/layout/floating-pane.tsx +10 -4
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/cycle-order.ts +66 -2
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/layout/pane/header.tsx +140 -31
- package/src/components/layout/pane/sidebar.tsx +13 -5
- package/src/components/layout/pane/status-footer.ts +3 -1
- package/src/components/layout/shell/drag/runtime.ts +5 -0
- package/src/components/layout/shell/index.tsx +25 -0
- package/src/components/layout/shell/menu.ts +9 -0
- package/src/components/layout/shell/pane/actions.ts +36 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
- package/src/components/layout/shell/pane-occlusion.ts +40 -0
- package/src/components/layout/shell/shortcuts.ts +17 -1
- package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
- package/src/components/layout/shell/window-mode/index.ts +5 -16
- package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +18 -8
- package/src/components/metric-treemap/index.tsx +3 -1
- package/src/components/onboarding/first-run-workspace.ts +46 -11
- package/src/components/onboarding/onboarding-keyboard.ts +57 -5
- package/src/components/onboarding/onboarding-wizard.tsx +91 -24
- package/src/components/onboarding/portfolio-step/index.tsx +1 -0
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
- package/src/components/onboarding/portfolio-step/types.ts +2 -0
- package/src/components/onboarding/tickers-step-model.ts +140 -0
- package/src/components/onboarding/tickers-step.tsx +116 -0
- package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
- package/src/components/onboarding/use-onboarding-progress.ts +100 -11
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
- package/src/components/onboarding/wizard-model.ts +3 -1
- package/src/components/onboarding/wizard-tickers.ts +139 -0
- package/src/components/price-performance.tsx +2 -2
- package/src/components/speedometer-gauge/model.ts +2 -1
- package/src/components/speedometer-gauge/terminal.tsx +13 -8
- package/src/components/ui/button.tsx +48 -4
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/data-table/opentui/index.tsx +24 -9
- package/src/components/ui/data-table/types.ts +7 -0
- package/src/components/ui/inline-quick-add.tsx +19 -3
- package/src/components/ui/list-view.tsx +11 -5
- package/src/components/ui/multi-select/dialog.tsx +1 -7
- package/src/components/ui/not-meaningful.ts +16 -0
- package/src/components/ui/query-bar.tsx +32 -5
- package/src/components/ui/selection-fill.ts +39 -0
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/core/state/app/layout-reducer.ts +2 -1
- package/src/core/state/app/pane-choices.ts +68 -0
- package/src/core/state/app/state.ts +14 -6
- package/src/core/state/app/types.ts +8 -0
- package/src/data/config/store/normalize.ts +2 -0
- package/src/docs/snapshot.json +1 -1
- package/src/i18n/es.ts +5 -2
- package/src/i18n/ja.ts +5 -2
- package/src/i18n/ko.ts +5 -2
- package/src/i18n/zh-cn.ts +5 -2
- package/src/i18n/zh-tw.ts +5 -2
- package/src/layout/pane-manager/dock-tree.ts +19 -0
- package/src/layout/pane-manager/index.ts +3 -0
- package/src/layout-marketplace/model.ts +2 -1
- package/src/market-data/futures-contract.ts +2 -1
- package/src/market-data/hooks.tsx +1 -1
- package/src/market-data/market/change-basis.ts +27 -5
- package/src/market-data/market/format.ts +13 -13
- package/src/market-data/market/freshness.ts +33 -0
- package/src/market-data/market/status.ts +5 -1
- package/src/market-data/quotes/contributions.ts +10 -0
- package/src/market-data/quotes/freshness.ts +19 -0
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/live-valuation.ts +31 -4
- package/src/market-data/quotes/resolution.ts +4 -0
- package/src/market-data/quotes/time.ts +17 -24
- package/src/market-data/tax-equivalent.ts +3 -2
- package/src/news/aggregator.ts +19 -8
- package/src/news/hooks.ts +1 -1
- package/src/news/news-model.ts +49 -0
- package/src/news/types.ts +9 -0
- package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
- package/src/plugins/builtin/account-management/index.tsx +1 -0
- package/src/plugins/builtin/account-management/pane.tsx +9 -8
- package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
- package/src/plugins/builtin/alerts/format.ts +6 -5
- package/src/plugins/builtin/alerts/headless.ts +3 -2
- package/src/plugins/builtin/alerts/history.ts +2 -1
- package/src/plugins/builtin/alerts/pane.tsx +2 -1
- package/src/plugins/builtin/alerts/price-text.ts +2 -1
- package/src/plugins/builtin/alerts/scheduled.ts +6 -5
- package/src/plugins/builtin/analytics/account-returns.ts +6 -7
- package/src/plugins/builtin/analytics/display.ts +2 -1
- package/src/plugins/builtin/analytics/pane-model.ts +5 -9
- package/src/plugins/builtin/analytics/risk-model.ts +6 -6
- package/src/plugins/builtin/analytics/risk-pane.tsx +6 -5
- package/src/plugins/builtin/analytics/view.tsx +5 -5
- package/src/plugins/builtin/attention/model.ts +6 -5
- package/src/plugins/builtin/attention/pane.tsx +5 -4
- package/src/plugins/builtin/awards/detail.tsx +17 -8
- package/src/plugins/builtin/awards/headless.ts +37 -15
- package/src/plugins/builtin/awards/model.ts +40 -5
- package/src/plugins/builtin/awards/pane.tsx +11 -8
- package/src/plugins/builtin/backtest/format.ts +3 -2
- package/src/plugins/builtin/backtest/report.ts +3 -2
- package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
- package/src/plugins/builtin/broker-manager/index.tsx +1 -0
- package/src/plugins/builtin/broker-trading/index.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
- package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
- package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
- package/src/plugins/builtin/buildout/cells.tsx +2 -1
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
- package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
- package/src/plugins/builtin/buildout/detail/values.ts +2 -1
- package/src/plugins/builtin/buildout/format.ts +4 -3
- package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
- package/src/plugins/builtin/catalysts/detail.tsx +2 -1
- package/src/plugins/builtin/catalysts/model.ts +6 -5
- package/src/plugins/builtin/catalysts/pane.tsx +2 -1
- package/src/plugins/builtin/cds/headless.ts +3 -2
- package/src/plugins/builtin/cds/model.ts +8 -8
- package/src/plugins/builtin/cds/pane.tsx +3 -2
- package/src/plugins/builtin/central-bank-rates/headless.ts +8 -7
- package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +24 -5
- package/src/plugins/builtin/central-bank-rates/pane.tsx +19 -9
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/headless.ts +5 -1
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +8 -3
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
- package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
- package/src/plugins/builtin/chat/content/handle-prompt.tsx +4 -0
- package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
- package/src/plugins/builtin/chat/sidebar.tsx +3 -4
- package/src/plugins/builtin/clinical-trials/model.ts +4 -3
- package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
- package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
- package/src/plugins/builtin/cloud/askg/model.ts +2 -1
- package/src/plugins/builtin/cloud/askg/pane.tsx +39 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/plugin.tsx +1 -0
- package/src/plugins/builtin/cloud/team/module.tsx +1 -0
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +22 -12
- package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
- package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
- package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
- package/src/plugins/builtin/commodity-balances/pane.tsx +13 -5
- package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
- package/src/plugins/builtin/company-attention/building-model.ts +7 -7
- package/src/plugins/builtin/company-attention/headless.ts +6 -5
- package/src/plugins/builtin/company-attention/model.ts +4 -4
- package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
- package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
- package/src/plugins/builtin/company-kpis/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/model.ts +18 -13
- package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
- package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
- package/src/plugins/builtin/congress-trades/headless.ts +2 -1
- package/src/plugins/builtin/congress-trades/model.ts +6 -6
- package/src/plugins/builtin/congress-trades/table.tsx +7 -6
- package/src/plugins/builtin/connections/index.ts +1 -0
- package/src/plugins/builtin/connections/pane.tsx +5 -5
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/index.tsx +4 -1
- package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
- package/src/plugins/builtin/cot/headless.ts +3 -2
- package/src/plugins/builtin/cot/model.ts +2 -1
- package/src/plugins/builtin/cot/pane.tsx +4 -3
- package/src/plugins/builtin/cpi/headless.ts +4 -3
- package/src/plugins/builtin/cpi/model.ts +8 -7
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +14 -9
- package/src/plugins/builtin/credit-boards/client.ts +5 -0
- package/src/plugins/builtin/credit-boards/headless.ts +3 -7
- package/src/plugins/builtin/credit-boards/model.ts +5 -11
- package/src/plugins/builtin/credit-boards/series.ts +19 -8
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -5
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
- package/src/plugins/builtin/credit-documents/model.ts +2 -2
- package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
- package/src/plugins/builtin/crypto-board/defi.ts +2 -2
- package/src/plugins/builtin/crypto-board/model.ts +4 -3
- package/src/plugins/builtin/crypto-board/pane.tsx +8 -8
- package/src/plugins/builtin/crypto-board/supply.ts +2 -2
- package/src/plugins/builtin/crypto-etf-flows/headless.ts +23 -13
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
- package/src/plugins/builtin/custom-view/index.tsx +3 -1
- package/src/plugins/builtin/custom-view/pane.tsx +5 -1
- package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
- package/src/plugins/builtin/debt-maturities/headless.ts +16 -7
- package/src/plugins/builtin/debt-maturities/model.ts +12 -18
- package/src/plugins/builtin/debt-maturities/pane.tsx +11 -12
- package/src/plugins/builtin/dividend-yield/client.ts +7 -3
- package/src/plugins/builtin/dividend-yield/headless.ts +16 -11
- package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
- package/src/plugins/builtin/dividend-yield/ranking.ts +19 -11
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +3 -3
- package/src/plugins/builtin/docs/use-docs.ts +4 -2
- package/src/plugins/builtin/doe/headless.ts +2 -1
- package/src/plugins/builtin/doe/model.ts +12 -11
- package/src/plugins/builtin/earnings/board-model.ts +42 -7
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/board.tsx +15 -3
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +11 -6
- package/src/plugins/builtin/earnings/client.ts +0 -9
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +64 -23
- package/src/plugins/builtin/earnings/history-model.ts +11 -7
- package/src/plugins/builtin/earnings/history-table.ts +14 -9
- package/src/plugins/builtin/earnings/history.tsx +22 -14
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/data.ts +24 -4
- package/src/plugins/builtin/earnings-calls/format.ts +29 -10
- package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
- package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
- package/src/plugins/builtin/earnings-calls/model.ts +11 -1
- package/src/plugins/builtin/earnings-calls/pane.tsx +2 -5
- package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
- package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
- package/src/plugins/builtin/econ/calendar-model.ts +29 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
- package/src/plugins/builtin/econ/index.tsx +16 -8
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +7 -5
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
- package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
- package/src/plugins/builtin/equity-screener/headless.ts +5 -5
- package/src/plugins/builtin/equity-screener/model.ts +6 -4
- package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
- package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
- package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
- package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
- package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
- package/src/plugins/builtin/executives/format.ts +4 -4
- package/src/plugins/builtin/exposure/headless.ts +8 -8
- package/src/plugins/builtin/exposure/model.ts +4 -3
- package/src/plugins/builtin/exposure/pane.tsx +6 -5
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/headless.ts +18 -14
- package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/filing-events/index.tsx +1 -0
- package/src/plugins/builtin/futures/table.tsx +8 -8
- package/src/plugins/builtin/futures-curve/headless.ts +18 -18
- package/src/plugins/builtin/futures-curve/model.ts +5 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
- package/src/plugins/builtin/fx-matrix/index.tsx +32 -21
- package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
- package/src/plugins/builtin/gpu/board.tsx +6 -5
- package/src/plugins/builtin/gpu/changes.tsx +2 -1
- package/src/plugins/builtin/gpu/equities.tsx +2 -2
- package/src/plugins/builtin/gpu/headless.ts +4 -3
- package/src/plugins/builtin/gpu/model.ts +8 -7
- package/src/plugins/builtin/help/functions-table.tsx +41 -9
- package/src/plugins/builtin/help/index.tsx +6 -3
- package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
- package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
- package/src/plugins/builtin/help/table-cells.tsx +51 -0
- package/src/plugins/builtin/holders/pane.tsx +4 -1
- package/src/plugins/builtin/insider/base-values.ts +2 -2
- package/src/plugins/builtin/insider/display.ts +2 -1
- package/src/plugins/builtin/insider/headless.ts +16 -16
- package/src/plugins/builtin/insider/insider-data.ts +2 -1
- package/src/plugins/builtin/insider/signals-model.ts +3 -3
- package/src/plugins/builtin/insider/table-model.ts +27 -13
- package/src/plugins/builtin/insider/table.tsx +11 -8
- package/src/plugins/builtin/insider/tickers.tsx +1 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
- package/src/plugins/builtin/iv-history/format.ts +8 -7
- package/src/plugins/builtin/iv-history/headless.ts +18 -16
- package/src/plugins/builtin/iv-history/pane.tsx +3 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
- package/src/plugins/builtin/jobs/headless.ts +11 -11
- package/src/plugins/builtin/jobs/index.tsx +1 -0
- package/src/plugins/builtin/jobs/model.ts +2 -2
- package/src/plugins/builtin/jobs/pane.tsx +5 -5
- package/src/plugins/builtin/jodi/model.ts +2 -2
- package/src/plugins/builtin/jodi/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
- package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
- package/src/plugins/builtin/macro-day/headless.ts +9 -8
- package/src/plugins/builtin/macro-day/model.ts +3 -2
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/macro-day/releases.ts +25 -16
- package/src/plugins/builtin/market-halts/model.ts +11 -10
- package/src/plugins/builtin/market-halts/pane.tsx +2 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
- package/src/plugins/builtin/market-movers/index.tsx +20 -8
- package/src/plugins/builtin/market-movers/model.ts +5 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
- package/src/plugins/builtin/market-movers/session-table.ts +3 -3
- package/src/plugins/builtin/market-movers/session.ts +2 -1
- package/src/plugins/builtin/market-movers/table.ts +5 -5
- package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
- package/src/plugins/builtin/market-valuation/headless.ts +7 -7
- package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
- package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
- package/src/plugins/builtin/members/headless.ts +2 -1
- package/src/plugins/builtin/members/model.ts +3 -2
- package/src/plugins/builtin/members/pane.tsx +10 -9
- package/src/plugins/builtin/mna/distress/model.ts +2 -1
- package/src/plugins/builtin/mna/model.ts +5 -5
- package/src/plugins/builtin/money-markets/headless.ts +14 -3
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +14 -5
- package/src/plugins/builtin/news/headless.ts +5 -2
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
- package/src/plugins/builtin/news/wire/news/row.ts +3 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
- package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
- package/src/plugins/builtin/notes/headless.ts +2 -1
- package/src/plugins/builtin/notes/model.ts +2 -1
- package/src/plugins/builtin/openfda/pane.tsx +4 -3
- package/src/plugins/builtin/options/carry.ts +3 -2
- package/src/plugins/builtin/options/market-reference.ts +2 -1
- package/src/plugins/builtin/options/table.ts +48 -9
- package/src/plugins/builtin/options/view.tsx +48 -17
- package/src/plugins/builtin/options-calculator/headless.ts +3 -2
- package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
- package/src/plugins/builtin/options-positioning/headless.ts +8 -7
- package/src/plugins/builtin/options-positioning/model.ts +10 -10
- package/src/plugins/builtin/options-positioning/pane.tsx +6 -6
- package/src/plugins/builtin/options-scenario/collar.ts +5 -4
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
- package/src/plugins/builtin/options-scenario/csp.ts +6 -5
- package/src/plugins/builtin/options-scenario/headless.ts +6 -5
- package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
- package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
- package/src/plugins/builtin/pe-band/headless.ts +9 -8
- package/src/plugins/builtin/pe-band/pane.tsx +7 -7
- package/src/plugins/builtin/perps/cascade.ts +3 -2
- package/src/plugins/builtin/perps/headless.ts +10 -9
- package/src/plugins/builtin/perps/model.ts +14 -14
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -31
- package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +6 -1
- package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +2 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +24 -10
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +9 -11
- package/src/plugins/builtin/portfolio-list/table.tsx +10 -1
- package/src/plugins/builtin/power/detail.tsx +6 -5
- package/src/plugins/builtin/power/gas-model.ts +8 -7
- package/src/plugins/builtin/power/gas.tsx +2 -1
- package/src/plugins/builtin/power/headless.ts +7 -6
- package/src/plugins/builtin/power/model.ts +3 -2
- package/src/plugins/builtin/power/prices-headless.ts +10 -9
- package/src/plugins/builtin/power/prices-model.ts +3 -2
- package/src/plugins/builtin/power/prices.tsx +2 -1
- package/src/plugins/builtin/primary-dealers/model.ts +3 -3
- package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
- package/src/plugins/builtin/rate-path/headless.ts +8 -7
- package/src/plugins/builtin/rate-path/model.ts +6 -5
- package/src/plugins/builtin/rate-path/pane.tsx +6 -5
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
- package/src/plugins/builtin/realized-vol/headless.ts +37 -10
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
- package/src/plugins/builtin/research/analyst-headless.ts +5 -5
- package/src/plugins/builtin/research/analyst-model.ts +7 -7
- package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
- package/src/plugins/builtin/research/client.ts +14 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
- package/src/plugins/builtin/research/event-model.ts +55 -22
- package/src/plugins/builtin/research/event-sources.ts +26 -8
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
- package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
- package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
- package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
- package/src/plugins/builtin/research-search/model.ts +2 -1
- package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
- package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
- package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
- package/src/plugins/builtin/risk-factors/index.tsx +1 -0
- package/src/plugins/builtin/scanner/flow-model.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/headless.ts +3 -2
- package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
- package/src/plugins/builtin/scanner/live-headless.ts +2 -2
- package/src/plugins/builtin/scanner/live-model.ts +3 -2
- package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
- package/src/plugins/builtin/seasonality/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/pane.tsx +4 -3
- package/src/plugins/builtin/sec/filing-display.tsx +12 -15
- package/src/plugins/builtin/sec/fund-facts.ts +2 -2
- package/src/plugins/builtin/sec/headless.ts +2 -1
- package/src/plugins/builtin/sec/index.tsx +6 -2
- package/src/plugins/builtin/sectors/headless.ts +4 -4
- package/src/plugins/builtin/sectors/index.tsx +7 -7
- package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
- package/src/plugins/builtin/shared/earnings-report.ts +13 -6
- package/src/plugins/builtin/shared/research-cells.tsx +2 -2
- package/src/plugins/builtin/shared/source-footer.ts +71 -0
- package/src/plugins/builtin/shared/trend.ts +2 -2
- package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
- package/src/plugins/builtin/short-interest/headless.ts +6 -6
- package/src/plugins/builtin/short-interest/model.ts +9 -9
- package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
- package/src/plugins/builtin/short-interest/publications-pane.tsx +8 -3
- package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
- package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
- package/src/plugins/builtin/short-volume/model.ts +5 -5
- package/src/plugins/builtin/short-volume/pane.tsx +9 -5
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
- package/src/plugins/builtin/supply-chain/client.ts +3 -1
- package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
- package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -2
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +11 -10
- package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
- package/src/plugins/builtin/supply-chain/headless.ts +15 -8
- package/src/plugins/builtin/supply-chain/model.ts +72 -15
- package/src/plugins/builtin/supply-chain/pane.tsx +11 -8
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +7 -6
- package/src/plugins/builtin/themes/headless.ts +2 -1
- package/src/plugins/builtin/themes/model.ts +3 -2
- package/src/plugins/builtin/themes/pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/format.ts +9 -9
- package/src/plugins/builtin/thirteenf/headless.ts +3 -2
- package/src/plugins/builtin/thirteenf/model.ts +2 -1
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
- package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
- package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/table.ts +6 -5
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
- package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
- package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -5
- package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +18 -5
- package/src/plugins/builtin/ticker-detail/overview/model.ts +24 -13
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
- package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +35 -7
- package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +13 -8
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
- package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
- package/src/plugins/builtin/time-sales/headless.ts +3 -2
- package/src/plugins/builtin/time-sales/model.ts +7 -5
- package/src/plugins/builtin/time-sales/pane.tsx +7 -6
- package/src/plugins/builtin/trace-bonds/model.ts +3 -2
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/after.ts +50 -23
- package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +231 -42
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +14 -7
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +37 -34
- package/src/plugins/builtin/treasury-auctions/hk.ts +65 -13
- package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
- package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
- package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +101 -23
- package/src/plugins/builtin/treasury-auctions/pane.tsx +56 -28
- package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
- package/src/plugins/builtin/treasury-daily/model.ts +2 -2
- package/src/plugins/builtin/vol-surface/events.ts +5 -4
- package/src/plugins/builtin/vol-surface/headless.ts +19 -18
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +6 -3
- package/src/plugins/builtin/vol-surface/pane.tsx +13 -9
- package/src/plugins/builtin/vol-surface/stored.ts +2 -1
- package/src/plugins/builtin/vol-surface/tables.ts +4 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -4
- package/src/plugins/builtin/volatility/pane.tsx +6 -6
- package/src/plugins/builtin/world-indices/headless.ts +7 -7
- package/src/plugins/builtin/world-indices/index.tsx +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
- package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
- package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
- package/src/plugins/builtin/yield-curve/curves.ts +3 -3
- package/src/plugins/builtin/yield-curve/headless.ts +7 -6
- package/src/plugins/builtin/yield-curve/index.tsx +5 -4
- package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
- package/src/plugins/runtime/index.tsx +1 -0
- package/src/plugins/runtime/state.ts +20 -0
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +54 -42
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/react.ts +7 -0
- package/src/react/auto-refresh.ts +29 -0
- package/src/renderers/browser/deeplink-bridge.ts +24 -3
- package/src/renderers/dom/desktop/query-bar.tsx +229 -60
- package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
- package/src/renderers/dom/host/overflow-fade.ts +1 -2
- package/src/renderers/dom/styles.css +25 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/series/types.ts +2 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
- package/src/sources/gloomberb-cloud/index.ts +25 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +24 -3
- package/src/sources/provider-errors.ts +64 -1
- package/src/sources/provider-router/batches.ts +19 -0
- package/src/sources/provider-router/index.ts +7 -1
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/app/context/index.tsx +24 -1
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/state/pane-unsent-work.ts +47 -0
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/test-support/shell-pane-keys.tsx +5 -0
- package/src/test-support/telemetry-guard.ts +83 -0
- package/src/test-support/test-env.ts +12 -0
- package/src/theme/colors.ts +17 -1
- package/src/theme/ui-tokens.ts +50 -1
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +37 -2
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/search/japanese-names.json +1 -0
- package/src/tickers/search/japanese-names.ts +152 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/tickers/terminal-codes.ts +55 -6
- package/src/time-series/base-series.ts +3 -0
- package/src/time-series/fundamentals/statement-fields.ts +11 -14
- package/src/time-series/history-acquisition.ts +1 -1
- package/src/time-series/log-scale.ts +9 -0
- package/src/time-series/reporting.ts +3 -3
- package/src/time-series/resolve.ts +6 -4
- package/src/time-series/transforms.ts +10 -5
- package/src/types/config.ts +9 -0
- package/src/types/data-provider.ts +9 -2
- package/src/types/financials.ts +26 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-contributions.ts +7 -0
- package/src/types/plugin-panes.ts +8 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/double-escape-close.ts +42 -0
- package/src/utils/financial-statements.ts +39 -15
- package/src/utils/format.ts +4 -9
- package/src/utils/fundamentals.ts +38 -16
- package/src/utils/fx-status.ts +30 -7
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/network-failure.ts +23 -0
- package/src/utils/options.ts +1 -1
- package/src/utils/report-timing.ts +2 -2
- package/src/utils/served-rates.ts +45 -0
- package/src/utils/text-wrap.ts +84 -3
- package/src/utils/zoned-date-time.ts +47 -22
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessPaneColumn, HeadlessPaneDefinition } from "../../../types/plugin";
|
|
2
3
|
import { expirationOptionSeconds, OPTION_EXPIRATION_FORMAT, OPTION_EXPIRATION_PLACEHOLDER } from "../../../utils/option-expiry";
|
|
3
4
|
import { resolveHeadlessInstrument } from "../shared/headless-market-data";
|
|
@@ -13,9 +14,9 @@ import {
|
|
|
13
14
|
strategyRankedBy, strategyScreenCriteriaText, type ScreenFamily, type StrategyScreen, type StrategyScreenCriteria, type StrategyScreenRow,
|
|
14
15
|
} from "./strategy-screen";
|
|
15
16
|
|
|
16
|
-
const percentCell = (digits: number) => (value: unknown) => typeof value === "number" ? `${value.toFixed(digits)}%` :
|
|
17
|
-
const priceCell = (value: unknown) => typeof value === "number" ? formatHedgePrice(value) :
|
|
18
|
-
const strikeCell = (value: unknown) => typeof value === "number" ? String(value) :
|
|
17
|
+
const percentCell = (digits: number) => (value: unknown) => typeof value === "number" ? `${value.toFixed(digits)}%` : MISSING_VALUE;
|
|
18
|
+
const priceCell = (value: unknown) => typeof value === "number" ? formatHedgePrice(value) : MISSING_VALUE;
|
|
19
|
+
const strikeCell = (value: unknown) => typeof value === "number" ? String(value) : MISSING_VALUE;
|
|
19
20
|
|
|
20
21
|
/** One name's row, flat, every percent in percent. */
|
|
21
22
|
export type CspScreenReportRow = {
|
|
@@ -49,11 +50,11 @@ const COLUMNS: HeadlessPaneColumn[] = [
|
|
|
49
50
|
// The text view marks a wide spread in its cell; exports keep the number and say so in Wide.
|
|
50
51
|
{ key: "spread", header: "Spread", align: "right", format: percentCell(1),
|
|
51
52
|
textFormat: (value, row) => `${percentCell(1)(value)}${row.wide ? " wide" : ""}` },
|
|
52
|
-
{ key: "delta", header: "Delta", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) :
|
|
53
|
+
{ key: "delta", header: "Delta", align: "right", format: (value) => typeof value === "number" ? value.toFixed(2) : MISSING_VALUE },
|
|
53
54
|
{ key: "otm", header: "OTM", align: "right", format: percentCell(1) },
|
|
54
55
|
{ key: "midYield", header: "Mid yield/yr", align: "right", format: percentCell(2) },
|
|
55
56
|
{ key: "bidYield", header: "Bid yield/yr", align: "right", format: percentCell(2) },
|
|
56
|
-
{ key: "ivRank", header: "IVR", align: "right", format: (value) => typeof value === "number" ? value.toFixed(0) :
|
|
57
|
+
{ key: "ivRank", header: "IVR", align: "right", format: (value) => typeof value === "number" ? value.toFixed(0) : MISSING_VALUE },
|
|
57
58
|
{ key: "earnings", header: "Earnings" },
|
|
58
59
|
];
|
|
59
60
|
const NOTE: HeadlessPaneColumn = { key: "note", header: "Note", underRow: true };
|
|
@@ -107,7 +108,7 @@ export function strategyScreenReportRow(row: StrategyScreenRow): StrategyScreenR
|
|
|
107
108
|
// The screen keeps only trades whose mids open the way the family does, so the amount is the column's own credit or debit.
|
|
108
109
|
trade: trade?.text ?? null, net: trade ? Math.abs(trade.netAmount) : null, maxGain: trade?.maxGain ?? null, maxLoss: trade?.maxLoss ?? null,
|
|
109
110
|
unlimited: trade?.unlimited ?? null, breakEven: trade?.breakEvens[0] ?? null, secondBreakEven: trade?.breakEvens[1] ?? null,
|
|
110
|
-
breakEvens: trade?.breakEvens.length ? trade.breakEvens.map((value) => value.toFixed(2)).join(" / ") :
|
|
111
|
+
breakEvens: trade?.breakEvens.length ? trade.breakEvens.map((value) => value.toFixed(2)).join(" / ") : MISSING_VALUE,
|
|
111
112
|
pop: exportPercent(trade?.probabilityOfProfit), returnToExpiry: exportPercent(trade?.returnToExpiry),
|
|
112
113
|
returnPerYear: exportPercent(trade?.annualizedReturn), rewardRisk: trade?.rewardToRisk ?? null,
|
|
113
114
|
ivRank: row.ivRank, spread: exportPercent(trade?.quote?.spreadOfMid), wide: trade?.quote ? row.wideSpread : null,
|
|
@@ -118,10 +119,10 @@ export function strategyScreenReportRow(row: StrategyScreenRow): StrategyScreenR
|
|
|
118
119
|
|
|
119
120
|
/** A gain or loss for one contract a leg, `unlimited` on the side that has no limit. */
|
|
120
121
|
const riskCell = (side: "gain" | "loss") => (value: unknown, row: Record<string, unknown>) =>
|
|
121
|
-
typeof value === "number" ? money(value) : row.unlimited === side ? "unlimited" :
|
|
122
|
+
typeof value === "number" ? money(value) : row.unlimited === side ? "unlimited" : MISSING_VALUE;
|
|
122
123
|
/** `2.68x`, or `unlimited` where the gain has no limit. */
|
|
123
124
|
export const rewardRiskText = (value: unknown, unlimited: unknown) =>
|
|
124
|
-
typeof value === "number" ? `${value.toFixed(2)}x` : unlimited === "gain" ? "unlimited" :
|
|
125
|
+
typeof value === "number" ? `${value.toFixed(2)}x` : unlimited === "gain" ? "unlimited" : MISSING_VALUE;
|
|
125
126
|
|
|
126
127
|
/** The unit every money column of a trade is in, said once: OSA's own for position money. */
|
|
127
128
|
export const STRATEGY_MONEY_UNIT = "USD per contract";
|
|
@@ -137,8 +138,8 @@ function strategyScreenColumns(strategy: ScreenFamily): { text: HeadlessPaneColu
|
|
|
137
138
|
const farExpiry: HeadlessPaneColumn[] = strategy === "calendar" ? [{ key: "farExpiry", header: "Bought expiry" }] : [];
|
|
138
139
|
const body: HeadlessPaneColumn[] = [
|
|
139
140
|
COLUMNS[3]!,
|
|
140
|
-
{ key: "trade", header: "Trade", format: (value) => typeof value === "string" ? value :
|
|
141
|
-
{ key: "net", header: def.net === "credit" ? "Credit" : "Debit", align: "right", format: (value) => typeof value === "number" ? money(value) :
|
|
141
|
+
{ key: "trade", header: "Trade", format: (value) => typeof value === "string" ? value : MISSING_VALUE },
|
|
142
|
+
{ key: "net", header: def.net === "credit" ? "Credit" : "Debit", align: "right", format: (value) => typeof value === "number" ? money(value) : MISSING_VALUE },
|
|
142
143
|
{ key: "maxGain", header: "Max gain", align: "right", format: riskCell("gain") },
|
|
143
144
|
{ key: "maxLoss", header: "Max loss", align: "right", format: riskCell("loss") },
|
|
144
145
|
];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
2
|
+
import { formatShortDate } from "../../../utils/datetime-format";
|
|
1
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
4
|
import {
|
|
3
5
|
DataTableView, PaneStatusBody, QueryBar, usePaneFooter, usePaneNoticeFooter, usePaneTabs, type DataTableCell, type DataTableColumn, type DataTableKeyEvent,
|
|
@@ -95,16 +97,15 @@ const SYMBOLS_FIELD_WIDTH = 24;
|
|
|
95
97
|
const SYMBOLS_DEBOUNCE_MS = 700;
|
|
96
98
|
|
|
97
99
|
const symbolList = (text: string) => [...new Set(text.split(/[\s,;]+/).map((symbol) => symbol.trim().toUpperCase()).filter(Boolean))];
|
|
98
|
-
const percentText = (value: unknown, digits: number) => typeof value === "number" ? `${value.toFixed(digits)}%` :
|
|
99
|
-
const priceText = (value: unknown) => typeof value === "number" ? formatHedgePrice(value) :
|
|
100
|
+
const percentText = (value: unknown, digits: number) => typeof value === "number" ? `${value.toFixed(digits)}%` : MISSING_VALUE;
|
|
101
|
+
const priceText = (value: unknown) => typeof value === "number" ? formatHedgePrice(value) : MISSING_VALUE;
|
|
100
102
|
const moneyText = (value: number) => value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
101
|
-
const riskText = (value: number | null, unlimited: boolean) => value != null ? moneyText(value) : unlimited ? "unlimited" :
|
|
102
|
-
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
103
|
+
const riskText = (value: number | null, unlimited: boolean) => value != null ? moneyText(value) : unlimited ? "unlimited" : MISSING_VALUE;
|
|
103
104
|
/** `before Oct 28`: the flag and the date without its year, which the next report never needs. */
|
|
104
105
|
const earningsCell = (row: { earningsDate: string | null; earningsBeforeExpiry: boolean | null; earnings: string }) => {
|
|
105
106
|
const date = row.earningsDate;
|
|
106
107
|
if (!date || row.earningsBeforeExpiry == null) return row.earnings;
|
|
107
|
-
return `${row.earningsBeforeExpiry ? "before" : "after"} ${
|
|
108
|
+
return `${row.earningsBeforeExpiry ? "before" : "after"} ${formatShortDate(`${date}T00:00:00Z`, { year: false, utc: true })}`;
|
|
108
109
|
};
|
|
109
110
|
/** A column's value to sort on: earnings by date, a flag as a number, an unlimited gain or loss above every limit. */
|
|
110
111
|
function sortValue(row: Record<string, unknown>, columnId: string): string | number | null {
|
|
@@ -222,17 +223,17 @@ export function CspScreenPane({ width, height, focused }: PaneProps) {
|
|
|
222
223
|
switch (id) {
|
|
223
224
|
case "rank": return { text: row.rank == null ? "" : String(row.rank), color: colors.textDim };
|
|
224
225
|
case "symbol": return { text: row.symbol, color: colors.textBright };
|
|
225
|
-
case "expiry": return { text: String(row.expiry ??
|
|
226
|
-
case "days": return { text: row.days == null ?
|
|
227
|
-
case "strike": return { text: row.strike == null ?
|
|
226
|
+
case "expiry": return { text: String(row.expiry ?? MISSING_VALUE), color: colors.textDim };
|
|
227
|
+
case "days": return { text: row.days == null ? MISSING_VALUE : String(row.days) };
|
|
228
|
+
case "strike": return { text: row.strike == null ? MISSING_VALUE : String(row.strike) };
|
|
228
229
|
case "bid": return { text: priceText(row.bid) };
|
|
229
230
|
case "ask": return { text: priceText(row.ask) };
|
|
230
231
|
case "spread": return { text: `${percentText(row.spread, 1)}${row.wide ? " wide" : ""}`, color: row.wide ? colors.warning : undefined };
|
|
231
|
-
case "delta": return { text: typeof row.delta === "number" ? row.delta.toFixed(2) :
|
|
232
|
+
case "delta": return { text: typeof row.delta === "number" ? row.delta.toFixed(2) : MISSING_VALUE };
|
|
232
233
|
case "otm": return { text: percentText(row.otm, 1) };
|
|
233
234
|
case "midYield": return { text: percentText(row.midYield, 2), color: colors.textDim };
|
|
234
235
|
case "bidYield": return { text: percentText(row.bidYield, 2), color: colors.positive };
|
|
235
|
-
case "ivRank": return { text: typeof row.ivRank === "number" ? row.ivRank.toFixed(0) :
|
|
236
|
+
case "ivRank": return { text: typeof row.ivRank === "number" ? row.ivRank.toFixed(0) : MISSING_VALUE };
|
|
236
237
|
case "earnings": return { text: String(row.earnings), color: row.earningsBeforeExpiry === true ? colors.warning : colors.textDim };
|
|
237
238
|
default: return { text: "" };
|
|
238
239
|
}
|
|
@@ -241,9 +242,9 @@ export function CspScreenPane({ width, height, focused }: PaneProps) {
|
|
|
241
242
|
switch (id) {
|
|
242
243
|
case "rank": return { text: row.rank == null ? "" : String(row.rank), color: colors.textDim };
|
|
243
244
|
case "symbol": return { text: row.symbol, color: colors.textBright };
|
|
244
|
-
case "days": return { text: row.days == null ?
|
|
245
|
-
case "trade": return { text: row.trade ??
|
|
246
|
-
case "net": return { text: row.net == null ?
|
|
245
|
+
case "days": return { text: row.days == null ? MISSING_VALUE : String(row.days) };
|
|
246
|
+
case "trade": return { text: row.trade ?? MISSING_VALUE };
|
|
247
|
+
case "net": return { text: row.net == null ? MISSING_VALUE : moneyText(row.net) };
|
|
247
248
|
case "maxGain": return { text: riskText(row.maxGain, row.unlimited === "gain") };
|
|
248
249
|
case "maxLoss": return { text: riskText(row.maxLoss, row.unlimited === "loss") };
|
|
249
250
|
case "breakEven": return { text: row.breakEvens };
|
|
@@ -251,7 +252,7 @@ export function CspScreenPane({ width, height, focused }: PaneProps) {
|
|
|
251
252
|
// A return above zero reads as a gain; none, or nothing to rank, stays neutral.
|
|
252
253
|
case "returnPerYear": return { text: percentText(row.returnPerYear, 1), color: (row.returnPerYear ?? 0) > 0 ? colors.positive : undefined };
|
|
253
254
|
case "rewardRisk": return { text: rewardRiskText(row.rewardRisk, row.unlimited), value: row.rewardRisk };
|
|
254
|
-
case "ivRank": return { text: typeof row.ivRank === "number" ? row.ivRank.toFixed(0) :
|
|
255
|
+
case "ivRank": return { text: typeof row.ivRank === "number" ? row.ivRank.toFixed(0) : MISSING_VALUE };
|
|
255
256
|
case "spread": return { text: `${percentText(row.spread, 1)}${row.wide ? " wide" : ""}`, color: row.wide ? colors.warning : undefined };
|
|
256
257
|
case "earnings": return { text: earningsCell(row), value: row.earningsDate,
|
|
257
258
|
color: row.earningsBeforeExpiry === true ? colors.warning : colors.textDim };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { InstrumentRef } from "../../../market-data/request-types";
|
|
2
3
|
import type { DataProvider } from "../../../types/data-provider";
|
|
3
4
|
import type { HeadlessPaneFreshness } from "../../../types/plugin";
|
|
@@ -294,7 +295,7 @@ export function cspScreenCriteriaText(criteria: CspScreenCriteria, now: number):
|
|
|
294
295
|
* expires, and its date; `unavailable` when the earnings calendar could not be read.
|
|
295
296
|
*/
|
|
296
297
|
export function cspEarningsText(csp: Pick<CashSecuredPut, "earnings"> | null): string {
|
|
297
|
-
if (!csp) return
|
|
298
|
+
if (!csp) return MISSING_VALUE;
|
|
298
299
|
const { beforeExpiry, date, unavailable } = csp.earnings;
|
|
299
300
|
if (unavailable) return "unavailable";
|
|
300
301
|
return beforeExpiry == null ? "unknown" : `${beforeExpiry ? "before" : "after"} ${date}`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { StatItem } from "../../../components";
|
|
2
3
|
import type { DataProvider } from "../../../types/data-provider";
|
|
3
4
|
import type { HeadlessPaneEntry } from "../../../types/headless";
|
|
@@ -195,7 +196,7 @@ const strikeText = (value: number) => formatHedgePrice(value).replace(/\.00$/, "
|
|
|
195
196
|
|
|
196
197
|
/** `5.5% below spot 89.98 (implied by option quotes)`, or above it for a put in the money. */
|
|
197
198
|
function otmText(csp: CashSecuredPut): string {
|
|
198
|
-
if (csp.outOfTheMoney == null) return
|
|
199
|
+
if (csp.outOfTheMoney == null) return MISSING_VALUE;
|
|
199
200
|
const side = csp.outOfTheMoney >= 0 ? "below" : "above";
|
|
200
201
|
return `${percent(Math.abs(csp.outOfTheMoney), 1)} ${side} spot ${money(csp.spot)} (${csp.spotBasis})`;
|
|
201
202
|
}
|
|
@@ -226,7 +227,7 @@ export function cspReportEntries(csp: CashSecuredPut): HeadlessPaneEntry[] {
|
|
|
226
227
|
{ key: "yieldOnCash", label: "Yield on cash", value: exportPercent(csp.yieldOnCash), unit: "%",
|
|
227
228
|
formatted: `${percent(csp.yieldOnCash)} (${money(csp.premium)} / ${money(csp.cashSecured)})` },
|
|
228
229
|
{ key: "annualizedYield", label: "Annualised yield", value: exportPercent(csp.annualizedYield), unit: "%",
|
|
229
|
-
formatted: csp.annualizedYield == null ?
|
|
230
|
+
formatted: csp.annualizedYield == null ? `${MISSING_VALUE} (expires today)` : `${percent(csp.annualizedYield)} (yield on cash x 365 / ${csp.daysToExpiry})` },
|
|
230
231
|
...(quote ? [
|
|
231
232
|
{ key: "bid", label: "Bid", value: quote.bid, unit: perShare, formatted: `${formatHedgePrice(quote.bid)} per share` },
|
|
232
233
|
{ key: "ask", label: "Ask", value: quote.ask, unit: perShare, formatted: `${formatHedgePrice(quote.ask)} per share` },
|
|
@@ -235,7 +236,7 @@ export function cspReportEntries(csp: CashSecuredPut): HeadlessPaneEntry[] {
|
|
|
235
236
|
{ key: "bidPremium", label: "Premium at the bid", value: quote.bidPremium, ...amount,
|
|
236
237
|
formatted: `${money(quote.bidPremium)}${unit} (${formatHedgePrice(quote.bid)} x ${csp.multiplier} x ${csp.contracts})` },
|
|
237
238
|
{ key: "bidAnnualizedYield", label: "Annualised yield at the bid", value: exportPercent(quote.bidAnnualizedYield), unit: "%",
|
|
238
|
-
formatted: quote.bidAnnualizedYield == null ?
|
|
239
|
+
formatted: quote.bidAnnualizedYield == null ? `${MISSING_VALUE} (expires today)`
|
|
239
240
|
: `${percent(quote.bidAnnualizedYield)} (${percent(quote.bidYieldOnCash)} on cash x 365 / ${csp.daysToExpiry})` },
|
|
240
241
|
] : []),
|
|
241
242
|
{ key: "outOfTheMoney", label: "Out of the money", value: exportPercent(csp.outOfTheMoney), unit: "%", formatted: otmText(csp) },
|
|
@@ -259,10 +260,10 @@ export function cspStatItems(csp: CashSecuredPut): StatItem[] {
|
|
|
259
260
|
...(quote ? [
|
|
260
261
|
{ id: "csp-bid", label: "Bid / ask", value: `${formatHedgePrice(quote.bid)} / ${formatHedgePrice(quote.ask)}`,
|
|
261
262
|
detail: `spread ${percent(quote.spreadOfMid, 1)} of mid` },
|
|
262
|
-
{ id: "csp-bid-yield", label: "At the bid", value: quote.bidAnnualizedYield == null ?
|
|
263
|
+
{ id: "csp-bid-yield", label: "At the bid", value: quote.bidAnnualizedYield == null ? MISSING_VALUE : percent(quote.bidAnnualizedYield),
|
|
263
264
|
detail: quote.bidAnnualizedYield == null ? "expires today" : "a year" },
|
|
264
265
|
] : []),
|
|
265
|
-
{ id: "csp-otm", label: "OTM", value: csp.outOfTheMoney == null ?
|
|
266
|
+
{ id: "csp-otm", label: "OTM", value: csp.outOfTheMoney == null ? MISSING_VALUE : percent(csp.outOfTheMoney, 1),
|
|
266
267
|
detail: `vs ${money(csp.spot)} ${csp.spotBasis === "implied by option quotes" ? "implied" : csp.spotBasis}` },
|
|
267
268
|
{ id: "csp-break-even", label: "Break-even", value: formatHedgePrice(csp.breakEven), detail: "per share" },
|
|
268
269
|
{ id: "csp-days", label: "DTE", value: String(csp.daysToExpiry), detail: csp.expiry },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { HeadlessPaneDefinition } from "../../../types/plugin";
|
|
2
3
|
import { parsePublicTickerKey } from "../../../utils/exchanges";
|
|
3
4
|
import { DATE_OPTION_EXAMPLES } from "../../../utils/calendar-date";
|
|
@@ -19,12 +20,12 @@ import { modelDividendYieldNote } from "../../../market-data/model-dividend-yiel
|
|
|
19
20
|
import { listingFateEmpty, loadListingFate } from "../../../tickers/listing-fate";
|
|
20
21
|
|
|
21
22
|
// Float noise at a flat origin or a breakeven prints as 0.00, not -0.00.
|
|
22
|
-
const money = (value: unknown) => typeof value === "number" ? (Math.abs(value) < 0.005 ? 0 : value).toFixed(2) :
|
|
23
|
-
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(2)}%` :
|
|
23
|
+
const money = (value: unknown) => typeof value === "number" ? (Math.abs(value) < 0.005 ? 0 : value).toFixed(2) : MISSING_VALUE;
|
|
24
|
+
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(2)}%` : MISSING_VALUE;
|
|
24
25
|
const supplied = (value: unknown) => value != null && value !== "";
|
|
25
26
|
// A seeded entry is a quote midpoint, often to the half cent (5.495), so it keeps up to four decimals.
|
|
26
27
|
const premium = (value: unknown) => typeof value === "number"
|
|
27
|
-
? value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4, useGrouping: false }) :
|
|
28
|
+
? value.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 4, useGrouping: false }) : MISSING_VALUE;
|
|
28
29
|
/** Entry prices and spot are quoted per share of the underlying. */
|
|
29
30
|
const PRICE_UNIT = "per share";
|
|
30
31
|
/** The Valuation entries, in model order, with the unit each is in. */
|
|
@@ -155,7 +156,7 @@ export const optionsScenarioHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
155
156
|
{ title: "Position", columns: [
|
|
156
157
|
{ key: "side", header: "Side" }, { key: "strike", header: "Strike" }, { key: "expiry", header: "Expiry" },
|
|
157
158
|
{ key: "quantity", header: "Contracts" }, { key: "price", header: "Entry/share", format: premium },
|
|
158
|
-
{ key: "volatility", header: "IV", format: (value) => typeof value === "number" ? `${(value * 100).toFixed(2)}%` :
|
|
159
|
+
{ key: "volatility", header: "IV", format: (value) => typeof value === "number" ? `${(value * 100).toFixed(2)}%` : MISSING_VALUE },
|
|
159
160
|
...(midVolatility ? [{ key: "volatilityFrom", header: "IV from" }] : []),
|
|
160
161
|
{ key: "multiplier", header: "Multiplier" },
|
|
161
162
|
], rows: position!.legs.map((leg) => ({ ...leg, expiry: new Date(leg.expiration * 1000).toISOString().slice(0, 10),
|
|
@@ -189,7 +190,7 @@ export const optionsScenarioHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
189
190
|
] },
|
|
190
191
|
{ title: `Scenario grid (P&L, ${per})`, columns: [
|
|
191
192
|
{ key: "spot", header: "Spot/share", format: money },
|
|
192
|
-
{ key: "move", header: "Move", format: (value) => typeof value === "number" && Number.isFinite(value) ? `${(value * 100).toFixed(1)}%` :
|
|
193
|
+
{ key: "move", header: "Move", format: (value) => typeof value === "number" && Number.isFinite(value) ? `${(value * 100).toFixed(1)}%` : MISSING_VALUE },
|
|
193
194
|
...scenario.dates.map((date, index) => ({ key: `date${index}`, header: new Date(date).toISOString().slice(0, 10), format: money })),
|
|
194
195
|
], rows: scenario.grid.map((row) => ({ spot: row.spot, move: row.move,
|
|
195
196
|
...Object.fromEntries(row.values.map((value, index) => [`date${index}`, value])) })) },
|
|
@@ -2,7 +2,7 @@ import type { StatItem } from "../../../components";
|
|
|
2
2
|
import type { OptionsChain } from "../../../types/financials";
|
|
3
3
|
import type { HeadlessPaneEntry } from "../../../types/headless";
|
|
4
4
|
import { numberErrorMessage } from "../../../utils/decimal-comma";
|
|
5
|
-
import { formatCompact } from "../../../utils/format";
|
|
5
|
+
import { MISSING_VALUE, formatCompact } from "../../../utils/format";
|
|
6
6
|
import { amountUnit, exportPercent, UNKNOWN_CURRENCY, type ScenarioPosition } from "./model";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -253,7 +253,7 @@ export function hedgeReportEntries(hedge: HedgeBudget): HeadlessPaneEntry[] {
|
|
|
253
253
|
{ key: "nav", label: "NAV", value: hedge.nav, ...amount, formatted: `${money(hedge.nav)}${unit}` },
|
|
254
254
|
{ key: "budget", label: "Budget", value: hedge.budget, ...amount, formatted: `${money(hedge.budget)}${unit} (${formatBps(hedge.budgetBps)} of NAV)` },
|
|
255
255
|
{ key: "sizingPrice", label: "Sizing price", value: hedge.sizingPrice, unit: `${amount.unit} per share`,
|
|
256
|
-
formatted: hedge.sizingPrice == null ?
|
|
256
|
+
formatted: hedge.sizingPrice == null ? MISSING_VALUE : describePrice(hedge.basis, hedge.singleLeg, hedge.sizingPrice) },
|
|
257
257
|
{ key: "costPerContract", label: "Cost per contract", value: hedge.costPerContract, ...amount,
|
|
258
258
|
formatted: costText(hedge.costPerContract, hedge.sizingPrice, hedge.multiplier, unit) },
|
|
259
259
|
{ key: "contracts", label: "Contracts", value: hedge.contracts, unit: "contracts", formatted: hedge.contracts.toLocaleString("en-US") },
|
|
@@ -285,7 +285,7 @@ export function hedgeStatItems(hedge: HedgeBudget): StatItem[] {
|
|
|
285
285
|
{ id: "hedge-notional", label: "Notional", value: short(hedge.notional),
|
|
286
286
|
detail: `${percent(hedge.notionalOfNav)} of NAV at ${formatHedgePrice(hedge.spot)}` },
|
|
287
287
|
hedge.coverage == null || hedge.sleeve == null
|
|
288
|
-
? { id: "hedge-coverage", label: "Coverage", value:
|
|
288
|
+
? { id: "hedge-coverage", label: "Coverage", value: MISSING_VALUE, detail: "no sleeve set" }
|
|
289
289
|
: { id: "hedge-coverage", label: "Coverage", value: percent(hedge.coverage), detail: `of ${short(hedge.sleeve)} sleeve` },
|
|
290
290
|
];
|
|
291
291
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
3
|
import { splitDelayedStatus, Button, ChoiceDialog, confirmDialog, DataTableView, EmptyState, PageStackView, PaneStatusBody, QueryBar, StatGrid, statGridRows,
|
|
3
4
|
usePaneFooter, usePaneNoticeFooter, usePaneTabs, type DataTableColumn, type SelectControl, type StatItem } from "../../../components";
|
|
@@ -45,10 +46,10 @@ import { logFailure } from "../../../utils/log-failure";
|
|
|
45
46
|
|
|
46
47
|
const EMPTY_ERRORS: string[] = [];
|
|
47
48
|
const TABS = [{ value: "payoff", label: "Payoff" }, { value: "grid", label: "P&L grid" }, { value: "legs", label: "Legs" }];
|
|
48
|
-
const dateLabel = (value: number) => Number.isFinite(new Date(value).getTime()) ? new Date(value).toISOString().slice(0, 10) :
|
|
49
|
+
const dateLabel = (value: number) => Number.isFinite(new Date(value).getTime()) ? new Date(value).toISOString().slice(0, 10) : MISSING_VALUE;
|
|
49
50
|
// Float noise at a flat origin reads as zero, not a red -0.00.
|
|
50
51
|
const cents = (value: number) => Math.abs(value) < 0.005 ? 0 : value;
|
|
51
|
-
const money = (value: number | null) => value == null || !Number.isFinite(value) ?
|
|
52
|
+
const money = (value: number | null) => value == null || !Number.isFinite(value) ? MISSING_VALUE : cents(value).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
52
53
|
|
|
53
54
|
export function OptionsScenarioPane({ width, height, focused }: PaneProps) {
|
|
54
55
|
const colors = useThemeColors();
|
|
@@ -354,7 +355,7 @@ export function OptionsScenarioPane({ width, height, focused }: PaneProps) {
|
|
|
354
355
|
{ id: "value", label: "Value", value: money(scenario.valuation.price), detail: valueUnit },
|
|
355
356
|
{ id: "max-profit", label: "Max profit", value: risk?.unlimitedProfit ? "Unlimited" : money(risk?.maxProfit ?? null) },
|
|
356
357
|
{ id: "max-loss", label: "Max loss", value: risk?.unlimitedLoss ? "Unlimited" : money(risk?.maxLoss ?? null) },
|
|
357
|
-
{ id: "breakevens", label: "Breakevens", value: risk?.breakevens.map(money).join(", ") ||
|
|
358
|
+
{ id: "breakevens", label: "Breakevens", value: risk?.breakevens.map(money).join(", ") || MISSING_VALUE },
|
|
358
359
|
{ id: "delta", label: "Delta", value: scenario.valuation.delta.toFixed(2) },
|
|
359
360
|
{ id: "gamma", label: "Gamma", value: scenario.valuation.gamma.toFixed(3) },
|
|
360
361
|
{ id: "theta", label: "Theta", value: money(scenario.valuation.thetaPerDay), detail: "per day" },
|
|
@@ -388,7 +389,7 @@ export function OptionsScenarioPane({ width, height, focused }: PaneProps) {
|
|
|
388
389
|
renderCell={(row, column) => {
|
|
389
390
|
const atSpot = row.move != null && Math.abs(row.move) < 1e-9;
|
|
390
391
|
if (column.id === "spot") return { text: money(row.spot), color: row.landmark ? colors.warning : atSpot ? colors.textBright : colors.text };
|
|
391
|
-
if (column.id === "move") return { text: row.move == null ?
|
|
392
|
+
if (column.id === "move") return { text: row.move == null ? MISSING_VALUE : `${row.move > 0 ? "+" : ""}${(row.move * 100).toFixed(1)}`, color: colors.textMuted };
|
|
392
393
|
if (column.id === "mark") return { text: row.landmark ?? (atSpot ? "spot" : ""), color: row.landmark ? colors.warning : colors.textMuted };
|
|
393
394
|
const value = cents(row.values[Number(column.id)] ?? 0);
|
|
394
395
|
// Shade by size so the profit zone and the wings read at a glance.
|
|
@@ -453,8 +454,8 @@ export function OptionsScenarioPane({ width, height, focused }: PaneProps) {
|
|
|
453
454
|
onActivate={(row) => edit({ id: crypto.randomUUID(), side: row.side, quantity: 1, strike: row.strike,
|
|
454
455
|
expiration: row.expiration, price: optionMid(row) ?? (row.lastPrice > 0 ? row.lastPrice : 0),
|
|
455
456
|
volatility: Number.isFinite(row.impliedVolatility) && row.impliedVolatility >= 0 ? row.impliedVolatility : 0, multiplier: 100 })}
|
|
456
|
-
renderCell={(row, column) => ({ text: column.id === "side" ? row.side : column.id === "iv" ? (row.impliedVolatility > 0 ? (row.impliedVolatility * 100).toFixed(2) :
|
|
457
|
-
: column.id === "oi" ? String(row.openInterest ??
|
|
457
|
+
renderCell={(row, column) => ({ text: column.id === "side" ? row.side : column.id === "iv" ? (row.impliedVolatility > 0 ? (row.impliedVolatility * 100).toFixed(2) : MISSING_VALUE)
|
|
458
|
+
: column.id === "oi" ? String(row.openInterest ?? MISSING_VALUE) : money(row[column.id as "strike" | "bid" | "ask"]) })} />
|
|
458
459
|
</PaneStatusBody>
|
|
459
460
|
</>;
|
|
460
461
|
return <Box flexDirection="column" width={width} height={height} overflow="hidden">
|
|
@@ -250,7 +250,7 @@ const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "
|
|
|
250
250
|
/** `Dec 18`: a later leg's expiry, the row's own being its DTE. */
|
|
251
251
|
const monthDay = (expiration: number) => {
|
|
252
252
|
const date = new Date(expiration * 1000);
|
|
253
|
-
return `${
|
|
253
|
+
return `${date.getUTCDate()} ${MONTHS[date.getUTCMonth()]}`;
|
|
254
254
|
};
|
|
255
255
|
|
|
256
256
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import { MarketDataCoordinator } from "../../../market-data/coordinator";
|
|
2
3
|
import type { HeadlessPaneDefinition } from "../../../types/plugin";
|
|
3
4
|
import { resolveHeadlessInstrument } from "../shared/headless-market-data";
|
|
@@ -5,9 +6,9 @@ import { loadPeBandInputs } from "./client";
|
|
|
5
6
|
import { formatPerShare, fxPairQuote, projectPeBand } from "./model";
|
|
6
7
|
import { DAILY_CLOSES } from "../shared/report-freshness";
|
|
7
8
|
|
|
8
|
-
const multiple = (value: unknown) => typeof value === "number" ? `${value.toFixed(1)}x` :
|
|
9
|
-
const amount = (value: unknown) => typeof value === "number" ? formatPerShare(value) :
|
|
10
|
-
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(1)}%` :
|
|
9
|
+
const multiple = (value: unknown) => typeof value === "number" ? `${value.toFixed(1)}x` : MISSING_VALUE;
|
|
10
|
+
const amount = (value: unknown) => typeof value === "number" ? formatPerShare(value) : MISSING_VALUE;
|
|
11
|
+
const percent = (value: unknown) => typeof value === "number" ? `${(value * 100).toFixed(1)}%` : MISSING_VALUE;
|
|
11
12
|
|
|
12
13
|
export const peBandHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
13
14
|
shape: "bundle", argument: { kind: "ticker", description: "Ticker" },
|
|
@@ -38,12 +39,12 @@ export const peBandHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
38
39
|
sections: [
|
|
39
40
|
{ title: "P/E band", columns: [{ key: "label", header: "" }, { key: "value", header: "Value" }], rows: [
|
|
40
41
|
{ label: "Trailing P/E", value: multiple(current?.pe) },
|
|
41
|
-
{ label: "Percentile of own history", value: current?.percentile == null ?
|
|
42
|
-
{ label: "Ranked over", value: model.sample ? `${model.sample.weeks} weeks since ${model.sample.start.toISOString().slice(0, 10)}` :
|
|
43
|
-
{ label: "P/E low, median, high", value: model.range ? `${multiple(model.range.min)}, ${multiple(model.range.median)}, ${multiple(model.range.max)}` :
|
|
42
|
+
{ label: "Percentile of own history", value: current?.percentile == null ? MISSING_VALUE : `${current.percentile.toFixed(0)}` },
|
|
43
|
+
{ label: "Ranked over", value: model.sample ? `${model.sample.weeks} weeks since ${model.sample.start.toISOString().slice(0, 10)}` : MISSING_VALUE },
|
|
44
|
+
{ label: "P/E low, median, high", value: model.range ? `${multiple(model.range.min)}, ${multiple(model.range.median)}, ${multiple(model.range.max)}` : MISSING_VALUE },
|
|
44
45
|
{ label: "Price", value: `${amount(current?.price)} ${model.currency ?? ""}`.trim() },
|
|
45
46
|
{ label: "Trailing EPS", value: current?.step
|
|
46
|
-
? `${amount(current.eps)} (${current.step.basis === "annual" ? "FY" : "TTM"} ${current.step.periodEnd})${reported}` :
|
|
47
|
+
? `${amount(current.eps)} (${current.step.basis === "annual" ? "FY" : "TTM"} ${current.step.periodEnd})${reported}` : MISSING_VALUE },
|
|
47
48
|
] },
|
|
48
49
|
{ title: "Price at each multiple", columns: [{ key: "multiple", header: "Multiple", format: multiple }, { key: "price", header: "Price", format: amount }],
|
|
49
50
|
rows: model.multiples.map((value) => ({ multiple: value, price: current?.eps != null && current.eps > 0 ? value * current.eps : null })) },
|
|
@@ -53,7 +54,7 @@ export const peBandHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
53
54
|
{ key: "yoy", header: "YoY", format: percent }, { key: "price", header: "Price", format: amount }, { key: "pe", header: "P/E", format: multiple }],
|
|
54
55
|
rows: model.rows.map((row) => ({ periodEnd: row.periodEnd, basis: row.basis === "annual" ? "FY" : "TTM",
|
|
55
56
|
knownAt: row.dated ? row.knownAt.toISOString().slice(0, 10) : "period end", eps: row.eps,
|
|
56
|
-
...(conversion ? { currency: row.currency, fx: row.fx ? `${pairQuote(row.fx.rate)} (${row.fx.date})` : row.currency === model.currency ? "" :
|
|
57
|
+
...(conversion ? { currency: row.currency, fx: row.fx ? `${pairQuote(row.fx.rate)} (${row.fx.date})` : row.currency === model.currency ? "" : MISSING_VALUE } : {}),
|
|
57
58
|
yoy: row.yoy, price: row.price, pe: row.pe })) },
|
|
58
59
|
],
|
|
59
60
|
complete: !inputs.stale && !inputs.error && !inputs.historyError && !model.error,
|
|
@@ -11,16 +11,16 @@ import { blendHex } from "../../../theme/color-utils";
|
|
|
11
11
|
import { useThemeColors } from "../../../theme/theme-context";
|
|
12
12
|
import type { PaneProps } from "../../../types/plugin";
|
|
13
13
|
import { Box } from "../../../ui";
|
|
14
|
-
import { formatCurrency, formatPercentileRank } from "../../../utils/format";
|
|
14
|
+
import { MISSING_VALUE, formatCurrency, formatPercentileRank } from "../../../utils/format";
|
|
15
15
|
import { useAssetData } from "../../runtime";
|
|
16
16
|
import { loadPeBandInputs } from "./client";
|
|
17
17
|
import { formatPerShare, fxPairQuote, perShareDigits, projectPeBand, type PeBandModel, type PeBandRow } from "./model";
|
|
18
18
|
|
|
19
19
|
export const LOOKBACK_OPTIONS = [{ value: "5", label: "5Y" }, { value: "10", label: "10Y" }, { value: "0", label: "Max" }];
|
|
20
20
|
|
|
21
|
-
const multiple = (value: number | null | undefined) => value == null ?
|
|
21
|
+
const multiple = (value: number | null | undefined) => value == null ? MISSING_VALUE : `${value.toFixed(1)}x`;
|
|
22
22
|
function pct(value: number | null): string {
|
|
23
|
-
if (value == null) return
|
|
23
|
+
if (value == null) return MISSING_VALUE;
|
|
24
24
|
const fixed = (value * 100).toFixed(1);
|
|
25
25
|
return /[1-9]/.test(fixed) ? `${value > 0 ? "+" : ""}${fixed}%` : "0.0%";
|
|
26
26
|
}
|
|
@@ -49,15 +49,15 @@ function renderCell(row: PeBandRow, column: DataTableColumn, colors: ReturnType<
|
|
|
49
49
|
// A figure with no publication date on record steps at its period end.
|
|
50
50
|
case "known": return row.dated ? { text: row.knownAt.toISOString().slice(0, 10), value: row.knownAt.toISOString().slice(0, 10) }
|
|
51
51
|
: { text: "period end", color: colors.textMuted };
|
|
52
|
-
case "eps": return { text: row.eps == null ?
|
|
52
|
+
case "eps": return { text: row.eps == null ? MISSING_VALUE : formatPerShare(row.eps), value: row.eps,
|
|
53
53
|
color: row.eps != null && row.eps <= 0 ? colors.negative : undefined };
|
|
54
54
|
case "yoy": return { text: pct(row.yoy), value: row.yoy == null ? null : row.yoy * 100,
|
|
55
55
|
color: row.yoy == null || Math.abs(row.yoy) < 0.0005 ? undefined : row.yoy > 0 ? colors.positive : colors.negative };
|
|
56
56
|
case "fx": {
|
|
57
57
|
const quote = row.fx && row.currency ? fxPairQuote(row.currency, row.fx.rate).value : null;
|
|
58
|
-
return { text: quote == null ?
|
|
58
|
+
return { text: quote == null ? MISSING_VALUE : quote.toPrecision(5), value: quote };
|
|
59
59
|
}
|
|
60
|
-
case "price": return { text: row.price == null ?
|
|
60
|
+
case "price": return { text: row.price == null ? MISSING_VALUE : formatPerShare(row.price), value: row.price };
|
|
61
61
|
default: return { text: multiple(row.pe), value: row.pe };
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -147,7 +147,7 @@ export function PeBandPane({ width, height, focused }: PaneProps) {
|
|
|
147
147
|
{ id: "pe", label: "P/E", value: multiple(current.pe),
|
|
148
148
|
detail: current.pe != null ? formatPercentileRank(current.percentile, windowLabel) : current.eps != null ? "EPS not positive" : "EPS unavailable" },
|
|
149
149
|
{ id: "median", label: "Median P/E", value: multiple(range?.median), detail: range ? `${multiple(range.min)} to ${multiple(range.max)}` : undefined },
|
|
150
|
-
{ id: "eps", label: "EPS", value: current.eps == null ?
|
|
150
|
+
{ id: "eps", label: "EPS", value: current.eps == null ? MISSING_VALUE : formatCurrency(current.eps, currency, perShareDigits(current.eps)),
|
|
151
151
|
detail: step ? `${periodLabel(step)}${converted}` : undefined },
|
|
152
152
|
{ id: "price", label: "Price", value: formatCurrency(current.price, currency, perShareDigits(current.price)) },
|
|
153
153
|
];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { PerpDepthPayload, PerpDepthRow, PerpDepthSnapshot, PerpLiquidationMarket, PerpLiquidationPrint, PerpLiquidationsPayload } from "../../../api-client/perps";
|
|
2
3
|
import type { DataTableCell, DataTableColumn, StatItem } from "../../../components";
|
|
3
4
|
import { scalarPoint, staticSeries } from "../../../components/chart/static/series";
|
|
@@ -11,11 +12,11 @@ import { compact, price, venueName } from "./model";
|
|
|
11
12
|
|
|
12
13
|
type Colors = Pick<ThemeColors, "positive" | "negative" | "text" | "textBright" | "textMuted" | "textDim">;
|
|
13
14
|
/** Month to second, or to minute: the header names UTC. */
|
|
14
|
-
const stamp = (s: string | null | undefined, seconds = false) => s ? `${s.slice(5, 10)} ${s.slice(11, seconds ? 19 : 16)}` :
|
|
15
|
+
const stamp = (s: string | null | undefined, seconds = false) => s ? `${s.slice(5, 10)} ${s.slice(11, seconds ? 19 : 16)}` : MISSING_VALUE;
|
|
15
16
|
const venueOrder = (venue: string) => { const at = ["binance", "bybit", "okx", "hyperliquid"].indexOf(venue); return at < 0 ? 9 : at; };
|
|
16
17
|
/** The venues behind some rows, in the order the tabs list them. */
|
|
17
18
|
const venuesIn = (rows: readonly { venue: string }[]) => [...new Set(rows.map((row) => row.venue))].sort((a, b) => venueOrder(a) - venueOrder(b));
|
|
18
|
-
const usd = (n: number | null | undefined) => n == null ?
|
|
19
|
+
const usd = (n: number | null | undefined) => n == null ? MISSING_VALUE : compact(n);
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* The columns that fit the pane, the least read going first. A pair (a band's bid and ask, a window's longs and
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../../utils/format";
|
|
1
2
|
import type { PerpBoardPayload, PerpBoardRow, PerpDepthRow, PerpLiquidationMarket, PerpLiquidationPrint, PerpLiquidationsPayload } from "../../../api-client/perps";
|
|
2
3
|
import type { HeadlessBundleResult, HeadlessBundleSection, HeadlessPaneColumn, HeadlessPaneContext, HeadlessPaneLoadArgs, HeadlessPaneRow } from "../../../types/headless";
|
|
3
4
|
import type { HeadlessPaneDefinition } from "../../../types/plugin";
|
|
@@ -17,7 +18,7 @@ import { basisSpotSymbol } from "../futures-curve/model";
|
|
|
17
18
|
const num = (value: unknown) => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
18
19
|
const text = (value: unknown) => typeof value === "string" ? value : null;
|
|
19
20
|
const pct = (digits: number): HeadlessPaneColumn["format"] => (value) => percent(num(value), digits);
|
|
20
|
-
const rateOver = (rate: unknown, interval: string | null, digits = 5) => num(rate) === null ?
|
|
21
|
+
const rateOver = (rate: unknown, interval: string | null, digits = 5) => num(rate) === null ? MISSING_VALUE : `${percent(num(rate), digits)} /${interval ?? MISSING_VALUE}`;
|
|
21
22
|
const hours = (value: unknown) => num(value) ? `${num(value)}h` : null;
|
|
22
23
|
const timeColumn = (key: string, header: string): HeadlessPaneColumn => ({ key, header, format: (value) => time(text(value)) });
|
|
23
24
|
const right = (key: string, header: string, format: HeadlessPaneColumn["format"]): HeadlessPaneColumn => ({ key, header, align: "right", format });
|
|
@@ -41,17 +42,17 @@ const rankingTextColumns = (ranking: typeof RANKINGS[number]): HeadlessPaneColum
|
|
|
41
42
|
? right(ranking.field, ranking.header, pct(ranking.digits)) : perpColumn(id));
|
|
42
43
|
const observationColumns = (currency: string): HeadlessPaneColumn[] => [
|
|
43
44
|
timeColumn("time", "Time"),
|
|
44
|
-
{ key: "resolution", header: "Resolution", format: (value) => text(value) ??
|
|
45
|
+
{ key: "resolution", header: "Resolution", format: (value) => text(value) ?? MISSING_VALUE },
|
|
45
46
|
priceColumn("markPrice", `Mark ${currency}`),
|
|
46
47
|
right("premium", "Premium %", pct(3)),
|
|
47
48
|
right("fundingRate", "Funding %/int", (value, row) => rateOver(value, hours(row.fundingIntervalHours))),
|
|
48
49
|
oiColumn,
|
|
49
|
-
right("sampleCount", "Samples", (value) => `${num(value) ??
|
|
50
|
+
right("sampleCount", "Samples", (value) => `${num(value) ?? MISSING_VALUE}`),
|
|
50
51
|
];
|
|
51
52
|
const FUNDING_COLUMNS: HeadlessPaneColumn[] = [
|
|
52
53
|
timeColumn("time", "Time"),
|
|
53
54
|
right("rate", "Paid %/int", (value, row) => rateOver(value, hours(row.intervalHours))),
|
|
54
|
-
right("rate", "Funding 8h %", (value, row) => num(value) !== null && num(row.intervalHours) ? percent(num(value)! * 8 / num(row.intervalHours)!, 4) :
|
|
55
|
+
right("rate", "Funding 8h %", (value, row) => num(value) !== null && num(row.intervalHours) ? percent(num(value)! * 8 / num(row.intervalHours)!, 4) : MISSING_VALUE),
|
|
55
56
|
right("premium", "Premium %", pct(3)),
|
|
56
57
|
timeColumn("observedAt", "Observed"),
|
|
57
58
|
];
|
|
@@ -59,7 +60,7 @@ const candleColumns = (currency: string): HeadlessPaneColumn[] => [
|
|
|
59
60
|
timeColumn("time", "Time"),
|
|
60
61
|
priceColumn("open", "Open"), priceColumn("high", "High"), priceColumn("low", "Low"), priceColumn("close", `Close ${currency}`),
|
|
61
62
|
right("volumeBase", "Volume (base)", (value) => compact(num(value))),
|
|
62
|
-
right("trades", "Trades", (value) => num(value)?.toLocaleString("en-US") ??
|
|
63
|
+
right("trades", "Trades", (value) => num(value)?.toLocaleString("en-US") ?? MISSING_VALUE),
|
|
63
64
|
];
|
|
64
65
|
const LONG_SHORT_COLUMNS: HeadlessPaneColumn[] = [
|
|
65
66
|
timeColumn("time", "Bucket"),
|
|
@@ -70,11 +71,11 @@ const LONG_SHORT_COLUMNS: HeadlessPaneColumn[] = [
|
|
|
70
71
|
timeColumn("observedAt", "Observed"),
|
|
71
72
|
];
|
|
72
73
|
const REVISION_COLUMNS: HeadlessPaneColumn[] = [
|
|
73
|
-
{ key: "kind", header: "Kind", format: (value) => text(value) ? label(text(value)!) :
|
|
74
|
+
{ key: "kind", header: "Kind", format: (value) => text(value) ? label(text(value)!) : MISSING_VALUE },
|
|
74
75
|
timeColumn("period_at", "Period"),
|
|
75
76
|
timeColumn("received_at", "Received"),
|
|
76
77
|
{ key: "superseded_at", header: "Status", format: (value) => text(value) ? `Superseded ${time(text(value))}` : "Current" },
|
|
77
|
-
{ key: "fingerprint", header: "Fingerprint", format: (value) => text(value)?.slice(0, 8) ||
|
|
78
|
+
{ key: "fingerprint", header: "Fingerprint", format: (value) => text(value)?.slice(0, 8) || MISSING_VALUE },
|
|
78
79
|
];
|
|
79
80
|
|
|
80
81
|
// Liquidations and depth print what their tabs' cells show, through the same formatters.
|
|
@@ -85,8 +86,8 @@ const LIQUIDATION_TEXT_COLUMNS = LIQUIDATION_COLUMN_IDS.map((id: LiquidationColu
|
|
|
85
86
|
const printTextColumns = (base: string) => PRINT_COLUMN_IDS.map((id: PrintColumnId) => cascadeColumn(id, printColumnLabel(id, base), (row) => printCellText(row as unknown as PerpLiquidationPrint, id)));
|
|
86
87
|
const DEPTH_TEXT_COLUMNS = DEPTH_COLUMN_IDS.map((id: DepthColumnId) => cascadeColumn(id, depthColumnLabel(id), (row) => depthCellText(row as unknown as PerpDepthRow, id)));
|
|
87
88
|
const HOURLY_COLUMNS: HeadlessPaneColumn[] = [timeColumn("time", "Hour"), right("long", "Longs USD", (value) => compact(num(value))), right("short", "Shorts USD", (value) => compact(num(value))),
|
|
88
|
-
right("count", "Events", (value) => num(value)?.toLocaleString("en-US") ??
|
|
89
|
-
const DEPTH_HISTORY_COLUMNS: HeadlessPaneColumn[] = [{ key: "marketId", header: "Market", format: (value) => text(value) ??
|
|
89
|
+
right("count", "Events", (value) => num(value)?.toLocaleString("en-US") ?? MISSING_VALUE)];
|
|
90
|
+
const DEPTH_HISTORY_COLUMNS: HeadlessPaneColumn[] = [{ key: "marketId", header: "Market", format: (value) => text(value) ?? MISSING_VALUE }, timeColumn("bucket", "Hour"),
|
|
90
91
|
...(["bid05", "ask05", "bid1", "ask1", "bid2", "ask2"] as const).map((id) => right(id, depthColumnLabel(id), (value) => compact(num(value))))];
|
|
91
92
|
|
|
92
93
|
// With no market the report shows the first; a market nothing matches names ones that work, a builder dex's among them.
|