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 URL | https://app.torque.fi/api/v1 |
| Auth | Authorization: Bearer <smart_wallet_jwt> |
| Wallet identity | GET /api/v1/wallet/me |
| Assistant link | functionResults 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.
Authorization: Bearer <smart_wallet_jwt>
Content-Type: application/jsonLegacy parity: some routes accept authJWT as a query parameter. Prefer the Authorization header.
Endpoints
| Action | Method | Path | Notes |
|---|---|---|---|
| Trade (EVM) | POST | /api/v1/actions/trade/swap | Enso swap; fromAddress forced to JWT wallet |
| Trade (Solana) | POST | /api/v1/actions/trade/swap/solana | Jupiter Ultra; taker forced to JWT pubkey |
| Transfer (EVM) | POST | /api/v1/actions/transfer/evm | EVM token or native transfer |
| Transfer (Solana) | POST | /api/v1/actions/transfer/solana | SPL or SOL transfer |
| Transfer (BTC) | POST | /api/v1/actions/transfer/btc | Custodial send from Torque deposit |
| Lend (EVM) | POST | /api/v1/actions/lend/evm | Supply or redeem via Enso delegate bundle |
| Borrow (EVM) | POST | /api/v1/actions/borrow/evm | Deposit + borrow via Enso bundle |
| Stake (EVM) | POST | /api/v1/actions/stake/evm | EVM 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.
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.
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 SOLPOST /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.
| Lend | POST /api/v1/actions/lend/evm | Supply or redeem supported assets |
| Borrow | POST /api/v1/actions/borrow/evm | Borrow against collateral |
| Stake | POST /api/v1/actions/stake/evm | EVM 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.