Marketplace API
Create a listing

Create a listing#

This interface is used for listing on OKX and other markets.

Request address#

POST https://www.okx.com/api/v5/mktplace/nft/markets/create-listing

Request parameters#

  • Body param
ParameterTypeRequiredDescription
chainStringYesChain name refer to Supported blockchains for details
walletAddressStringYesWallet address for creating the listing
collectionAddressStringYesNFT contract address
tokenIdStringYesNFT tokenId
priceStringYesPrice of the NFT in decimal, example: 2000000 represents 2
currencyAddressStringYesContract address of the pricing currency, native coins like ETH, OKT, etc. on different networks default to “0x000000000000000000000
0000000000000000000”
countStringYesQuantity of NFT, 1 for ERC-721 type
validTimeStringYesListing expiration timestamp (s), example: 2039-09-19 07:06:40 converts to timestamp 2200000000
platformStringYesTarget listing platform, refer to Integrated markets

Request example#

shell
curl -X POST "https://www.okx.com/api/v5/mktplace/nft/markets/create-listing" \
     -H "Content-Type: application/json" \
     -H 'OK-ACCESS-KEY: XXX' \
     -H 'OK-ACCESS-TIMESTAMP: XXX' \
     -H 'OK-ACCESS-PASSPHRASE: XXX' \
     -H 'OK-ACCESS-SIGN: XXX' \
     -d '{
            "chain": "oktc",
            "orderHash": "0x",
            "parameters": {
                "conduitKey": "0x618Cf13c76c1FFC2168fC47c98453dCc6134F5c8888888888888888888888888",
                "consideration": [
                    {
                        "endAmount": "90090000000000000",
                        "identifierOrCriteria": "0",
                        "itemType": 0,
                        "recipient": "0x3aa48fc5f9d205531263381e69fd0457aa684b47",
                        "startAmount": "90090000000000000",
                        "token": "0x0000000000000000000000000000000000000000"
                    },
                    {
                        "endAmount": "8910000000000000",
                        "identifierOrCriteria": "0",
                        "itemType": 0,
                        "recipient": "0x3aa48fc5f9d205531263381e69fd0457aa684b47",
                        "startAmount": "8910000000000000",
                        "token": "0x0000000000000000000000000000000000000000"
                    }
                ],
                "counter": 0,
                "endTime": 1682493877,
                "offer": [
                    {
                        "endAmount": "1",
                        "identifierOrCriteria": "45990",
                        "itemType": 2,
                        "startAmount": "1",
                        "token": "0xf8b973fdf2e6f700a775aa94ff72180688b5a044"
                    }
                ],
                "offerer": "0x",
                "orderType": 2,
                "salt": "1462602105",
                "startTime": 0,
                "totalOriginalConsiderationItems": 1,
                "zone": "0x868B0635A8858dB9D984B5A27559f961Fd2736c0",
                "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
            },
            "signature": "0x"
         }'

Response example#

200
{
    "code": 0,
    "data": {
        "errors": [],
        "orders": [
            {
                "collectionAddress": "",
                "count": "1",
                "currencyAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "id": "9e28093f7b224ede8bdada1083b235e7",
                "nftId": "67303636459837",
                "platform": "okx",
                "price": "2000000",
                "project": "",
                "source": 4,
                "tokenId": "",
                "validTime": 1703140617
            }
        ],
        "steps": [
            {
                "action": "ApprovalCurrency",
                "items": [
                    {
                        "amount": "2000000",
                        "approvalAddress": "0x1e0049783f008a0085193e00003d00cd54003c71",
                        "chain": 1,
                        "currency": "USDC",
                        "currencyUrl": "https://static.coinall.ltd/cdn/explorer/okexchain/exchain_usdc.png",
                        "decimalNum": "",
                        "description": "",
                        "kind": "erc20Approval",
                        "orderIds": [
                            "9e28093f7b224ede8bdada1083b235e7"
                        ],
                        "platform": {
                            "icon": "https://static.coinall.ltd/cdn/nft/2ffcd699-3e14-4ac3-b6fc-e8e5369ab2fd.png",
                            "name": "OKX",
                            "source": 4
                        },
                        "platforms": [
                            {
                                "icon": "https://static.coinall.ltd/cdn/nft/2ffcd699-3e14-4ac3-b6fc-e8e5369ab2fd.png",
                                "name": "OKX",
                                "source": 4
                            }
                        ],
                        "status": "complete",
                        "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
                    }
                ]
            },
            {
                "action": "SignOrders",
                "items": [
                    {
                        "data": {
                            "conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
                            "consideration": [
                                {
                                    "endAmount": "1",
                                    "identifierOrCriteria": "3027",
                                    "itemType": 2,
                                    "recipient": "0xa03bb8d8099c994ed87361f5c9857e13fc7c5ccf",
                                    "startAmount": "1",
                                    "token": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
                                }
                            ],
                            "counter": "948892694796415917080870615203989852295",
                            "endTime": 1703140617,
                            "offer": [
                                {
                                    "endAmount": "2000000",
                                    "identifierOrCriteria": "0",
                                    "itemType": 1,
                                    "startAmount": "2000000",
                                    "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
                                }
                            ],
                            "offerer": "0xa03bb8d8099c994ed87361f5c9857e13fc7c5ccf",
                            "orderType": 0,
                            "salt": "0x0000000000000000000000000000000000000000000000003eb1648a930dc6cd",
                            "startTime": 1700548617,
                            "totalOriginalConsiderationItems": 1,
                            "zone": "0x0000000000000000000000000000000000000000",
                            "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
                        },
                        "description": "",
                        "domain": {
                            "chainId": 1,
                            "name": "Seaport",
                            "verifyingContract": "0x00000000000000adc04c56bf30ac9d3c0aaf14dc",
                            "version": "1.5"
                        },
                        "kind": "signature",
                        "orderIds": [
                            "9e28093f7b224ede8bdada1083b235e7"
                        ],
                        "platform": {
                            "icon": "https://static.coinall.ltd/cdn/nft/2ffcd699-3e14-4ac3-b6fc-e8e5369ab2fd.png",
                            "name": "OKX",
                            "source": 4
                        },
                        "platforms": [
                            {
                                "icon": "https://static.coinall.ltd/cdn/nft/2ffcd699-3e14-4ac3-b6fc-e8e5369ab2fd.png",
                                "name": "OKX",
                                "source": 4
                            }
                        ],
                        "post": {
                            "body": {
                                "chain": 1,
                                "items": [
                                    {
                                        "collectionAddress": "",
                                        "count": "1",
                                        "currencyAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                                        "id": "9e28093f7b224ede8bdada1083b235e7",
                                        "nftId": "67303636459837",
                                        "platform": "okx",
                                        "price": "2000000",
                                        "project": "",
                                        "source": 4,
                                        "tokenId": "",
                                        "validTime": 1703140617
                                    }
                                ],
                                "orderData": "",
                                "signature": "",
                                "walletAddress": "0xa03bb8d8099c994ed87361f5c9857e13fc7c5ccf"
                            },
                            "endpoint": "/priapi/v1/nft/trading/seaport/step/submitOrder",
                            "method": "post"
                        },
                        "primaryType": "OrderComponents",
                        "signKind": "eip712",
                        "status": "incomplete",
                        "types": {
                            "ConsiderationItem": [
                                {
                                    "name": "itemType",
                                    "type": "uint8"
                                },
                                {
                                    "name": "token",
                                    "type": "address"
                                },
                                {
                                    "name": "identifierOrCriteria",
                                    "type": "uint256"
                                },
                                {
                                    "name": "startAmount",
                                    "type": "uint256"
                                },
                                {
                                    "name": "endAmount",
                                    "type": "uint256"
                                },
                                {
                                    "name": "recipient",
                                    "type": "address"
                                }
                            ],
                            "OrderComponents": [
                                {
                                    "name": "offerer",
                                    "type": "address"
                                },
                                {
                                    "name": "zone",
                                    "type": "address"
                                },
                                {
                                    "name": "offer",
                                    "type": "OfferItem[]"
                                },
                                {
                                    "name": "consideration",
                                    "type": "ConsiderationItem[]"
                                },
                                {
                                    "name": "orderType",
                                    "type": "uint8"
                                },
                                {
                                    "name": "startTime",
                                    "type": "uint256"
                                },
                                {
                                    "name": "endTime",
                                    "type": "uint256"
                                },
                                {
                                    "name": "zoneHash",
                                    "type": "bytes32"
                                },
                                {
                                    "name": "salt",
                                    "type": "uint256"
                                },
                                {
                                    "name": "conduitKey",
                                    "type": "bytes32"
                                },
                                {
                                    "name": "counter",
                                    "type": "uint256"
                                }
                            ],
                            "EIP712Domain": [
                                {
                                    "name": "name",
                                    "type": "string"
                                },
                                {
                                    "name": "version",
                                    "type": "string"
                                },
                                {
                                    "name": "chainId",
                                    "type": "uint256"
                                },
                                {
                                    "name": "verifyingContract",
                                    "type": "address"
                                }
                            ],
                            "OfferItem": [
                                {
                                    "name": "itemType",
                                    "type": "uint8"
                                },
                                {
                                    "name": "token",
                                    "type": "address"
                                },
                                {
                                    "name": "identifierOrCriteria",
                                    "type": "uint256"
                                },
                                {
                                    "name": "startAmount",
                                    "type": "uint256"
                                },
                                {
                                    "name": "endAmount",
                                    "type": "uint256"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    },
    "msg": ""
}