-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f1b2e1
commit ec94b08
Showing
10 changed files
with
79 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ Package: vndirect | |
Title: GET DATA FROM VNDIRECT API | ||
Version: 0.0.0.9000 | ||
Authors@R: person('Ngoc Binh Nguyen', email = '[email protected]', role = c('cre', 'aut')) | ||
Description: Some utilities functions to get data from vndirect api | ||
License: {{ License }} | ||
Description: Some utilities functions to working with vndirect api. | ||
License: MIT + file LICENSE | ||
URL: https://github.com/nguyenngocbinh/vndirect | ||
BugReports: https://github.com/nguyenngocbinh/vndirect/issues | ||
Encoding: UTF-8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2022 vndirect authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
utils::globalVariables(c("ticker_name", "date", "code")) | ||
utils::globalVariables(c("code")) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,54 @@ | ||
# vnd_data | ||
Using API from vndirect to get data | ||
|
||
# Get data from vndirect API | ||
|
||
``` r | ||
library(vndirect) | ||
dt <- vnd_get_data('VCB', 100) | ||
head(dt) | ||
``` | ||
|
||
## # A tibble: 6 x 25 | ||
## ticker_name date time floor type basicPrice ceilingPrice floorPrice | ||
## <chr> <date> <chr> <chr> <chr> <dbl> <dbl> <dbl> | ||
## 1 VCB 2022-03-01 14:44:58 HOSE STOCK 84.5 90.4 78.6 | ||
## 2 VCB 2022-02-28 15:02:03 HOSE STOCK 85.1 91 79.2 | ||
## 3 VCB 2022-02-25 15:02:04 HOSE STOCK 85.3 91.2 79.4 | ||
## 4 VCB 2022-02-24 15:02:03 HOSE STOCK 86.9 92.9 80.9 | ||
## 5 VCB 2022-02-23 15:02:03 HOSE STOCK 86.8 92.8 80.8 | ||
## 6 VCB 2022-02-22 15:02:02 HOSE STOCK 87.4 93.5 81.3 | ||
## # ... with 17 more variables: open <dbl>, high <dbl>, low <dbl>, close <dbl>, | ||
## # average <dbl>, adOpen <dbl>, adHigh <dbl>, adLow <dbl>, adClose <dbl>, | ||
## # adAverage <dbl>, nmVolume <dbl>, nmValue <dbl>, ptVolume <dbl>, | ||
## # ptValue <dbl>, change <dbl>, adChange <dbl>, pctChange <dbl> | ||
|
||
``` r | ||
dplyr::glimpse(dt) | ||
``` | ||
|
||
## Rows: 100 | ||
## Columns: 25 | ||
## $ ticker_name <chr> "VCB", "VCB", "VCB", "VCB", "VCB", "VCB", "VCB", "VCB", "~ | ||
## $ date <date> 2022-03-01, 2022-02-28, 2022-02-25, 2022-02-24, 2022-02-~ | ||
## $ time <chr> "14:44:58", "15:02:03", "15:02:04", "15:02:03", "15:02:03~ | ||
## $ floor <chr> "HOSE", "HOSE", "HOSE", "HOSE", "HOSE", "HOSE", "HOSE", "~ | ||
## $ type <chr> "STOCK", "STOCK", "STOCK", "STOCK", "STOCK", "STOCK", "ST~ | ||
## $ basicPrice <dbl> 84.5, 85.1, 85.3, 86.9, 86.8, 87.4, 87.2, 87.5, 87.0, 87.~ | ||
## $ ceilingPrice <dbl> 90.4, 91.0, 91.2, 92.9, 92.8, 93.5, 93.3, 93.6, 93.0, 93.~ | ||
## $ floorPrice <dbl> 78.6, 79.2, 79.4, 80.9, 80.8, 81.3, 81.1, 81.4, 81.0, 81.~ | ||
## $ open <dbl> 84.5, 85.1, 85.3, 86.7, 87.0, 87.0, 86.6, 86.4, 87.0, 87.~ | ||
## $ high <dbl> 85.4, 85.1, 85.9, 86.8, 87.0, 87.0, 87.6, 87.5, 87.7, 87.~ | ||
## $ low <dbl> 84.1, 84.4, 85.0, 85.0, 85.8, 85.0, 86.6, 86.4, 86.8, 86.~ | ||
## $ close <dbl> 85.0, 84.5, 85.1, 85.3, 86.9, 86.8, 87.4, 87.2, 87.5, 87.~ | ||
## $ average <dbl> 84.8487, 84.7500, 85.2500, 85.7200, 86.7600, 86.0500, 87.~ | ||
## $ adOpen <dbl> 84.5, 85.1, 85.3, 86.7, 87.0, 87.0, 86.6, 86.4, 87.0, 87.~ | ||
## $ adHigh <dbl> 85.4, 85.1, 85.9, 86.8, 87.0, 87.0, 87.6, 87.5, 87.7, 87.~ | ||
## $ adLow <dbl> 84.1, 84.4, 85.0, 85.0, 85.8, 85.0, 86.6, 86.4, 86.8, 86.~ | ||
## $ adClose <dbl> 85.0, 84.5, 85.1, 85.3, 86.9, 86.8, 87.4, 87.2, 87.5, 87.~ | ||
## $ adAverage <dbl> 84.8487, 84.7500, 85.2500, 85.7200, 86.7600, 86.0500, 87.~ | ||
## $ nmVolume <dbl> 1295400, 1322100, 1616500, 2078700, 986300, 1540200, 1017~ | ||
## $ nmValue <dbl> 109913000000, 112046270000, 137812170000, 178190380000, 8~ | ||
## $ ptVolume <dbl> 7900, 0, 60000, 79000, 0, 60000, 79000, 0, 60000, 79000, ~ | ||
## $ ptValue <dbl> 6.588400e+03, 0.000000e+00, 5.217000e+09, 6.768100e+09, 0~ | ||
## $ change <dbl> 0.5, -0.6, -0.2, -1.6, 0.1, -0.6, 0.2, -0.3, 0.5, 0.0, 1.~ | ||
## $ adChange <dbl> 0.5, -0.6, -0.2, -1.6, 0.1, -0.6, 0.2, -0.3, 0.5, 0.0, 1.~ | ||
## $ pctChange <dbl> 0.5917, -0.7051, -0.2345, -1.8412, 0.1152, -0.6865, 0.229~ |
This file was deleted.
Oops, something went wrong.
File renamed without changes.