v1

latestOpenAPI 3.0.12026-07-142791104.2 KB
Orders

Batch place order

This endpoint is used to batch create listings on the Element contract.It is recommended to use the Element SDK to signature order parameters and place listings order.<br><a href='https://element.readme.io/reference/sdk#making-listings'>Make Batch Listings</a>

post/openapi/v1/orders/postBatch

Request body

exchangestring required

Order exchange

makerstring required

The order maker's wallet address

paymentTokenstring required

The address of the smart contract of the payment token that is accepted or offered by the order, Native token is 0x0000000000000000000000000000000000000000

listingTimeinteger required

Listing Time, default value is the current time minus 60 seconds.

expirationTimeinteger required

Expiration Time, must be less than the current time plus 7,890,048 seconds (3 months).

startNonceinteger required

Start Nonce

hashNoncestring required

Hash Nonce

vinteger required
rstring required
sstring required
chain'eth' | 'bsc' | 'polygon' | 'avalanche' | 'arbitrum' | 'zksync' | 'linea' | 'starknet' | 'opbnb' | 'base' | 'scroll' | 'manta_pacific' | 'optimism' | 'mantle' | 'zkfair' | 'blast' | 'merlin' | 'mode' | 'cyber' | 'bob' | 'lightlink' | 'zeta' | 'nibiru' | 'abstract' | 'bitlayer' | 'mantra' | 'monad' | 'ink' required

Chain Name

hashstring required

Order Hash

platformFeeRecipientstring required

Platform fee address

oracleSignatureinteger required

When the order is matched in the smart contract, it will verify the off-chain oracle signature: 1-Verify (currently, only this type is accepted by Element), 0-Do not verify.

Example request

{
  "exchange": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
  "maker": "0x90284230d4796d307f9cc4a8d139867bd749be61",
  "paymentToken": "0x0000000000000000000000000000000000000000",
  "listingTime": 1617171954,
  "expirationTime": 1617172560,
  "startNonce": 10,
  "hashNonce": "0",
  "v": 27,
  "r": "0xa011a7c9d1c758b3d56aea9843d27e467f9b63c3e77ccde299a25797bdaa4d9f",
  "s": "0x0bf97dece3fc7c894a878c8856a1762dda499b1de3a80d0e568f705b4f14db78",
  "chain": "eth",
  "hash": "0x0bf97dece3fc7c894a878c8856a1762dda499b1de3a80d0e568f705b4f14db78",
  "platformFeeRecipient": "0x90284230d4796d307f9cc4a8d139867bd749be61",
  "oracleSignature": 1,
  "basicCollections": [
    {
      "nftAddress": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
      "platformFee": 200,
      "royaltyFeeRecipient": "0x90284230d4796d307f9cc4a8d139867bd749be61",
      "royaltyFee": 200,
      "items": [
        {
          "erc20TokenAmount": "2000000000000000000",
          "nftId": "9752"
        }
      ]
    }
  ],
  "collections": [
    {
      "nftAddress": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
      "platformFee": 200,
      "royaltyFeeRecipient": "0x90284230d4796d307f9cc4a8d139867bd749be61",
      "royaltyFee": 200,
      "items": [
        {
          "erc20TokenAmount": "2000000000000000000",
          "nftId": "9752"
        }
      ]
    }
  ]
}

Response

OK

codeinteger

Error Code

msgstring

Error Message

messagestring

Example response

{
  "data": {
    "successList": [
      {
        "assetContract": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
        "assetTokenId": "125",
        "errorDetail": "nonce is invalid",
        "orderId": "974967556489302561"
      }
    ],
    "failList": [
      {
        "assetContract": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
        "assetTokenId": "125",
        "errorDetail": "nonce is invalid",
        "orderId": "974967556489302561"
      }
    ]
  }
}