createBuyOrder API Error 404: Not found
Error: API Error 404: Not found. Full message was '{"success":false}'
does anyone have a clue?
same problem
I'm getting this with createSellOrder:
API Error 404: Not found. Full message was '{"success":false}'
Hey guys I've got this error, too, while calling createSellOrder.
After a little digging in, I found that it is (in my case) caused by some latency for OpenSea to fetch the asset's detail. So there is a workaround: put off the createSellOrder call until the asset is ready (we can check if the asset's ready with seaport.api.getAsset).
The workaround code is like this:
class {
async waitForOpenseaAssetReady(seaport: OpenSeaPort, tokenAddress: string, tokenId: string) {
while (true) {
try {
await seaport.api.getAsset({ tokenAddress, tokenId })
break // the asset is ready, exit the loop
} catch (e) {
// `API Error 404 ...` means asset not ready
if (!/API Error 404/.test(e + '')) throw e // If other errors found, that's not expected, just throw
await delay(5) // retry after 5 seconds
}
}
}
async createOpenseaOrder(nft: NFTItemWithContract, account: string, price: number) {
// prepare params...
await this.waitForOpenseaAssetReady(seaport, tokenAddress, tokenId)
return seaport.createSellOrder({ ... })
}
}
Hello, is everyone still having this issue? As a reminder, please use the latest version of the SDK and Node.
@esteban-OpenSea Could u plz link here the related PR, which is expected to solve this issue.
Getting this error on createSellOrder
Error: API Error 404: Not found. Full message was '{"success":false}'
const seaport = new OpenSeaPort(provider, { networkName: Network.Rinkeby, });
const listing = await seaport.createSellOrder({ asset: { tokenId, tokenAddress, }, quantity: 1, accountAddress, startAmount, expirationTime }); Log of object: { asset: { tokenId: '2252', tokenAddress: '0x230B03Af0e9917B89FDFECc4380E70c15371297b' }, quantity: 1, accountAddress: '0x1a7a4121d7527f9ccf538fa748a73455d8c5005a', startAmount: 0.5, expirationTime: 1650340141 }
Hey guys I've got this error, too, while calling
createSellOrder.After a little digging in, I found that it is (in my case) caused by some latency for OpenSea to fetch the asset's detail. So there is a workaround: put off the
createSellOrdercall until the asset is ready (we can check if the asset's ready withseaport.api.getAsset).The workaround code is like this:
class { async waitForOpenseaAssetReady(seaport: OpenSeaPort, tokenAddress: string, tokenId: string) { while (true) { try { await seaport.api.getAsset({ tokenAddress, tokenId }) break // the asset is ready, exit the loop } catch (e) { // `API Error 404 ...` means asset not ready if (!/API Error 404/.test(e + '')) throw e // If other errors found, that's not expected, just throw await delay(5) // retry after 5 seconds } } } async createOpenseaOrder(nft: NFTItemWithContract, account: string, price: number) { // prepare params... await this.waitForOpenseaAssetReady(seaport, tokenAddress, tokenId) return seaport.createSellOrder({ ... }) } }
@nighca I'm getting the same error on fetching asset await seaport.api.getAsset({ tokenAddress, tokenId })
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.