I'm trying to List but i get: errors: ['We encountered an exception while processing your request. Please try again later.']
Ghijo1 opened this issue · 1 comments
Hello,
i'm trying to list an NFT but i get the following error when i call the OS API:
errors: [
'We encountered an exception while processing your request. Please try again later.'
]
This is my code. I hope that someone can help me:
`const Seaport = require("@opensea/seaport-js").Seaport;
const ethers = require("ethers").ethers;
const fetch = require("node-fetch")
// SECRETS
let key = 'MY OS API KEY';
let pk = 'MY WALLET PRIVATE KEY';
let publicKey = 'MY WALLET ADDRESS';
let provider = new ethers.providers.JsonRpcProvider( "https://eth-mainnet.g.alchemy.com/v2/MY ALCHEMY KEY");
let signer = new ethers.Wallet(pk, provider);
let seaport = new Seaport(signer,{seaportVersion:"1.4"});
let price = '0.179'
async function main(){
const { executeAllActions } = await seaport.createOrder(
{
orderType: 0,
zone: "0x004C00500000aD104D7DBd00e3ae0A5C00560C00",
allowPartialFill: false,
restrictedByZone: false,
startTime: Math.round(Date.now()).toString(),
endTime: Math.round(Date.now() / 1000 + 60 * 30).toString(),
zoneHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
offer: [
{
itemType: 3,
token: "0x3adf71d5fbb59e32730ceb8e6605af958a204e6b",
identifier: "8",
},
],
consideration: [
{
amount: ethers.utils.parseEther("0.178").toString(),
recipient: "MY WALLET ADDRESS",
},
],
fees: [
{
recipient: "0xcf3bc13c0f19b9549364cc5f4b7ea807b737c062",
basisPoints: 50
}
],
totalOriginalConsiderationItems: 2,
salt: Math.floor(Math.random() * 100_000).toString(),
conduitKey: "0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
counter: 0,
offerer: "MY WALLET ADDRESS"
}
);
const order = await executeAllActions();
console.log("ordine creato: "+JSON.stringify(order))
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
'X-API-KEY': 'MY OS API KEY'
},
body: JSON.stringify({
parameters: order["parameters"],
signature: order["signature"],
protocol_address: '0x00000000000001ad428e4906ae43d8f9852d0dd6'
})
};
fetch('https://api.opensea.io/v2/orders/ethereum/seaport/listings', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
}
main()`
Solved here: ProjectOpenSea/seaport-js#189 (comment)