API documentation
Sign in

Trade error codes

The code values returned on RFS quote and order responses.

These are the code values carried on RFS quote and order responses over the WebSocket. They do not apply to the REST API, which reports failures as a resultCode on its own scale.

A code beginning RFS comes from the quoting and execution service, and one beginning PRE from the pre-deal checks that run before an order is accepted — limits, permissions and instrument availability.

Error frame

Sent as messageType: "error". It is the frame a code arrives in when the request has no response of its own to carry it.

It is almost entirely an order frame. Six of the eight paths that produce one only fire on an order request, and the price channel does not use it at all — a refused subscribe answers SubscribeResponse with success: false, and a refused unsubscribe answers nothing. See the price channel.

You will receive one when:

  • a messageType the gateway does not handle is sent — message is Unsupported message type and code is RFS500001
  • an order fails validation, carrying the validator's own code
  • an order is refused for per-session capacity, or throttled by the rate limit
  • an order carries a clientRequestId or sessionId that is too long or holds a control character
  • handling threw anywhere the gateway has no more specific answer
  • the connection fails to authenticate. This one carries message and nothing else, and the socket closes immediately after it

Correlation is best-effort, so match on what is present rather than expecting it. Which of clientRequestId, quoteId and transactionId are filled in depends on the path, and the generic handling failure fills in none of them. code itself is empty on the authentication frame, which is the one case where a code cannot be looked up below.

FieldTypeNotes
messageTypestringAlways error
messagestringHuman-readable detail. Where the source text contains %s, the offending value is substituted at the point of failure
clientRequestIdstringYour own reference from the order this answers, when the path that produced the frame had it to hand
codestringThe code, from the table below. Empty when the connection failed to authenticate
quoteIdstringThe quote from the order this answers, on the same terms
transactionIdstringThe order identifier, set on a capacity refusal and on a throttled order
chanIdstringThe connection the message was delivered on. Not set on the generic handling failure
timestampintegerWhen the gateway produced this message, in milliseconds

Codes

The message shown is the one the platform returns.

CodeMeaning
PRE200003This user not allowed to trade with passed currency pair
PRE200004User doesn't have enough prefunded funds to perform trade
PRE200005User doesn't have enough limit to perform trade
PRE200006Request-for-stream trading is not enabled for your site
PRE200029Per transaction limit exceeded
PRE200032Trade amount is less than the allowed
PRE200035Currency pair is currently disabled for trading
PRE200036Beneficiary wallet not found
PRE200037API key does not contain RSA public key for signed intent verification
PRE200038Signed intent verification failed
PRE200039Broker limit check failed. Please contact support
PRE200040Broker limit exceeded. Please contact support
PRE200061PSP limit is not available
PRE200062Insufficient PSP limit for a trade
PRE200063PSP trade limit not found
RFS100001An unexpected error. Retry, and contact support if it persists
RFS100002Trading is currently unavailable. Contact support
RFS100003Client subscription was not found for a given order request
RFS100004Instrument must not be empty
RFS100005Instrument %s is not valid
RFS100006Such a pair of currencies %s is unavailable
RFS100007Price %s is not valid
RFS100008Currency %s is not valid
RFS100009Quantity %s is not valid
RFS100010quoteId is required
RFS100011No corresponding price level for the request
RFS100012Some error occurred during the order request
RFS100013Some error occurred during the subscribe request
RFS100014Some error occurred during trade capture
RFS100015quoteId is not valid
RFS100016Your account groups could not be returned. This is also what you receive when you have none, so the two are indistinguishable — see reading account groups
RFS100017Client already has this subscription
RFS100018No price feed
RFS100019quoteId is Expired
RFS100020quoteId is owned by other user
RFS100021Tenor must not be empty
RFS100022Currency pair is disabled for trading
RFS100023Order could not complete due to breaching LP slippage limit
RFS100024Broker rejected the order
RFS100025Maximum allowed precision is %s decimal points
RFS100026Rate limit breached
RFS100027Per-session order capacity reached; retry once open orders resolve
RFS300001Pre-deal service is down
RFS400001Upstream provider not found
RFS500001The request could not be processed. Retry, and contact support if it persists
RFS600001Price no longer available, please use another quote
RFS600002Response for the order request was not retrieved
RFS600003Returned order status is unexpected
RFS600004Account group is empty or blank
RFS600006Beneficiary not found
RFS600007Beneficiary wallet not found
RFS600008Invalid network details provided
RFS600009Beneficiary trade request is not valid
RFS600010Network settings not found
RFS600011Beneficiary details not valid. %s
RFS600012Sender payin currency must be crypto
RFS600013Sender wallet not found
RFS600021Quote amount exceeded
RFS600031Order with this idempotency key already exists

We use cookies to improve your experience and analyse site traffic. Cookie policy