TorqueTorque

Search docs

Search Torque documentation pages & sections

Signals in Discord

Embed Torque desk trade angles in your Discord server or app. Poll the Intelligence API with your business key, or configure a push webhook in the developer portal. For creator-owned calls (reports, pod signals), see Creator Discord.

Prerequisites

  • Business API key (sk_live_…) from developers.torque.fi
  • signals capability on your key (Platform / Pro entitlements)
  • Discord incoming webhook URL per channel you want to feed (your bot posts there)

Poll Trade Angles

trade-angles.sh
export TORQUE_KEY="sk_live_…"

curl -sS "https://app.torque.fi/api/v1/intelligence/views/trade-angles" \
  -H "Authorization: Bearer $TORQUE_KEY" \
  | jq '.ideas[] | {id, symbols, bias, title, summary, actions}'

Full surface: Intelligence API. SDK: torque-intelligence getTradeAngles().

Sample Discord Worker

Run on a cron (e.g. every 10 minutes). Dedupe by idea.id so you do not repost the same angle.

discord-signals-worker.mjs
import { createTorqueIntelligenceFromEnv } from "torque-intelligence"

const DISCORD_WEBHOOK = process.env.DISCORD_WEBHOOK_URL
const SYMBOLS = new Set(["BTC", "NVDA", "ETH"])
const seen = new Set()

const ti = createTorqueIntelligenceFromEnv()
const { ideas } = await ti.getTradeAngles()

for (const idea of ideas) {
  const sym = idea.symbols?.[0]?.toUpperCase()
  if (!sym || !SYMBOLS.has(sym)) continue
  if (seen.has(idea.id)) continue
  seen.add(idea.id)

  const tradeAction = idea.actions?.find((a) => a.label?.toLowerCase().includes("buy") || a.label?.toLowerCase().includes("sell"))
  const tradeUrl = tradeAction?.href
    ? `https://app.torque.fi${tradeAction.href}`
    : undefined

  await fetch(DISCORD_WEBHOOK, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      embeds: [{
        title: `${sym} — ${idea.bias ?? "WATCH"}`,
        description: idea.summary ?? idea.title,
        footer: { text: "Torque desk" },
        ...(tradeUrl ? { url: tradeUrl } : {}),
      }],
      ...(tradeUrl ? {
        components: [{
          type: 1,
          components: [{ type: 2, style: 5, label: "Open Trade", url: tradeUrl }],
        }],
      } : {}),
    }),
  })
}

Push Webhooks

Configure a Signals webhook URL in portal Settings to receive desk.angle.published events when Torque posts a new desk angle (HMAC-signed, same scheme as deposit webhooks). Optional symbol filter limits which tickers you receive.

webhook-event.json
{
  "type": "desk.angle.published",
  "businessId": "…",
  "digestSlot": 291234,
  "timestamp": 1710000000000,
  "item": {
    "id": "desk_ETH_watch_…",
    "kind": "angle",
    "title": "…",
    "summary": "…",
    "symbols": ["ETH"],
    "bias": "Watch",
    "actions": [{ "label": "Buy ETH", "href": "/trade?buy=eth" }]
  }
}

Starter Template

See the developer portal Templates section → Signals Discord Bot (links to the intelligence-dashboard starter and this guide).

Questions or corrections? hello@torque.fi