APIs & SDKs
Log In
APIs & SDKs

buildOrder

🚧 Understanding buildOrder

  • buildOrder allows you to build an order using the Seaport protocol as an alternative to seaport-js. At the moment, this only supports single NFT purchases. It takes the following path parameter:

    • chainId - integer.

    And the following body parameters:

    • fromAddress - string.
    • tokenAddress (contract) - string.
    • tokenId - string.
    • price - string (Wei).
    • currency (optional, ERC20 token) - string, 0x0000000000000000000000000000000000000000 by default.

Query example

const Axios = require("axios"); const projectUuId = 'Your Project Id'; const projectKey = 'Your Project Client Or Server Key'; const chainId = 5; // Goerli const baseUrl = 'https://api-market.particle.network'; const url = `${baseUrl}/chains/${chainId}/orders/build`; const fromAddress = '0x3E08c246D9AD2091c549E73D622A8C3c9d114fD7'; const tokenAddress = '0x8e6eec3901a6647cab90d061c5dda74c73d326ab'; const tokenId = '64'; const price = '1000000000'; // wei (async () => { const response = await axios.post(url, { fromAddress, tokenAddress, tokenId, price, }, { params: { projectUuid, projectKey, }, }); console.log(JSON.stringify(response.data)); })();
Path Params
integer
required
Query Params
params
object
required
Body Params
string
string
string
string
string
Response

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json