Bulk Order Creation

Reservoir's APIs support bulk order creation enabling developers to cross-post orders across multiple marketplaces with one common interface.

Here is an example of using the execute/list/v5 API with multiple tokens. Reference the API here: https://docs.reservoir.tools/reference/postexecutelistv5

curl --request POST \
     --url https://api.reservoir.tools/execute/list/v5 \
     --header 'accept: */*' \
     --header 'content-type: application/json' \
     --header 'x-api-key: demo-api-key' \
     --data '
{
  "params": [
    {
      "orderKind": "seaport-v1.4",
      "orderbook": "reservoir",
      "automatedRoyalties": true,
      "currency": "0x0000000000000000000000000000000000000000",
      "token": "0:8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63",
      "weiPrice": "1000000000000000000"
    },
    {
      "orderKind": "seaport-v1.4",
      "orderbook": "reservoir",
      "automatedRoyalties": true,
      "currency": "0x0000000000000000000000000000000000000000",
      "token": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
      "weiPrice": "2000000000000000000"
    },
    {
      "orderKind": "seaport-v1.4",
      "orderbook": "reservoir",
      "automatedRoyalties": true,
      "currency": "0x0000000000000000000000000000000000000000",
      "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "weiPrice": "3000000000000000000"
    }
  ],
  "maker": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c000000"
}

To further simplify this process, Reservoir SDK abstracts the complexities around steps management making it even easier to bring this functionality to your users.

Here is an example of using the SDK for bulk order creation. You can see the listToken here: (https://docs.reservoir.tools/docs/listtoken)

import { getClient, Execute } from "@reservoir0x/reservoir-sdk";
import { ethers } from "ethers";

...

address = "0x8ba1f109551bD432803012645Ac136ddd6000000"
signer = new ethers.VoidSigner(address, provider)

getClient()?.actions.listToken({
  listings: [
    {  
      token: "0:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",  
      weiPrice: 10000000000000000,  
      orderbook: "reservoir",  
      orderKind: "seaport",  
      expirationTime: 1667403808616  
    },
    {
      token: "0:0x5FbDB2315678afecb367f032d93F642f64180aa3",
      weiPrice: 20000000000000000,
      orderbook: "reservoir",
      orderKind: "seaport",
      expirationTime: 1667403808616
    },
    {
      token: "0:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      weiPrice: 30000000000000000,
      orderbook: "reservoir",
      orderKind: "seaport",
      expirationTime: 1667403808616
    }
  ],
  signer,
  onProgress: (steps: Execute['steps']) => {
    console.log(steps)
  }
})

πŸ“˜

API Docs: Create Bids and Listings

πŸ“˜

Quick Guide: Listing with Reservoir SDK