Skip to main content
tpluspy is the official Python client library for the T+ exchange. T+ is a high-performance, cryptographically-verifiable trading platform built around Ed25519 key-pair identities, a central order-management system, and an on-chain clearing and settlement layer. With tpluspy you can place and manage orders, subscribe to real-time market data streams, query your inventory and trade history, and—when you need it—interact directly with the vault and registry contracts on-chain. Everything works from Python code or from the bundled tplus command-line tool.

What’s included

OrderBookClient

Async REST and WebSocket client for the T+ order-management system. Place, cancel, and replace limit and market orders; stream live order and trade events; query open orders, inventory, margin, and positions.

MarketDataClient

Read-only async client for the T+ market-data service. Fetch order-book snapshots, klines, 24-hour tickers, and public trades. Stream depth diffs, kline updates, and finalized trades in real time. No authentication required.

ClearingEngineClient

Async client for the T+ clearing engine. Initiate deposits, withdrawals, and settlements; query vaults, the asset registry, and per-asset decimal metadata through typed sub-clients (client.deposits, client.withdrawals, client.settlements, client.vaults, client.assets).

CLI tool (`tplus`)

A full shell interface installed alongside the library. Generate and manage local Ed25519 accounts, place and monitor orders, stream WebSocket feeds, and run on-chain vault and registry operations—all without writing Python.

EVM contracts (optional)

The [evm] install extra adds the Ape framework and typed-message helpers for interacting directly with T+ smart contracts: reading the asset registry, managing deposit vaults, signing settlement messages, and running on-chain administrative operations.

Install tiers

tpluspy ships in two tiers. Choose the one that matches your use case.

Core install

Includes the async REST/WebSocket clients, Pydantic v2 wire models, and Ed25519 user-key signing. Use this when your workflow only involves talking to a running T+ instance—placing orders, reading market data, streaming trades, or signing requests with your T+ key.

EVM install

Adds the Ape framework (eth-ape), hexbytes, and the structured-message helpers on top of the core install. Required for any task that touches chain state: reading or writing vault/registry contracts, initiating on-chain deposits and withdrawals, or signing settlement messages with an Ethereum account.
pip install tpluspy
If you only need to place orders or stream market data, the core install is sufficient. Only add [evm] when your code imports anything from tplus.evm, uses vault/registry contracts, or needs an Ethereum account for settlement.

Next steps

Quickstart

Create an account and place your first limit order in under five minutes.

Installation

Full install guide covering Python version requirements and environment setup.

CLI overview

Explore every tplus subcommand and global option.