POST /open/v1/{network_id}/offers/cancel

Cancel a offer(s) from the Dew marketplace. This is an off-chain cancel and others already obtained its signature would still be able to fulfill it. Cancelling on-chain is always recommended.

Path parameters

  • network_id integer Required

    Chain ID.

    Value is 137.

application/json

Body

  • signature string Required

    Signature of the hex(lower('order_hash:${order_hash}')) data.

  • order_hash string Required

    Unique hash of each order

  • offerer string Required

    Hex address which supplies all the items in the offer.

Responses

  • 200 application/json

    Successful

    Hide response attributes Show response attributes object
    • code integer Required

      0: success, others: error

    • data object
      Hide data attributes Show data attributes object
      • code integer Required

        0: success, others: error

      • order_hash string Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer Required

      0: success, others: error

    • error string | null Required
    • errors array[object] | null
POST /open/v1/{network_id}/offers/cancel
curl \
 -X POST https://api.dewapi.com/open/v1/137/offers/cancel \
 -H "X-API-Key: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"signature":"0x1234","order_hash":"0x1234","offerer":"0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434"}'
Request example
{
  "signature": "0x1234",
  "order_hash": "0x1234",
  "offerer": "0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434"
}
Response examples (200)
{
  "code": 0,
  "data": {
    "code": 0,
    "order_hash": "0x41a2753400f805db148079f60355df470aece45941a45cb96a25ab5d24e4c243"
  }
}
Response examples (400)
{
  "code": 3000,
  "error": "this is an error message",
  "errors": [
    {
      "field": [
        "error message"
      ]
    }
  ]
}