On this page
API reference
Checkout quotes and fills
Request fresh purchase calldata and review spending limits for an operator marketplace.
POST /v1/collections/:chainId/:collection/purchases/quote#
Quote and simulate the selected NFT purchase from the buyer address. For a Seaport cart, pass each token and listing in the same order and review individual and aggregate caps.
Note. The shopper’s own wallet signs and sends any on-chain call. The server builds and checks the call. It never signs or sends one. For a marketplace listing quoted with source: "native", or included in a source: "seaport" cart, the returned calldata contains the maker’s signed order. A cart simulation does not reserve the NFTs. Review its expiry and exact limit before requesting a wallet action.
Path and query parameters#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
chainId |
integer | Yes | NFT chain ID. | — | 1 for this API. |
collection |
address | Yes | Selected Ethereum ERC-721 contract. | — | 20 bytes, 0x prefix. |
Request body#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
source |
string | Yes | Checkout source. | — | nftx, opensea, native, seaport. |
poolId |
string | No | Required for NFTX checkout. | — | v4 or v2-<id>. |
tokenIds |
array of decimal strings | Yes | Unique selected token IDs. Empty only for NFTX V2 random redemption. | — | Up to 20 in a Seaport cart and up to 10 otherwise. Individual routes can require one. |
random |
integer | No | Number of random V2 redemptions. Use empty tokenIds. | Off. | 1–10. |
orderHash |
hex string | No | Single listing hash for native or OpenSea. | — | 32 bytes. |
listings |
array | No | Required with source seaport. Each row has source (opensea or native), tokenId, orderHash and optional maxValueWei. |
— | 1–20 rows. |
buyer |
address | Yes | Buyer’s wallet. | — | Nonzero 20-byte wallet address. |
slippageBps |
integer | No | Permitted NFTX price movement in basis points. | 100 | 0–500. |
maxValueWei |
decimal string | No | Maximum reviewed total value. | Route quote cap. | — |
{
"source": "nftx",
"poolId": "v2-174",
"tokenIds": [
"4"
],
"buyer": "0x1111111111111111111111111111111111111111"
}Response fields#
| Field | Type | Meaning |
|---|---|---|
transaction |
object or null | An unsigned call with chainId, target to, calldata data and value. |
quotedValueWei, maximumValueWei, feeWei |
decimal strings | Quoted value, spending cap and marketplace fee. |
expiresAt |
integer | Quote expiry in Unix milliseconds. |
simulation |
object | Simulation result and block. |
label |
string | Readable purchase description. |
maximumFulfilled, included, skipped |
integer and arrays, Seaport cart only | Maximum fills and listings accepted or skipped during review. Simulation adds filled and skipped counts and a refund estimate. Check the NFT transfers in the final receipt. |
Cache. Cache-Control: no-store.
Limit. Chain reads, 60 per minute per visitor.
Errors#
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request |
A path, query or body field failed validation. |
| 404 | not_found |
The collection, feed or venue is unavailable on this site. |
| 429 | rate_limited |
The visitor limit was reached. Retry after 60 seconds. |
| 422 | unprocessable |
The current order, account or NFT did not pass the checks described above. |
| 502 | upstream_error |
A venue, chain read or simulation service could not return a usable result. |
| 503 | not_configured |
The required checkout or order setting is unavailable. |
| 503 | upstream_error |
The response referenced a contract that the Worker blocks. |
Example request#
curl \
-X POST \
-H 'Content-Type: application/json' \
--data '{"source":"nftx","poolId":"v2-174","tokenIds":["4"],"buyer":"0x1111111111111111111111111111111111111111"}' \
https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/purchases/quoteconst response = await fetch("https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/purchases/quote", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"source": "nftx", "poolId": "v2-174", "tokenIds": ["4"], "buyer": "0x1111111111111111111111111111111111111111"})
});
const result = await response.json();Example response#
{
"transaction": {
"chainId": 1,
"to": "0x0fc584529a2aefa997697fafacba5831fac0c22d",
"value": "843893248488183",
"data": "0x7fc8248400000000000000000000000000000000000000000000000000000000000000ae000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000001111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000009a09eec78998924c24b287f0576253ffa9e87c21"
},
"quotedValueWei": "835537869790280",
"maximumValueWei": "843893248488183",
"expiresAt": 1796384979450,
"simulation": {
"blockNumber": "26556592",
"ok": true
},
"feeWei": "0",
"label": "1 Space Pogger · NFTX V2"
}POST /v1/collections/:chainId/:collection/fills/native#
Build the low-level fill for one stored native listing. The server checks signed payout terms against current creator royalties. Use the purchase quote for actual-buyer simulation and a spending cap. A successful response encodes the maker’s order and signature into the fill calldata.
Note. The shopper’s own wallet signs and sends any on-chain call. The server builds and checks the call. It never signs or sends one.
Path and query parameters#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
chainId |
integer | Yes | NFT chain ID. | — | 1 for this API. |
collection |
address | Yes | Selected Ethereum ERC-721 contract. | — | 20 bytes, 0x prefix. |
Request body#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
orderHash |
hex string | Yes | Native listing hash. | — | 32 bytes. |
fulfiller |
address | Yes | Buyer receiving the NFT. | — | — |
{
"orderHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"fulfiller": "0x1111111111111111111111111111111111111111"
}Response fields#
| Field | Type | Meaning |
|---|---|---|
transaction |
object or null | An unsigned call with chainId, target to, calldata data and value. |
Cache. Cache-Control: no-store.
Limit. Chain reads, 60 per minute per visitor.
Errors#
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request |
A path, query or body field failed validation. |
| 404 | not_found |
The collection, feed or venue is unavailable on this site. |
| 429 | rate_limited |
The visitor limit was reached. Retry after 60 seconds. |
| 422 | unprocessable |
The current order, account or NFT did not pass the checks described above. |
| 502 | upstream_error |
A venue, chain read or simulation service could not return a usable result. |
| 503 | upstream_error |
The response referenced a contract that the Worker blocks. |
Example request#
curl \
-X POST \
-H 'Content-Type: application/json' \
--data '{"orderHash":"0x0000000000000000000000000000000000000000000000000000000000000000","fulfiller":"0x1111111111111111111111111111111111111111"}' \
https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/fills/nativeconst response = await fetch("https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/fills/native", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"orderHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "fulfiller": "0x1111111111111111111111111111111111111111"})
});
const result = await response.json();Example response#
{
"error": {
"type": "not_found",
"message": "No hub listing has that order hash.",
"param": "orderHash"
}
}