Coinranking

FREEMIUM
(Ким) Coinranking | Оновлено 14 days ago | Finance
Популярність

9.9 / 10

Затримки

397ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

getting undefined data

Rapid account: Mayadihno
mayadihno
a year ago

while trying to fetch data from https://coinranking1.p.rapidapi.com i’m getting undefined in my console
Please kindly help me look into this
Thanks

here is my code
import { createApi, fetchBaseQuery } from “@reduxjs/toolkit/query/react”;

const cryptoApiHeaders = {
“X-RapidAPI-Key”: “1e7d8da8ebmsh0fbc641b9825874p1eacd4jsn6fbe01fb6b9b”,
“X-RapidAPI-Host”: “coinranking1.p.rapidapi.com”,
};

const baseUrl = “https://coinranking1.p.rapidapi.com”;

const createRequest = (url) => ({ url, headers: cryptoApiHeaders });

export const cryptoApi = createApi({
reducerPath: “cryptoApi”,
baseUrl: fetchBaseQuery({
baseUrl,
}),
endpoints: (builder) => ({
getCryptos: builder.query({
query: () => createRequest("/coins"),
}),
}),
});

export const { useGetCryptosQuery } = cryptoApi;

Rapid account: Lukecurry 85
lukecurry85 Commented 10 months ago

RECOVER YOUR SCAMMED BITCOIN WITH ULTIMATE HACKER JERRY.

Hello everyone, I was a victim of bitcoin scam, I saw a glamorous review showering praises and marketing an investment firm, I reached out to them on their terms of investments and invested $155,000 which I was promised to get my first 15% profit in weeks, when it was time to retire my profits, I got to know the company was bogus, they kept asking me to invest more and I ran out of patience then requested to have my money back, they refused to answer nor refund my funds, not until an old family friend introduced me to Ultimate Hacker Jerry, I reached out and after submitting my case, Ultimate Hacker Jerry was swift to action and within 36 hours I got back my funds with the due profit. I couldn’t contain the joy in me. I urge you guys to reach out to Ultimate Hacker Jerry on their support email:  (Ultimatehackerjerry@seznam.cz)   or WhatsAp  +1(520)2 827151  ).
don"t forget to mention Luke Curry Recommended you.

Rapid account: Lukecurry 85
lukecurry85 Commented 10 months ago

RECOVER YOUR SCAMMED BITCOIN WITH ULTIMATE HACKER JERRY.

Hello everyone, I was a victim of bitcoin scam, I saw a glamorous review showering praises and marketing an investment firm, I reached out to them on their terms of investments and invested $155,000 which I was promised to get my first 15% profit in weeks, when it was time to retire my profits, I got to know the company was bogus, they kept asking me to invest more and I ran out of patience then requested to have my money back, they refused to answer nor refund my funds, not until an old family friend introduced me to Ultimate Hacker Jerry, I reached out and after submitting my case, Ultimate Hacker Jerry was swift to action and within 36 hours I got back my funds with the due profit. I couldn’t contain the joy in me. I urge you guys to reach out to Ultimate Hacker Jerry on their support email:  (Ultimatehackerjerry@seznam.cz)   or WhatsAp  +1(520)2 827151  ).
don"t forget to mention Luke Curry Recommended you.

Rapid account: Lukecurry 85
lukecurry85 Commented 10 months ago

RECOVER YOUR SCAMMED BITCOIN WITH ULTIMATE HACKER JERRY.

Hello everyone, I was a victim of bitcoin scam, I saw a glamorous review showering praises and marketing an investment firm, I reached out to them on their terms of investments and invested $155,000 which I was promised to get my first 15% profit in weeks, when it was time to retire my profits, I got to know the company was bogus, they kept asking me to invest more and I ran out of patience then requested to have my money back, they refused to answer nor refund my funds, not until an old family friend introduced me to Ultimate Hacker Jerry, I reached out and after submitting my case, Ultimate Hacker Jerry was swift to action and within 36 hours I got back my funds with the due profit. I couldn’t contain the joy in me. I urge you guys to reach out to Ultimate Hacker Jerry on their support email:  (Ultimatehackerjerry@seznam.cz)   or WhatsAp  +1(520)2 827151  ).
don"t forget to mention Luke Curry Recommended you.

Rapid account: Lukecurry 85
lukecurry85 Commented 10 months ago

RECOVER YOUR SCAMMED BITCOIN WITH ULTIMATE HACKER JERRY.

Hello everyone, I was a victim of bitcoin scam, I saw a glamorous review showering praises and marketing an investment firm, I reached out to them on their terms of investments and invested $155,000 which I was promised to get my first 15% profit in weeks, when it was time to retire my profits, I got to know the company was bogus, they kept asking me to invest more and I ran out of patience then requested to have my money back, they refused to answer nor refund my funds, not until an old family friend introduced me to Ultimate Hacker Jerry, I reached out and after submitting my case, Ultimate Hacker Jerry was swift to action and within 36 hours I got back my funds with the due profit. I couldn’t contain the joy in me. I urge you guys to reach out to Ultimate Hacker Jerry on their support email:  (Ultimatehackerjerry@seznam.cz)   or WhatsAp  +1(520)2 827151  ).
don"t forget to mention Luke Curry Recommended you.

Rapid account: Coinranking
Coinranking Commented a year ago

The url you are using is correct, We’ve just tested it and it works.

The problem should be in the codebase.

But, if we check the react documentation (https://redux-toolkit.js.org/rtk-query/api/createApi)

We believe these changes needs to be made:

baseUrl: fetchBaseQuery({
baseUrl,
}),

into:
baseQuery: fetchBaseQuery({
baseUrl,
}),

We cant test it without setting up an entire react application, but we believe this can be solved by changing baseUrl into baseQuery at the right places.
Hope this helps.

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення