Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1426fb5
Expanded Exchange Support [See https://github.com/serkor1/cryptoQuote…
serkor1 Jun 14, 2024
037d7db
Expanded Exchange Support [See https://github.com/serkor1/cryptoQuote…
serkor1 Jun 7, 2024
a1fcb3b
Fixed error in https://github.com/serkor1/cryptoQuotes/commit/037d7db…
serkor1 Jun 14, 2024
86ae664
Chart updates :heart: (#22)
serkor1 Jun 28, 2024
2795667
{pkgdown}-fix :wrench:
serkor1 Jun 28, 2024
4e3870c
Updated and reworked documentation (#23)
serkor1 Jun 29, 2024
95ec42c
:fire: Expanding Unit Testing and Minor Bug-fixes :fire:
serkor1 Jun 29, 2024
697bbb0
Test expansion and (more) bug-fixes :wrench: :fire: (#27)
serkor1 Jul 1, 2024
fddaeb8
Fixed unittest error :wrench:
serkor1 Jul 1, 2024
c15173a
Rebranding, efficiency and end-user upgrades :rocket: :rocket: (#28)
serkor1 Jul 7, 2024
e08df82
{pkgdown}-update :arrow_up: (#29)
serkor1 Jul 9, 2024
31923a1
Accessibility upgrade of chart()-function (#31)
serkor1 Aug 16, 2024
7207205
:books: Update custom_indicators.Rmd (#32)
stavralf Sep 19, 2024
b920c7d
Fix 720720583854139595eae278d8b28c692b1a0a2a :hammer:
serkor1 Oct 3, 2024
a407bf2
[NEW FEATURE] Global market capitalization :rocket:
serkor1 Oct 3, 2024
ac472c8
Create FUNDING.yml (#35)
serkor1 Oct 16, 2024
d86f32e
BitMart update :fire: (#38)
serkor1 Nov 1, 2024
c3b2a0f
BitMart update :fire: (#38)
serkor1 Nov 1, 2024
1d717fc
Merge branch 'development' of https://github.com/serkor1/cryptoQuotes…
serkor1 Nov 1, 2024
e718cd0
Kraken tickers updated :fire:
serkor1 Nov 2, 2024
052f949
Fear and Greed Index Fix :hammer:
serkor1 Nov 2, 2024
ca612b9
Updated unit-test :hammer:
serkor1 Nov 2, 2024
05c4157
Removed /playground and cryptoQuotes.Rproj :wave:
serkor1 Nov 2, 2024
7e11545
Removed .html-file in root directory and updated .gitignore :hammer:
serkor1 Nov 2, 2024
475e3f8
Updated DESCRIPTION and codemeta.json :hammer:
serkor1 Nov 2, 2024
a367010
Merge branch 'development' into coinmarketcap
serkor1 Nov 2, 2024
f7326ef
Prepare release for version 1.3.2 :fire:
serkor1 Nov 2, 2024
a539695
Updated Documentation :books:
serkor1 Nov 6, 2024
e129732
Fixed Unit-test for `store_xts()` 🔧 and updated documentation :books:
serkor1 Nov 7, 2024
85f3366
Submitted to CRAN and updated comments 🚀
serkor1 Nov 7, 2024
1347b10
Fixed Description :wrench:
serkor1 Nov 7, 2024
924a5ab
Updated crancomments :heart:
serkor1 Nov 7, 2024
460fe97
:hammer: Schedule R CMD check (#43)
serkor1 Jan 13, 2025
61c55d9
:rocket: Coinmarketcap Implementation
serkor1 May 2, 2025
e58e71d
:hammer: Fixed backticks and added factors
serkor1 May 2, 2025
8901d5e
:rocket: Coinmarketcap API
serkor1 May 2, 2025
8d4be2c
Patch (#48)
serkor1 Sep 18, 2025
ee387f7
:hammer: Fixed Merge-conflicts
serkor1 Sep 18, 2025
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
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ playground
^data-raw$
^codemeta\.json$
NEWS.Rmd
.vdoc.r
.vdoc.r
Makefile
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [serkor1]
3 changes: 3 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main, master, development, documentation]
pull_request:
branches: [main, master, development, documentation]
workflow_dispatch:
schedule:
- cron: '0 10 * * 1'

name: R-CMD-check

Expand Down
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.3.2
Date: 2024-11-07 05:41:59 UTC
SHA: e12973201b0a1173d20ccc6d89b774a4f68b95cf
Version: 1.3.3
Date: 2025-09-15 18:41:18 UTC
SHA: 4f3649c1905e82ab62e390aff687b81b3088eaf8
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cryptoQuotes
Title: Open Access to Cryptocurrency Market Data, Sentiment Indicators and Interactive Charts
Version: 1.3.2
Version: 1.3.3
Authors@R: c(
person(
given = "Serkan",
Expand Down
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Package information
package_name := $(shell grep "^Package:" DESCRIPTION | sed "s/Package: //")
package_version := $(shell grep "^Version:" DESCRIPTION | sed "s/Version: //")
tarball_location := $(package_name)_$(package_version).tar.gz

## default target
.PHONY: help
help:
@grep -h -E '^[[:space:]]*[A-Za-z0-9_.-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sed -E 's/^[[:space:]]*//' \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}'

build: ## Build the R package
@Rscript --verbose -e "devtools::document()"
@R CMD build . && R CMD INSTALL $(tarball_location)
@Rscript -e "rmarkdown::render('README.Rmd', output_format = rmarkdown::github_document(html_preview = FALSE), clean = TRUE)"
@Rscript -e "rmarkdown::render('NEWS.Rmd', output_format = rmarkdown::github_document(html_preview = FALSE), clean = TRUE)"

check: ## Check the R package
@Rscript --verbose -e "devtools::document()"
@R CMD build . && R CMD check $(tarball_location)

test: ## Run tests
@Rscript --verbose -e "library(cryptoQuotes); testthat::test_dir('tests/testthat')"

clean: ## Remove artifacts
@rm -rf $(tarball_location)
@rm -rf $(package_name).Rcheck
@Rscript -e "remove.packages('$(package_name)')"

fmt: ## Format code
@air format .

pkgdown-build: ## Build {pkgdown} documentation
@Rscript --verbose -e "devtools::document()"
@Rscript -e "pkgdown::clean_site()"
@Rscript -e "pkgdown::init_site()"
@Rscript -e "pkgdown::build_site()"

pkgdown-preview: ## Preview {pkgdown} documetation
@Rscript -e "pkgdown::preview_site()"
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export(fgi)
export(get_fgindex)
export(get_fundingrate)
export(get_lsratio)
export(get_mktcap)
export(get_openinterest)
export(get_quote)
export(hma)
Expand Down
21 changes: 20 additions & 1 deletion NEWS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@ knitr::opts_chunk$set(
library(cryptoQuotes)
```

# Version 1.3.3

## General

### New features

* The `get_mktcap()`-function returns the global market capitalization of the cryptocurrency market. It also has the option to return altcoin market capitalization.

```{r}
# get market capitalization
tail(
get_mktcap()
)
```

## Bugfixes

* A bug in the funding rates from Binance have been fixed. The returned values was the time indices of the json-array, not the actual rates.

# Version 1.3.2

## General
Expand All @@ -33,7 +52,7 @@ library(cryptoQuotes)

## Improvements

## Read and Write `xts`-objects
## [NEW FEATURE] Read and Write `xts`-objects

* `read_xts()` and `write_xts()` reads and stores `xts`-objects. These functions are essentially just wrappers of `zoo::read.zoo()` and `zoo::write.zoo()`. Thank you @gokberkcan7 for the suggestion.

Expand Down
74 changes: 49 additions & 25 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

# Version 1.3.3

## General

### New features

- The `get_mktcap()`-function returns the global market capitalization
of the cryptocurrency market. It also has the option to return altcoin
market capitalization.

``` r
# get market capitalization
tail(
get_mktcap()
)
```

#> marketcap volume
#> 2025-09-12 05:00:00 4.015436e+12 163237690580
#> 2025-09-13 05:00:00 4.072732e+12 169107128392
#> 2025-09-14 05:00:00 4.062633e+12 137318394600
#> 2025-09-15 05:00:00 4.056822e+12 128029319974
#> 2025-09-16 05:00:00 4.004271e+12 163269852880
#> 2025-09-17 05:00:00 4.027473e+12 146323890322

## Bugfixes

- A bug in the funding rates from Binance have been fixed. The returned
values was the time indices of the json-array, not the actual rates.

# Version 1.3.2

## General
Expand All @@ -13,7 +43,7 @@

## Improvements

## Read and Write `xts`-objects
## \[NEW FEATURE\] Read and Write `xts`-objects

- `read_xts()` and `write_xts()` reads and stores `xts`-objects. These
functions are essentially just wrappers of `zoo::read.zoo()` and
Expand Down Expand Up @@ -62,7 +92,7 @@ chart(
)
```

<img src="man/figures/NEWS-unnamed-chunk-2-1.png" style="display: block; margin: auto;" />
<img src="man/figures/NEWS-unnamed-chunk-3-1.png" style="display: block; margin: auto;" />
</details>
<details>
<summary>
Expand All @@ -86,7 +116,7 @@ chart(
)
```

<img src="man/figures/NEWS-unnamed-chunk-3-1.png" style="display: block; margin: auto;" />
<img src="man/figures/NEWS-unnamed-chunk-4-1.png" style="display: block; margin: auto;" />
</details>

### Supported Exchanges (Issue [\#14](https://github.com/serkor1/cryptoQuotes/issues/14))
Expand Down Expand Up @@ -167,7 +197,7 @@ chart(
)
```

<img src="man/figures/NEWS-unnamed-chunk-4-1.png" style="display: block; margin: auto;" />
<img src="man/figures/NEWS-unnamed-chunk-5-1.png" style="display: block; margin: auto;" />
</details>

### Expanded Support
Expand All @@ -190,12 +220,12 @@ tail(
```

#> open_interest
#> 2024-11-02 10:00:00 2394.876
#> 2024-11-02 11:00:00 2389.595
#> 2024-11-02 12:00:00 2396.225
#> 2024-11-02 13:00:00 2403.175
#> 2024-11-02 14:00:00 2418.193
#> 2024-11-02 15:00:00 2398.648
#> 2025-09-18 02:00:00 2707.242
#> 2025-09-18 03:00:00 2730.265
#> 2025-09-18 04:00:00 2731.936
#> 2025-09-18 05:00:00 2711.744
#> 2025-09-18 06:00:00 2708.016
#> 2025-09-18 07:00:00 2706.681

</details>

Expand Down Expand Up @@ -233,7 +263,7 @@ chart(
)
```

<img src="man/figures/NEWS-unnamed-chunk-6-1.png" style="display: block; margin: auto;" />
<img src="man/figures/NEWS-unnamed-chunk-7-1.png" style="display: block; margin: auto;" />
</details>

### Documentation
Expand Down Expand Up @@ -348,7 +378,7 @@ chart(
)
```

<img src="man/figures/NEWS-unnamed-chunk-7-1.png" style="display: block; margin: auto;" />
<img src="man/figures/NEWS-unnamed-chunk-8-1.png" style="display: block; margin: auto;" />

### Exchange Support

Expand Down Expand Up @@ -377,12 +407,12 @@ tail(
```

#> funding_rate
#> 2024-10-31 17:00:00 1.730390e+12
#> 2024-11-01 01:00:00 1.730419e+12
#> 2024-11-01 09:00:00 1.730448e+12
#> 2024-11-01 17:00:00 1.730477e+12
#> 2024-11-02 01:00:00 1.730506e+12
#> 2024-11-02 09:00:00 1.730534e+12
#> 2025-09-16 10:00:00 6.991e-05
#> 2025-09-16 18:00:00 6.472e-05
#> 2025-09-17 02:00:00 6.972e-05
#> 2025-09-17 10:00:00 8.441e-05
#> 2025-09-17 18:00:00 6.303e-05
#> 2025-09-18 02:00:00 4.941e-05

</details>

Expand All @@ -403,13 +433,7 @@ tail(
)
```

#> open_interest
#> 2024-10-28 01:00:00 82206.35
#> 2024-10-29 01:00:00 89115.04
#> 2024-10-30 01:00:00 90242.98
#> 2024-10-31 01:00:00 89315.49
#> 2024-11-01 01:00:00 89544.93
#> 2024-11-02 01:00:00 84087.60
#> open_interest

</details>

Expand Down
4 changes: 0 additions & 4 deletions R/ATOM.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@
#' sub = list(volume())
#' )
"ATOM"




33 changes: 14 additions & 19 deletions R/FUN.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#' @export

remove_bound <- function(
xts,
bounds = c('upper')) {

xts,
bounds = c('upper')
) {
# check if bounds are correctly
# specified
# if (!grepl(x = bounds, pattern = 'upper|lower|both')) {
Expand All @@ -59,11 +59,10 @@ remove_bound <- function(
bounds,
upper = xts[-nrow(xts)],
lower = xts[-1],
both = xts[-c(1,nrow(xts))]
both = xts[-c(1, nrow(xts))]
)

xts

}

# split window; #####
Expand All @@ -90,10 +89,10 @@ remove_bound <- function(
#'
#' @export
split_window <- function(
xts,
by,
bounds = 'upper') {

xts,
by,
bounds = 'upper'
) {
assert(
inherits(xts, "xts"),
error_message = c(
Expand All @@ -111,10 +110,9 @@ split_window <- function(
lapply(
X = seq_along(by),
FUN = function(i) {

# 1) extract both
# indices
index <- by[i:(i+1)]
index <- by[i:(i + 1)]

# 2) subset using
# window and cut the upper
Expand All @@ -123,16 +121,14 @@ split_window <- function(
xts = stats::window(
x = xts,
start = index[1],
end = index[2]
end = index[2]
),
bounds = bounds
)

xts

}
)

}

# calibrate window; ####
Expand All @@ -157,10 +153,10 @@ split_window <- function(
#'
#' @export
calibrate_window <- function(
list,
FUN,
...) {

list,
FUN,
...
) {
assert(
inherits(list, "list"),
error_message = c(
Expand All @@ -185,7 +181,6 @@ calibrate_window <- function(
...
)
)

}

# script end;
Loading
Loading