POST /open/v1/{network_id}/orders/sign

Retrieve all the information, including signatures, needed to fulfill a listing directly onchain.

Path parameters

  • network_id integer Required

    Chain ID.

    Value is 137.

application/json

Body

  • source integer Required

    Market source. -2: Dew, 0: OpenSea, 4: Tofu, 5: Element, 6: MagicEden, 7: OnePlanet, 8: Mooar

    Values are -2, 1, 4, 5, 6, 7, or 8.

  • order_hashes array[string] Required

    Should contain no more than 5 order_hashes for OpenSea listings. There are no limit for dew listings.

    At least 1 element.

Responses

  • 200 application/json

    Successful

    Hide response attributes Show response attributes object
    • code integer Required

      0: success, others: error

    • data array[object]
      Hide data attributes Show data attributes object
      • order_hash string Required
      • data object | null
        Hide data attributes Show data attributes object | null
        • signature string Required

          Signature of the signed type data represented by the parameters field.

        • parameters object Required
          Hide parameters attributes Show parameters attributes object
          • offerer string Required

            hex address which supplies all the items in the offer.

          • offer array[object] Required

            Array of items that may be transferred from the offerer's account.

            At least 1 but not more than 1 element.

            Hide offer attributes Show offer attributes object
            • itemType integer Required

              Must be 2

              Value is 2.

            • token string Required

              The item's token contract (with the null address used for native tokens) Token address

            • identifierOrCriteria integer Required

              The ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier.

            • startAmount integer Required

              The amount of the token in question that will be required should the order be fulfilled.

            • endAmount integer Required

              When endAmount differs from startAmount, the realized amount is calculated linearly based on the time elapsed since the order became active.

          • consideration array[object] Required

            Array of items which must be received by a recipient to fulfill the order. One of the consideration items must be the OpenSea marketplace fee.

            At least 1 element.

            Hide consideration attributes Show consideration attributes object
            • itemType integer Required

              0 - Native - Ether (or other native token for the given chain) 1 - ERC20

              Values are 0 or 1.

            • token string Required

              The item's token contract (with the null address used for native tokens)

            • identifierOrCriteria integer Required

              The ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier.

            • startAmount integer Required

              The amount of the token in question that will be required should the order be fulfilled.

            • endAmount integer Required

              When endAmount differs from startAmount, the realized amount is calculated linearly based on the time elapsed since the order became active.

            • recipient string Required

              The address which will receive the consideration item when the order is executed.

          • startTime integer Required

            The block timestamp at which the order becomes active.

          • endTime integer Required

            The block timestamp at which the order expires.

          • orderType integer Required

            The type of order, which determines how it can be executed. 0 = Full Open - No partial fills, anyone can execute Must be 0

            Value is 0.

          • zone string Required

            Use 0x0000000000000000000000000000000000000000.

            Value is 0x0000000000000000000000000000000000000000.

          • zoneHash string Required

            A value that will be supplied to the zone when fulfilling restricted orders that the zone can utilize when making a determination on whether to authorize the order. Most often this value will be the zero hash 0x0000000000000000000000000000000000000000000000000000000000000000.

          • salt string Required

            An arbitrary source of entropy for the order. When generating using Seaport.js generateRandomSalt(), the domain parameter has to be set to dew.

          • conduitKey string Required

            Use 0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000 for most collections, use 0xbf93ac7f6ed28340151d3f99a295e3728a7aeda3000000000000000000000000 for listing Dew Names.

          • totalOriginalConsiderationItems integer

            Size of the consideration array.

          • counter string Required

            Must match the current counter for the given offerer. If you are unsure of the current counter, it can be read from the contract on etherscan.

      • error string | null
    • total integer
  • 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}/orders/sign
curl \
 -X POST https://api.dewapi.com/open/v1/137/orders/sign \
 -H "X-API-Key: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"source":1,"order_hashes":["0x1234"]}'
Request example
{
  "source": 1,
  "order_hashes": [
    "0x1234"
  ]
}
Response examples (200)
{
  "code": 0,
  "data": [
    {
      "order_hash": "0x41a2753400f805db148079f60355df470aece45941a45cb96a25ab5d24e4c243",
      "data": {
        "signature": "0x1234",
        "parameters": {
          "offerer": "string",
          "offer": [
            {
              "itemType": 2,
              "token": "string",
              "identifierOrCriteria": 42,
              "startAmount": 42,
              "endAmount": 42
            }
          ],
          "consideration": [
            {
              "itemType": 0,
              "token": "string",
              "identifierOrCriteria": 42,
              "startAmount": 42,
              "endAmount": 42,
              "recipient": "string"
            }
          ],
          "startTime": 42,
          "endTime": 42,
          "orderType": 0,
          "zone": "0x0000000000000000000000000000000000000000",
          "zoneHash": "string",
          "salt": "string",
          "conduitKey": "string",
          "totalOriginalConsiderationItems": 42,
          "counter": "1"
        }
      },
      "error": "string"
    }
  ],
  "total": 0
}
Response examples (400)
{
  "code": 3000,
  "error": "this is an error message",
  "errors": [
    {
      "field": [
        "error message"
      ]
    }
  ]
}