TorqueTorque

Search docs

Search Torque documentation pages & sections

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

ChannelIntentsAuthCommit path
on_chainswap, transfer, lend, borrowSmart Wallet JWTPOST /execute/**
merchantpaysk_live_… + Business IDtorque-checkout SDK

Merchant Channel (Pay)

intentType: pay via torque-checkout. Fulfillment → webhooks.

ActionMethodPath / SDKNotes
Pay (merchant)SDKtorque-checkoutintentType pay; checkout session + buyer wallet_order
Order webhooksPOST/api/webhooks/order-updateMerchant fulfillment sync; sk_live_…

At a Glance (on_chain)

Base URLhttps://app.torque.fi/api/v1
AuthAuthorization: Bearer <smart_wallet_jwt>
Wallet identityGET /api/v1/accounts/wallet
Assistant linkPOST /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.

auth-header
Authorization: Bearer <smart_wallet_jwt>
Content-Type: application/json
Idempotency-Key: <uuid>   # optional, 24h replay on POST /execute/**

Endpoints

ActionMethodPathNotes
Trade (EVM)POST/api/v1/execute/tradesEnso swap; alias /actions/trade/swap
Trade (Solana)POST/api/v1/execute/trades/solanaJupiter Ultra; alias /actions/trade/swap/solana
Transfer (EVM)POST/api/v1/execute/transfers/evmEVM token or native; alias /actions/transfer/evm
Transfer (Solana)POST/api/v1/execute/transfers/solanaSPL or SOL; alias /actions/transfer/solana
Transfer (BTC)POST/api/v1/execute/transfers/btcCustodial send; alias /actions/transfer/btc
Lend (EVM)POST/api/v1/execute/lends/evmEnso delegate; alias /actions/lend/evm
Borrow (EVM)POST/api/v1/execute/borrows/evmEnso bundle; alias /actions/borrow/evm

Examples

Submit functionResults from Assistant or build bodies per OpenAPI (BuildEnsoSwapRouteBody, TransferEvmBody, etc.). Sender forced to JWT-linked wallet.

swap-evm.sh
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
  }'
transfer-evm.sh
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