Error: API Error 404: Not found. Full message was '{"success":false}'
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 }
Are you still having this issue?
Yes It gives me same error whenever I try to createSellOrder or getAsset and that is minted on our platform smart contract but listed on opensea i.e. not on opensea smart contract.
Are you still having this issue?
same error occured on createBuyOrder function when using paymentTokenAddress param.
It seems like API can't convert token from address.
@esteban-OpenSea Can you guide me what's the work around to handle this?
im facing the same issue as well , calling seaport.api.getAssets is working fine but seaport.api.getAsset on a specific asset returned 404. I tested the token id and contract address on the opensea api page it's working perfectly fine.
Is this happening with both testnet and mainnet?
Is this happening with both testnet and mainnet?
Hello, I have the same problem in testnet, could you help please?
It has to be said that there are many problems in the maintenance of opensea-js. It was the first time I had such a bad experience.
Facing the same issue. Can anyone help?
You have solutions ? Bug persist on testnet with last release of lib
Same issue here (tesntet)
Bump. Mainnet
same issue, did you guys able to find solution?
Solved my side by creating instance of OpenSeaSDK rather than OpenSeaPort. Though they both are same, I don't know why it's working. I'm using 4.0.12 of opensea-js
Solved my side by creating instance of
OpenSeaSDKrather thanOpenSeaPort. Though they both are same, I don't know why it's working. I'm using4.0.12ofopensea-js
could you share small piece of code or something mate? this would be really helpful
I made a class like this:
const opensea = require('opensea-js');
const Web3 = require('web3');
const HDWalletProvider = require('@truffle/hdwallet-provider');
class Opensea {
constructor({ network, privateKey, apiKey, rpcUrl, accountAddress } = {}) {
this.network = network;
this.privateKey = privateKey;
this.apiKey = apiKey;
this.rpcUrl = rpcUrl;
this.accountAddress = accountAddress;
// Wallet Provider
this.provider = new HDWalletProvider({
privateKeys: [this.privateKey],
providerOrUrl: this.rpcUrl,
addressIndex: 0,
});
this.web3 = new Web3(this.provider);
// Opensea API
const options = {
networkName: opensea.Network[this.network]
}
this.headers = {
accept: 'application/json'
}
if (this.network.toLowerCase() === 'main') {
options.apiKey = this.apiKey;
this.headers['X-API-KEY'] = this.apiKey;
}
this.seaport = new opensea.OpenSeaSDK(this.provider, options);
}
}
Solved my side by creating instance of
OpenSeaSDKrather thanOpenSeaPort. Though they both are same, I don't know why it's working. I'm using4.0.12ofopensea-jscould you share small piece of code or something mate? this would be really helpful
I made a class like this:
const opensea = require('opensea-js'); const Web3 = require('web3'); const HDWalletProvider = require('@truffle/hdwallet-provider'); class Opensea { constructor({ network, mnemonic, privateKey, apiKey, rpcUrl, accountAddress }) { this.network = network; this.mnemonic = mnemonic; this.privateKey = privateKey; this.apiKey = apiKey; this.rpcUrl = rpcUrl; this.accountAddress = accountAddress; // Wallet Provider this.provider = new HDWalletProvider({ // mnemonic: this.mnemonic, privateKeys: [this.privateKey], providerOrUrl: this.rpcUrl, addressIndex: 0, }); this.web3 = new Web3(this.provider); // Opensea API const options = { networkName: opensea.Network[this.network] } if (this.network.toLowerCase() === 'main') options.apiKey = this.apiKey; this.seaport = new opensea.OpenSeaSDK(this.provider, options); this.headers = { 'X-API-KEY': this.apiKey, accept: 'application/json' } if (this.network.toLowerCase() !== 'main') delete this.headers['X-API-KEY']; } }Solved my side by creating instance of
OpenSeaSDKrather thanOpenSeaPort. Though they both are same, I don't know why it's working. I'm using4.0.12ofopensea-jscould you share small piece of code or something mate? this would be really helpful
great thanks man :)
I made a class like this:
Solved my side by creating instance of
OpenSeaSDKrather thanOpenSeaPort. Though they both are same, I don't know why it's working. I'm using4.0.12ofopensea-jscould you share small piece of code or something mate? this would be really helpful
Hello, guys. Could you also share a call of the instance, please? I made it, but I still have the same result
import dotenv from 'dotenv';
dotenv.config();
import Web3 from 'web3';
import HDWalletProvider from "@truffle/hdwallet-provider";
import opensea from 'opensea-js';
//const { Network, opensea } = pkg;
class Opensea {
constructor({ network, mnemonic, privateKey, apiKey, rpcUrl, accountAddress }) {
this.network = network;
this.mnemonic = mnemonic;
this.privateKey = privateKey;
this.apiKey = apiKey;
this.rpcUrl = rpcUrl;
this.accountAddress = accountAddress;
console.log("Network= " + network + " Mnemonic= " + mnemonic + " PrivateKey= " + privateKey
+ " apiKey = " + apiKey + "rpcUrl= " + rpcUrl + " AccountAddress = " + accountAddress);
// Wallet Provider
this.provider = new HDWalletProvider({
//mnemonic: this.mnemonic,
privateKeys: [this.privateKey],
providerOrUrl: this.rpcUrl,
addressIndex: 0,
});
this.web3 = new Web3(this.provider);
const options = {
networkName: this.network,
apiKey: this.apiKey,
}
this.seaport = new opensea.OpenSeaSDK(this.provider, options);
}
}
const myOpenSea = new Opensea({
network: "main",
mnemonic: "myMnemonic",
privateKey: process.env.PRIVATE_KEY,
apiKey: process.env.OPENSEA_API_KEY,
rpcUrl: process.env.ALCHEMY_URL,
accountAddress: process.env.MY_WALLET,
});
const tokenId = 1844;
const collectionAddress = "0xe24e4d4535f504d6d7957356534e23b4e787289f";
const offerExpiration = 15;
const myWallet = process.env.MY_WALLET;
const offer = await myOpenSea.seaport.createBuyOrder({
asset: {
tokenId,
collectionAddress,
},
myWallet,
startAmount: 0.001,
}).then(function (offer) {
console.log(`Offer placed, expires in ${offerExpiration}min`);
}).catch(function (error) {
console.log('Offer failed', error);
});
myOpenSea.provider.engine.stop();
The result is
DEPRECATED: Please use providerUtils.standardizeOrThrow() instead
Offer failed Error: API Error 404: Not found. Full message was '{"success":false}'
at OpenSeaAPI.<anonymous> (/Users/slava/JavaProjects/js-parser/node_modules/opensea-js/lib/api.js:583:31)
at step (/Users/slava/JavaProjects/js-parser/node_modules/opensea-js/lib/api.js:63:23)
at Object.next (/Users/slava/JavaProjects/js-parser/node_modules/opensea-js/lib/api.js:44:53)
at fulfilled (/Users/slava/JavaProjects/js-parser/node_modules/opensea-js/lib/api.js:35:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
It's really a weird SDK 8))
Related on Stack Overflow: How can I solve 404 issue using the OpenSea JavaScript SDK?.
@vmnfts @dreygur @storyicon @alex-bormotov Guys, have you found a solution? I've been stuck on this issue for too long time 8))