Skip to main content
The tplus markets commands let you inspect and manage the trading markets available on T+. Market metadata such as creation, retrieval, and listing is served by the orderbook service (configured via --orderbook-base-url), while depth snapshots and historical klines come from the separate market-data service (--market-data-base-url). Make sure both URLs are set correctly before using these commands.

Creating a market

Register a new market for an asset. This is an idempotent operation — calling it on a market that already exists is safe:
tplus markets create 0xabc123...@42161
The asset ID is the on-chain token address combined with the chain ID in the format <address>@<chain-id>.

Getting market details

Fetch metadata for a specific market, including its price and quantity decimal precision:
tplus markets get 0xabc123...@42161
The response includes fields such as book_price_decimals and book_quantity_decimals, which tell you how to convert between human-readable values and the integer units used by the order placement commands.

Listing all markets

List every market currently active on the exchange:
tplus markets list
Add --output-format json to get structured output suitable for scripting:
tplus markets list --output-format json
markets create, markets get, and markets list all query the orderbook service at --orderbook-base-url.

Viewing order book depth

Fetch a snapshot of the current bid and ask levels for a market. This command reads from the market-data service at --market-data-base-url:
tplus markets depth 0xabc123...@42161
The output shows aggregated quantity at each price level for both sides of the book.

Fetching klines (OHLCV)

Retrieve historical open/high/low/close/volume candlestick data for a market. This command also reads from the market-data service:
# Most recent klines (default page and limit)
tplus markets klines 0xabc123...@42161

# Paginate through history
tplus markets klines 0xabc123...@42161 --page 2 --limit 100

# Klines ending before a specific nanosecond timestamp
tplus markets klines 0xabc123...@42161 --end-timestamp-ns 1700000000000000000
FlagDescription
--page NPage number for paginated results (default: 1).
--limit NNumber of klines to return per page (default: service-defined).
--end-timestamp-ns NReturn only klines whose close time is at or before this nanosecond UNIX timestamp.
Use --output-format json with tplus markets klines to pipe candle data directly into charting scripts or data pipelines.