library(dplyr)
library(stringr)
library(here)
library(binance)
# This information could also be retrieved from wallet_coins().
COINS_SCRIPT <- here("R", "coins.R")
COINS_RDA = here::here("data", "coins.rda")
symbols <- market_exchange_info()$symbols
COINS <- c(symbols$base, symbols$quote) %>%
unique() %>%
sort()
cat("# Generated by get-coins.R. Do not edit!\n#\n", file = COINS_SCRIPT)
paste(deparse(COINS), collapse = "") %>%
str_replace_all("\"", "'") %>%
str_replace_all("',", "',\n ") %>%
str_replace_all("'\\)", "'\n)") %>%
str_replace_all("\\('", "(\n '") %>%
cat("COINS <-", ., file = COINS_SCRIPT, append = TRUE)
save(COINS, file = COINS_RDA, version = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.