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}/actionWhen action is needed
The order's action field gives the reason:
action.reason | Description | Can continue |
|---|---|---|
RATE_MOVED | For a fixed-rate order, the market moved too far from the locked rate by the time payment arrived | Yes |
AMOUNT_MISMATCH | For a fixed-rate order, the amount paid differs from the order | Yes |
BELOW_MIN | The amount paid is below the minimum | No, refund only |
ABOVE_MAX | The amount paid is above the maximum | No, refund only |
Always check action.canContinue before offering CONTINUE.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | CONTINUE (swap at the current market price) or REFUND |
refundAddress | string | Depends | Refund address. Required for REFUND when the order has none |
refundMemo | string | No | Refund 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
| code | Description |
|---|---|
40000 | action is not CONTINUE or REFUND, or the refund address is missing |
42005 | Invalid refund address |
42011 | Order not found |
42012 | Not allowed in the current state (not ACTION_REQUIRED, or this reason can't continue) |
Need help with your integration? Contact support: [email protected]