1 inch network error 400 when using Swap in the Swagger section

Look at message on swap address it says “We cannot verify this contract”.

this is the Transaction Hash:
0x1da88b02d1432d19029cccd84878cda6ccd748c73b476a8c7cb1aa8104ffe839

it looks like the transaction executed, but it didn’t do a swap
from the transaction logs:

amount0In : 0
amount1In : 9536271
amount0Out : 16856874
amount1Out : 0

Maybe some parameters are not ok?

can you try to swap different coins like wbnb and USDC?

yes, i get the same result.

Can it be something in the API order?

async function fetchDexSwap() {

const allowance = await axios.get(`https://api.1inch.io/v5.0/56/approve/allowance?tokenAddress=${'0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d'}&walletAddress=${'0x2Ea31bdC2FF638b331f459930ab473433166E1ff'}`);



if (allowance.data.allowance === '0') {



  const approve = await axios.get(`https://api.1inch.io/v5.0/56/approve/transaction?tokenAddress=${'0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d'}`);



  setTxDetails(approve.data);

  console.log('not approved');

  return;

}

   

const tx = await axios.get(`https://api.1inch.io/v5.0/56/swap?fromTokenAddress=${'0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d'}&toTokenAddress=${'0x111111111117dc0aa78b770fa6a738034120c302'}&amount=${'1000000000000000000'}&fromAddress=${'0x2Ea31bdC2FF638b331f459930ab473433166E1ff'}&slippage=${'1'}`);



let decimals = Number(`1E${tokenTwo.decimals}`)

setTokenTwoAmount((Number(tx.data.toTokenAmount)/decimals).toFixed(2));

setTxDetails(tx.data.tx);

}

this is when i swap from USDC to BUSD. Can you explained why the BUSD is not display in to my wallet?

do you have that 1Inch token in your wallet now?

yes, here is a screenshot of my wallet.

it looks like somehow you received 1Inch tokens and not what you expected, maybe you can do something with those 1Inch tokens now

i need the DEX to work correctly.

it looks like here it was used

toTokenAddress=${'0x111111111117dc0aa78b770fa6a738034120c302'}

that could mean that it was specified to exchange to 1Inch token, this is what you wanted to do?

fixed i replace the code with template literals. but my custom token is not working but others like BUSD, 1inch, USDC ect.

That could be a different issue. Not every token works with 1 inch. There may be some requirements for the supported tokens.

so i need to list my token with them to be supported?

I don’t remember the rules, I think the the token has to have at least a specific liquidity value and I don’t know what else is required

i guess, im getting an error on 1inch exchange related to price impact.