v1

latestOpenAPI 3.0.12026-07-142791104.2 KB
Orders

Place order

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

post/openapi/v1/orders/post

Request body

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

Order Hash

exchangestring required

Order exchange

makerstring required

The order maker's wallet address

takerstring required

The order taker's wallet address

sideinteger required

Side of the order. 0 for buy orders and 1 for sell orders.

saleKindinteger required

Kind of sell order. 0 for standard order, 3 for bulk listings.

paymentTokenstring required

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

quantitystring required

The asset quantity of order.

basePricestring required

The base price is the total price of the order, minus the fees. For example: totalPrice = unitPrice * quantity. fees = totalPrice * (feeBps / 10000). basePrice = totalPrice - fees.

extrastring required

The lowest selling price for Dutch auctions or the reserve price for British auctions, differentiated by saleKine (price increase/decrease percentage), default is 0.

listingTimestring required

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

expirationTimestring required

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

noncestring required

nonce

hashNoncestring required

Hash Nonce

signatureTypeinteger required

Signature Type. 0 = EIP712 1 = PRESIGNED 2 = EIP712_BULK 3 = EIP712_1271 4 = EIP712_BULK_1271

vinteger required
rstring required
sstring required
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

{
  "chain": "eth",
  "hash": "0x0bf97dece3fc7c894a878c8856a1762dda499b1de3a80d0e568f705b4f14db78",
  "exchange": "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9",
  "maker": "0x90284230d4796d307f9cc4a8d139867bd749be61",
  "taker": "0x0000000000000000000000000000000000000000",
  "paymentToken": "0x0000000000000000000000000000000000000000",
  "quantity": "1",
  "basePrice": "120000000000000000",
  "extra": "0",
  "listingTime": "1617171954",
  "expirationTime": "1617172560",
  "metadata": {
    "asset": {
      "id": "65204180910293981306652535746150640085711429543479113152868139754483502546945",
      "address": "0xee45b41d1ac24e9a620169994deb22739f64f231"
    },
    "schema": "ERC1155"
  },
  "fees": [
    {
      "recipient": "0xee45b41d1ac24e9a620169994deb22739f64f231",
      "amount": "200000",
      "feeData": "0x"
    }
  ],
  "properties": [
    {
      "propertyValidator": "0xxxxxxxx",
      "propertyData": "0x"
    }
  ],
  "nonce": "10",
  "hashNonce": "0",
  "v": 27,
  "r": "0xa011a7c9d1c758b3d56aea9843d27e467f9b63c3e77ccde299a25797bdaa4d9f",
  "s": "0x0bf97dece3fc7c894a878c8856a1762dda499b1de3a80d0e568f705b4f14db78",
  "oracleSignature": 1
}

Response

OK

codeinteger

Error Code

msgstring

Error Message

messagestring

Example response

{
  "data": {
    "chain": "eth",
    "createTime": 1651667808,
    "expirationTime": 1652191800,
    "listingTime": 1651584703,
    "hash": "0xf490d07dd0d0f7e9037a2579acc55ed4009e5a7c6dbe5fe2d2f811598d1c8f62",
    "orderId": "974967556489302561",
    "exchange": "0x8D6022B8A421B08E9E4cEf45E46f1c83C85d402F",
    "maker": "0xea199722372dea9df458dbb56be7721af117a9bc",
    "taker": "0x0000000000000000000000000000000000000000",
    "side": 1,
    "paymentToken": "0x0000000000000000000000000000000000000000",
    "basePrice": "970000000000000000",
    "extra": "0",
    "quantity": 1,
    "nonce": "11111111",
    "hashNonce": "1",
    "assetContract": "0x5fecbbbaf9f3126043a48a35eb2eb8667d469d53",
    "assetTokenId": "177004",
    "schema": "ERC721",
    "properties": [
      {
        "propertyValidator": "0xxxxxxxx",
        "propertyData": "0x"
      }
    ],
    "fees": [
      {
        "recipient": "0xee45b41d1ac24e9a620169994deb22739f64f231",
        "amount": "200000",
        "feeData": "0x"
      }
    ],
    "v": 27,
    "r": "0xa011a7c9d1c758b3d56aea9843d27e467f9b63c3e77ccde299a25797bdaa4d9f",
    "s": "0x0bf97dece3fc7c894a878c8856a1762dda499b1de3a80d0e568f705b4f14db78"
  }
}
All 27 operations