Discussions

Ask a Question
Back to All

Cors error

I am trying to hit token market history api from localhost, its giving CORS error.

Access to fetch at 'https://api.dev.dex.guru/v1/chain/137/tokens/0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619/market/history?begin_timestamp=1588723228' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Admin

Hello, sorry you are experiencing the issue. Could you provide more info. I see that api.dev.dex.guru allows all origins. I've just tried

const response = await fetch("https://api.dev.dex.guru/v1/chain/137/tokens/0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619/market/history?begin_timestamp=1588723228%22);

I'm getting HTTP401 (because it's missing api key) which is expected

ο»Ώ