internal/

directory
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0

Directories

Path Synopsis
Package broker is the CLI-independent domain layer over the T-Invest API: typed params in, typed results out, one sub-package per service domain.
Package broker is the CLI-independent domain layer over the T-Invest API: typed params in, typed results out, one sub-package per service domain.
accounts
Package accounts wraps the accounts surface of UsersService.
Package accounts wraps the accounts surface of UsersService.
history
Package history downloads the REST bulk candle-history zip archives.
Package history downloads the REST bulk candle-history zip archives.
instruments
Package instruments resolves instrument identifiers (<instrument_uid | FIGI | TICKER@CLASSCODE>) to the full instrument record via InstrumentsService, with a local TTL cache, plus free-text search (plan §5/§8).
Package instruments resolves instrument identifiers (<instrument_uid | FIGI | TICKER@CLASSCODE>) to the full instrument record via InstrumentsService, with a local TTL cache, plus free-text search (plan §5/§8).
marketdata
Package marketdata wraps the quote/orderbook/status surface of MarketDataService (plan §5/§8): last prices, close prices, order book, and trading status.
Package marketdata wraps the quote/orderbook/status surface of MarketDataService (plan §5/§8): last prices, close prices, order book, and trading status.
operations
Package operations wraps cursor-paginated operation history reads.
Package operations wraps cursor-paginated operation history reads.
orders
Package orders wraps OrdersService (plan §5/§8/§9): typed placement, cancellation, replacement, state lookups, and the two pre-trade checks (GetOrderPrice, GetMaxLots).
Package orders wraps OrdersService (plan §5/§8/§9): typed placement, cancellation, replacement, state lookups, and the two pre-trade checks (GetOrderPrice, GetMaxLots).
portfolio
Package portfolio wraps the account portfolio, positions, and withdraw-limit reads of OperationsService.
Package portfolio wraps the account portfolio, positions, and withdraw-limit reads of OperationsService.
research
Package research wraps the read-only research RPCs on InstrumentsService.
Package research wraps the read-only research RPCs on InstrumentsService.
sandbox
Package sandbox wraps the account-management surface of SandboxService (plan §1.1/§8): opening/closing sandbox accounts, listing them, and paying virtual money in.
Package sandbox wraps the account-management surface of SandboxService (plan §1.1/§8): opening/closing sandbox accounts, listing them, and paying virtual money in.
signals
Package signals wraps analyst and technical signal reads.
Package signals wraps analyst and technical signal reads.
stoporders
Package stoporders wraps StopOrdersService (plan §1.1/§8/§9): typed placement, cancellation, and listing of stop-loss/take-profit/stop-limit orders, including trailing take-profit.
Package stoporders wraps StopOrdersService (plan §1.1/§8/§9): typed placement, cancellation, and listing of stop-loss/take-profit/stop-limit orders, including trailing take-profit.
streaming
Package streaming adapts the T-Invest stream services to the generic resilient runner and builds de-duplicated market-data subscription requests.
Package streaming adapts the T-Invest stream services to the generic resilient runner and builds de-duplicated market-data subscription requests.
users
Package users wraps the user-info surface of UsersService.
Package users wraps the user-info surface of UsersService.
Package clientconn assembles the shared gRPC connection used by both the CLI and the public library facade.
Package clientconn assembles the shared gRPC connection used by both the CLI and the public library facade.
Package config resolves profiles, environment, and token sources into the effective settings for a command invocation.
Package config resolves profiles, environment, and token sources into the effective settings for a command invocation.
Package ledger implements the write-ahead intent ledger described in plan-tinvest-cli.md §9 (reliability model) and §10 (intent ledger spec).
Package ledger implements the write-ahead intent ledger described in plan-tinvest-cli.md §9 (reliability model) and §10 (intent ledger spec).
Package policy implements the pre-trade guardrails described in plan-tinvest-cli.md §6: an instrument allowlist, per-order lot and notional caps, an open-order cap, market/short opt-in flags, and a kill-switch file whose presence blocks every mutation.
Package policy implements the pre-trade guardrails described in plan-tinvest-cli.md §6: an instrument allowlist, per-order lot and notional caps, an open-order cap, market/short opt-in flags, and a kill-switch file whose presence blocks every mutation.
Package ratelimit provides the process-local unary RPC token buckets used to stay below the broker's per-method-group limits.
Package ratelimit provides the process-local unary RPC token buckets used to stay below the broker's per-method-group limits.
Package render turns broker results into the CLI's output formats (JSON envelope and tables) and maps errors to stable exit codes.
Package render turns broker results into the CLI's output formats (JSON envelope and tables) and maps errors to stable exit codes.
Package stream owns resilient stream connection lifecycle: reconnect, authoritative subscription replay, ping/data watchdog, reconciliation, and explicit consumer-visible gap events.
Package stream owns resilient stream connection lifecycle: reconnect, authoritative subscription replay, ping/data watchdog, reconciliation, and explicit consumer-visible gap events.
Package transport owns the gRPC connection and interceptors: Bearer auth, per-call deadlines, call-phase tracking, and x-tracking-id capture.
Package transport owns the gRPC connection and interceptors: Bearer auth, per-call deadlines, call-phase tracking, and x-tracking-id capture.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL