Skip to main content

What is TIM

The Trading API is built on TIM (Trading Intent Model) — a protocol for expressing trading strategies as structured intents. You submit an intent, and TIM validates it, resolves tokens, and executes the trade on-chain. A single tool call (execute_intent) covers all trading operations: immediate swaps, event-triggered rules, exit strategies, and position management.

Intent types

TIM supports three intent types:
TypeBehavior
IMMEDIATEExecute an on-chain swap now
CONDITIONAL_ENTRYRegister an event-triggered rule that fires when conditions match
CLOSE_POSITIONClose an existing position by position_id
IMMEDIATE intents execute and return a transaction hash. CONDITIONAL_ENTRY intents register a rule and return a rule_id — the rule stays active and triggers on each matching event until cancelled. CLOSE_POSITION cancels exit orders and returns realized PnL.

Supported chains

TIM uses CAIP-2 chain identifiers:
ChainCAIP-2 ID
Solanasolana:mainnet-beta
Ethereumeip155:1
BSCeip155:56
Baseeip155:8453
Arbitrumeip155:42161

Supported DEXes

Solana: Jupiter, Raydium, PumpFun, Orca, Meteora DLMM, Bonk Launchpad EVM (via RelayerRouter): Uniswap, Aerodrome, Sushiswap TIM selects the best route automatically based on liquidity and price impact.

Exit strategies

You can attach take-profit and stop-loss conditions to any IMMEDIATE buy intent:
  • profit_percent — sell when PnL reaches +X%
  • loss_percent — sell when PnL reaches -X%
  • Combine with OR logic (either condition triggers) or AND logic (both must be true)
When an exit strategy is configured, TIM creates a tracked position and monitors it until an exit condition fires or you close it manually.

Token resolution

TIM has built-in symbol-to-address resolution. You do not need to look up contract addresses before submitting intents:
  1. If you provide a contract address, TIM uses it directly
  2. For common tokens (SOL, USDC, USDT, ETH, BNB), TIM uses known addresses
  3. For other tokens, provide the symbol and TIM resolves it
You can also use the GET /api/v1/tokens/resolve endpoint to resolve tokens explicitly.

AIUSD integration

TIM connects to the AIUSD ledger for funding. When you trade using your AIUSD balance, the platform moves funds from the ledger into your trading account before execution. See the architecture page for how this flow works.
AIUSD can only be converted to stablecoins (USDC, USDT, USD1). To buy non-stablecoins with AIUSD, first convert AIUSD to USDC, then swap USDC for the target token.

How it fits together

You can reach TIM through two paths:
  • MCP Hub — call genalpha_tim_execute_intent via the MCP Hub API. Best for AI agents using MCP tool calling.
  • HTTP API — call POST /api/v1/execute-intent directly. Best for custom integrations and programmatic access.
Both paths accept the same XML intent format and return the same response structure.

Next steps

Intent format

XML schema, intent types, buy/sell semantics, and examples

HTTP API reference

Endpoints, authentication, request/response schemas