该接口用于挂单到欧易和其他市场
POST https://www.okx.com/api/v5/mktplace/nft/markets/create-listing
字段名 | 类型 | 是否必传 | 说明 |
---|---|---|---|
chain | String | 是 | 链名称,详情见已支持的网络 |
walletAddress | String | 是 | 挂单的钱包地址 |
collectionAddress | String | 是 | NFT 合约地址 |
tokenId | String | 是 | NFT 的 tokenId |
price | String | 是 | NFT 的价格,十进制的, 例子:2000000 是 2 |
currencyAddress | String | 是 | 挂单对应计价货币的合约地址,各条网络上的原生币如 eth,地址默认为 0x00000000000000000000 00000000000000000000 |
count | Integer | 是 | NFT 的数量,721 类型为 1 |
validTime | String | 是 | 挂单截止时间戳 (s),例子:2039-09-19 07:06:40 转换为时间戳后是 2200000000 |
platform | String | 是 | 目标挂单平台,详情见已经接入的市场 |
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": "polygon",
"walletAddress": "0x76e2da406db566f0e79764a2bf01b992997d0586",
"items" : [
{
"collectionAddress": "0xa5561b779c086d37a77d7b35e97ce75bb9193491",
"tokenId": "101837856840664764261208575168687881837850830083487668871567409609794568798800",
"price": "50000000",
"currencyAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
"count": 1,
"validTime":1748057424,
"platform": "okx"
}
]
}'
{
"code": 0,
"data": {
"errors": [],
"orders": [
{
"collectionAddress": "0xa5561b779c086d37a77d7b35e97ce75bb9193491",
"count": "1",
"currencyAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
"id": "a07b10bb8da04a9183cd0ca216126071",
"listingProfit": "",
"nftId": "27278971523568785",
"platform": "okx",
"platformFeePoints": null,
"price": "50000000",
"project": "",
"protocolFeePoints": null,
"royaltyFeePoints": null,
"source": 4,
"tokenId": "101837856840664764261208575168687881837850830083487668871567409609794568798800",
"validTime": 1748057424
}
],
"steps": [
{
"action": "ApprovalItems",
"items": [
{
"approvalAddress": "0x1e0049783f008a0085193e00003d00cd54003c71",
"chain": 137,
"collectionAddress": "0xa5561b779c086d37a77d7b35e97ce75bb9193491",
"description": "",
"kind": "nftApproval",
"orderIds": [
"a07b10bb8da04a9183cd0ca216126071"
],
"platform": {
"icon": "https://static.coinall.ltd/cdn/nft/1f4d2f3f-774c-4386-b8e1-52533d1af81d.webp",
"name": "OKX",
"source": 4
},
"platforms": [
{
"icon": "https://static.coinall.ltd/cdn/nft/1f4d2f3f-774c-4386-b8e1-52533d1af81d.webp",
"name": "OKX",
"source": 4
}
],
"status": "complete"
}
]
},
{
"action": "SignOrders",
"items": [
{
"data": {
"conduitKey": "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
"consideration": [
{
"endAmount": "49000000",
"identifierOrCriteria": "0",
"itemType": 1,
"recipient": "0x76e2da406db566f0e79764a2bf01b992997d0586",
"startAmount": "49000000",
"token": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
},
{
"endAmount": "1000000",
"identifierOrCriteria": "0",
"itemType": 1,
"recipient": "0xecd8c2d00b969fddbb06c2c6bec9a98a7d8dfb85",
"startAmount": "1000000",
"token": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
}
],
"counter": "0",
"endTime": "1748057424",
"offer": [
{
"endAmount": "1",
"identifierOrCriteria": "101837856840664764261208575168687881837850830083487668871567409609794568798800",
"itemType": 2,
"startAmount": "1",
"token": "0xa5561b779c086d37a77d7b35e97ce75bb9193491"
}
],
"offerer": "0x76e2da406db566f0e79764a2bf01b992997d0586",
"orderType": 2,
"salt": "0x000000000000000000000000000000000000000000000000eb1c8424e64a1eec",
"startTime": 1719209238,
"totalOriginalConsiderationItems": 2,
"zone": "0xdf2d4bffec010debd302674c9fb9cda99bb5e852",
"zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"description": "",
"domain": {
"chainId": 137,
"name": "Seaport",
"verifyingContract": "0x0000000000000068f116a894984e2db1123eb395",
"version": "1.6"
},
"kind": "signature",
"orderIds": [
"a07b10bb8da04a9183cd0ca216126071"
],
"platform": {
"icon": "https://static.coinall.ltd/cdn/nft/1f4d2f3f-774c-4386-b8e1-52533d1af81d.webp",
"name": "OKX",
"source": 4
},
"platforms": [
{
"icon": "https://static.coinall.ltd/cdn/nft/1f4d2f3f-774c-4386-b8e1-52533d1af81d.webp",
"name": "OKX",
"source": 4
}
],
"post": {
"body": {
"chain": 137,
"items": [
{
"collectionAddress": "0xa5561b779c086d37a77d7b35e97ce75bb9193491",
"count": "1",
"currencyAddress": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
"id": "a07b10bb8da04a9183cd0ca216126071",
"listingProfit": "",
"nftId": "27278971523568785",
"platform": "okx",
"platformFeePoints": null,
"price": "50000000",
"project": "",
"protocolFeePoints": null,
"royaltyFeePoints": null,
"source": 4,
"tokenId": "101837856840664764261208575168687881837850830083487668871567409609794568798800",
"validTime": 1748057424
}
],
"orderData": "",
"r": "",
"s": "",
"signature": "",
"walletAddress": "0x76e2da406db566f0e79764a2bf01b992997d0586"
},
"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": ""
}