Fetch the quote for a given index.

nse_index_quote(clean_names = TRUE)

Arguments

clean_names

Logical; if TRUE, makes the column names descriptive and uses snake_case.

Value

A tibble with the following columns:

index_name

Name of the NSE indices.

last_traded_price

Last traded price.

change

Change in price.

percent_change

Percentage change in price.

Examples

# \donttest{ nse_index_quote()
#> # A tibble: 55 x 4 #> index_name last_traded_price change percent_change #> <chr> <dbl> <dbl> <dbl> #> 1 NIFTY 50 Pre Open 11939. -114. -0.94 #> 2 NIFTY 50 11973. -80.2 -0.67 #> 3 NIFTY NEXT 50 27965. -136 -0.48 #> 4 NIFTY100 LIQ 15 3704. -38.4 -1.03 #> 5 NIFTY BANK 31128. -272. -0.86 #> 6 INDIA VIX 16.1 1.45 9.9 #> 7 NIFTY 100 12077. -78.1 -0.64 #> 8 NIFTY 500 9745. -60.1 -0.61 #> 9 NIFTY MIDCAP 100 16942. -79.2 -0.47 #> 10 NIFTY MIDCAP 50 4642. -32.2 -0.69 #> # ... with 45 more rows
# retain original column names as returned by NSE nse_index_quote(clean_names = FALSE)
#> # A tibble: 55 x 4 #> name lastPrice change pChange #> <chr> <dbl> <dbl> <dbl> #> 1 NIFTY 50 Pre Open 11939. -114. -0.94 #> 2 NIFTY 50 11973. -80.2 -0.67 #> 3 NIFTY NEXT 50 27965. -136 -0.48 #> 4 NIFTY100 LIQ 15 3704. -38.4 -1.03 #> 5 NIFTY BANK 31128. -272. -0.86 #> 6 INDIA VIX 16.1 1.45 9.9 #> 7 NIFTY 100 12077. -78.1 -0.64 #> 8 NIFTY 500 9745. -60.1 -0.61 #> 9 NIFTY MIDCAP 100 16942. -79.2 -0.47 #> 10 NIFTY MIDCAP 50 4642. -32.2 -0.69 #> # ... with 45 more rows
# }