getPortfolio: Retrieve portfolio data from different brokers/exchanges

View source: R/getPortfolio.R

getPortfolioR Documentation

Retrieve portfolio data from different brokers/exchanges

Description

This function retrieves portfolio data from different brokers/exchanges such as Tinkoff, Finam and Alor.

Usage

getPortfolio(
  src = "",
  board = "MOEX",
  api.key = "",
  clientId = "",
  verbose = TRUE
)

Arguments

src

character indicating the name of the broker/exchange (options are 'tinkoff', 'finam', or 'alor')

board

character indicating the name of the board (only required for Alor, default is 'MOEX')

api.key

character representing the authorization key required for accessing broker/exchange API

clientId

character representing the ID of the client whose portfolio data is being retrieved

verbose

logical value indicating whether to print verbose output (default is TRUE)

Value

A list of portfolio data containing the positions and other relevant information

Note

Not for the faint of heart. All profits and losses related are yours and yours alone. If you don't like it, write it yourself.

Author(s)

Vyacheslav Arbuzov

Examples

# Retrieve portfolio data from Tinkoff
getPortfolio(src = 'tinkoff', api.key = 'my_api_key', clientId = 'my_client_id')

# Retrieve portfolio data from Finam
getPortfolio(src = 'finam', api.key = 'my_api_key', clientId = 'my_client_id')

# Retrieve portfolio data from Alor
getPortfolio(src = 'alor', api.key = 'my_api_key', clientId = 'my_client_id', board = 'MOEX')

arbuzovv/rusquant documentation built on Feb. 1, 2024, 6:39 p.m.