Skip to main content

Error response format

All errors follow the same envelope:

Common errors

A failed simulation is not an error status. POST /swap returns 200 with simulation.success: false and the failure detail in the body — check that field, not the HTTP status.

Handling errors in code

Simulation errors

When skipSimulation is false (default), the swap endpoint simulates the transaction before returning it. Check the simulation field in the response:

On-chain transaction errors

Even after a successful simulation, the transaction can fail on-chain if conditions change between simulation and confirmation.

Retry strategy

Last modified on August 31, 2026