v1

latestOpenAPI 3.0.12026-07-142791104.2 KB
Orders

Encode order by order id

Use this endpoint to generate the transaction calldata encoded for the taker and the order. The calldata includes the element oracle signature (valid for 1 hour) required to verify orders in the ElementEx contract.

post/openapi/v1/orders/encodeTradeDataByOrderId

Request body

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

Chain Name

takerstring required

Taker address

Example request

{
  "chain": "eth",
  "taker": "0x2177827dc49c7e89864d07853d1d65492c7a9327",
  "orderIdList": [
    {
      "orderId": "974967556489302561",
      "takeCount": 1,
      "tokenId": "Collection offer and traits offer must pass tokenId"
    }
  ]
}

Response

OK

codeinteger

Error Code

msgstring

Error Message

messagestring

Example response

{
  "data": {
    "to": "0x20F780A973856B93f63670377900C1d2a50a77c4",
    "data": "0x...",
    "value": "1000000000000000000",
    "flags": [
      true,
      false,
      true,
      true
    ]
  }
}