Skip to main content
Moving funds into and out of T+ involves both an off-chain component (the OMS / orderbook service) and an on-chain component (an EVM chain such as Arbitrum). The tplus deposit and tplus withdraw commands handle both sides. Deposits and the on-chain half of withdrawals require the [evm] extras package; the read-only and cancellation withdrawal subcommands work with the base install.
pip install "tpluspy[evm]"

Depositing tokens

The tplus deposit command approves and deposits an ERC-20 token into the T+ vault contract. It requires the [evm] extras and uses Ape under the hood for the on-chain transaction.
tplus deposit <token> --amount 1000000000000000000
Pass --wait to block until the transaction is confirmed before the command returns:
tplus deposit 0xtoken...@42161 --amount 1000000000000000000 --wait
--amount is expressed in the token’s smallest unit (wei for 18-decimal tokens). Use tplus decimals get <address> to look up the decimal count for any token.
The deposit command uses your configured --account (or TPLUS_ACCOUNT) as the signing account and reads the vault address from the clearing engine at --clearing-base-url.

Withdrawing funds

Withdrawals go through a two-step lifecycle: init signs and submits the withdrawal request to the OMS, and execute additionally polls for OMS approval and then submits the on-chain transaction. Both steps route through the OMS at --orderbook-base-url.

Step 1 — init

Submit the withdrawal request. This signs the request locally and sends it to the OMS. No on-chain transaction is sent at this point.
tplus withdraw init \
  --network arbitrum:mainnet:alchemy \
  --account my-ape-alias \
  --asset 0xtoken...@42161 \
  --amount 1000000 \
  --nonce 1 \
  --target 0xrecipient...
FlagDescription
--networkApe network specifier (e.g. arbitrum:mainnet:alchemy).
--accountApe account alias for the on-chain signer.
--assetAsset address in <address>@<chain-id> format.
--amountAmount to withdraw in base units.
--nonce NOptional withdrawal nonce. The OMS assigns one if omitted.
--target <addr>Optional on-chain recipient address. Defaults to the signing account’s address.

Step 2 — execute

Submit the on-chain withdrawal transaction once the OMS has approved the request. execute polls the OMS until approval arrives and then broadcasts the transaction:
tplus withdraw execute \
  --network arbitrum:mainnet:alchemy \
  --account my-ape-alias \
  --asset 0xtoken...@42161 \
  --amount 1000000 \
  --nonce 1 \
  --target 0xrecipient... \
  --poll-interval 2 \
  --poll-timeout 60
FlagDescription
--poll-interval NSeconds between OMS approval polls (default: 2).
--poll-timeout NMaximum seconds to wait for approval before aborting (default: 60).
Use tplus withdraw execute when you want a single command that handles both submission and on-chain settlement. Use tplus withdraw init when you want to decouple submission from execution — for example, to inspect the pending withdrawal first.

Reading and cancelling withdrawals

The following subcommands only need the OMS URL and do not require the [evm] extras:
# Cancel a pending withdrawal by asset and nonce
tplus wd cancel --asset 0xtoken... --nonce 1

# List pending and historical withdrawals
tplus wd list
tplus wd list --user <pubkey>

# Show approval signatures for a withdrawal
tplus wd signatures
tplus wd signatures --user <pubkey> --nonce 1
tplus wd is an alias for tplus withdraw, so both forms are interchangeable.

Managing withdrawal delay parameters

On-chain withdrawal-delay parameters control the minimum and maximum time the OMS enforces between a withdrawal request and its execution. These are set on the Registry contract and then ingested by the clearing engine.
# Set pending withdrawal-delay params on-chain and apply them immediately
tplus withdrawal params set \
  --min-delay 0 --max-delay 0 \
  --clamp 0 --clamp 1000000 \
  --value 0 --value 0 \
  --cap-floor 50000

# Defer application (set pending only, do not apply yet)
tplus withdrawal params set \
  --min-delay 300 --max-delay 3600 \
  --clamp 0 --clamp 5000000 \
  --value 0 --value 0 \
  --no-apply

# Trigger clearing engine ingestion of the on-chain params
tplus withdrawal params update-ce
tplus withdrawal params set requires the [evm] extras. tplus withdrawal params update-ce works with the base install and only requires a valid --clearing-base-url.