Cancel deals

POST/v1/orders/cancel

Calls off up to 100 of your deals at once, those of them that can be called off now, as cancel-deal would. The answer names them. If none could, the refusal says why the first could not.

Request

Request body

  • idsstring[]required

    The deals: those asked about, or in an answer those it changed.

curl -X POST 'https://api.rockvel.store/v1/orders/cancel' \
  -H "Authorization: Bearer $ROCKVEL_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"ids":["019a4c1e-6f3a-7c21-9d40-5b2e8f1a7c03"]}'

Answer 200

  • idsstring[]

    The deals: those asked about, or in an answer those it changed.

{ "ids": ["019a4c1e-6f3a-7c21-9d40-5b2e8f1a7c03"] }

Refusals

StatusCodeWhen
403not_your_orderThis deal isn't yours, or this step belongs to the other side.
404no_such_orderThere is no such deal.
409order_moved_onThe deal moved on and this step no longer applies. Read it again.
409too_earlyThe seller still has time: wait for buyer_cancels_at.
422too_many_lotsMore than 100 items in one request.

Any route can also answer with the statuses on the Errors page.