Connect & Execute
EXECUTE commits wallet_order. Third-party apps start with Connect OAuth for user consent, then call POST /execute/** with a delegated JWT. In-app wallets use a Smart Wallet JWT instead. Merchants use torque-checkout. Partner cash-out → cash-out and execute. Channel rules: Lifecycle.
Channels
| Channel | Intents | Auth | Commit path |
|---|---|---|---|
| on_chain | swap, transfer, lend, borrow | Smart Wallet JWT | POST /execute/** |
| merchant | pay | sk_live_… + Business ID | torque-checkout SDK |
Merchant Channel (Pay)
intentType: pay via torque-checkout. Fulfillment → webhooks.
| Action | Method | Path / SDK | Notes |
|---|---|---|---|
| Pay (merchant) | SDK | torque-checkout | intentType pay; checkout session + buyer wallet_order |
| Order webhooks | POST | /api/webhooks/order-update | Merchant fulfillment sync; sk_live_… |
At a Glance (on_chain)
| Base URL | https://app.torque.fi/api/v1 |
| Auth | Authorization: Bearer <smart_wallet_jwt> |
| Wallet identity | GET /api/v1/accounts/wallet |
| Assistant link | POST /api/v1/decide/assistant/chat |
User Consent and Execute (Profile C / D)
Connect is the v1 consent gate for smart wallets: your app starts authorize, the user approves scopes, you exchange the code for a delegated JWT, then call POST /execute/**. sk_live_… never signs user transactions. See Smart Wallets for the private-label model and roadmap.
- B:
POST /connect/confirm→/connect/execute - C: OAuth →
POST /connect/token→torque-actions
SDKs: torque-connect, torque-actions.
Authentication
Smart Wallet JWT on all on_chain routes (Authentication). Optional Idempotency-Key. See Execute Idempotency.
Authorization: Bearer <smart_wallet_jwt>
Content-Type: application/json
Idempotency-Key: <uuid> # optional, 24h replay on POST /execute/**Endpoints
| Action | Method | Path | Notes |
|---|---|---|---|
| Trade (EVM) | POST | /api/v1/execute/trades | Enso swap; alias /actions/trade/swap |
| Trade (Solana) | POST | /api/v1/execute/trades/solana | Jupiter Ultra; alias /actions/trade/swap/solana |
| Transfer (EVM) | POST | /api/v1/execute/transfers/evm | EVM token or native; alias /actions/transfer/evm |
| Transfer (Solana) | POST | /api/v1/execute/transfers/solana | SPL or SOL; alias /actions/transfer/solana |
| Transfer (BTC) | POST | /api/v1/execute/transfers/btc | Custodial send; alias /actions/transfer/btc |
| Lend (EVM) | POST | /api/v1/execute/lends/evm | Enso delegate; alias /actions/lend/evm |
| Borrow (EVM) | POST | /api/v1/execute/borrows/evm | Enso bundle; alias /actions/borrow/evm |
Examples
Submit functionResults from Assistant or build bodies per OpenAPI (BuildEnsoSwapRouteBody, TransferEvmBody, etc.). Sender forced to JWT-linked wallet.
curl -sS -X POST "https://app.torque.fi/api/v1/execute/trades" \
-H "Authorization: Bearer $WALLET_JWT" \
-H "Content-Type: application/json" \
-d '{
"chainId": 8453,
"tokenIn": "0x…",
"tokenOut": "0x…",
"amountIn": "100000000",
"slippageBps": 100
}'curl -sS -X POST "https://app.torque.fi/api/v1/execute/transfers/evm" \
-H "Authorization: Bearer $WALLET_JWT" \
-H "Content-Type: application/json" \
-d '{
"chainId": 8453,
"recipient": "0x…",
"token": "0x…",
"amount": "1000000"
}'Questions or corrections? hello@torque.fi