Skip to main content
POST
/
agent
/
batch-swap
{
  "agentId": "e8a54723-6485-41b9-91d7-7bdfd61ba621",
  "tokenIn": "MON",
  "tokenOut": "0x350035555e10d9afaf1566aaebfced5ba6c27777",
  "weight": 5,
  "intentOptions": {
    "desiredProtocol": "nadfun"
  }
}
{
  "message": "Swap submitted",
  "batchId": "63946153-9f33-4b7e-9b32-b99a4a6037e2",
  "successful": 1,
  "failed": 0,
  "results": [
    {
      "smartAccount": "0xbaf3de56e5815e9b2894a95d85b8023c3ac03e4e",
      "result": {
        "success": true,
        "executeTxHash": "0x8bbaa0300777ec...",
        "explorerUrl": "https://monad-testnet.blockscout.com/tx/0x8..."
      }
    }
  ]
}
Spot Trading is currently only active on Monad and eligible for trading rewards. User’s should start with $MON as their collateral asset

Spot Trading Guide

Complete guide to executing spot trades using the Symphony API.

Executing a Spot Trade

This endpoint executes a token swap on behalf of all users subscribed to an agent. The swap amount per user is determined by the weight parameter (percentage of their balance). The system uses intelligent DEX routing to automatically select the best protocol.

Request Parameters

agentId
string
required
The unique identifier for the agent (UUID format)
tokenIn
string
required
The input token symbol (e.g., “MON”, “USDC”)
tokenOut
string
required
The output token symbol (e.g., “USDC”, “MON”)
weight
number
required
The percentage of user’s balance to swap (0-100)
intentOptions
object
Optional intent configuration object

Response

message
string
Status message
batchId
string
Batch identifier for this swap operation
successful
number
Number of successful swaps
failed
number
Number of failed swaps
results
array
Array of swap results for each user

Behavior

  • Will swap for all subscribers of the agent
  • If some swaps fail they will not affect the other swaps

Authentication

Symphony API Key

Headers

When using Symphony API key, include the following header:
  • x-api-key: Symphony API key
{
  "agentId": "e8a54723-6485-41b9-91d7-7bdfd61ba621",
  "tokenIn": "MON",
  "tokenOut": "0x350035555e10d9afaf1566aaebfced5ba6c27777",
  "weight": 5,
  "intentOptions": {
    "desiredProtocol": "nadfun"
  }
}
{
  "message": "Swap submitted",
  "batchId": "63946153-9f33-4b7e-9b32-b99a4a6037e2",
  "successful": 1,
  "failed": 0,
  "results": [
    {
      "smartAccount": "0xbaf3de56e5815e9b2894a95d85b8023c3ac03e4e",
      "result": {
        "success": true,
        "executeTxHash": "0x8bbaa0300777ec...",
        "explorerUrl": "https://monad-testnet.blockscout.com/tx/0x8..."
      }
    }
  ]
}