Skip to main content
GET /v2/order/detail and GET /v2/orders return the state of an order in the integer field orderStatus. Ramp orders (fiat_to_crypto and crypto_to_fiat) and global payment orders (fiat_to_fiat) use two different sets of codes.
Always read orderStatus together with orderType. Some codes mean different things in the two sets: 71 is “Cancelling” for a ramp order but “Pay-in cancelled” for a global payment order, and 72 is “Refunded” for a ramp order but “Payout cancelled” for a global payment order.

Ramp orders (fiat_to_crypto, crypto_to_fiat)

A new order created through the API normally starts in 10, 11, 31, 32 (crypto_to_fiat only) or 40. For a crypto_to_fiat order, if the crypto cannot be taken from your balance when the order is created, the create call still returns an orderId, but the order is already 70 (Cancelled) when you query it.
GET /v2/orders lists every order on your account for the requested orderType, not only orders you created through the API. Orders that VelaFi creates for your account (not through the API or the dashboard) can also show 20 (review rejected) or 30 (approved). Orders created through the API skip these two codes. When approved, they normally move from 10 to 31, 32 or 40; if the price has moved below VelaFi’s minimum rate by the time of approval, the order is cancelled instead (70, or 71 first as described above). A review rejection is reported as 80 (or 71 first, as described above).

How internal statuses are reported

VelaFi stores a few internal statuses that the API reports under another code. You never receive 0, 90, 91 or 92 for a ramp order:

Global payment orders (fiat_to_fiat)

How internal statuses are reported

Some internal statuses are reported under another code:

Filtering by status

GET /v2/orders accepts an orderStatus filter. 0 (the default) returns all statuses.
  • Ramp orders: filter by any code in the ramp table. 10, 70 and 80 also match the internal statuses reported under them, so the results match the orderStatus you see.
  • Global payment orders: the filter is applied to the stored status, not the reported one. 10, 11, 12, 60 and 72 match exactly. 41 and 51 can also return orders reported as 31. Filtering by 31, 71 or 90 does not return exactly the orders reported with that code.

Webhooks

Webhook payloads use their own status mapping. For example, ramp orders in 80 or 81 are pushed as 70. See the webhook pages, for example the fiat/crypto order push, for the pushed values.