TorqueTorque

Search docs

Search Torque documentation pages & sections

Assistant

DECIDE: chat → functionResults Connect & Execute. Example prompts for investors & traders: below. sk_live_… server-side (Authentication).

Key Rule

All inputs, regardless of modality, are transformed into a single decision output.

Any input mode
TextChatVoice

Same DECIDE pipeline for every modality

DECIDE

Intent → Financial Action draft

functionResults; no settlement

Execution Flow

Call

Server calls POST /assistant/chat with sk_live_… + wallet context

DECIDE
contentfunctionResults

Assistant returns one of two shapes

Read-only answer; prepared transactions

Confirm

Hosted confirm (/connect/execute) or Connect OAuth approval

EXECUTE

User signs & POSTs /execute/** with wallet or delegated JWT

Consumer prompt examples in the Examples section below.

API Reference

At a Glance

Preferred routePOST /api/v1/decide/assistant/chat
Legacy aliasPOST /api/v1/assistant/chat (same handler)
Auth (programmatic)Authorization: Bearer sk_live_…
Streaming?stream=true → SSE (text/event-stream)
Client executes txstrue: functionResults → Connect & Execute

Authentication

CallerRequirement
Programmatic / serverAuthorization: Bearer sk_live_… required
In-app browser (Torque origins)May call without business key
Free tier (wallet in context)20 messages / 30 days → 402 assistant_credits_exhausted

walletAddress preloads portfolio (Profile B). Do not call /assistant/functions; internal to chat.

Request Body

AssistantChatPostBody
{
  "messages": [
    { "role": "user", "content": "What is the price of ETH?" }
  ],
  "context": {
    "walletAddress": "0x…",
    "solanaWalletAddress": "…",
    "chainId": 8453,
    "localCurrency": "USD",
    "authJWT": "<smart_wallet_jwt>"
  },
  "conversationId": "optional-thread-id"
}

Required: messages. Context: walletAddress, chainId, authJWT for portfolio & tx drafts.

Product language: example user prompts use product buckets (USD, ETH) and a unified portfolio — not network names. End users do not pick Base vs Arbitrum; Torque routes automatically. Optional chainId in context is server routing metadata for integrators, not something to expose in end-user copy.

Response (JSON)

response.json
{
  "content": [
    { "type": "text", "text": "Here's the best route I found…" }
  ],
  "functionResults": [
    {
      "toolName": "swap_tokens",
      "result": {
        "success": true,
        "requiresConfirmation": true,
        "tokenIn": "USDC",
        "tokenOut": "ETH",
        "amountIn": "100",
        "chainId": 8453,
        "transaction": { … }
      }
    }
  ]
}

functionResults is omitted when empty. Torque resolves canonical write verbs (trade, transfer, schedule, …) from grounded user intent — often without a model tool round when required slots are already complete. Expanded payloads often use legacy toolName values such as swap_tokens. Read-only tools return answers in content only.

functionResults by Tool

toolNameKey Result Fields
trade (alias swap_tokens)spend, receive, amount → tokenIn, tokenOut, amountIn, transaction, …
transfer (alias transfer_tokens)asset, amount, recipient → token, amount, transaction
lend (alias lend_tokens)asset, amount, protocol → token, amount, transaction
borrow (alias borrow_tokens)collateral, borrow amounts, protocol, transaction
schedule (alias schedule_portfolio_recurring_buy)spendAsset, receiveAsset, amountUsdPerLeg, totalLegs, intervalSeconds, scheduleId, requiresConfirmation
read_portfolioUnified portfolio buckets; Profile B integrators only

Signable (tradetransferlendborrowbridgeschedulepayswap_tokenstransfer_tokenslend_tokensborrow_tokensbridge_tokens) set requiresConfirmation: true; hand off via Connect or submit with a wallet JWT on Connect & Execute. Advisory (read_portfolioread_marketread_ratesread_taperead_researchread_intelligenceread_planread_commerceget_portfolio_summaryget_yield_opportunitiesget_weatherget_perp_market_infoget_perp_positionscreate_market_scannerdisplay_data_table) return context in content only. Advisory tools also include weather (get_weather thesisCard), perps, market scanners, SEC research, and tables — see query examples.

Streaming

Append ?stream=true for Server-Sent Events.

Event TypePayload
delta{ text }: incremental assistant text
correction{ text }: full text replacement
done{ functionResults }: final tool payloads
error{ message }
(terminal)data: [DONE]
assistant-chat.sh
curl -sS -N -X POST "https://app.torque.fi/api/v1/assistant/chat?stream=true" \
  -H "Authorization: Bearer $TORQUE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{ "role": "user", "content": "Trade 100 USD for ETH" }],
    "context": { "walletAddress": "0x…", "chainId": 8453 }
  }'

Examples

Plain-language prompts → lookup, quote, or draft. Fund moves require confirmation. Full investor & trader catalog: query examples.

Track

  • “What's my net worth?”: total value and category breakdown
  • “Show my assets”: holdings by bucket with USD values
  • “What's the price of ETH?”: spot price and 24h change

Trade

  • “Trade 100 USD for ETH”: best route, output, and price impact
  • “Move 500 USD”: route, ETA, and fees — Torque routes automatically

Transfer

  • “Send 0.5 ETH to vitalik.eth”: drafted transfer ready to confirm
  • “Request 100 USD from alice@example.com”: payment request link
  • “Create an invoice for 250 USD”: shareable invoice for a client

Lend

  • “What are USD lending rates?”: current APYs across supported markets
  • “Lend 1000 USD”: supply draft at the best available rate
  • “Show my lending position”: supplied assets and accrued interest

Supported supply assets include USDC, USDT, DAI, ETH, and other markets listed in Assets. APYs are variable and depend on utilization.

Borrow

  • “Borrow 500 USD against my ETH”: draft loan against collateral
  • “What is my health factor?”: liquidation risk for open borrows
CollateralMax LTV
ETH80%
USDC85%
WBTC75%

Keep health factor above 1.0 to avoid liquidation. Below 1.5 warrants close monitoring.

Sample Conversation

You: Trade 100 USD for ETH

Assistant: Here's the best route I found.
  • You pay:     100 USD
  • You receive: ~0.0287 ETH
  • Price impact: 0.03%
  • Network fee:  sponsored
Confirm to send?

You: confirm

Assistant: Done. ~0.0287 ETH is in your portfolio.
Transaction: 0x4f2a…c19b

Query examples

Torque Intelligence runs in the app at app.torque.fi/assistant. Copy any prompt below — TI calls live tools for balances, quotes, weather, and news. Money moves only after you confirm.

Unified balance: end users do not pick networks in chat. Torque routes spend and settlement silently. Weather & commodities: Gulf / North Sea hubs return a structured thesis card with precedent episodes (Harvey, 2022 EU energy crisis) and futures legs.

Portfolio & balance

One unified balance across chains — no chain picker in chat.

Try askingWhat you get
What's my net worth?Total portfolio value and category breakdown.
Show my portfolioHoldings by bucket (USD, ETH, BTC, equities) with USD values.
How much USD do I have?Spendable unified USD sleeve across supported chains.
What's my biggest position?Largest holding by USD value with symbol and weight.
Am I too concentrated in tech?Allocation read vs your holdings; may suggest rebalance angles.

Prices & charts

Live marks and recent history — TI reads markets, it does not guess from memory.

Try askingWhat you get
What's the price of ETH?Spot price and 24h change.
BTC chart over the last monthRecent daily candles via price history.
How is NVDA doing today?Equity spot, change, and headline context when available.
Compare CL and BRENTOILWTI vs Brent marks — useful for spread / Gulf weather setups.
What's moving in crypto right now?Market movers list with symbols and direction.

Trade & swap

Pair swaps and portfolio-wide buys route automatically; you confirm before anything sends.

Try askingWhat you get
Trade 100 USD for ETHConfirm before sendBest route, estimated output, fees, and impact — then confirm to send.
Buy $50 of NVDA with my portfolioConfirm before sendPortfolio-wide spend plan when sell legs need consolidation.
Swap EUR to USDConfirm before sendCross-bucket pair quote on preferred settlement assets.
What's the quote to sell half my AAPL?Ownership-aware preview before you commit.

Futures, commodities & weather

Express macro and energy views via CL, BRENTOIL, NATGAS, GOLD, COPPER, and other perps.

Try askingWhat you get
Gulf storm thesis for crude — what would you trade?Weather thesis card: hub conditions, Harvey-style precedent, CL/BRENTOIL legs with marks and sizing hint.
North Sea cold snap — thesis for BRENTOIL vs CLStructured card with EU winter precedents, spread notes, and futures deep links.
Show my futures positionsOpen perps with size, side, and PnL.
What's the funding rate on BTC perps?Futures market snapshot for the symbol.
Long NATGAS — size it against my bookConfirm before sendMark + NAV-based sizing suggestion; confirm before order submit.

Lend, borrow & yield

Rates across venues; supply and borrow drafts respect unified balance routing.

Try askingWhat you get
What are USD lending rates?APYs across supported EVM lending markets.
Lend 1,000 USDConfirm before sendBest-rate supply draft — confirm to deposit.
Where should I park idle USDC?Yield ideas matched to balances you actually hold.
Borrow 500 USD against my ETHConfirm before sendCollateralized borrow draft with health factor preview.
What's my health factor?Liquidation risk for open borrows.

Transfer, pay & invoice

Send value, request payment, or create shareable checkout links.

Try askingWhat you get
Send 0.1 ETH to vitalik.ethConfirm before sendTransfer draft resolved to address — confirm to send.
Send $25 to @aliceConfirm before sendTorque username / handle resolution when configured.
Create an invoice for 250 USDConfirm before sendShareable payment link for a client.
Request 100 USD from bob@example.comConfirm before sendPayment request the recipient can fulfill.

Markets, news & research

Headlines, filings, fundamentals, and screens — grounded in live tools.

Try askingWhat you get
Latest news on TeslaCompany headlines with sources.
What's the macro desk saying?Blended markets briefing.
AAPL revenue breakdown by segmentSegmented revenue from fundamentals tools.
What does Berkshire own?Investor holdings slug lookup (e.g. 13F-style lists).
Find stocks with P/E under 15Screener results you can drill into.
Summarize the latest 10-K risks for COINSEC filing fetch + focused read of the filing URL.

Macro & calendar

Catalysts, events, and historical pattern context.

Try askingWhat you get
What's on the economic calendar this week?FOMC, CPI, payrolls, and earnings windows.
How did BTC react to the last CPI print?Historical insight search — not guessed from memory.
Geopolitical headlines affecting oilIntel / news blend with energy angle.

Automations & scanners

Torque Pro: ongoing watches, DCA schedules, and signal-linked policies.

Try askingWhat you get
Notify me when BTC drops 5% in a dayMarket scanner setup; email confirmation when configured.
Set up a weekly $50 ETH buyConfirm before sendRecurring buy schedule — confirm once to activate.
When Torque signals sell BTC, de-risk 10% to USDConfirm before sendExecution policy tied to signals (Pro).
List my market scannersSaved filters and alert status.

Tables, models & strategies

Spreadsheet-style outputs with live portfolio data — not generic chat prose.

Try askingWhat you get
Build a portfolio risk table — concentration, 24h move, and flagsStructured data table rendered in chat after READ tools.
Compare lending rates across venues in a tableSide-by-side APY grid with sources.
Draft a 60/30/10 allocation strategy from my current bookCapital strategy artifact with target weights and next steps.
Executive summary of my portfolio for a board updateSectioned brief with metrics grounded in this turn's reads.

Help & discovery

Not sure where to start? Ask directly.

Try askingWhat you get
What can you do?Capabilities tailored to your connected wallet and page context.
Help me deploy idle cashYield + trade suggestions from actual balances.
What am I missing in my portfolio?Gap scan: yield left on table, concentration, catalysts.

Questions or corrections? hello@torque.fi