Overview
Choose an example based on what your application needs to do.
Fetch data with the SDK
- List accounts — choose an account for the next request.
- Find an instrument and get its UID — look up an instrument by ticker and class.
- Make related unary gRPC requests — fetch a portfolio, candles, or active signals with a deadline.
- Backfill candle history in windows — read closed one-minute candles over a long period.
- Paginate operations — walk through account history using a cursor.
Work with orders
- Run an order lifecycle in the sandbox — create and fund a test account, place an order, and cancel the active remainder.
- Track order state — subscribe to account events and filter messages by the client order key.
Read and recover streams
- Read a stream and stop it — subscribe to events, cancel reading with
AbortSignal, and close the SDK. - Change a subscription while reading — subscribe and unsubscribe on the same bidirectional stream.
- Recover a stream of closed candles — resubscribe, backfill history, and save progress.
- Handle errors — inspect
SdkError, distinguish causes, and decide whether to retry.
Rate-limit unary gRPC requests
- Rate-limit unary gRPC requests — use the built-in limiter, override quotas, and allocate a share.
- Implement a custom unary gRPC limiter — write a limiter, handle cancellation, and coordinate quotas.
Migrate from deprecated fields
- Migrate from deprecated provider fields — preserve CLI compatibility and update the application model.
Test your application
- Test an application with a test gRPC server — test without connecting to the broker using public
*ServiceDefinitionexports.
Look up reference information
- T-Invest API limits — check request and connection quotas.
- Run a streaming CLI command — look up event formats and exit codes.
- Configure a streaming CLI command — describe the stream and subscriptions in JSON.
- Choose documentation for your task — find configuration and development materials.