List an NFT on Polygon

The following tutorial is done in Python.

Step 1: Define parameters

import time
import json
import requests

# Reach out to us for a token: https://forms.gle/VyCZPCBi4ECVQJ4U8
api_token = "ask-us-for-a-token"

# Maker is willing to sell #200 of 0xc9F07b9B359fA16e1af9df6fAC5540FbDa658e8E for 10 MATIC
maker_address = "0x487bFB4e3A69cf34adddA893EEC6fDdEF19aDAfA"
nft_address = "0xeC6F34d2052D9Da956295F0Bf8034b2B900C9D54"
nft_id = "200"

# Purchase price is 10 MATIC (MATIC has 18 decimals)
purchase_price = str(int(10 * 1e18))

# Expires in 1 hour
expiry_epoch = int(time.time() + 3600)

# TODO: add real API domain below.
acilia_api_domain = "api.acilia.llc"

Step 2: Request listing call-data

Let's look at the data coming back from the API. Inline is an explanation of each field:

Most of the data in the API response is not actionable and is meant for the developer to do spot-checks. The listingInstructions contain transactions that can be submitted on-chain to perform the listing.

Step 3: Execute the call-data as the maker

Congratulations! your NFT was listed on-chain! You can now use the UID in the response to fill or cancel the listing!

Last updated