Fear and greed index

무료
분류별 Clark J | 업데이트됨 19 days ago | Finance
인기

9.9 / 10

지연 시간

313ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Seems to be down

Rapid account: Christophgeisel
christophgeisel
a year ago

Hello, I’m trying to learn how to use this api but it might be down as the example responses are all 0 and “”.

Thank you 😃

Rapid account: Dgianno
dgianno Commented 7 months ago

Here is how you can pull from a Google Sheets AppScript:

Just call =FearGreed() from a cell

function FearGreed() {

var url = “https://fear-and-greed-index.p.rapidapi.com/v1/fgi”;
var headers = {
“contentType”: “application/json”,
“headers”:{“X-RapidAPI-Host”: “fear-and-greed-index.p.rapidapi.com”,
“X-RapidAPI-Key”: “XXXXXXXXXXXXXXXXXXXXXXXX”},
muteHttpExceptions: true,
request: “GET”};

var response = UrlFetchApp.fetch(url, headers);
var data = JSON.parse(response.getContentText());

Logger.log(data);

var PullDate = new Date ();
var PullTime= PullDate.toLocaleTimeString();

const object = {
Date: PullDate,
Time: PullTime,
Current_Score: data.fgi.now.value,
Rating: data.fgi.now.valueText,
One_Week_Ago: data.fgi.oneWeekAgo.value,
Week_Rating: data.fgi.oneWeekAgo.valueText,
One_Month_Ago: data.fgi.oneMonthAgo.value,
Month_Rating: data.fgi.oneMonthAgo.valueText,
One_Year_Ago: data.fgi.oneYearAgo.value,
YearRating: data.fgi.oneYearAgo.valueText
}

return Object.entries(object);
}

Rapid account: Msharingan 708
msharingan708 Commented 7 months ago

Hi,

I’m working on a Google Sheets project and need help with coding. The goal is to retrieve data from an API, store it in Google Sheets, and perform analyses.

If anyone has experience with Google Sheets and programming and can assist, I would appreciate it.

Thanks in advance!

Best regards,

Rapid account: Rpi 4 Gx
rpi4gx Commented a year ago

Hello,

Yeah, this API has no examples. It’s a free API so just try using the API to get real values.

Regards.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입