I tried a ton of different ways, also suggested in other topics, I tried to simply fetch the token price of a contract address, but I get an error of json parsing.
Here is my code:
const Moralis = require('moralis/node');
Moralis.initialize("LpEXpjpFgexv51r2nGym46XAdmMf8WeSJLqxEDj4");
Moralis.serverURL = "https://6kfhdlrelof3.moralishost.com:2053/server"
const options = {
chain: "eth",
address: "0x095418A82BC2439703b69fbE1210824F2247D77c"
};
const price = Moralis.Web3API.token.getTokenPrice(options);
What I tried:
1 I used only the first 3 rows (initialization), and the code doesn’t raise an error, just exits with code 0.
2 I put the code into a function like in other examples (so that I could use the async/await structure), but didn’t work
3 I tried other sdk commands, but same results
What am I doing wrong?
Thank you for the help in advance