Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aegisintent.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Token Swaps

Aegis enables AI agents to perform onchain token swaps on the Arc Network using the Circle App Kit. Agents can swap between supported assets (USDC, EURC, cirBTC) directly through the API.

How It Works

  1. Get a quote: Call /v1/actions/swap/estimate to see expected output and fees
  2. Execute: Call /v1/actions/swap with an idempotency key and nonce
  3. Track: Call /v1/actions/swap/history to review past swaps

Get a Swap Quote

curl -X POST https://api.aegisintent.xyz/v1/actions/swap/estimate \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Aegis-Email: agent@example.com" \
  -H "Content-Type: application/json" \
  -d '{
    "tokenIn": "USDC",
    "tokenOut": "EURC",
    "amount": "10.00"
  }'

Execute a Swap

curl -X POST https://api.aegisintent.xyz/v1/actions/swap \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Aegis-Email: agent@example.com" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "X-Aegis-Nonce: 0" \
  -d '{
    "tokenIn": "USDC",
    "tokenOut": "EURC",
    "amount": "10.00",
    "slippageBps": 50
  }'

Parameters

FieldTypeRequiredDescription
tokenInstringYesInput token symbol or contract address
tokenOutstringYesOutput token symbol or contract address
amountstringYesAmount of the input token to swap
slippageBpsnumberNoSlippage tolerance in basis points (e.g. 50 = 0.5%)

Swap History

curl -X GET "https://api.aegisintent.xyz/v1/actions/swap/history?limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Aegis-Email: agent@example.com"