Youtube Build A Web3 DEX | FULL COURSE

first off, i see allot of this question, and then it’s resolved but i can’t find a answer anywhere… So.i did the first part and still get the
code: ‘C0005’,
details: undefined,
[cause]: undefined

error… the code i try is the first call of the video…/** @format */

const express = require('express');
const Moralis = require('moralis').default;
const ethereumUtil = require('ethereumjs-util');
const app = express();
const cors = require('cors');
const port = 3001;


function isValidAddress(address) {
  return ethereumUtil.isValidAddress(address);

app.get('/tokenPrice', async (req, res) => {
  const { query } = req;

  if (!isValidAddress(query.addressOne) || !isValidAddress(query.addressTwo)) {
    return res.status(400).json({ error: 'Invalid Ethereum address' });

  try {
    const responseOne = await Moralis.EvmApi.token.getTokenPrice({
      address: query.addressOne,

    const responseTwo = await Moralis.EvmApi.token.getTokenPrice({
      address: query.addressTwo,


    return res.status(200).json({});
  } catch (error) {
    console.error('Moralis SDK Error:', error);
    return res.status(500).json({ error: 'Internal server error' });

  apiKey: process.env.MORALIS_KEY,
}).then(() => {
  app.listen(port, () => {
    console.log(`Listening for API Calls`);

I can’t see the solution anywhere

Error C0005 occurs when you have passed an invalid argument to the Moralis sdk functions. Can you check if the param values passed to the getTokenPrice function are correct?

Let me check it out…