Skip to content

Commit

Permalink
{pkgdown}-update ⬆️ (#29)
Browse files Browse the repository at this point in the history
{pkgdown} has been updated. During the update a few minor changes have been implemented to the documentation.

1. frontpage has been reworked
2. theme has been changed to default (the update seems to have broken the original setup)
3. alt text has been added to article 5

Note: At some point the alt text has to be reworked completely.
  • Loading branch information
serkor1 authored Jul 9, 2024
1 parent c15173a commit e08df82
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 325 deletions.
11 changes: 8 additions & 3 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ home:
charts in R.
navbar:
type: inverse
inverse: true

structure:
left: [intro, usecase, custom-indicators, reference, articles, news]
right: [github]
right: [search, lightswitch, github]

components:
usecase:
Expand All @@ -40,7 +40,12 @@ url: https://serkor1.github.io/cryptoQuotes/

template:
bootstrap: 5
bootswatch: flatly
light-switch: true
bslib:
primary: "#0054AD"
border-radius: 0.5rem
btn-border-radius: 0.25rem
danger: "#A6081A"

reference:
- title: Cryptocurrency Market Data
Expand Down
1 change: 1 addition & 0 deletions pkgdown/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

87 changes: 9 additions & 78 deletions pkgdown/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ knitr::opts_chunk$set(
)
```

# Open access to cryptocurrency market data in R <a href="https://serkor1.github.io/cryptoQuotes/"><img src="man/figures/logo.png" align="right" height="139" alt="cryptocurrency in R"/></a>
# {cryptoQuotes}: Open access to cryptocurrency market data <a href="https://serkor1.github.io/cryptoQuotes/"><img src="man/figures/logo.png" align="right" height="154" alt="cryptocurrency in R"/></a>

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/cryptoQuotes)](https://CRAN.R-project.org/package=cryptoQuotes)
Expand All @@ -27,70 +27,15 @@ knitr::opts_chunk$set(
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/serkor1/cryptoQuotes/development)
<!-- badges: end -->

[{cryptoQuotes}](https://github.com/serkor1/cryptoQuotes) is a high-level API client for accessing public market data endpoints on major cryptocurrency exchanges. It supports open, high, low, close and volume (OHLC-V) data and a variety of sentiment indicators; the market data is high quality and can be retrieved in intervals ranging from *seconds* to *months*. All the market data is accessed and processed without relying on crawlers, or API keys, ensuring an open, and reliable, access for researchers, traders and students alike.
[{cryptoQuotes}](https://serkor1.github.io/cryptoQuotes/) is a high-level API client for accessing public market data endpoints on major cryptocurrency exchanges. It supports open, high, low, close and volume (OHLC-V) data and a variety of sentiment indicators; the market data is high quality and can be retrieved in intervals ranging from *seconds* to *months*.

## Example: Bitcoin OHLC-V with Long-Short Ratios
All the market data is accessed and processed without relying on crawlers, or API keys, ensuring an open, and reliable, access for researchers, traders and students alike.

<div align="center">
```{r print table, echo=FALSE, fig.alt="cryptocurrency prices in R"}
## get OHLC-V in 30 minute intervals
## for Bitcoin from Binance
## futures market since yesterday
BTC <- cryptoQuotes::get_quote(
ticker = 'BTCUSDT',
source = 'binance',
futures = TRUE,
interval = '30m',
from = Sys.Date() - 1
)
## get the Long-Short Ratios in 30 minute
## intervals for Bitcoin from
## Binance since yesterday
BTC_LSR <- cryptoQuotes::get_lsratio(
ticker = 'BTCUSDT',
source = 'binance',
interval = '30m',
from = Sys.Date() - 1
)
## merge the OHLC-B
## and Long-Short Ratios
BTC <- round(
merge(
BTC,
BTC_LSR
),
digits = 3
)
## Basic usage

kable_output <- kableExtra::kable_styling(
kable_input = knitr::kable(
caption = 'Bitcoin (BTC) in 30 minute intervals with Long-Short Ratios.',
align = 'lcccc',
table.attr = "style='width: fit-content;'",
x = data.frame(
cbind(
index = paste(tail(zoo::index(BTC))),
tail(zoo::coredata(BTC))
),
row.names = NULL
),
format = 'html'
),
full_width = TRUE,
position = 'center',
bootstrap_options = c("responsive", "bordered"),
font_size = 14
)
kable_output
```
</div>
Below is an example on retrieving OHLC-V data for Bitcoin in 30 minute intervals,

<details>
<summary>Source</summary>
```{r cryptocurrency market data in R, eval=FALSE}
```{r OHLC, echo=TRUE, fig.alt="cryptocurrency prices in R"}
## get OHLC-V in 30 minute intervals
## for Bitcoin from Binance
## futures market since yesterday
Expand All @@ -102,24 +47,10 @@ BTC <- cryptoQuotes::get_quote(
from = Sys.Date() - 1
)
## get the Long-Short Ratios in 30 minute
## intervals for Bitcoin from
## Binance since yesterday
BTC_LSR <- cryptoQuotes::get_lsratio(
ticker = 'BTCUSDT',
source = 'binance',
interval = '30m',
from = Sys.Date() - 1
)
## merge the OHLC-B
## and Long-Short Ratios
BTC <- merge(
BTC,
BTC_LSR
)
## display latest
## values
tail(BTC)
```
</details>

## :information_source: Installation

Expand Down
Loading

0 comments on commit e08df82

Please sign in to comment.