Skip to main content
To trade on T+, you first deposit tokens into the T+ vault on-chain, which makes them available as exchange balance. When you want to recover funds, you initiate a withdrawal request and then execute it on-chain once the exchange has approved it. Both deposit and withdrawal operations touch the Ethereum blockchain, so they require the [evm] extra and the Ape framework.
Depositing and withdrawing requires pip install "tpluspy[evm]". The core install (pip install tpluspy) is sufficient for order placement and market data, but not for on-chain vault interactions.

Install the EVM extra

pip install "tpluspy[evm]"

Deposit funds

Depositing moves tokens from your on-chain wallet into the T+ vault contract, crediting your exchange balance. Use the tplus deposit CLI command with the token address and the amount in the token’s smallest unit (e.g. wei for 18-decimal tokens).
tplus deposit <token-address> --amount 1000000000000000000
The --amount flag always takes the raw integer amount in the token’s native decimals. For an 18-decimal token, 1000000000000000000 equals 1.0 tokens. Add --wait to block until the deposit is confirmed on-chain before returning:
tplus deposit <token-address> --amount 1000000000000000000 --wait
Use tplus decimals get <token-address> to look up the decimals for any registered token, so you can calculate the correct integer amount.

Withdraw funds

Withdrawals use a two-step flow: you first submit a signed withdrawal request to the OMS (init), and once the exchange approves it, you execute the on-chain transaction (execute). This design lets the exchange validate your request and collect the necessary signatures before any on-chain gas is spent.

Why two steps?

  1. init — Signs the withdrawal request with your Ape account and submits it to the OMS. No on-chain transaction yet; just a signed request waiting for approval.
  2. execute — Polls the OMS for the approval, then submits the withdraw transaction to the vault contract on-chain.

Step 1 — Init

tplus withdraw init \
  --network <ape-network> \
  --account <ape-alias> \
  --asset 0x<token-address>@42161 \
  --amount 1000000
FlagPurpose
--networkApe network specifier, e.g. arbitrum:mainnet:alchemy
--accountYour Ape account alias (the on-chain signer)
--assetToken address in address@chain_id form
--amountInteger amount in book-native units
--nonce NOptional: override the withdrawal nonce
--target <addr>Optional: send funds to a different address

Step 2 — Execute

tplus withdraw execute \
  --network <ape-network> \
  --account <ape-alias> \
  --asset 0x<token-address>@42161 \
  --amount 1000000 \
  --poll-interval 2 \
  --poll-timeout 60
execute submits the same signed request as init and then polls the OMS for the approval before sending the on-chain transaction. You can skip init entirely and go straight to execute — it handles both steps in sequence.
FlagDefaultPurpose
--poll-interval2Seconds between approval-status polls
--poll-timeout60Maximum seconds to wait for approval

Combined shortcut

If you want to init and execute in a single command, just call execute directly — it always runs the init step first:
tplus withdraw execute \
  --network arbitrum:mainnet:alchemy \
  --account my-ape-alias \
  --asset 0x<token-address>@42161 \
  --amount 1000000

Check withdrawal status

List your pending and completed withdrawal requests at any time:
# Your own withdrawals (uses the default account).
tplus wd list

# Withdrawals for a specific T+ public key.
tplus wd list --user <pubkey>
To inspect the collected signatures for a withdrawal:
tplus wd signatures
tplus wd signatures --nonce <N>

Cancel a withdrawal

If a withdrawal has been submitted but not yet executed on-chain, you can cancel it:
tplus wd cancel --asset 0x<token-address> --nonce <N>
You can always withdraw your funds as long as you have no open liabilities on the exchange (e.g. outstanding borrowings or unsettled obligations). The exchange will reject a withdrawal request if it would leave your account insolvent.

Global CLI options for withdrawals

Withdrawal commands route through the OMS, not the clearing engine. Make sure you have the right base URL set:
export TPLUS_ORDERBOOK_BASE_URL=http://127.0.0.1:8000
# or pass --orderbook-base-url on each command
tplus wd list --orderbook-base-url http://127.0.0.1:8000

CLI Deposits & Withdrawals

Full CLI reference for deposit and withdrawal subcommands and flags.

Settlement Guide

Learn how to settle T+ trades and finalize asset movement on-chain.