VeTrade returns instructive error messages. The message explains what to change before retrying.
Common API error codes
INVALID_JSONINVALID_REQUESTINVALID_QUERYINVALID_ORDER_IDMETHOD_NOT_ALLOWEDUPSTREAM_ROUTER_ERRORUPSTREAM_LIMIT_ORDER_ERROR
Error envelope
{
"error": {
"code": "INVALID_REQUEST",
"message": "Correct the request body fields before retrying /v2/swap-plans.",
"action": "Update the listed fields and send the same request again.",
"details": {
"issues": [
{
"field": "recipient",
"message": "Provide recipient when mode is \"wallet_bound\" so the API can build clauses for a real wallet context."
}
]
},
"requestId": "REQUEST_ID",
"docsUrl": "https://vetrade.vet/developers/ai/overview"
}
}
Validation tip
When a request fails, inspect details.issues first. Those are the fields you need to correct before retrying.
This error envelope applies to:
/v2/swap-plans/v2/limit-order-plans/v2/limit-orders/v2/limit-orders/{orderId}