With one call multiple price contracts (REACT)

Hi gentlemen, Iโ€™m new
i am building a dapp to display different prices of different tokens per layer.
how do i download multiple contracts with one call?
i use this code:

import React from 'react';
import axios from 'axios';

const istanza=axios.create({
    headers: {
        'accept': 'application/json',
        'X-API-Key': 'xxx'


export default istanza;


import React, {useState, useEffect} from 'react';
import istanza from './api';

const Valuetoken = () => {
  useEffect(() =>{
    async function price(){
      try {
    const response=await istanza.get('')
    console.log('RESPONSE', response)
      } catch (err){console.log(err) }
  }, [])

  return (

export default Valuetoken

sorry for my bad english.

This url is specific to a single token.
You can look into https://docs.moralis.io/moralis-dapp/web3-api/token#gettokenprice where you pass the options as the parameter to your Valuetoken function

Thanks for the reply.
I am a beginner and I have a hard time running that docs code

Are you looking to reuse your axios code? Your current baseURL is always going to use the same token as mentioned. You can do:

import axios from 'axios';

const istanza = axios.create({
  baseURL: `https://deep-index.moralis.io/api/v2/`,
  headers: {
    accept: 'application/json',
    'X-API-Key': 'xxx',

export default istanza;


const response = await istanza('erc20/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c/price?chain=0x38&exchange=pancakeswap-v2');

console.log('data', response.data);

If youโ€™re using the Moralis SDK, you can use that instead to make things easier (e.g. using Moralis.Web3API.token.getTokenPrice and passing in options).

Thanks for the reply,
I will tentatively fix it like this, if they donโ€™t bring out a new API.

const Valuetoken = () => {
  useEffect(() =>{
    async function price(token){
      try {
    const response=await istanza('erc20/'+ token +'/price?chain=0x38&exchange=pancakeswap-v2')
    console.log('RESP', response.data)
      } catch (err){console.log(err) }
  }, [])

I just want to avoid making all these calls to the Moralis server.