TorqueTorque

Search docs

Search Torque documentation pages and sections

OpenAPI

Torque Platform v1 publishes an OpenAPI 3.1 document generated from the capabilities manifest and integrator schemas in the main repo. Use it for codegen, contract tests, or interactive exploration — domain guides still carry narrative context and execution flows.

Spec URLs

Live (recommended)https://app.torque.fi/api/v1/openapi

Built on each request — always matches production routes

Static JSONhttps://app.torque.fi/openapi/torque-v1.openapi.json

Checked into main repo; good for pinning in CI

Docs proxy (Swagger UI)/api/torque-v1-openapi

Same-origin copy for the explorer below — avoids browser CORS limits

curl -sS "https://app.torque.fi/api/v1/openapi" | jq '.info.title, .paths | keys | length'

Security schemes

businessApiKey

Header Authorization: Bearer sk_live_… — Intelligence, programmatic Assistant, Checkout, Business profile. See Authentication.

smartWalletJwt

RS256 session JWT from Torque auth — Actions and GET /api/v1/wallet/me. In-app issuance only; not available via API key.

Route coverage

Generated from capabilities-manifest.ts plus integrator schemas such as IntelligenceItemV1, AssistantChatPostBody, and TorqueV1Error.

TagRoutes
HealthGET /api/v1/health
CapabilitiesGET /api/v1/capabilities, GET /api/v1/openapi
BusinessGET /api/v1/business/me
WalletGET /api/v1/wallet/me
Intelligencefeed, trade-angles, happening-now, market-outlook, brief
OpportunitiesGET /api/v1/opportunities/yield, GET /api/v1/opportunities/lending
AssistantPOST /api/v1/assistant/chat (+ stream, 402 credits)
Actionstrade, transfer, lend, borrow v1 POST routes

Interactive explorer

Browse paths and schemas below. The explorer loads the spec through a same-origin proxy (/api/torque-v1-openapi) because app.torque.fi does not send CORS headers on the live OpenAPI route — browser-based tools on other origins (e.g. petstore.swagger.io) cannot fetch it directly. CLI tools like curl and openapi-typescript are unaffected.

Codegen and type sync

Point your OpenAPI client generator at the live or static URL. In the monorepo, run yarn openapi:generate then codegen into @torquefi/types — see the pipeline sketch below.

# Integrator-side (any repo)
npx openapi-typescript "https://app.torque.fi/api/v1/openapi" -o ./torque-v1.d.ts

# Main repo (planned — packages/@torquefi/types)
yarn openapi:generate
yarn workspace @torque/types openapi:types

CI should fail if public/openapi/torque-v1.openapi.json or generated types drift after a manifest change. Hand-curated types (Assistant tool payloads, SDK client ergonomics) stay alongside generated HTTP shapes.

Related

API Overview — surface map and integration profiles. API Reference — endpoint index, rate limits, and links to domain guides.

Was this helpful?