get_fgindex {cryptoQuotes}R Documentation

Get the daily Fear and Greed Index in the cryptocurrency market

Description

[Stable]

Get the daily fear and greed index.

Usage

get_fgindex(
 from = NULL,
 to   = NULL
)

Arguments

from

An optional character-, date- or POSIXct-vector of length 1. NULL by default.

to

An optional character-, date- or POSIXct-vector of length 1. NULL by default.

Details

Classification

The Fear and Greed Index goes from 0-100, and can be classified as follows,

About the Fear and Greed Index

The fear and greed index is a market sentiment indicator that measures investor emotions to gauge whether they are generally fearful (indicating potential selling pressure) or greedy (indicating potential buying enthusiasm).

Source

This index is fetched from alternative.me, and can be different from the one provided by coinmarketcap.

Value

An xts-object containing,

index

<POSIXct> the time-index

fgi

<numeric> the daily fear and greed index value

Sample output

#>                     fgi
#> 2024-05-12 02:00:00  56
#> 2024-05-13 02:00:00  57
#> 2024-05-14 02:00:00  66
#> 2024-05-15 02:00:00  64
#> 2024-05-16 02:00:00  70
#> 2024-05-17 02:00:00  74

Author(s)

Serkan Korkmaz

See Also

Other get-functions: get_fundingrate(), get_lsratio(), get_openinterest(), get_quote()

Examples

## Not run: 
  # script start;

  # 1) get the fear and greed index
  # for the last 7 days
  tail(
    fgi <- cryptoQuotes::get_fgindex(
      from = Sys.Date() - 7
    )
  )

  # script end;

## End(Not run)


[Package cryptoQuotes version 1.3.1 Index]