TorqueTorque

Search docs

Search Torque documentation pages and sections

Actions API

Execute on-chain operations through versioned HTTP routes. All Actions require a smart wallet JWT — the server forces the sender to the wallet linked to the token. EVM routes use Enso; Solana spot uses Jupiter Ultra; Bitcoin sends are custodial from the user's Torque deposit.

At a glance

Base URLhttps://app.torque.fi/api/v1
AuthAuthorization: Bearer <smart_wallet_jwt>
Wallet identityGET /api/v1/wallet/me
Assistant linkfunctionResults from POST /api/v1/assistant/chat

Who this is for

Torque in-app clients and any flow where the end user has authenticated through Torque and holds a valid session JWT. Third-party integrators typically receive prepared transactions via Assistant API functionResults, then submit here after user confirmation.

Authentication

Smart wallet JWTs are issued when users sign in through Torque (email OTP or Google). There is no partner token-issuance API — see Authentication.

auth-header
Authorization: Bearer <smart_wallet_jwt>
Content-Type: application/json

Legacy parity: some routes accept authJWT as a query parameter. Prefer the Authorization header.

Endpoints

ActionMethodPathNotes
Trade (EVM)POST/api/v1/actions/trade/swapEnso swap; fromAddress forced to JWT wallet
Trade (Solana)POST/api/v1/actions/trade/swap/solanaJupiter Ultra; taker forced to JWT pubkey
Transfer (EVM)POST/api/v1/actions/transfer/evmEVM token or native transfer
Transfer (Solana)POST/api/v1/actions/transfer/solanaSPL or SOL transfer
Transfer (BTC)POST/api/v1/actions/transfer/btcCustodial send from Torque deposit
Lend (EVM)POST/api/v1/actions/lend/evmSupply or redeem via Enso delegate bundle
Borrow (EVM)POST/api/v1/actions/borrow/evmDeposit + borrow via Enso bundle
Stake (EVM)POST/api/v1/actions/stake/evmEVM staking action

Trade (EVM swap)

POST /api/v1/actions/trade/swap — body shape follows BuildEnsoSwapRouteBody (token addresses, amounts, chainId, slippage). The route builds an Enso swap; fromAddress is forced to the JWT-linked EVM wallet.

swap-evm.sh
curl -sS -X POST "https://app.torque.fi/api/v1/actions/trade/swap" \
  -H "Authorization: Bearer $WALLET_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 8453,
    "tokenIn": "0x…",
    "tokenOut": "0x…",
    "amountIn": "100000000",
    "slippageBps": 100
  }'

Trade (Solana)

POST /api/v1/actions/trade/swap/solana — Jupiter Ultra order flow. Taker pubkey is forced to the JWT-linked Solana wallet.

Transfer

Three routes by network. EVM body type: TransferEvmBody (recipient, token, amount, chainId). Solana and BTC bodies are validated inline in their route handlers.

transfer-evm.sh
curl -sS -X POST "https://app.torque.fi/api/v1/actions/transfer/evm" \
  -H "Authorization: Bearer $WALLET_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 8453,
    "recipient": "0x…",
    "token": "0x…",
    "amount": "1000000"
  }'
  • POST /api/v1/actions/transfer/solana — SPL or SOL
  • POST /api/v1/actions/transfer/btc — custodial send from Torque deposit

Lend & borrow

EVM supply/redeem and deposit+borrow via Enso delegate bundles. Bodies: LendEvmBody, BorrowEvmBody.

LendPOST /api/v1/actions/lend/evmSupply or redeem supported assets
BorrowPOST /api/v1/actions/borrow/evmBorrow against collateral
StakePOST /api/v1/actions/stake/evmEVM staking

Relationship to Assistant

When a user asks the assistant to trade or transfer, chat returns functionResults with requiresConfirmation: true and a prepared transaction object. After confirmation, the client submits the signed payload to the matching Actions route. Tool argument schemas (Zod) live in the assistant pipeline — integrators consume results through chat, not direct function calls.

Was this helpful?