CRAN_Status_Badge cran checks Lifecycle: stable Downloads

Latest Version 1.3.3

New functions nsetree, bhavfos

Introduction

“nser” helps you to download historical bhavcopy of Equities and F&O segment easily.

Package website nser

Installation

You can install “nser” from CRAN with:

install.packages("nser")

Install it from github by:

install.packages("devtools")
library(devtools)
install_github("nandp1/nser")

Example 1. Downloading Historical Equity Bhavcopy

library(nser)
# Download Bhavcopy of 1st July 2021
report1 = bhav("01072021")

Example 2. Downloading Historical F&O Bhavcopy

library(nser)
# Download Bhavcopy of 1st July 2021
report2 = fobhav("01072021")

Example 3. Downloading today’s Equity and F&O Bhavcopy

library(nser)
report3 = bhavtoday()
report4 = fobhavtoday()

Example 4. Live F&O data.

library(nser)
nselive()

Example 5. Pre market open data of F&O stocks

library(nser)
nseopen("fo")

Example 6. Current and Upcoming IPO’s

library(nser)
#> Creating a generic function for 'toJSON' from package 'jsonlite' in package 'googleVis'
nseipo()
#>   Equity /IPO Name    Type    Rating Issue Price Issue Size (in crores)
#> 1  D.K. Enterprise SME IPO Not Rated          40                   7.99
#>   Lot Size Open Date Close Date
#> 1     3000    07-Oct     12-Oct

Example 7. RSelenium to Download Equity Bhavcopy

library(nser)
library(RSelenium)

# Start a selenium server and browser
# For Google Chrome (Update Chrome to latest version)

 driver <- rsDriver(browser = c("chrome"), port = 3163L, chromever = "91.0.4472.101")
 remDr <- driver$client

# or for Firefox
 driver <- rsDriver(browser = c("firefox"), port = 3799L)
 
# Download Equity Bhavcopy zip file
bhavs("03012000", 2)

# Close the Browser
remDr$close()

Example 8. RSelenium to Download F&O Bhavcopy

library(nser)
library(RSelenium)

# Start a selenium server and browser
# For Google Chrome (Update Chrome to latest version)

 driver <- rsDriver(browser = c("chrome"), port = 3163L, chromever = "91.0.4472.101")
 remDr <- driver$client

# or for Firefox
 driver <- rsDriver(browser = c("firefox"), port = 3799L)
 
# Download Equity Bhavcopy zip file
bhavfos("03012000", 2)

# Close the Browser
remDr$close()

Example 9. NSE Treemap

library(nser)
# NIFTY 50 stocks
nsetree()

# F&O stocks
nsetree("fo")

Example 10. Daily data to Weelkly data

library(nser)
data(dailydata)
daytoweek(dailydata)