Pando Exchange Docs Build your marketplace
On this page

API reference

Preparing and accepting offers

Prepare, submit or review a Seaport offer for your collection.

POST /v1/collections/:chainId/:collection/offers/prepare#

Price an offer and return the next wallet step. The offer is paid in WETH. A single-token offer has quantity one.

Note. The offer maker’s wallet sends the WETH deposit or conduit allowance when required. Reprepare after each receipt. With funds and allowance present, the maker signs the Seaport EIP-712 order. The server never signs or sends.

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
buyer address Yes Buyer’s wallet. — Nonzero 20-byte wallet address.
priceWei decimal string Yes Positive price per NFT. — Within uint256.
durationSeconds integer No Order lifetime in seconds. 604800 3600–2592000.
scope object No kind is collection, token with tokenId, or tokens with traitType and traitValue. Collection. Trait names and values at most 200 characters. Trait preparation computes root and count.
quantity integer No Maximum fills at the per-NFT price. 1 1–20. Limited by the scope’s coverage.
json
{
  "buyer": "0x1111111111111111111111111111111111111111",
  "priceWei": "10000000000000000"
}

Response fields#

Field Type Meaning
route, exchange, scope, walletEnabled strings, object and boolean Order family, exchange, resolved applicability and wallet feature state.
amounts object Per-NFT price, quantity, total, fee rate and amount, royalty and reference token, seller amount, WETH balance and Unix-second expiry.
wrap object or null Unsigned ETH deposit to WETH with call fields and label.
orderHash hex string, optional Present when typed data is returned.
approval object or null Unsigned approval containing target, calldata, value and a human-readable label.
typedData object or null EIP-712 domain, types, primary type and message for the maker’s wallet.

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.
409 configuration_changed Marketplace settings changed during preparation or since signing. Prepare again.
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#

bash
curl \
  -X POST \
  -H 'Content-Type: application/json' \
  --data '{"buyer":"0x1111111111111111111111111111111111111111","priceWei":"10000000000000000"}' \
  https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/prepare
js
const response = await fetch("https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/prepare", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"buyer": "0x1111111111111111111111111111111111111111", "priceWei": "10000000000000000"})
});
const result = await response.json();

Example response#

json
{
  "route": "seaport",
  "exchange": "Seaport 1.6",
  "scope": {
    "kind": "collection"
  },
  "walletEnabled": true,
  "amounts": {
    "priceWei": "10000000000000000",
    "quantity": 1,
    "totalWei": "10000000000000000",
    "feeBps": 50,
    "feeWei": "50000000000000",
    "royaltyWei": "0",
    "royaltyRecipient": null,
    "royaltyTokenId": "1",
    "sellerWei": "9950000000000000",
    "expiration": 1796989739,
    "wethWei": "100000000000"
  },
  "wrap": {
    "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "data": "0xd0e30db0",
    "value": "0x2386db274a1800",
    "label": "Wrap 0.009999 ETH into WETH"
  },
  "approval": null,
  "typedData": null
}

POST /v1/collections/:chainId/:collection/offers/submit#

Check the signed offer, scope, funds, allowance, payout and simulated fill before putting it on the book. Success returns HTTP 201.

Note. Submit the offer maker’s signature of the prepared offer. The example uses placeholder order components and an all-zero signature. The server never signs or sends.

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
route string Yes Order family. — seaport.
scope object Yes Resolved scope returned by prepare. Include the same root and count for a trait. — —
order object Yes Seaport OrderComponents from typedData.message. Keep every field unchanged. — —
signature hex string Yes Signature returned by the maker’s wallet for the prepared order. — —
json
{
  "route": "seaport",
  "scope": {
    "kind": "collection"
  },
  "order": {
    "offerer": "0x1111111111111111111111111111111111111111",
    "zone": "0x0000000000000000000000000000000000000000",
    "offer": [
      {
        "itemType": 2,
        "token": "0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c",
        "identifierOrCriteria": "344",
        "startAmount": "1",
        "endAmount": "1"
      }
    ],
    "consideration": [
      {
        "itemType": 0,
        "token": "0x0000000000000000000000000000000000000000",
        "identifierOrCriteria": "0",
        "startAmount": "10000000000000000",
        "endAmount": "10000000000000000",
        "recipient": "0x1111111111111111111111111111111111111111"
      }
    ],
    "orderType": 0,
    "startTime": "1796384939",
    "endTime": "1796989739",
    "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "salt": "1",
    "conduitKey": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "counter": "0"
  },
  "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}

Response fields#

Field Type Meaning
id, orderHash, scope strings and object Book identity, Seaport hash and coverage.
priceWei, quantity, expiresAt, seq string and integers Per-item price, requested count, expiry in Unix seconds and book sequence.
amounts, admission objects Fee, royalty and net amounts and the admission check result.

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.
409 configuration_changed Marketplace settings changed during preparation or since signing. Prepare again.
413 invalid_request The Cloudflare order revision check refused an oversized submission.
503 upstream_error The response referenced a contract that the Worker blocks.

Example request#

bash
curl \
  -X POST \
  -H 'Content-Type: application/json' \
  --data '{"route":"seaport","scope":{"kind":"collection"},"order":{"offerer":"0x1111111111111111111111111111111111111111","zone":"0x0000000000000000000000000000000000000000","offer":[{"itemType":2,"token":"0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c","identifierOrCriteria":"344","startAmount":"1","endAmount":"1"}],"consideration":[{"itemType":0,"token":"0x0000000000000000000000000000000000000000","identifierOrCriteria":"0","startAmount":"10000000000000000","endAmount":"10000000000000000","recipient":"0x1111111111111111111111111111111111111111"}],"orderType":0,"startTime":"1796384939","endTime":"1796989739","zoneHash":"0x0000000000000000000000000000000000000000000000000000000000000000","salt":"1","conduitKey":"0x0000000000000000000000000000000000000000000000000000000000000000","counter":"0"},"signature":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}' \
  https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/submit
js
const response = await fetch("https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/submit", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"route": "seaport", "scope": {"kind": "collection"}, "order": {"offerer": "0x1111111111111111111111111111111111111111", "zone": "0x0000000000000000000000000000000000000000", "offer": [{"itemType": 2, "token": "0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c", "identifierOrCriteria": "344", "startAmount": "1", "endAmount": "1"}], "consideration": [{"itemType": 0, "token": "0x0000000000000000000000000000000000000000", "identifierOrCriteria": "0", "startAmount": "10000000000000000", "endAmount": "10000000000000000", "recipient": "0x1111111111111111111111111111111111111111"}], "orderType": 0, "startTime": "1796384939", "endTime": "1796989739", "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "salt": "1", "conduitKey": "0x0000000000000000000000000000000000000000000000000000000000000000", "counter": "0"}, "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"})
});
const result = await response.json();

Example response#

Not verified. This example is written from the response's schema and was not produced by a running site.

json
{
  "id": "native:0x1111111111111111111111111111111111111111111111111111111111111111",
  "scope": {
    "kind": "collection"
  },
  "orderHash": "0x1111111111111111111111111111111111111111111111111111111111111111",
  "quantity": 1,
  "priceWei": "10000000000000000",
  "expiresAt": 1796989739,
  "seq": 42,
  "amounts": {
    "feeWei": "0",
    "royaltyWei": "0",
    "royaltyRecipient": null,
    "sellerWei": "10000000000000000"
  },
  "admission": {
    "simulated": true,
    "block": "26556600",
    "taker": "0x2222222222222222222222222222222222222222",
    "tokenId": "344",
    "gasUsed": "149000"
  }
}

POST /v1/collections/:chainId/:collection/offers/:hash/accept#

Review a specific marketplace offer for a holder and NFT. The response contains the required approval or the simulated acceptance call. Successful fill calldata encodes the buyer’s signed offer.

Note. The holder’s wallet sends the required NFT approval or the Seaport acceptance. The server never signs or sends.

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.
hash hex string Yes Order hash without the venue prefix. — 32 bytes, 0x prefix.

Request body#

Name Type Required Meaning Default Limits
seller address Yes Holder’s wallet. — Nonzero 20-byte wallet address.
tokenId decimal string Yes NFT identifier. — Unsigned 256-bit integer unless specified.
json
{
  "seller": "0x1111111111111111111111111111111111111111",
  "tokenId": "344"
}

Response fields#

Field Type Meaning
amounts object Gross, fee and net amounts for the accepted NFT.
approval object or null Unsigned approval containing target, calldata, value and a human-readable label.
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#

bash
curl \
  -X POST \
  -H 'Content-Type: application/json' \
  --data '{"seller":"0x1111111111111111111111111111111111111111","tokenId":"344"}' \
  https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/0x0000000000000000000000000000000000000000000000000000000000000000/accept
js
const response = await fetch("https://marketplace.example/v1/collections/1/0x4a8b01e437c65fa8612e8b699266c0e0a98ff65c/offers/0x0000000000000000000000000000000000000000000000000000000000000000/accept", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"seller": "0x1111111111111111111111111111111111111111", "tokenId": "344"})
});
const result = await response.json();

Example response#

json
{
  "error": {
    "type": "unprocessable",
    "message": "That offer is no longer on the book."
  }
}

Pando Exchange is software published by Simple Things Ltd. Each marketplace made with it is run by its operator, in the operator's own account.