jup-ag / jupiter-quote-api-node

91 stars 32 forks source link

ReferenceError: fetch is not defined #24

Open volo723 opened 6 months ago

volo723 commented 6 months ago

npm install, npm test or start

image

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

But same error, How to fix this?

anhtuan96a8 commented 5 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