API reference

Exception orders

When an order's status is ACTION_REQUIRED, choose to continue at market price or refund.

POST/api/open/v1/orders/{orderNo}/action

When action is needed

The order's action field gives the reason:

action.reasonDescriptionCan continue
RATE_MOVEDFor a fixed-rate order, the market moved too far from the locked rate by the time payment arrivedYes
AMOUNT_MISMATCHFor a fixed-rate order, the amount paid differs from the orderYes
BELOW_MINThe amount paid is below the minimumNo, refund only
ABOVE_MAXThe amount paid is above the maximumNo, refund only

Always check action.canContinue before offering CONTINUE.

Parameters

ParameterTypeRequiredDescription
actionstringYesCONTINUE (swap at the current market price) or REFUND
refundAddressstringDependsRefund address. Required for REFUND when the order has none
refundMemostringNoRefund memo / tag
JSON
{ "action": "REFUND", "refundAddress": "TQrZ8tKfjEfHKAAT6vWZ7Bt7m9hEFLgGF1" }

Response

Returns the updated Order object.

Notes

  • We recommend letting your user decide: explain the reason and both options.
  • Refunds are returned to the refund address, minus the network fee.

Possible errors

codeDescription
40000action is not CONTINUE or REFUND, or the refund address is missing
42005Invalid refund address
42011Order not found
42012Not allowed in the current state (not ACTION_REQUIRED, or this reason can't continue)

Need help with your integration? Contact support: [email protected]