Skip to contents

Retrieves staking rewards for a specific account from https://solanabeach.io.

Usage

parse_solana(
  address,
  pp_security_name = "Solana",
  currency = "EUR",
  pp_lang = "EN",
  securities_account = NULL,
  api_key,
  dec = NULL,
  sep = ";",
  filename = NULL,
  by_day = TRUE
)

Arguments

address

[character]
Wallet address.

pp_security_name

character
The name of the security in Portfolio Performance (e.g. "Kusama").

currency

character
Currency in which to calculate the staking rewards. Must be part of a valid coin pair on Binance, e.g. "DOTEUR".

pp_lang

character
The currency of Portfolio Performance. Only German ("DE") and English ("EN") are supported.

securities_account

character
The name of the account to which to associate the deliveries. In German called "Depot".

api_key

character
Optional personal API key.

dec

character
Decimal separator. If not set, inferred by the value of argument pp_lang:

  • If pp_lang = "DE" -> dec = ","

  • If pp_lang = "EN" -> dec = "."

sep

character
Columns separator. Defaults to ;.

filename

character
The output filename.

by_day

logical
Whether to aggregate staking rewards from different accounts by day. If set to FALSE, all individual rewards are returned.

Value

tibble::tibble (invisibly)

Examples

# single address
parse_solana("AsbXE1vn9Z2uZftkQKDMg9cx3ZaKGExxzfwe2u8uj9ZZ",
  api_key = Sys.getenv("solanabeach_api_key"), dec = "."
)
#> Error: HTTP 403 Forbidden.
# multiple addresses
parse_solana(c(
  "AsbXE1vn9Z2uZftkQKDMg9cx3ZaKGExxzfwe2u8uj9ZZ",
  "HUKZz7MK9dMGis2AC8trhSME3WFRSivVMfVDypkkNWJR"
),
pp_lang = "EN", dec = ".",
api_key = Sys.getenv("solanabeach_api_key")
)
#> Error: HTTP 403 Forbidden.