Machine-native surface

Swap Plans

VeTrade is a VeChain DEX aggregator for quotes, executable swap bundles, and limit-order workflows.

The canonical machine API is POST /v2/swap-plans. GET /v2/swap-plans returns machine-readable usage guidance for clients that want endpoint discovery before sending a JSON body.

Modes

  • quote_only: quote and route explanation only
  • wallet_bound: quote plus executable VeChain clauses for recipient

Request highlights

  • inputToken
  • outputToken
  • amountIn
  • recipient when mode = wallet_bound
  • routing.maxHops
  • routing.maxSplits
  • include.simulation

Response highlights

  • quote
  • routePlan
  • bundle
  • simulation
  • warnings

Quote-only example

{
  "mode": "quote_only",
  "inputToken": "0x0000000000000000000000000000000000000000",
  "outputToken": "0x45429a2255e7248e57fce99e7239aed3f84b7a53",
  "amountIn": "1000000000000000000",
  "slippageBps": 100
}

Endpoint discovery example

curl -X GET https://vetrade.vet/v2/swap-plans \
  -H 'accept: */*'

Wallet-bound example

{
  "mode": "wallet_bound",
  "inputToken": "0x0000000000000000000000000000000000000000",
  "outputToken": "0x45429a2255e7248e57fce99e7239aed3f84b7a53",
  "amountIn": "1000000000000000000",
  "recipient": "0x1111111111111111111111111111111111111111",
  "slippageBps": 100,
  "include": {
    "simulation": true
  }
}

OpenAI remote MCP note

Use the HTTP API when you want direct API integration. Use the MCP server when you want tool-based agent orchestration with the same contract semantics.

Safety boundary

The API prepares and validates bundles. It does not sign or execute them. If you want local execution from Codex, use the VeTrade skill with PRIVATE_KEY.