Skip to content

Commit

Permalink
{cryptoQuotes} v1.3.2 🚀 (#40)
Browse files Browse the repository at this point in the history
* See commit history or NEWS.md for changes.

---------

Co-authored-by: Stavros Alfieris <[email protected]>
  • Loading branch information
serkor1 and stavralf authored Nov 7, 2024
1 parent 93d7baa commit 31d92e2
Show file tree
Hide file tree
Showing 98 changed files with 3,373 additions and 2,558 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ playground
^data-raw$
^codemeta\.json$
NEWS.Rmd
.vdoc.r
5 changes: 4 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
Expand All @@ -29,7 +31,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -47,3 +49,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [development]
branches: [development, expand-test]
pull_request:
branches: [development]
branches: [development, expand-test]

name: test-coverage

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ inst/doc
/doc/
/Meta/
docs
/playground
/playground/

/*.html
.vdoc.r
*.Rproj
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 1.3.2
Date: 2024-11-07 05:41:59 UTC
SHA: e12973201b0a1173d20ccc6d89b774a4f68b95cf
36 changes: 23 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
Package: cryptoQuotes
Title: A Streamlined Access to Cryptocurrency OHLC-V Market Data and Sentiment Indicators
Version: 1.3.1
Title: Open Access to Cryptocurrency Market Data, Sentiment Indicators and Interactive Charts
Version: 1.3.2
Authors@R: c(
person("Serkan", "Korkmaz", , "[email protected]", role = c("cre", "aut", "ctb", "cph"),
comment = c(ORCID = "0000-0002-5052-0982")),
person("Jonas", "Cuzulan Hirani", , "[email protected]", role = "ctb",
comment = c(ORCID = "0000-0002-9512-1993"))
person(
given = "Serkan",
family = "Korkmaz",
email = "[email protected]",
role = c("cre", "aut", "ctb", "cph"),
comment = c(ORCID = "0000-0002-5052-0982")
),
person(
given = "Jonas",
family = "Cuzulan Hirani",
email = "[email protected]",
role = "ctb",
comment = c(ORCID = "0000-0002-9512-1993")
)
)
Description:
This high-level API client offers a streamlined access to public cryptocurrency market data and sentiment indicators. It features OHLC-V (Open, High, Low, Close, Volume) that comes
with granularity ranging from seconds to months and essential sentiment indicators to develop and backtest trading strategies, or conduct detailed market analysis. By interacting directly with
the major cryptocurrency exchanges this package ensures a reliable, and stable, flow of market information, eliminating the need for complex, low-level API interactions or webcrawlers.
Description:
This high-level API client provides open access to cryptocurrency market data, sentiment indicators, and interactive charting tools.
The data is sourced from major cryptocurrency exchanges via 'curl' and returned in 'xts'-format. The data comes in open, high, low, and close (OHLC) format with flexible granularity, ranging from seconds to months.
This flexibility makes it ideal for developing and backtesting trading strategies or conducting detailed market analysis.
License: GPL (>= 2)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Suggests:
data.table,
knitr,
Expand All @@ -24,14 +34,14 @@ Suggests:
tidyverse
Config/testthat/edition: 3
Imports:
cli (>= 3.6.2),
cli (>= 3.6.3),
curl (>= 5.2.1),
jsonlite (>= 1.8.8),
lifecycle (>= 1.0.4),
plotly (>= 4.10.4),
TTR (>= 0.24.4),
utils,
xts (>= 0.13.2),
xts (>= 0.14.0),
zoo (>= 1.8-12)
Depends:
R (>= 4.0.0)
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export(lsr)
export(macd)
export(ohlc)
export(pline)
export(read_xts)
export(remove_bound)
export(rsi)
export(sma)
Expand All @@ -31,6 +32,7 @@ export(split_window)
export(volume)
export(vwap)
export(wma)
export(write_xts)
export(zlema)
importFrom(TTR,BBands)
importFrom(curl,has_internet)
Expand Down
112 changes: 101 additions & 11 deletions NEWS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,97 @@ knitr::opts_chunk$set(
library(cryptoQuotes)
```

# cryptoQuotes 1.3.1
# Version 1.3.2

## General

* `bitmart` has updated their futures API. The backend have been updated accordingly.

* Unit-tests have been updated and now all `get_quote()`-functions are being tested for equality in passed and inferred interval.

## Improvements

## 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.

### Charting

* The `chart()`-function are now exported as `.svg`-images in 4k resolution via the `modebar`.
* The `chart()`-function are now more interactive and supports drawing lines and rectangles via the `modebar`. It is also possible to interactively change the `title` and `subtitle` by double clicking these (Thank you @andreltr for the suggestion. See [Discussion](https://github.com/serkor1/cryptoQuotes/discussions/19)).
* The `chart()`-function now has a new option `static` that is equal to `FALSE` by default. If `FALSE` the chart can be edited, annotated and explored interactively.
* The `chart()`-function now has a new option `palette` that is set to "hawaii" by default. See `hcl.pals()` for accepted values.
* The `chart()`-function now has a new option `scale` that is set to 1 by default. Scales all fonts on the chart.
* The `chart()`-function now has a new option `width` that is set to 0.9 by default. Sets the overall `linewidth` of the chart. (Thank you @andreltr for the suggestion. See [Discussion](https://github.com/serkor1/cryptoQuotes/discussions/30))

<details>
<summary>Static set to FALSE (Default Palette) </summary>
```{r}
# static = FALSE
chart(
ticker = BTC,
main = kline(),
indicator = line(
sma(n = 7),
sma(n = 14),
sma(n = 21)
),
options = list(
static = FALSE,
palette = "hawaii"
)
)
```
</details>

<details>
<summary>Static set to TRUE ("Set 3" palette)</summary>
```{r}
# static = TRUE
chart(
ticker = BTC,
main = kline(),
indicator = line(
sma(n = 7),
sma(n = 14),
sma(n = 21)
),
options = list(
static = TRUE,
palette = "Set 3"
)
)
```
</details>

### Supported Exchanges (Issue [#14](https://github.com/serkor1/cryptoQuotes/issues/14))

[{cryptoQuotes}](https://serkor1.github.io/cryptoQuotes/) now supports the following exchanges:

* Crypto.com
* Huobi
* MEXC


## Breaking Changes

## Bugfixes

### Charting

* Fixed a bug in the `chart()`-function where a warning would be given if called using namespace qualified function calls (Issue [#13](https://github.com/serkor1/cryptoQuotes/issues/13))
* Fixed a bug in the `chart()`-function where a `legend` wouldn't show unless a main-chart indicator
were included. (Issue [#13](https://github.com/serkor1/cryptoQuotes/issues/13))

### Quotes

* Removed `1s` from *Binance spot*
* Removed `3m`, `6h` and `3d` in *Bitmart spot*

These intervals have been removed as they have either been discontinued, or were non-existent.


# Version 1.3.1

## General

Expand Down Expand Up @@ -118,7 +208,7 @@ chart(
* Removed dependency on `conflicted`-package.

Prior to version `1.3.0` the `get*`-functions were following the syntax of `quantmod` closely, and this goes for the function naming too. With the adoption of the `tidyverse` style guide, there is no conflicts that
Prior to version `1.3.0` the `get*`-functions were following the syntax of [{quantmod}](https://github.com/joshuaulrich/quantmod) closely, and this goes for the function naming too. With the adoption of the `tidyverse` style guide, there is no conflicts that
needs to be resolved on `stable`- and `experimental`-functions.

### New developper tools
Expand All @@ -140,7 +230,7 @@ needs to be resolved on `stable`- and `experimental`-functions.
* Fixed a bug in the `get_quote()`-function where if `to = NULL` and `from != NULL` the returned `quote` would be filtered according to `UTC` and not `Sys.timezone()`
* Fixed a bug in the `chart()`-function where the inferred intervals would be incorrect for leap years, and months different from 30 days.

# cryptoQuotes 1.3.0
# Version 1.3.0

## Improvements

Expand Down Expand Up @@ -247,10 +337,10 @@ tail(

## Warning

As the `cryptoQuotes`-package has moved to the `tidyverse` style guide, the `getFoo`-functions are now `deprecated`. These will be permanently deleted, and removed from the `cryptoQuotes`-package, at version 1.4.0!
As [{cryptoQuotes}](https://serkor1.github.io/cryptoQuotes/) has moved to the `tidyverse` style guide, the `getFoo`-functions are now `deprecated`. These will be permanently deleted, and removed from the [{cryptoQuotes}](https://serkor1.github.io/cryptoQuotes/), at version 1.4.0!


# cryptoQuotes 1.2.1
# Version 1.2.1

### Minor Updates

Expand All @@ -263,15 +353,15 @@ As the `cryptoQuotes`-package has moved to the `tidyverse` style guide, the `get
* All returned Quotes are now in `UTC`, again.
* Fixed an error on the `Bitmart` API where weekly candles would throw an error.

# cryptoQuotes 1.2.0
# Version 1.2.0

* All `from` and `to` arguments are now more flexible, and supports passing `Sys.Date()` and `Sys.time()` directly into the `get`-functions.

* `getQuote()` now returns up to 100 pips preceding the specified `to` date, when `from = NULL`. It returns 100 pips, or up to `Sys.Date()`, from the specified `from` date.

The `getQuote()`-function can now be used as follows;

```
```r
## Specifying from
## date only;
##
Expand All @@ -283,7 +373,7 @@ getQuote(
)
```

```
```r
## Specifying to
## date only;
##
Expand Down Expand Up @@ -312,15 +402,15 @@ Three new convinience functions are added applicable to some situations,
* `splitWindow()`
* `calibrateWindow()`

# cryptoQuotes 1.1.0
# Version 1.1.0

## Frontend

`getQuote()` now returns up to 100 pips when `to` and `from` is `NULL`

## Backend

* All code has been rewritten so its compatible with `httr2`, the package used `httr` at version `1.0.0`.
* All code has been rewritten so its compatible with [{httr2}](https://github.com/r-lib/httr2), the package used [{httr}](https://github.com/r-lib/httr) at version `1.0.0`.

## Future releases

Expand All @@ -331,6 +421,6 @@ In the next release, three more exchanges will be supported.
The returned `quotes` are in local timezone, this is an unintentional feature and will be fixed in a bugfix.


# cryptoQuotes 1.0.0
# Version 1.0.0

* Initial CRAN submission :rocket:
Loading

0 comments on commit 31d92e2

Please sign in to comment.