Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{pkgdown}-update ⬆️ #29

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading