/
README.Rmd
125 lines (88 loc) · 2.99 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# ubci
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Travis build status](https://travis-ci.org/mrchypark/ubci.svg?branch=master)](https://travis-ci.org/mrchypark/ubci)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/mrchypark/ubci?branch=master&svg=true)](https://ci.appveyor.com/project/mrchypark/ubci)
[![Coverage status](https://codecov.io/gh/mrchypark/ubci/branch/master/graph/badge.svg)](https://codecov.io/github/mrchypark/ubci?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/ubci)](https://cran.r-project.org/package=ubci)
[![CRAN download](http://cranlogs.r-pkg.org/badges/grand-total/ubci)](http://cranlogs.r-pkg.org/badges/grand-total/Rcpp)
The goal of ubci is to get UBCI(UpBit Crypto Index) & Crypto price data form [upbit][upbit].
* *notice* : This is a personal project and not relevant to upbit.
## Installation
ubci is now on cran!
You can install on cran with:
```
install.packages("ubci")
```
You can install the development version of ubci from [GitHub](https://github.com/mrchypark/ubci) with:
```
install.packages("remotes")
remotes::install_github("mrchypark/ubci")
```
please check encoding UTF-8 for unix-like os.
```{r}
Sys.getlocale()
```
## Example
### index options
`ubci_index_options()` function return list of index code & descriptions.
```{r}
library(ubci)
ubci_index_options()
```
`ubci_index_options()` function provide lang param for korean descriptions.
```{r}
ubci_index_options(lang="ko")
```
### index
`ubci_index()` function return index data with code, range of date with from/to.
```{r}
loi<-ubci_index_options()
loi$index[1]
ubci_index(loi$index[1])
tail(ubci_index(loi$index[1], from="2019-05-15"))
ubci_index(loi$index[1], to="2019-05-15")
ubci_index(loi$index[1], from="2019-05-10", to="2019-05-15")
```
### crypto price options
`ubci_get_options()` function return list of crypto code & name.
```{r}
ubci_get_options()
```
`ubci_get_options()` function provide lang param for korean name of crypto.
```{r}
ubci_get_options(lang="ko")
```
### crypto price
`ubci_get()` function return crypto prcie data with code, range of date with from/to.
```{r}
loc<-ubci_get_options()
loc$code[1]
ubci_get(loc$code[1])
tail(ubci_get(loc$code[1], from="2019-05-15"))
ubci_get(loc$code[1], to="2019-05-15")
ubci_get(loc$code[1], from="2019-05-10", to="2019-05-15")
```
Session info is below.
```{r}
sessionInfo()
```
Data source license is below.
```
“UBCI 인덱스”
Copyright 2018 두나무(주) All rights reserved.
Powered by 두나무/Upbit
```
[upbit]: https://www.ubcindex.com/home