R/lastPrft.R

Defines functions lastPrft

Documented in lastPrft

lastPrft <- function(period="weekly", token){
  
  prd0 <- ifelse(period=="weekly",FALSE,TRUE)
  
  headers = c(
    Authorization = paste0("Token ",token)
  )
  files = list(`monthly` = prd0)
  res <- httr::POST(url = paste0("https://apiv2.nobitex.ir/users/portfolio/last-week-daily-profit")
                    , httr::add_headers(.headers=headers),body=files)
  res<-content(res, as = "parsed")
  res<-do.call(rbind.data.frame, res$data)
  res
}

Try the TSEtools package in your browser

Any scripts or data that you put into this service are public.

TSEtools documentation built on Jan. 8, 2026, 5:07 p.m.