jup-ag / jupiter-quote-api-node

116 stars 36 forks source link

ReferenceError: fetch is not defined #24

Open volo723 opened 9 months ago

volo723 commented 9 months ago

npm install, npm test or start

image

installed node-fetch, @types/node-fetch.

But same error, How to fix this?

anhtuan96a8 commented 8 months ago

`const quoteResponse = await ( await fetch('https://quote-api.jup.ag/v6/quote?inputMint=So11111111111111111111111111111111111111112\ &outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\ &amount=100000000\ &slippageBps=50' ) ).json();

console.log(quoteResponse);`

{ error: 'Query parameter inputMint cannot be parsed: WrongSize' } what's wrong? i don't know why