Skip to main content
POST
/
api
/
sandbox
/
agents
/
{id}
/
trade
Simulate a developer-agent trade
curl --request POST \
  --url https://mcp.echozero.app/api/sandbox/agents/{id}/trade \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pair": "SOL/USDC",
  "amount": 100
}
'
{
  "success": true,
  "data": {
    "orderId": "<string>",
    "agentId": "<string>",
    "agent": "<string>",
    "pair": "<string>",
    "amount": 123,
    "price": 123,
    "estimatedUnits": 123,
    "status": "SIMULATED",
    "message": "<string>",
    "simulatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

User JWT access token issued by POST /api/auth/verify or POST /api/auth/social/verify. Routes that accept both auth modes declare api-key and bearer-jwt security schemes.

Headers

x-signature
string

HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD + path + body). Optional -- when omitted, HMAC verification is skipped.

x-timestamp
string

Request timestamp in epoch milliseconds. Required when x-signature is provided. Rejected if drift exceeds 5 minutes.

Path Parameters

id
string
required

Body

application/json
pair
string
required

Trading pair to simulate

Example:

"SOL/USDC"

amount
number
required

Notional amount in quote currency (typically USD/USDC)

Example:

100

action
enum<string>

Optional trade side. Defaults to BUY.

Available options:
BUY,
SELL

Response

Sandbox trade simulated.

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload