Soheil.fi
Soheil RouterDocs
API reference

Errors

Every error is JSON with a code and a message you can show your users.

Shape

Error
{ "error": { "code": "NO_ROUTE", "message": "No route for this pair and amount right now." } }

Codes

New codes may be added: handle an unknown one by its HTTP status.

CodeHTTPMeaning
INVALID400A field is missing or wrong; the message says which.
UNAUTHORIZED401No key, or a wrong one.
KEY_DISABLED403Your key is switched off.
NOT_FOUND404No such endpoint.
METHOD_NOT_ALLOWED405The endpoint does not take this method.
UNSUPPORTED_CHAIN422The router is not on this network, or cannot reach toChainId from it yet.
NO_ROUTE422No route for this pair and amount right now.
RATE_LIMITED429Over your key's requests a minute; wait Retry-After seconds.
QUOTA_EXCEEDED429Your key's monthly requests are used up; Retry-After says when they start again.
INTERNAL500Something went wrong on our side; try again.
UPSTREAM502A network we read from did not answer; try again.
PAUSED503The contract on this network is paused.
NOT_READY503The contract on this network is not ready for trades yet.