gloomberb 0.18.1 → 0.18.3
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 +1 -1
- package/patches/electrobun@1.18.1.patch +106 -5
- package/src/api-client/commodity-balances.ts +6 -0
- package/src/api-client/company-kpis.ts +9 -0
- package/src/api-client/crypto-markets.ts +9 -0
- package/src/api-client/data.ts +21 -5
- package/src/api-client/equity-screener.ts +2 -0
- package/src/api-client/index.ts +2 -0
- package/src/api-client/request.ts +5 -3
- package/src/api-client/telemetry.ts +17 -0
- package/src/api-client/types.ts +5 -0
- package/src/app/global-shortcuts.ts +1 -16
- package/src/app/pane-runtime/plugin-bindings.ts +3 -1
- package/src/app/pane-runtime/ticker-open-runtime.ts +17 -5
- package/src/app/runtime/plugin-bindings.ts +6 -2
- package/src/app/runtime/update.ts +28 -8
- package/src/architecture/pane-tabs-allowlist.json +65 -0
- package/src/brokers/logos.ts +66 -0
- package/src/brokers/profile-form.ts +3 -0
- package/src/brokers/remote-broker-adapter.ts +13 -3
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/service-capabilities.ts +7 -1
- package/src/cli/base-converter.ts +60 -18
- package/src/cli/commands/market.ts +354 -187
- package/src/cli/commands/news-search.ts +35 -8
- package/src/cli/commands/system.ts +35 -1
- package/src/cli/commands/ticker.ts +167 -60
- package/src/cli/currency-hints.ts +27 -0
- package/src/cli/fx-pair.ts +41 -4
- package/src/cli/glossary.ts +57 -4
- package/src/cli/help.ts +1 -1
- package/src/cli/helpers.ts +36 -3
- package/src/cli/index.ts +12 -1
- package/src/cli/issuer-membership.ts +103 -0
- package/src/cli/known-gaps.ts +37 -1
- package/src/cli/listing-arg.ts +51 -3
- package/src/cli/name-entries.ts +51 -12
- package/src/cli/pane-functions/capabilities.ts +2 -0
- package/src/cli/pane-functions/catalog.ts +19 -1
- package/src/cli/pane-functions/discovery.ts +15 -1
- package/src/cli/pane-functions/dom.ts +11 -5
- package/src/cli/pane-functions/freshness.ts +4 -4
- package/src/cli/pane-functions/function-help.ts +27 -3
- package/src/cli/pane-functions/headless.ts +31 -11
- package/src/cli/pane-functions/index.ts +67 -7
- package/src/cli/pane-functions/lock-note.ts +7 -4
- package/src/cli/pane-functions/resolver.ts +21 -6
- package/src/cli/quote-answer.ts +179 -0
- package/src/cli/report-tables.ts +136 -18
- package/src/cli/result.ts +12 -4
- package/src/cli/series-search.ts +2 -1
- package/src/cli/symbol-list.ts +47 -11
- package/src/cli/types.ts +4 -0
- package/src/components/chart/composite/composite-chart.tsx +25 -7
- package/src/components/chart/composite/drawing-store.ts +26 -6
- package/src/components/chart/composite/format.ts +13 -1
- package/src/components/chart/composite/interactions.ts +2 -1
- package/src/components/chart/composite/level-labels.ts +30 -0
- package/src/components/chart/composite/levels.ts +17 -6
- package/src/components/chart/composite/panel-surface.tsx +69 -8
- package/src/components/chart/composite/types.ts +6 -0
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +1 -1
- package/src/components/command-bar/routes/root/command-items.ts +32 -6
- package/src/components/command-bar/routes/ticker-search/actions.ts +6 -0
- package/src/components/data-table/view.tsx +23 -3
- package/src/components/index.ts +3 -0
- package/src/components/layout/detached-pane-shell.tsx +1 -0
- package/src/components/layout/floating-pane.tsx +1 -0
- package/src/components/layout/header.tsx +228 -55
- package/src/components/layout/pane/content.tsx +16 -14
- package/src/components/layout/pane/footer/index.tsx +22 -3
- package/src/components/layout/pane/footer/model.ts +99 -4
- package/src/components/layout/pane/header-tabs.tsx +15 -1
- package/src/components/layout/pane/header.tsx +10 -3
- package/src/components/layout/pane/index.tsx +1 -0
- package/src/components/layout/pane/pane-tabs.tsx +9 -1
- package/src/components/onboarding/onboarding-frame.tsx +9 -11
- package/src/components/onboarding/use-onboarding-broker-form.ts +5 -2
- package/src/components/onboarding/wizard-model.ts +10 -3
- package/src/components/ui/button.tsx +11 -4
- package/src/components/ui/choice-dialog.tsx +8 -5
- package/src/components/ui/display.tsx +11 -6
- package/src/components/ui/fields.tsx +100 -20
- package/src/components/ui/icon.tsx +6 -1
- package/src/components/ui/list-row-lines.tsx +87 -0
- package/src/components/ui/list-view.tsx +14 -0
- package/src/components/ui/logo-mark.tsx +64 -0
- package/src/components/ui/number-step.ts +54 -0
- package/src/components/ui/select-button.tsx +5 -4
- package/src/components/ui/select-field.tsx +3 -3
- package/src/components/ui/stat-grid.tsx +28 -3
- package/src/components/ui/status.tsx +20 -4
- package/src/components/ui/tabs.tsx +9 -1
- package/src/components/ui/toggle.tsx +17 -3
- package/src/core/app-services.ts +4 -0
- package/src/core/state/app/instrument.ts +8 -3
- package/src/data/config/store/normalize.ts +4 -1
- package/src/data/plugin-cache.ts +32 -6
- package/src/docs/snapshot.json +5 -5
- package/src/i18n/es.ts +31 -3
- package/src/i18n/ja.ts +31 -3
- package/src/i18n/ko.ts +31 -3
- package/src/i18n/zh-cn.ts +32 -4
- package/src/i18n/zh-tw.ts +32 -4
- package/src/market-data/commodity-names.ts +80 -0
- package/src/market-data/coordinator/auxiliary.ts +3 -1
- package/src/market-data/coordinator/chart.ts +3 -1
- package/src/market-data/futures-board.ts +38 -1
- package/src/market-data/futures-contract.ts +91 -0
- package/src/market-data/fx-closes.ts +78 -1
- package/src/market-data/market/change-basis.ts +219 -0
- package/src/market-data/market/format.ts +28 -12
- package/src/market-data/market/freshness.ts +38 -0
- package/src/market-data/market/status.ts +55 -9
- package/src/market-data/market/year-to-date.ts +46 -0
- package/src/market-data/quotes/contributions.ts +12 -0
- package/src/market-data/quotes/delisting.ts +34 -0
- package/src/market-data/quotes/live-valuation.ts +23 -0
- package/src/market-data/quotes/resolution.ts +8 -2
- package/src/market-data/tax-equivalent.ts +10 -2
- package/src/notifications/app-notifier.ts +2 -2
- package/src/notifications/notification-log.ts +8 -6
- package/src/plugins/builtin/alerts/alert-engine.ts +3 -1
- package/src/plugins/builtin/alerts/cli.ts +26 -18
- package/src/plugins/builtin/alerts/events.ts +1 -0
- package/src/plugins/builtin/alerts/headless.ts +1 -1
- package/src/plugins/builtin/alerts/index.tsx +13 -4
- package/src/plugins/builtin/alerts/research-rules.ts +1 -0
- package/src/plugins/builtin/analytics/risk-pane.tsx +10 -7
- package/src/plugins/builtin/attention/pane.tsx +16 -14
- package/src/plugins/builtin/attention/trending.tsx +8 -6
- package/src/plugins/builtin/awards/pane.tsx +6 -6
- package/src/plugins/builtin/backtest/client.ts +5 -2
- package/src/plugins/builtin/backtest/export.ts +1 -1
- package/src/plugins/builtin/backtest/window.ts +16 -3
- package/src/plugins/builtin/broker-manager/add-flow.tsx +40 -8
- package/src/plugins/builtin/broker-manager/detail.tsx +26 -1
- package/src/plugins/builtin/broker-manager/index.tsx +20 -9
- package/src/plugins/builtin/broker-manager/model.ts +5 -0
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +8 -1
- package/src/plugins/builtin/broker-manager/table.ts +5 -1
- package/src/plugins/builtin/broker-trading/account-picker.tsx +91 -0
- package/src/plugins/builtin/broker-trading/chart-levels.ts +54 -0
- package/src/plugins/builtin/broker-trading/command.ts +103 -0
- package/src/plugins/builtin/broker-trading/controller.ts +688 -0
- package/src/plugins/builtin/broker-trading/dock.tsx +184 -0
- package/src/plugins/builtin/broker-trading/headless.ts +76 -0
- package/src/plugins/builtin/broker-trading/index.tsx +77 -0
- package/src/plugins/builtin/broker-trading/order-feed.ts +383 -0
- package/src/plugins/builtin/broker-trading/orders-data.ts +133 -0
- package/src/plugins/builtin/broker-trading/orders.tsx +437 -0
- package/src/plugins/builtin/broker-trading/overview-orders.tsx +121 -0
- package/src/plugins/builtin/broker-trading/pane-model.ts +207 -0
- package/src/plugins/builtin/broker-trading/pane.tsx +507 -0
- package/src/plugins/builtin/broker-trading/strategy.ts +153 -0
- package/src/plugins/builtin/broker-trading/ticket-parts.tsx +117 -0
- package/src/plugins/builtin/broker-trading/ticket.tsx +578 -0
- package/src/plugins/builtin/buildout/data-runtime.ts +1 -1
- package/src/plugins/builtin/buildout/format.ts +1 -0
- package/src/plugins/builtin/buildout/model/index.ts +16 -7
- package/src/plugins/builtin/buildout/pane/index.tsx +11 -7
- package/src/plugins/builtin/buildout/pane/status.tsx +3 -3
- package/src/plugins/builtin/catalysts/client.ts +2 -2
- package/src/plugins/builtin/catalysts/pane.tsx +3 -3
- package/src/plugins/builtin/chart-composer/cli-options.ts +19 -0
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +2 -1
- package/src/plugins/builtin/chart-composer/headless-schema.ts +3 -3
- package/src/plugins/builtin/chart-composer/headless.ts +2 -1
- package/src/plugins/builtin/chart-composer/option-range.ts +39 -0
- package/src/plugins/builtin/chart-composer/pane.tsx +32 -11
- package/src/plugins/builtin/chart-composer/presets.ts +2 -2
- package/src/plugins/builtin/chart-composer/series-catalog.ts +4 -2
- package/src/plugins/builtin/chart-composer/shortcuts.ts +3 -3
- package/src/plugins/builtin/chart-composer/viewport-labels.ts +5 -2
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/chat/status-widget.tsx +1 -1
- package/src/plugins/builtin/chat/unread-inbox-pane.tsx +6 -1
- package/src/plugins/builtin/chat/unread-inbox.ts +1 -1
- package/src/plugins/builtin/commodity-balances/client.ts +6 -4
- package/src/plugins/builtin/commodity-balances/headless.ts +41 -7
- package/src/plugins/builtin/commodity-balances/index.tsx +19 -4
- package/src/plugins/builtin/commodity-balances/model.ts +22 -0
- package/src/plugins/builtin/commodity-balances/pane.tsx +39 -9
- package/src/plugins/builtin/company-attention/app-rank.tsx +4 -5
- package/src/plugins/builtin/company-attention/pane.tsx +13 -11
- package/src/plugins/builtin/company-kpis/client.ts +3 -2
- package/src/plugins/builtin/company-kpis/headless.ts +5 -7
- package/src/plugins/builtin/company-kpis/model.ts +85 -2
- package/src/plugins/builtin/company-kpis/pane.tsx +30 -15
- package/src/plugins/builtin/composite-plugins.ts +3 -2
- package/src/plugins/builtin/correlation/headless.ts +2 -1
- package/src/plugins/builtin/correlation/relationship/model.ts +1 -0
- package/src/plugins/builtin/correlation/settings.ts +1 -0
- package/src/plugins/builtin/cot/headless.ts +1 -1
- package/src/plugins/builtin/cot/index.tsx +1 -1
- package/src/plugins/builtin/cot/model.ts +35 -12
- package/src/plugins/builtin/cot/pane.tsx +4 -3
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +2 -1
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +2 -1
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -1
- package/src/plugins/builtin/credit-documents/pane.tsx +8 -7
- package/src/plugins/builtin/crypto-board/client.ts +33 -2
- package/src/plugins/builtin/crypto-board/headless.ts +5 -2
- package/src/plugins/builtin/crypto-board/model.ts +28 -8
- package/src/plugins/builtin/debt-maturities/pane.tsx +4 -3
- package/src/plugins/builtin/dividend-yield/headless.ts +30 -8
- package/src/plugins/builtin/dividend-yield/provider-client.ts +3 -1
- package/src/plugins/builtin/doe/pane.tsx +1 -1
- package/src/plugins/builtin/earnings-calls/headless.ts +4 -4
- package/src/plugins/builtin/earnings-calls/lock-note.ts +12 -3
- package/src/plugins/builtin/econ/calendar-model.ts +35 -0
- package/src/plugins/builtin/econ/index.tsx +31 -4
- package/src/plugins/builtin/econ/print-watch.ts +279 -0
- package/src/plugins/builtin/equity-screener/headless.ts +30 -5
- package/src/plugins/builtin/equity-screener/model.ts +68 -2
- package/src/plugins/builtin/equity-screener/pane.tsx +129 -119
- package/src/plugins/builtin/estimate-revisions/headless.ts +3 -2
- package/src/plugins/builtin/estimate-revisions/lock-note.ts +29 -7
- package/src/plugins/builtin/exposure/client.ts +4 -1
- package/src/plugins/builtin/exposure/editor.tsx +3 -3
- package/src/plugins/builtin/exposure/evidence.ts +4 -1
- package/src/plugins/builtin/exposure/holdings.ts +3 -1
- package/src/plugins/builtin/exposure/pane.tsx +43 -21
- package/src/plugins/builtin/filing-events/index.tsx +9 -3
- package/src/plugins/builtin/futures/table.tsx +6 -3
- package/src/plugins/builtin/futures-curve/pane.tsx +2 -2
- package/src/plugins/builtin/gpu/board.tsx +4 -1
- package/src/plugins/builtin/gpu/changes.tsx +10 -10
- package/src/plugins/builtin/gpu/equities.tsx +4 -1
- package/src/plugins/builtin/gpu/history.tsx +4 -2
- package/src/plugins/builtin/gpu/pane.tsx +5 -3
- package/src/plugins/builtin/holders/client.ts +2 -1
- package/src/plugins/builtin/holders/headless.ts +2 -1
- package/src/plugins/builtin/holders/thirteenf-match.ts +3 -1
- package/src/plugins/builtin/insider/base-values.ts +76 -0
- package/src/plugins/builtin/insider/client.ts +3 -0
- package/src/plugins/builtin/insider/headless.ts +48 -10
- package/src/plugins/builtin/insider/index.tsx +17 -8
- package/src/plugins/builtin/insider/issuer.ts +34 -4
- package/src/plugins/builtin/insider/signals-client.ts +2 -2
- package/src/plugins/builtin/insider/table-model.ts +35 -13
- package/src/plugins/builtin/insider/table.tsx +5 -2
- package/src/plugins/builtin/iv-history/events.ts +145 -0
- package/src/plugins/builtin/iv-history/format.ts +3 -0
- package/src/plugins/builtin/iv-history/headless.ts +91 -7
- package/src/plugins/builtin/jobs/headless.ts +2 -2
- package/src/plugins/builtin/jobs/lock-note.ts +14 -3
- package/src/plugins/builtin/jodi/pane.tsx +4 -4
- package/src/plugins/builtin/market-halts/model.ts +31 -6
- package/src/plugins/builtin/market-halts/pane.tsx +3 -0
- package/src/plugins/builtin/market-movers/client.ts +4 -3
- package/src/plugins/builtin/market-movers/screener.ts +4 -3
- package/src/plugins/builtin/market-valuation/pane.tsx +2 -1
- package/src/plugins/builtin/members/pane.tsx +8 -3
- package/src/plugins/builtin/news/wire/feed-config.ts +29 -12
- package/src/plugins/builtin/news/wire/index.tsx +7 -2
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +11 -3
- package/src/plugins/builtin/news/wire/rss/cli.ts +3 -2
- package/src/plugins/builtin/news/wire/rss/source.ts +13 -4
- package/src/plugins/builtin/notes/cli.ts +1 -1
- package/src/plugins/builtin/notes/export.ts +17 -6
- package/src/plugins/builtin/notes/files.ts +16 -5
- package/src/plugins/builtin/options/enrichment-model.ts +10 -9
- package/src/plugins/builtin/options/footer.ts +25 -20
- package/src/plugins/builtin/options/live-quotes.ts +33 -18
- package/src/plugins/builtin/options/model-spot.ts +70 -4
- package/src/plugins/builtin/options/view.tsx +118 -35
- package/src/plugins/builtin/options-calculator/pane.tsx +7 -4
- package/src/plugins/builtin/options-positioning/headless.ts +11 -3
- package/src/plugins/builtin/options-positioning/model.ts +24 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +10 -12
- package/src/plugins/builtin/options-scenario/client.ts +19 -1
- package/src/plugins/builtin/options-scenario/headless.ts +13 -6
- package/src/plugins/builtin/options-scenario/pane.tsx +54 -11
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +5 -4
- package/src/plugins/builtin/portfolio-list/account-metrics.ts +3 -0
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +8 -5
- package/src/plugins/builtin/portfolio-list/cli/render.ts +34 -10
- package/src/plugins/builtin/portfolio-list/headless.ts +1 -1
- package/src/plugins/builtin/portfolio-list/pane/data.ts +23 -1
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +33 -14
- package/src/plugins/builtin/portfolio-list/settings.ts +20 -2
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +12 -0
- package/src/plugins/builtin/portfolio-list/summary/totals.ts +24 -3
- package/src/plugins/builtin/power/client.ts +2 -2
- package/src/plugins/builtin/power/pane.tsx +36 -31
- package/src/plugins/builtin/primary-dealers/client.ts +137 -62
- package/src/plugins/builtin/primary-dealers/headless.ts +30 -5
- package/src/plugins/builtin/primary-dealers/index.tsx +3 -2
- package/src/plugins/builtin/primary-dealers/model.ts +179 -129
- package/src/plugins/builtin/primary-dealers/pane.tsx +135 -15
- package/src/plugins/builtin/research/analyst-model.ts +5 -1
- package/src/plugins/builtin/reverse-dcf/client.ts +2 -1
- package/src/plugins/builtin/reverse-dcf/model.ts +4 -3
- package/src/plugins/builtin/risk-factors/index.tsx +12 -3
- package/src/plugins/builtin/scanner/feed.ts +6 -1
- package/src/plugins/builtin/scanner/headless.ts +1 -1
- package/src/plugins/builtin/scanner/lock-note.ts +3 -2
- package/src/plugins/builtin/seasonality/client.ts +2 -1
- package/src/plugins/builtin/sectors/client.ts +4 -3
- package/src/plugins/builtin/series-inventory.ts +1 -0
- package/src/plugins/builtin/shared/cloud-denied.ts +7 -6
- package/src/plugins/builtin/shared/cloud-resource.ts +15 -2
- package/src/plugins/builtin/shared/cloud-upgrade.ts +10 -11
- package/src/plugins/builtin/shared/free-routes.ts +24 -0
- package/src/plugins/builtin/shared/headless-options.ts +11 -0
- package/src/plugins/builtin/shared/pro-lock-note.ts +89 -7
- package/src/plugins/builtin/shared/research-trading.tsx +64 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +3 -1
- package/src/plugins/builtin/shared/volatility/options.ts +2 -1
- package/src/plugins/builtin/social-mentions/client.ts +2 -1
- package/src/plugins/builtin/social-mentions/headless.ts +1 -1
- package/src/plugins/builtin/social-mentions/lock-note.ts +1 -1
- package/src/plugins/builtin/themes/headless.ts +8 -2
- package/src/plugins/builtin/themes/model.ts +43 -10
- package/src/plugins/builtin/themes/pane.tsx +8 -6
- package/src/plugins/builtin/ticker-detail/overview/model.ts +44 -10
- package/src/plugins/builtin/ticker-detail/overview/option-contract.ts +64 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +82 -21
- package/src/plugins/builtin/ticker-detail/pane.tsx +21 -14
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -1
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +37 -8
- package/src/plugins/builtin/time-sales/pane.tsx +2 -2
- package/src/plugins/builtin/trace-bonds/client.ts +14 -3
- package/src/plugins/builtin/trace-bonds/headless.ts +1 -1
- package/src/plugins/builtin/vol-surface/client.ts +23 -3
- package/src/plugins/builtin/vol-surface/headless.ts +33 -14
- package/src/plugins/builtin/vol-surface/model.ts +30 -10
- package/src/plugins/builtin/vol-surface/pane.tsx +35 -15
- package/src/plugins/builtin/vol-surface/stored.ts +34 -3
- package/src/plugins/builtin/vol-surface/tables.ts +14 -0
- package/src/plugins/builtin-editorial.ts +1 -1
- package/src/plugins/compat.ts +3 -0
- package/src/plugins/external-runtime.ts +5 -0
- package/src/plugins/loader.ts +6 -0
- package/src/plugins/plugin-icon.ts +61 -0
- package/src/plugins/registry/host-actions.ts +2 -1
- package/src/plugins/registry/index.ts +9 -1
- package/src/plugins/runtime/context.tsx +5 -0
- package/src/plugins/runtime/index.tsx +3 -0
- package/src/portfolio/column-values.ts +13 -4
- package/src/portfolio/cost-fx.ts +5 -28
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/broker.ts +8 -0
- package/src/public/market-data.ts +5 -0
- package/src/renderers/dom/desktop/control-styles.ts +7 -1
- package/src/renderers/dom/desktop/controls.tsx +40 -8
- package/src/renderers/dom/desktop/icons.tsx +14 -0
- package/src/renderers/dom/desktop/list-view.tsx +51 -19
- package/src/renderers/dom/desktop/menu.tsx +10 -1
- package/src/renderers/dom/desktop/query-bar.tsx +2 -0
- package/src/renderers/dom/desktop/select-field.tsx +8 -6
- package/src/renderers/dom/host/style.ts +6 -1
- package/src/renderers/dom/host/tabs.tsx +22 -5
- package/src/renderers/dom/host/top-surface.ts +127 -0
- package/src/renderers/dom/styles.css +51 -5
- package/src/renderers/electrobun/bun/core-capabilities.ts +21 -1
- package/src/renderers/electrobun/bun/desktop/backend.ts +10 -0
- package/src/renderers/electrobun/bun/desktop/update.ts +210 -30
- package/src/renderers/electrobun/bun/external-plugins.ts +3 -0
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/broker-remote-client.ts +16 -0
- package/src/renderers/electrobun/view/external-plugins.ts +1 -0
- package/src/renderers/electrobun/view/news-source.ts +4 -2
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +8 -1
- package/src/renderers/opentui/start.tsx +7 -0
- package/src/series/validate.ts +2 -2
- package/src/sources/gloomberb-cloud/index.ts +57 -17
- package/src/sources/gloomberb-cloud/normalizers.ts +4 -0
- package/src/sources/history-result.ts +3 -0
- package/src/sources/provider-errors.ts +3 -1
- package/src/sources/provider-router/history.ts +49 -6
- package/src/sources/provider-router/index.ts +18 -1
- package/src/state/app/activity.ts +13 -0
- package/src/sync/controller.ts +4 -0
- package/src/sync/core-contributors.ts +62 -11
- package/src/sync/local-only.ts +121 -0
- package/src/sync/react.ts +6 -0
- package/src/sync/types.ts +3 -0
- package/src/telemetry/crash-reports.ts +4 -0
- package/src/telemetry/update-failures-node.ts +59 -0
- package/src/telemetry/update-failures.ts +307 -0
- package/src/tickers/company-name-listing.ts +9 -7
- package/src/tickers/company-name.ts +43 -0
- package/src/tickers/listing-fate.ts +57 -8
- package/src/tickers/search/index.ts +24 -3
- package/src/time-series/price-comparison.ts +35 -0
- package/src/time-series/resolve.ts +52 -11
- package/src/time-series/spec.ts +1 -1
- package/src/time-series/types.ts +5 -0
- package/src/types/broker.ts +56 -1
- package/src/types/config.ts +6 -0
- package/src/types/data-provider.ts +11 -1
- package/src/types/financials.ts +23 -0
- package/src/types/headless.ts +19 -2
- package/src/types/instrument.ts +4 -0
- package/src/types/issuer-listings.ts +28 -0
- package/src/types/plugin.ts +24 -6
- package/src/types/price-history.ts +6 -1
- package/src/types/trading.ts +67 -0
- package/src/ui/host.tsx +4 -0
- package/src/updater/failure.ts +163 -0
- package/src/updater/index.ts +87 -23
- package/src/utils/base-currency.ts +108 -0
- package/src/utils/currency-names.ts +128 -0
- package/src/utils/currency-pair.ts +28 -1
- package/src/utils/currency-units.ts +32 -1
- package/src/utils/dom-screenshot.ts +22 -9
- package/src/utils/exchange-notation.generated.ts +360 -0
- package/src/utils/exchanges.ts +15 -322
- package/src/utils/format.ts +31 -1
- package/src/utils/instrument-identity.ts +38 -1
- package/src/utils/options.ts +46 -1
- package/src/utils/price-history.ts +4 -0
- package/src/utils/reported-money.ts +8 -4
- package/src/utils/sec.ts +68 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The logo a broker is listed with on the desktop and the web: the icon of the
|
|
3
|
+
* plugin that registered it (its gloom.json `icon`), else the app's own for a
|
|
4
|
+
* broker Gloom connects for you (a signed-in broker, which no plugin owns),
|
|
5
|
+
* else none, and the list draws the broker's initial instead (LogoMark).
|
|
6
|
+
*/
|
|
7
|
+
import type { BrokerAdapter } from "../types/broker";
|
|
8
|
+
import type { BrokerInstanceConfig } from "../types/config";
|
|
9
|
+
import type { Portfolio } from "../types/ticker";
|
|
10
|
+
import type { BrokerDirectoryEntry } from "./directory";
|
|
11
|
+
|
|
12
|
+
function svg(markup: string): string {
|
|
13
|
+
return `data:image/svg+xml,${encodeURIComponent(markup)}`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The marks the official plugins ship as their icon, for the same brokers
|
|
18
|
+
* when Gloom connects them, keyed by the backend's broker id.
|
|
19
|
+
*/
|
|
20
|
+
const SIGNED_IN_BROKER_LOGOS: Readonly<Record<string, string>> = {
|
|
21
|
+
ibkr: svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="t" x1="0" y1="0" x2="0" y2="64" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#262626"/><stop offset="1" stop-color="#0F0F0F"/></linearGradient><linearGradient id="m" gradientUnits="userSpaceOnUse" x1="3633.335" y1="66.0445" x2="3671.0737" y2="66.0445" gradientTransform="matrix(-1 0 0 1 3673.7529 0)"><stop offset="0" stop-color="#D71F27"/><stop offset="1" stop-color="#971B1E"/></linearGradient></defs><rect width="64" height="64" fill="url(#t)"/><g transform="translate(20.4 8.2) scale(0.539)"><polygon points="40.4,86.8 2.7,86.8 2.7,45.3" fill="url(#m)"/><polygon points="40.4,1.5 2.7,45.3 2.7,86.8" fill="#D71F27"/><circle cx="35.2" cy="55.5" r="11.3" fill="#D71F27"/></g></svg>'),
|
|
22
|
+
robinhood: svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" fill="#CCFF00"/><path transform="translate(14 14) scale(1.5)" d="M2.84 24h.53c.096 0 .192-.048.224-.128C7.591 13.696 11.94 8.656 14.67 5.638c.112-.128.064-.225-.096-.225h-4.88a.55.55 0 0 0-.45.225L5.746 9.972c-.514.642-.642 1.236-.642 2.086v4.43c-1.14 3.194-1.862 5.361-2.392 7.32-.032.125.016.192.129.192M20.447.646c-.754-.802-4.157-.834-5.73-.224a3 3 0 0 0-.786.465 41 41 0 0 0-3.323 3.178c-.112.113-.064.225.097.225h5.409c.497 0 .786.289.786.786v6.1c0 .16.128.208.225.064l3.258-4.254c.53-.69.69-.898.835-1.861.192-1.413.08-3.58-.77-4.479m-6.982 16.18 2.231-3.676a.7.7 0 0 0 .064-.29V6.73c0-.16-.112-.225-.224-.097-3.355 3.74-5.971 7.672-8.395 12.407-.06.12.016.225.16.177l5.009-1.54c.565-.174.882-.402 1.155-.852" fill="#1A1A1A"/></svg>'),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** The plugin icon of a broker adapter (`getBrokerLogo` on the plugin runtime). */
|
|
26
|
+
export type BrokerPluginLogo = (brokerType: string) => string | null;
|
|
27
|
+
|
|
28
|
+
function logoFor(brokerKey: string, pluginIcon: string | null): string | null {
|
|
29
|
+
return pluginIcon ?? SIGNED_IN_BROKER_LOGOS[brokerKey] ?? null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** A broker in Add Broker's list: the icon of the plugin that connects it on this device, else Gloom's own. */
|
|
33
|
+
export function brokerDirectoryLogo(entry: BrokerDirectoryEntry, pluginLogo: BrokerPluginLogo): string | null {
|
|
34
|
+
const device = entry.methods.find((method) => method.kind === "device");
|
|
35
|
+
return logoFor(entry.key, device ? pluginLogo(device.adapter.id) : null);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** A broker profile: its adapter's plugin icon, or the logo of the broker a signed-in profile connects. */
|
|
39
|
+
export function brokerProfileLogo(
|
|
40
|
+
instance: BrokerInstanceConfig,
|
|
41
|
+
adapter: BrokerAdapter | null,
|
|
42
|
+
pluginLogo: BrokerPluginLogo,
|
|
43
|
+
): string | null {
|
|
44
|
+
const brokerKey = adapter?.portfolioBrokerId?.(instance) || instance.brokerType;
|
|
45
|
+
return logoFor(brokerKey, pluginLogo(instance.brokerType));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The broker a portfolio's account is at, for its tab: the logo and the name
|
|
50
|
+
* its initial stands in for. Null for a portfolio no broker fills.
|
|
51
|
+
*/
|
|
52
|
+
export function brokerPortfolioLogo(
|
|
53
|
+
portfolio: Pick<Portfolio, "brokerId" | "brokerInstanceId">,
|
|
54
|
+
instances: readonly BrokerInstanceConfig[],
|
|
55
|
+
getAdapter: (brokerType: string) => BrokerAdapter | null,
|
|
56
|
+
pluginLogo: BrokerPluginLogo,
|
|
57
|
+
): { src: string | null; name: string } | null {
|
|
58
|
+
if (!portfolio.brokerInstanceId) return null;
|
|
59
|
+
const instance = instances.find((candidate) => candidate.id === portfolio.brokerInstanceId);
|
|
60
|
+
if (!instance) {
|
|
61
|
+
return portfolio.brokerId ? { src: logoFor(portfolio.brokerId, null), name: portfolio.brokerId } : null;
|
|
62
|
+
}
|
|
63
|
+
const adapter = getAdapter(instance.brokerType);
|
|
64
|
+
const name = adapter?.describeInstance?.(instance).brokerName ?? adapter?.name ?? instance.label;
|
|
65
|
+
return { src: brokerProfileLogo(instance, adapter, pluginLogo), name };
|
|
66
|
+
}
|
|
@@ -6,6 +6,8 @@ import { t, tf } from "../i18n";
|
|
|
6
6
|
export interface BrokerProfileDraft {
|
|
7
7
|
label: string;
|
|
8
8
|
enabled: boolean;
|
|
9
|
+
/** Keep the connection's data on this device, out of Gloom Cloud sync. */
|
|
10
|
+
localOnly: boolean;
|
|
9
11
|
values: Record<string, string>;
|
|
10
12
|
}
|
|
11
13
|
|
|
@@ -47,6 +49,7 @@ export function createBrokerProfileDraft(
|
|
|
47
49
|
return {
|
|
48
50
|
label: instance?.label || adapter.name,
|
|
49
51
|
enabled: instance?.enabled !== false,
|
|
52
|
+
localOnly: instance?.localOnly === true,
|
|
50
53
|
values: flattenBrokerConfigValues(adapter, instance),
|
|
51
54
|
};
|
|
52
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TimeRange } from "../time-series/range";
|
|
2
2
|
import type { ManualChartResolution } from "../time-series/resolution";
|
|
3
|
-
import type { BrokerAdapter, BrokerConnectionStatus } from "../types/broker";
|
|
3
|
+
import type { BrokerAdapter, BrokerConnectionStatus, BrokerHistoryOptions, BrokerOrderListener } from "../types/broker";
|
|
4
4
|
import type { BrokerInstanceConfig } from "../types/config";
|
|
5
5
|
import type { QuoteSubscriptionTarget } from "../types/data-provider";
|
|
6
6
|
import type { BrokerContractRef } from "../types/instrument";
|
|
@@ -15,6 +15,7 @@ export interface BrokerRemoteClient {
|
|
|
15
15
|
targets: QuoteSubscriptionTarget[],
|
|
16
16
|
onQuote: (target: QuoteSubscriptionTarget, quote: any) => void,
|
|
17
17
|
): () => void;
|
|
18
|
+
subscribeOrders(instanceId: string, listener: BrokerOrderListener): () => void;
|
|
18
19
|
removeInstance(instanceId: string): Promise<void>;
|
|
19
20
|
destroyAll(): Promise<void>;
|
|
20
21
|
}
|
|
@@ -73,7 +74,8 @@ export function createRemoteBrokerAdapter(adapter: BrokerAdapter): BrokerAdapter
|
|
|
73
74
|
bufferRange: TimeRange,
|
|
74
75
|
resolution: ManualChartResolution,
|
|
75
76
|
instrument?: BrokerContractRef | null,
|
|
76
|
-
|
|
77
|
+
options?: BrokerHistoryOptions,
|
|
78
|
+
) => invoke(instance, "getPriceHistoryForResolution", [ticker, exchange, bufferRange, resolution, instrument, ...(options ? [options] : [])]),
|
|
77
79
|
getDetailedPriceHistory: (
|
|
78
80
|
ticker,
|
|
79
81
|
instance,
|
|
@@ -82,7 +84,8 @@ export function createRemoteBrokerAdapter(adapter: BrokerAdapter): BrokerAdapter
|
|
|
82
84
|
endDate: Date,
|
|
83
85
|
barSize: string,
|
|
84
86
|
instrument?: BrokerContractRef | null,
|
|
85
|
-
|
|
87
|
+
options?: BrokerHistoryOptions,
|
|
88
|
+
) => invoke(instance, "getDetailedPriceHistory", [ticker, exchange, startDate, endDate, barSize, instrument, ...(options ? [options] : [])]),
|
|
86
89
|
getChartResolutionSupport: (ticker, instance, exchange?: string, instrument?: BrokerContractRef | null) =>
|
|
87
90
|
invoke(instance, "getChartResolutionSupport", [ticker, exchange, instrument]),
|
|
88
91
|
getChartResolutionCapabilities: (ticker, instance, exchange?: string, instrument?: BrokerContractRef | null) =>
|
|
@@ -95,7 +98,14 @@ export function createRemoteBrokerAdapter(adapter: BrokerAdapter): BrokerAdapter
|
|
|
95
98
|
subscribeQuotes: adapter.subscribeQuotes
|
|
96
99
|
? (instance, targets, onQuote) => getBrokerRemoteClient()?.subscribeQuotes(instance.id, targets, onQuote) ?? (() => {})
|
|
97
100
|
: undefined,
|
|
101
|
+
subscribeOrders: adapter.subscribeOrders
|
|
102
|
+
? (instance, listener) => getBrokerRemoteClient()?.subscribeOrders(instance.id, listener) ?? (() => {})
|
|
103
|
+
: undefined,
|
|
98
104
|
listOpenOrders: (instance) => invoke(instance, "listOpenOrders"),
|
|
105
|
+
// The view's own adapter has no session: a ticket confirming an order must ask the one that placed it.
|
|
106
|
+
getOrderStatus: adapter.getOrderStatus
|
|
107
|
+
? (instance, orderId: number) => invoke(instance, "getOrderStatus", [orderId])
|
|
108
|
+
: undefined,
|
|
99
109
|
listExecutions: (instance) => invoke(instance, "listExecutions"),
|
|
100
110
|
previewOrder: (instance, request: BrokerOrderRequest) => invoke(instance, "previewOrder", [request]),
|
|
101
111
|
placeOrder: (instance, request: BrokerOrderRequest) => invoke(instance, "placeOrder", [request]),
|
|
@@ -25,7 +25,7 @@ export {
|
|
|
25
25
|
AI_RUNNER_CAPABILITY_ID, BROKER_CAPABILITY_ID, NOTES_FILES_CAPABILITY_ID,
|
|
26
26
|
} from "./service-capabilities";
|
|
27
27
|
export type {
|
|
28
|
-
AiAuthProgressEvent, AiRunnerAgentMessage, AiRunnerEvent, BrokerQuoteEvent, BrokerRemoteEvent,
|
|
28
|
+
AiAuthProgressEvent, AiRunnerAgentMessage, AiRunnerEvent, BrokerOrderEvent, BrokerQuoteEvent, BrokerRemoteEvent,
|
|
29
29
|
BrokerStatusEvent,
|
|
30
30
|
} from "./service-capabilities";
|
|
31
31
|
export {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BrokerConnectionStatus } from "../types/broker";
|
|
2
2
|
import type { QuoteSubscriptionTarget } from "../types/data-provider";
|
|
3
3
|
import type { Quote } from "../types/financials";
|
|
4
|
+
import type { BrokerOrder } from "../types/trading";
|
|
4
5
|
|
|
5
6
|
export const BROKER_CAPABILITY_ID = "broker.core";
|
|
6
7
|
export const NOTES_FILES_CAPABILITY_ID = "notes.files";
|
|
@@ -18,7 +19,12 @@ export type BrokerQuoteEvent = {
|
|
|
18
19
|
quote: Quote;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
/** An order change, or the order stream going live or quiet, from `BrokerAdapter.subscribeOrders`. */
|
|
23
|
+
export type BrokerOrderEvent =
|
|
24
|
+
| { kind: "order"; order: BrokerOrder }
|
|
25
|
+
| { kind: "orders-live"; live: boolean };
|
|
26
|
+
|
|
27
|
+
export type BrokerRemoteEvent = BrokerStatusEvent | BrokerQuoteEvent | BrokerOrderEvent;
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* What an AI runtime reports while it signs an account in.
|
|
@@ -2,34 +2,76 @@ import type { DataProvider } from "../types/data-provider";
|
|
|
2
2
|
import { fixedUsdRate } from "../utils/currency-units";
|
|
3
3
|
import { logFailure } from "../utils/log-failure";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/** One rate a converter used: units of `baseCurrency` per unit of `currency`, and when it was observed. */
|
|
6
|
+
export interface BaseConversion {
|
|
7
|
+
currency: string;
|
|
8
|
+
baseCurrency: string;
|
|
9
|
+
rate: number;
|
|
10
|
+
/** Epoch ms of the older leg's observation; null when the source did not date it. */
|
|
11
|
+
asOf: number | null;
|
|
12
|
+
}
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
/** Converts an amount into the base currency, and lists the rates it used so a report can state them. */
|
|
15
|
+
export type BaseConverter = ((value: number, fromCurrency: string) => Promise<number>) & {
|
|
16
|
+
conversions(): BaseConversion[];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
interface UsdRate {
|
|
20
|
+
rate: number;
|
|
21
|
+
asOf: number | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function createBaseConverter(
|
|
25
|
+
dataProvider: Pick<DataProvider, "getExchangeRate" | "getCachedQuery" | "revalidatesInBackground">,
|
|
26
|
+
baseCurrency: string,
|
|
27
|
+
): BaseConverter {
|
|
28
|
+
const rateCache = new Map<string, Promise<UsdRate>>();
|
|
29
|
+
const used = new Map<string, BaseConversion>();
|
|
30
|
+
|
|
31
|
+
/** USD per unit, dated when the cached query says when it was observed (as `fx` dates it). */
|
|
32
|
+
const loadRate = async (currency: string): Promise<UsdRate> => {
|
|
33
|
+
const fixed = fixedUsdRate(currency);
|
|
34
|
+
if (fixed != null) return { rate: fixed, asOf: null };
|
|
12
35
|
try {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
36
|
+
if (dataProvider.getCachedQuery) {
|
|
37
|
+
const entry = await dataProvider.getCachedQuery("getExchangeRate", [currency])
|
|
38
|
+
.load({ background: dataProvider.revalidatesInBackground });
|
|
39
|
+
return { rate: Number.isFinite(entry.value) && entry.value > 0 ? entry.value : Number.NaN, asOf: entry.asOf ?? null };
|
|
40
|
+
}
|
|
41
|
+
const rate = await dataProvider.getExchangeRate(currency);
|
|
42
|
+
return { rate: Number.isFinite(rate) && rate > 0 ? rate : Number.NaN, asOf: null };
|
|
17
43
|
} catch (error) {
|
|
18
44
|
logFailure("cli-base-converter", "Could not load base conversion exchange rate")(error);
|
|
19
|
-
return Number.NaN;
|
|
45
|
+
return { rate: Number.NaN, asOf: null };
|
|
20
46
|
}
|
|
21
47
|
};
|
|
22
48
|
|
|
23
|
-
|
|
49
|
+
const getRate = (currency: string): Promise<UsdRate> => {
|
|
50
|
+
const normalizedCurrency = currency.toUpperCase();
|
|
51
|
+
let pending = rateCache.get(normalizedCurrency);
|
|
52
|
+
if (!pending) {
|
|
53
|
+
pending = loadRate(normalizedCurrency);
|
|
54
|
+
rateCache.set(normalizedCurrency, pending);
|
|
55
|
+
}
|
|
56
|
+
return pending;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const convert = async (value: number, fromCurrency: string): Promise<number> => {
|
|
24
60
|
const normalizedFrom = fromCurrency.toUpperCase();
|
|
25
61
|
const normalizedBase = baseCurrency.toUpperCase();
|
|
26
62
|
if (normalizedFrom === normalizedBase) return value;
|
|
27
63
|
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
64
|
+
const [from, base] = await Promise.all([getRate(normalizedFrom), getRate(normalizedBase)]);
|
|
65
|
+
if (!Number.isFinite(from.rate) || !Number.isFinite(base.rate) || base.rate <= 0) return Number.NaN;
|
|
66
|
+
const dates = [from.asOf, base.asOf].filter((time): time is number => time != null);
|
|
67
|
+
used.set(normalizedFrom, {
|
|
68
|
+
currency: normalizedFrom,
|
|
69
|
+
baseCurrency: normalizedBase,
|
|
70
|
+
rate: from.rate / base.rate,
|
|
71
|
+
asOf: dates.length > 0 ? Math.min(...dates) : null,
|
|
72
|
+
});
|
|
73
|
+
return (value * from.rate) / base.rate;
|
|
34
74
|
};
|
|
75
|
+
|
|
76
|
+
return Object.assign(convert, { conversions: () => [...used.values()] });
|
|
35
77
|
}
|