Skip to content

Errors

An invalid request returns 400 Bad Request with a plain text (text/plain) message, not JSON. Show the text to developers, not end users: it’s meant for debugging.

“No route found” is not an error: it’s 200 OK with an empty array.

Message Cause
Failed to deserialize query string: missing field `token_in` A required parameter is missing
Failed to deserialize query string: ... A parameter has the wrong format, for example an invalid token ID or account ID
Failed to deserialize query string: dexes: Invalid dex id: Foo Unknown or empty ID in dexes
Token in and token out must be different token_in equals token_out
Slippage must be between 0.00 and 1.00 Fixed slippage out of range
Min slippage must be between 0.00 and 1.00 Auto min_slippage out of range
Max slippage must be between 0.00 and 1.00 Auto max_slippage out of range
Max slippage must be greater than min slippage max_slippage < min_slippage
Max wait must be less than 60 seconds max_wait_ms over 60000

Over the WebSocket, the same messages come as { "id": ..., "error": "..." }.