Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent

AI-powered DeFi agent interface — natural language to calldata

AI-powered DeFi agent chat

post

Natural language DeFi interface. Send a message describing a trading intent and receive unsigned swap calldata, position summaries, bridge transactions, or market analysis. The agent internally uses Kimi K2.7 Code for reasoning and tool calling.

Price: up to $0.10 USDC per request (x402 upto scheme, eip155:8453) — billed by actual inference cost, typical $0.003–$0.015

Supported operations (one per request):

  • Swap tokens via Uniswap v4 or 0x aggregator

  • Bridge tokens cross-chain via Across Protocol

  • Add/remove Uniswap v4 LP positions

  • Open/close GMX perpetual positions (Arbitrum)

  • Trade Hyperliquid perpetuals: deposit/withdraw USDC, limit orders, cancel (HyperEVM)

  • Stake/unstake GRG governance tokens

  • Deploy and fund Rigoblock smart pool vaults

  • Query vault NAV, token balances, active positions

  • Create/manage automated trading strategies

  • Schedule TWAP orders (time-weighted average price execution)

Execution modes:

  • manual (default): Returns unsigned calldata — operator signs and broadcasts

  • delegated: Agent wallet executes on-chain directly (requires operator auth + on-chain delegation)

Safety: Every transaction passes NAV shield (≤10% loss), Swap Shield (oracle price check), 7-point execution validation, and on-chain selector whitelist.

Authorizations
X-PaymentstringRequired

x402 payment header. Flow:

  1. Make the request without this header → receive 402 Payment Required and, for protected routes, a PAYMENT-REQUIRED header describing accepted payment requirements
  2. Create the x402 payment payload for USDC on Base (chain 8453), typically via @x402/core and the CDP facilitator at api.cdp.coinbase.com
  3. Retry the request with this header set to the encoded payment payload

Successful 2xx responses may include a PAYMENT-RESPONSE settlement receipt. See https://github.com/rigoblock/agentic-operator/blob/main/AGENTS.md for full integration.

Body
vaultAddressstringOptional

RigoBlock vault (smart pool) address for vault-scoped operations

Example: 0xYourVaultAddress
contextDocsstring[]Optional

Optional request-scoped context snippets (for example markdown excerpts) injected into the model prompt for this request.

chainstring · enumOptional

Target chain context

Default: basePossible values:
Responses
200

AI response with DeFi action or analysis

application/json
messagestringOptional

AI-generated response text

reasoningstringOptional

Reasoning trace from the model, when available.

modelsUsedstring[]Optional

Ordered list of model identifiers that contributed to this output.

finalModelstringOptional

Model that authored the final natural-language output (or 'tooling' when output is tool-native).

post/api/chat
POST /api/chat HTTP/1.1
Host: trader.rigoblock.com
X-Payment: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 108

{
  "messages": [
    {
      "role": "user",
      "content": "Swap 0.1 ETH for USDC on Base"
    }
  ],
  "vaultAddress": "0xYourVaultAddress"
}
{
  "message": "text",
  "reasoning": "text",
  "modelsUsed": [
    "text"
  ],
  "finalModel": "text",
  "action": {
    "type": "swap",
    "to": "text",
    "calldata": "text",
    "value": "text",
    "gasEstimate": "text"
  }
}

Last updated