Compare commits
2 Commits
master
...
datastore-
Author | SHA1 | Date | |
---|---|---|---|
|
722e3a5aa6 | ||
|
a267389110 |
10
api-output.scm
Normal file
10
api-output.scm
Normal file
@ -0,0 +1,10 @@
|
||||
(import :std/net/request)
|
||||
(define api-output
|
||||
(lambda (stock-symbol)
|
||||
(let-values
|
||||
(((api-url api-function api-key)
|
||||
(values
|
||||
"https://www.alphavantage.co/query?function=~a&symbol=~a&apikey=~a"
|
||||
"TIME_SERIES_DAILY"
|
||||
"EC4C0NRKZAK1Q2UG" ) ))
|
||||
(request-text (http-get (format api-url api-function stock-symbol api-key))) ) ) )
|
21
database.scm
Normal file
21
database.scm
Normal file
@ -0,0 +1,21 @@
|
||||
(import :std/db/dbi
|
||||
:std/db/sqlite )
|
||||
|
||||
(define local-db
|
||||
(sql-connect sqlite-open "test.sqlite") )
|
||||
(define query-db (lambda (query connection)
|
||||
(cond ((not (connection? connection))
|
||||
(error "(ARGUMENT 2) CONNECTION expected") )
|
||||
((not (string? query))
|
||||
(error "(ARGUMENT 1) STRING expected"))
|
||||
((and (connection? connection) (string? query))
|
||||
(sql-query (sql-prepare connection query)))
|
||||
(else error "Unkown Error. Please report a bug :)") ) ))
|
||||
(define exec-db (lambda (exec connection)
|
||||
(cond ((not (connection? connection))
|
||||
(error "(ARGUMENT 2) CONNECTION expected") )
|
||||
((not (string? exec))
|
||||
(error "(ARGUMENT 1) STRING expected"))
|
||||
((and (connection? connection) (string? exec))
|
||||
(sql-exec (sql-prepare connection exec)))
|
||||
(else error "Unkown Error. Please report a bug :)") ) ))
|
341
db.md
Normal file
341
db.md
Normal file
@ -0,0 +1,341 @@
|
||||
# SQL Databases
|
||||
|
||||
## Overview
|
||||
|
||||
## Generic Database Interface
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/dbi)
|
||||
:::
|
||||
|
||||
### connection?
|
||||
::: tip usage
|
||||
```
|
||||
(connection? obj) -> boolean
|
||||
```
|
||||
:::
|
||||
|
||||
Returns #t if the arguemnt is an sql connection object.
|
||||
|
||||
### statement?
|
||||
::: tip usage
|
||||
```
|
||||
(statement? obj) -> boolean
|
||||
```
|
||||
:::
|
||||
|
||||
Returns #t if the argument is an sql statement object.
|
||||
|
||||
### sql-error?
|
||||
::: tip usage
|
||||
```
|
||||
(sql-error? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-close
|
||||
::: tip usage
|
||||
```
|
||||
(sql-close ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-prepare
|
||||
::: tip usage
|
||||
```
|
||||
(sql-prepare str) -> statement
|
||||
str := string that is a valid sql statement
|
||||
```
|
||||
:::
|
||||
|
||||
Converts an sql statement in string form to a statement object to be used with
|
||||
connections established via `sql-connect`.
|
||||
|
||||
### sql-bind
|
||||
::: tip usage
|
||||
```
|
||||
(sql-bind ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-clear
|
||||
::: tip usage
|
||||
```
|
||||
(sql-clear ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-reset
|
||||
::: tip usage
|
||||
```
|
||||
(sql-reset ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-reset/clear
|
||||
::: tip usage
|
||||
```
|
||||
(sql-reset/clear ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-finalize
|
||||
::: tip usage
|
||||
```
|
||||
(sql-finalize ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-eval
|
||||
::: tip usage
|
||||
```
|
||||
(sql-eval ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-eval-query
|
||||
::: tip usage
|
||||
```
|
||||
(sql-eval-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-exec
|
||||
::: tip usage
|
||||
```
|
||||
(sql-exec obj)
|
||||
obj := sql statement object
|
||||
```
|
||||
:::
|
||||
|
||||
Accepts an sql statement object as an argument. Defaults to currently open
|
||||
connection made via `(sql-connect sqlite-open ...)`.
|
||||
|
||||
### sql-query
|
||||
::: tip usage
|
||||
```
|
||||
(sql-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### in-sql-query
|
||||
::: tip usage
|
||||
```
|
||||
(in-sql-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-columns
|
||||
::: tip usage
|
||||
```
|
||||
(sql-columns ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-begin
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-begin ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-commit
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-commit ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-abort
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-abort ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
|
||||
|
||||
## SQLite driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/sqlite)
|
||||
:::
|
||||
|
||||
### sqlite-open
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect sqlite-open str)
|
||||
str := a relative filepath or sqlite connection string
|
||||
```
|
||||
:::
|
||||
|
||||
Opens an sql connection to the database located at the provided path/address.
|
||||
|
||||
|
||||
## PostgreSQL driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/postgresql)
|
||||
:::
|
||||
|
||||
### postgresql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect postgresql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### defcatalog
|
||||
::: tip usage
|
||||
```
|
||||
(defcatalog ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### defcatalog-default
|
||||
::: tip usage
|
||||
```
|
||||
(defcatalog-default ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### default-catalog
|
||||
::: tip usage
|
||||
```
|
||||
(def default-catalog)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### current-catalog
|
||||
::: tip usage
|
||||
```
|
||||
(current-catalog ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
|
||||
## MySQL driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/mysql)
|
||||
:::
|
||||
|
||||
### mysql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect mysql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
## Connection Pools
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/conpool)
|
||||
:::
|
||||
|
||||
### make-conpool
|
||||
::: tip usage
|
||||
```
|
||||
(make-conpool ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool?
|
||||
::: tip usage
|
||||
```
|
||||
(conpool? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-get
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-get ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-put
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-put ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-release
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-release ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-close
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-close ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
## Example
|
336
db.md_original
Normal file
336
db.md_original
Normal file
@ -0,0 +1,336 @@
|
||||
# SQL Databases
|
||||
|
||||
## Overview
|
||||
|
||||
## Generic Database Interface
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/dbi)
|
||||
:::
|
||||
|
||||
### connection?
|
||||
::: tip usage
|
||||
```
|
||||
(connection? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### statement?
|
||||
::: tip usage
|
||||
```
|
||||
(statement? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-error?
|
||||
::: tip usage
|
||||
```
|
||||
(sql-error? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-close
|
||||
::: tip usage
|
||||
```
|
||||
(sql-close ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-prepare
|
||||
::: tip usage
|
||||
```
|
||||
(sql-prepare ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-bind
|
||||
::: tip usage
|
||||
```
|
||||
(sql-bind ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-clear
|
||||
::: tip usage
|
||||
```
|
||||
(sql-clear ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-reset
|
||||
::: tip usage
|
||||
```
|
||||
(sql-reset ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-reset/clear
|
||||
::: tip usage
|
||||
```
|
||||
(sql-reset/clear ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-finalize
|
||||
::: tip usage
|
||||
```
|
||||
(sql-finalize ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-eval
|
||||
::: tip usage
|
||||
```
|
||||
(sql-eval ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-eval-query
|
||||
::: tip usage
|
||||
```
|
||||
(sql-eval-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-exec
|
||||
::: tip usage
|
||||
```
|
||||
(sql-exec ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-query
|
||||
::: tip usage
|
||||
```
|
||||
(sql-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### in-sql-query
|
||||
::: tip usage
|
||||
```
|
||||
(in-sql-query ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-columns
|
||||
::: tip usage
|
||||
```
|
||||
(sql-columns ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-begin
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-begin ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-commit
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-commit ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### sql-txn-abort
|
||||
::: tip usage
|
||||
```
|
||||
(sql-txn-abort ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
|
||||
|
||||
## SQLite driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/sqlite)
|
||||
:::
|
||||
|
||||
### sqlite-open
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect sqlite-open ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
|
||||
## PostgreSQL driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/postgresql)
|
||||
:::
|
||||
|
||||
### postgresql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect postgresql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### defcatalog
|
||||
::: tip usage
|
||||
```
|
||||
(defcatalog ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### defcatalog-default
|
||||
::: tip usage
|
||||
```
|
||||
(defcatalog-default ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### default-catalog
|
||||
::: tip usage
|
||||
```
|
||||
(def default-catalog)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### current-catalog
|
||||
::: tip usage
|
||||
```
|
||||
(current-catalog ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
|
||||
## MySQL driver
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/mysql)
|
||||
:::
|
||||
|
||||
### mysql-connect
|
||||
::: tip usage
|
||||
```
|
||||
(sql-connect mysql-connect ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
## Connection Pools
|
||||
|
||||
::: tip usage
|
||||
(import :std/db/conpool)
|
||||
:::
|
||||
|
||||
### make-conpool
|
||||
::: tip usage
|
||||
```
|
||||
(make-conpool ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool?
|
||||
::: tip usage
|
||||
```
|
||||
(conpool? ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-get
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-get ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-put
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-put ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-release
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-release ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
### conpool-close
|
||||
::: tip usage
|
||||
```
|
||||
(conpool-close ...)
|
||||
```
|
||||
:::
|
||||
|
||||
Please document me!
|
||||
|
||||
## Example
|
58
holding.scm
Normal file
58
holding.scm
Normal file
@ -0,0 +1,58 @@
|
||||
(import :std/format)
|
||||
;; Units
|
||||
(define is-units? (lambda (object);;; Inspector
|
||||
(cond ((eq? 'units (car object)) #t)
|
||||
(else #f) ) ))
|
||||
|
||||
(define make-units (lambda (units);;; Constructor
|
||||
(cond ((not (zero? units)) (cons 'units units))
|
||||
(else (error "(Argument 1) Unsigned 8 bit exact non-zero INTEGER expected")) ) ))
|
||||
|
||||
;; Asset
|
||||
(define is-asset? (lambda (object);;; Inspector
|
||||
(cond ((eq? 'asset (car object)) #t)
|
||||
(else #f) ) ))
|
||||
|
||||
;; New make-asset
|
||||
(define asset-types (vector "ETF" "Stock" "Mutual Fund"))
|
||||
(define make-asset (lambda (asset asset-type)
|
||||
(let loop
|
||||
((vector-index (- (vector-length asset-types) 1)))
|
||||
;(display (format "Evaluates ~a = ~a .\n" (vector-ref asset-types vector-index) asset-type))
|
||||
;(display (equal? (vector-ref asset-types vector-index) asset-type))
|
||||
(cond ((> 0 vector-index)
|
||||
(error `"(Argument 2) defined ASSET-TYPE expected. Is ,asset-type defined?"))
|
||||
((equal? (vector-ref asset-types vector-index) asset-type)
|
||||
(list 'asset asset asset-type) )
|
||||
(else (loop (- vector-index 1))) ) ) ))
|
||||
;(define make-asset (lambda (asset);;; Constructor
|
||||
; (cond ((string? asset) (cons 'asset asset))
|
||||
; (else (error "(Argument 1) STRING expected")) ) ))
|
||||
|
||||
;;Holding
|
||||
(define is-holding? (lambda (object);;; Inspector
|
||||
(cond ((eq? 'holding (car object)) #t)
|
||||
(else #f) ) ))
|
||||
|
||||
(define make-holding (lambda (asset units);;; Constructor
|
||||
(cond ((and (is-asset? asset) (is-units? units)) (list 'holding asset units))
|
||||
(else (error "Type Error")) ) ))
|
||||
|
||||
(define get-units (lambda (holding);;; Selector->Units
|
||||
(cond ((is-holding? holding) (caddr holding))
|
||||
(else (error "(Argument 1) HOLDING expected")) ) ))
|
||||
|
||||
(define get-asset (lambda (holding);;; Selector->Asset
|
||||
(cond ((is-holding? holding) (cadr holding))
|
||||
(else (error "(Argument 1) HOLDING expected")) ) ))
|
||||
|
||||
(define get-asset-type (lambda (holding);;; Selector->Asset
|
||||
(cond ((is-holding? holding) (list-ref (cadr holding) 2))
|
||||
(else (error "(Argument 1) HOLDING expected")) ) ))
|
||||
|
||||
(define print-holding (lambda (holding);;; Print
|
||||
(cond ((is-holding? holding)
|
||||
(printf (format "(~a)[~d]\n"
|
||||
(cadr (get-asset holding)) (cdr (get-units holding)) )) )
|
||||
(else (error "(Argument 1) HOLDING expected")) ) ))
|
||||
;; Database functions
|
74
patch_2020-11-15.txt
Normal file
74
patch_2020-11-15.txt
Normal file
@ -0,0 +1,74 @@
|
||||
--- db.md_original 2020-11-15 22:37:01.041227106 -0500
|
||||
+++ db.md 2020-11-15 22:49:31.107770676 -0500
|
||||
@@ -11,20 +11,20 @@
|
||||
### connection?
|
||||
::: tip usage
|
||||
```
|
||||
-(connection? ...)
|
||||
+(connection? obj) -> boolean
|
||||
```
|
||||
:::
|
||||
|
||||
-Please document me!
|
||||
+Returns #t if the arguemnt is an sql connection object.
|
||||
|
||||
### statement?
|
||||
::: tip usage
|
||||
```
|
||||
-(statement? ...)
|
||||
+(statement? obj) -> boolean
|
||||
```
|
||||
:::
|
||||
|
||||
-Please document me!
|
||||
+Returns #t if the argument is an sql statement object.
|
||||
|
||||
### sql-error?
|
||||
::: tip usage
|
||||
@@ -56,11 +56,13 @@
|
||||
### sql-prepare
|
||||
::: tip usage
|
||||
```
|
||||
-(sql-prepare ...)
|
||||
+(sql-prepare str) -> statement
|
||||
+ str := string that is a valid sql statement
|
||||
```
|
||||
:::
|
||||
|
||||
-Please document me!
|
||||
+Converts an sql statement in string form to a statement object to be used with
|
||||
+connections established via `sql-connect`.
|
||||
|
||||
### sql-bind
|
||||
::: tip usage
|
||||
@@ -128,11 +130,13 @@
|
||||
### sql-exec
|
||||
::: tip usage
|
||||
```
|
||||
-(sql-exec ...)
|
||||
+(sql-exec obj)
|
||||
+ obj := sql statement object
|
||||
```
|
||||
:::
|
||||
|
||||
-Please document me!
|
||||
+Accepts an sql statement object as an argument. Defaults to currently open
|
||||
+connection made via `(sql-connect sqlite-open ...)`.
|
||||
|
||||
### sql-query
|
||||
::: tip usage
|
||||
@@ -199,11 +203,12 @@
|
||||
### sqlite-open
|
||||
::: tip usage
|
||||
```
|
||||
-(sql-connect sqlite-open ...)
|
||||
+(sql-connect sqlite-open str)
|
||||
+ str := a relative filepath or sqlite connection string
|
||||
```
|
||||
:::
|
||||
|
||||
-Please document me!
|
||||
+Opens an sql connection to the database located at the provided path/address.
|
||||
|
||||
|
||||
## PostgreSQL driver
|
14
portfolio.scm
Normal file
14
portfolio.scm
Normal file
@ -0,0 +1,14 @@
|
||||
;(import :std/db/dbi
|
||||
; :std/db/sqlite )
|
||||
|
||||
(load "database.scm")
|
||||
(load "holding.scm")
|
||||
|
||||
(define portfolio
|
||||
(lambda (db-connection arguments)
|
||||
(exit)
|
||||
) )
|
||||
;(vector->list (tscar (sql-query (sql-prepare db-connection
|
||||
;(cdr (assoc portfolio-action action-query)))))) ) ) ) )
|
||||
;`((get-assets . "SELECT * FROM stocksymbols;")
|
||||
;(add-asset . "INSERT INTO stocksymbols (symbol, shares) VALUES ('~a', ~d);"))
|
2
sqlite_testing.scm
Normal file
2
sqlite_testing.scm
Normal file
@ -0,0 +1,2 @@
|
||||
(import :std/db/dbi :std/db/sqlite)
|
||||
(define dbconnection (sql-connect sqlite-open "test.sqlite"))
|
@ -1,44 +1,25 @@
|
||||
#!/bin/env gxi
|
||||
|
||||
|
||||
(import :std/net/request
|
||||
:std/format
|
||||
:std/xml
|
||||
(import :std/format
|
||||
:std/text/json)
|
||||
|
||||
(map (lambda (x) (load x)) `("api-output.scm" "portfolio.scm"))
|
||||
#| Yahoo Finance Headers
|
||||
headers: '( ("x-rapidapi-host" . "apidojo-yahoo-finance-v1.p.rapidapi.com")
|
||||
("x-rapidapi-key" . "98c32048f8mshe6f4d8a686ddce9p18cc5ajsn8b8888e7e256") )
|
||||
|#
|
||||
; Declare the file from which we'll load our stockminder configuration
|
||||
; Things like stock symbols, favourite functions, timing preferences, etc.
|
||||
(define-values
|
||||
(stockminder-config stocklist output-file)
|
||||
(values
|
||||
(open-input-file "stocklist.conf")
|
||||
; Initialize our stocklist so we can throw stuff in there after we parse
|
||||
; the config file.
|
||||
`()
|
||||
(open-output-file "test.out") ) )
|
||||
; The procedure we'll use to iterate through config values and add symbols
|
||||
; to our stocklist
|
||||
(define read-config (lambda (config-file)
|
||||
(let read-loop ((config-chomp (read config-file)))
|
||||
(if (eof-object? config-chomp)
|
||||
(close-input-port config-file)
|
||||
(and (set! stocklist (append stocklist `(,config-chomp)))
|
||||
(read-loop (read config-file)) ) ) ) ))
|
||||
; Now the business end; parse the config file
|
||||
(read-config stockminder-config)
|
||||
|
||||
(define-values
|
||||
(api-function api-url api-key)
|
||||
(values
|
||||
"TIME_SERIES_DAILY"
|
||||
"https://www.alphavantage.co/"
|
||||
"EC4C0NRKZAK1Q2UG" ) )
|
||||
(let
|
||||
((stock-symbols stocklist))
|
||||
(map (lambda (x) (display (string-append
|
||||
api-url "query?function=" api-function "&symbol=" (symbol->string x) "&apikey=" api-key "\n")))
|
||||
stock-symbols ) )
|
||||
; Initialize the db connections we'll need to store stockminder's config
|
||||
; Things like stock symbols, favourite functions, timing preferences, etc.
|
||||
;(define local-db
|
||||
; (sql-connect sqlite-open "test.sqlite") )
|
||||
; The procedure we'll use to iterate through portfolio values and add symbols
|
||||
; to our stocklist
|
||||
;(define actions
|
||||
; `((get-assets . "SELECT * FROM stocksymbols;")
|
||||
; ;(add-asset . ,(format "INSERT INTO stocksymbols (symbol, shares) VALUES ('~a', ~d);" stock-symbol number-of-shares)))
|
||||
; ) )
|
||||
|
||||
;(display (portfolio local-db `get-assets))
|
||||
;(display (portfolio local-db `add-asset (list "VIU" 10)))
|
||||
|
711
test.json
Normal file
711
test.json
Normal file
@ -0,0 +1,711 @@
|
||||
{
|
||||
"Meta Data": {
|
||||
"1. Information": "Daily Prices (open, high, low, close) and Volumes",
|
||||
"2. Symbol": "VUN.TO",
|
||||
"3. Last Refreshed": "2020-11-13",
|
||||
"4. Output Size": "Compact",
|
||||
"5. Time Zone": "US/Eastern"
|
||||
},
|
||||
"Time Series (Daily)": {
|
||||
"2020-11-13": {
|
||||
"1. open": "64.9900",
|
||||
"2. high": "65.6000",
|
||||
"3. low": "64.9800",
|
||||
"4. close": "65.4700",
|
||||
"5. volume": "23542"
|
||||
},
|
||||
"2020-11-12": {
|
||||
"1. open": "65.0000",
|
||||
"2. high": "65.0400",
|
||||
"3. low": "64.2700",
|
||||
"4. close": "64.5200",
|
||||
"5. volume": "32900"
|
||||
},
|
||||
"2020-11-11": {
|
||||
"1. open": "65.0000",
|
||||
"2. high": "65.0000",
|
||||
"3. low": "64.4800",
|
||||
"4. close": "64.8200",
|
||||
"5. volume": "21400"
|
||||
},
|
||||
"2020-11-10": {
|
||||
"1. open": "64.3500",
|
||||
"2. high": "64.3500",
|
||||
"3. low": "63.4700",
|
||||
"4. close": "64.1400",
|
||||
"5. volume": "45300"
|
||||
},
|
||||
"2020-11-09": {
|
||||
"1. open": "65.9700",
|
||||
"2. high": "66.0000",
|
||||
"3. low": "64.0900",
|
||||
"4. close": "64.0900",
|
||||
"5. volume": "73200"
|
||||
},
|
||||
"2020-11-06": {
|
||||
"1. open": "64.0000",
|
||||
"2. high": "64.0000",
|
||||
"3. low": "63.2600",
|
||||
"4. close": "63.5300",
|
||||
"5. volume": "37900"
|
||||
},
|
||||
"2020-11-05": {
|
||||
"1. open": "63.6000",
|
||||
"2. high": "63.8000",
|
||||
"3. low": "63.3900",
|
||||
"4. close": "63.6700",
|
||||
"5. volume": "44100"
|
||||
},
|
||||
"2020-11-04": {
|
||||
"1. open": "62.0400",
|
||||
"2. high": "63.3800",
|
||||
"3. low": "62.0400",
|
||||
"4. close": "62.7400",
|
||||
"5. volume": "25500"
|
||||
},
|
||||
"2020-11-03": {
|
||||
"1. open": "61.5300",
|
||||
"2. high": "61.7600",
|
||||
"3. low": "60.8500",
|
||||
"4. close": "61.5300",
|
||||
"5. volume": "33700"
|
||||
},
|
||||
"2020-11-02": {
|
||||
"1. open": "60.6500",
|
||||
"2. high": "61.1000",
|
||||
"3. low": "60.2600",
|
||||
"4. close": "60.6500",
|
||||
"5. volume": "45100"
|
||||
},
|
||||
"2020-10-30": {
|
||||
"1. open": "60.4600",
|
||||
"2. high": "60.9400",
|
||||
"3. low": "59.8000",
|
||||
"4. close": "60.4300",
|
||||
"5. volume": "94700"
|
||||
},
|
||||
"2020-10-29": {
|
||||
"1. open": "61.0100",
|
||||
"2. high": "61.6600",
|
||||
"3. low": "60.6200",
|
||||
"4. close": "61.2400",
|
||||
"5. volume": "41100"
|
||||
},
|
||||
"2020-10-28": {
|
||||
"1. open": "60.8100",
|
||||
"2. high": "61.4300",
|
||||
"3. low": "60.5000",
|
||||
"4. close": "60.5100",
|
||||
"5. volume": "69600"
|
||||
},
|
||||
"2020-10-27": {
|
||||
"1. open": "62.4000",
|
||||
"2. high": "62.4000",
|
||||
"3. low": "61.8900",
|
||||
"4. close": "61.9600",
|
||||
"5. volume": "53700"
|
||||
},
|
||||
"2020-10-26": {
|
||||
"1. open": "62.8500",
|
||||
"2. high": "62.8500",
|
||||
"3. low": "61.7000",
|
||||
"4. close": "62.2600",
|
||||
"5. volume": "59800"
|
||||
},
|
||||
"2020-10-23": {
|
||||
"1. open": "63.0100",
|
||||
"2. high": "63.1500",
|
||||
"3. low": "62.7700",
|
||||
"4. close": "63.1500",
|
||||
"5. volume": "37200"
|
||||
},
|
||||
"2020-10-22": {
|
||||
"1. open": "62.4600",
|
||||
"2. high": "63.0200",
|
||||
"3. low": "62.2500",
|
||||
"4. close": "62.9400",
|
||||
"5. volume": "30200"
|
||||
},
|
||||
"2020-10-21": {
|
||||
"1. open": "62.8900",
|
||||
"2. high": "62.9400",
|
||||
"3. low": "62.4800",
|
||||
"4. close": "62.5400",
|
||||
"5. volume": "35900"
|
||||
},
|
||||
"2020-10-20": {
|
||||
"1. open": "62.9000",
|
||||
"2. high": "63.1700",
|
||||
"3. low": "62.5600",
|
||||
"4. close": "62.7300",
|
||||
"5. volume": "46600"
|
||||
},
|
||||
"2020-10-19": {
|
||||
"1. open": "63.8200",
|
||||
"2. high": "63.8600",
|
||||
"3. low": "62.6500",
|
||||
"4. close": "62.7200",
|
||||
"5. volume": "42300"
|
||||
},
|
||||
"2020-10-16": {
|
||||
"1. open": "64.0400",
|
||||
"2. high": "64.2900",
|
||||
"3. low": "63.7300",
|
||||
"4. close": "63.7500",
|
||||
"5. volume": "22300"
|
||||
},
|
||||
"2020-10-15": {
|
||||
"1. open": "63.1500",
|
||||
"2. high": "63.9000",
|
||||
"3. low": "63.1500",
|
||||
"4. close": "63.8700",
|
||||
"5. volume": "24500"
|
||||
},
|
||||
"2020-10-14": {
|
||||
"1. open": "63.9600",
|
||||
"2. high": "64.2000",
|
||||
"3. low": "63.4900",
|
||||
"4. close": "63.6000",
|
||||
"5. volume": "36300"
|
||||
},
|
||||
"2020-10-13": {
|
||||
"1. open": "63.8000",
|
||||
"2. high": "64.1700",
|
||||
"3. low": "63.8000",
|
||||
"4. close": "63.9600",
|
||||
"5. volume": "32800"
|
||||
},
|
||||
"2020-10-09": {
|
||||
"1. open": "63.0000",
|
||||
"2. high": "63.3300",
|
||||
"3. low": "63.0000",
|
||||
"4. close": "63.1800",
|
||||
"5. volume": "40400"
|
||||
},
|
||||
"2020-10-08": {
|
||||
"1. open": "63.0000",
|
||||
"2. high": "63.2500",
|
||||
"3. low": "62.9600",
|
||||
"4. close": "63.1200",
|
||||
"5. volume": "21700"
|
||||
},
|
||||
"2020-10-07": {
|
||||
"1. open": "62.5600",
|
||||
"2. high": "62.9800",
|
||||
"3. low": "62.4100",
|
||||
"4. close": "62.9100",
|
||||
"5. volume": "25500"
|
||||
},
|
||||
"2020-10-06": {
|
||||
"1. open": "62.8500",
|
||||
"2. high": "63.0100",
|
||||
"3. low": "61.9000",
|
||||
"4. close": "61.9700",
|
||||
"5. volume": "44400"
|
||||
},
|
||||
"2020-10-05": {
|
||||
"1. open": "61.8900",
|
||||
"2. high": "62.5600",
|
||||
"3. low": "61.8800",
|
||||
"4. close": "62.5600",
|
||||
"5. volume": "22000"
|
||||
},
|
||||
"2020-10-02": {
|
||||
"1. open": "61.2200",
|
||||
"2. high": "61.9000",
|
||||
"3. low": "61.2100",
|
||||
"4. close": "61.6700",
|
||||
"5. volume": "32800"
|
||||
},
|
||||
"2020-10-01": {
|
||||
"1. open": "62.4700",
|
||||
"2. high": "62.4700",
|
||||
"3. low": "61.6900",
|
||||
"4. close": "62.0100",
|
||||
"5. volume": "32800"
|
||||
},
|
||||
"2020-09-30": {
|
||||
"1. open": "61.1900",
|
||||
"2. high": "62.1800",
|
||||
"3. low": "61.1900",
|
||||
"4. close": "61.6600",
|
||||
"5. volume": "37000"
|
||||
},
|
||||
"2020-09-29": {
|
||||
"1. open": "61.9900",
|
||||
"2. high": "61.9900",
|
||||
"3. low": "61.5000",
|
||||
"4. close": "61.5400",
|
||||
"5. volume": "18800"
|
||||
},
|
||||
"2020-09-28": {
|
||||
"1. open": "61.0000",
|
||||
"2. high": "61.8700",
|
||||
"3. low": "61.0000",
|
||||
"4. close": "61.7600",
|
||||
"5. volume": "22100"
|
||||
},
|
||||
"2020-09-25": {
|
||||
"1. open": "60.0600",
|
||||
"2. high": "60.9000",
|
||||
"3. low": "59.6200",
|
||||
"4. close": "60.7900",
|
||||
"5. volume": "24100"
|
||||
},
|
||||
"2020-09-24": {
|
||||
"1. open": "59.0100",
|
||||
"2. high": "60.3700",
|
||||
"3. low": "59.0100",
|
||||
"4. close": "59.8500",
|
||||
"5. volume": "28100"
|
||||
},
|
||||
"2020-09-23": {
|
||||
"1. open": "61.0600",
|
||||
"2. high": "61.2900",
|
||||
"3. low": "59.8300",
|
||||
"4. close": "59.8800",
|
||||
"5. volume": "24400"
|
||||
},
|
||||
"2020-09-22": {
|
||||
"1. open": "60.3300",
|
||||
"2. high": "61.0500",
|
||||
"3. low": "60.3300",
|
||||
"4. close": "61.0300",
|
||||
"5. volume": "31300"
|
||||
},
|
||||
"2020-09-21": {
|
||||
"1. open": "59.7500",
|
||||
"2. high": "60.4300",
|
||||
"3. low": "59.4700",
|
||||
"4. close": "60.4300",
|
||||
"5. volume": "45200"
|
||||
},
|
||||
"2020-09-18": {
|
||||
"1. open": "61.1000",
|
||||
"2. high": "61.6200",
|
||||
"3. low": "60.1500",
|
||||
"4. close": "60.6900",
|
||||
"5. volume": "31977"
|
||||
},
|
||||
"2020-09-17": {
|
||||
"1. open": "60.4900",
|
||||
"2. high": "61.5000",
|
||||
"3. low": "60.4900",
|
||||
"4. close": "61.0400",
|
||||
"5. volume": "47461"
|
||||
},
|
||||
"2020-09-16": {
|
||||
"1. open": "62.0000",
|
||||
"2. high": "62.2400",
|
||||
"3. low": "61.6800",
|
||||
"4. close": "61.6800",
|
||||
"5. volume": "25020"
|
||||
},
|
||||
"2020-09-15": {
|
||||
"1. open": "61.8800",
|
||||
"2. high": "62.1900",
|
||||
"3. low": "61.7700",
|
||||
"4. close": "61.9500",
|
||||
"5. volume": "23968"
|
||||
},
|
||||
"2020-09-14": {
|
||||
"1. open": "60.8400",
|
||||
"2. high": "61.6800",
|
||||
"3. low": "60.8400",
|
||||
"4. close": "61.5300",
|
||||
"5. volume": "46103"
|
||||
},
|
||||
"2020-09-11": {
|
||||
"1. open": "60.7400",
|
||||
"2. high": "61.0300",
|
||||
"3. low": "60.1500",
|
||||
"4. close": "60.6200",
|
||||
"5. volume": "35946"
|
||||
},
|
||||
"2020-09-10": {
|
||||
"1. open": "61.7300",
|
||||
"2. high": "61.9300",
|
||||
"3. low": "60.5000",
|
||||
"4. close": "60.6900",
|
||||
"5. volume": "38051"
|
||||
},
|
||||
"2020-09-09": {
|
||||
"1. open": "61.6700",
|
||||
"2. high": "61.8800",
|
||||
"3. low": "61.1300",
|
||||
"4. close": "61.4700",
|
||||
"5. volume": "39282"
|
||||
},
|
||||
"2020-09-08": {
|
||||
"1. open": "60.7100",
|
||||
"2. high": "61.2700",
|
||||
"3. low": "60.5500",
|
||||
"4. close": "60.6200",
|
||||
"5. volume": "87275"
|
||||
},
|
||||
"2020-09-04": {
|
||||
"1. open": "62.8100",
|
||||
"2. high": "62.8100",
|
||||
"3. low": "60.4500",
|
||||
"4. close": "61.5900",
|
||||
"5. volume": "52367"
|
||||
},
|
||||
"2020-09-03": {
|
||||
"1. open": "64.5100",
|
||||
"2. high": "64.5100",
|
||||
"3. low": "61.9800",
|
||||
"4. close": "62.4200",
|
||||
"5. volume": "37535"
|
||||
},
|
||||
"2020-09-02": {
|
||||
"1. open": "63.4100",
|
||||
"2. high": "64.4300",
|
||||
"3. low": "63.4100",
|
||||
"4. close": "64.3000",
|
||||
"5. volume": "43434"
|
||||
},
|
||||
"2020-09-01": {
|
||||
"1. open": "63.3300",
|
||||
"2. high": "63.5200",
|
||||
"3. low": "62.8800",
|
||||
"4. close": "63.5200",
|
||||
"5. volume": "44655"
|
||||
},
|
||||
"2020-08-31": {
|
||||
"1. open": "62.9300",
|
||||
"2. high": "63.1200",
|
||||
"3. low": "62.8300",
|
||||
"4. close": "62.8900",
|
||||
"5. volume": "39910"
|
||||
},
|
||||
"2020-08-28": {
|
||||
"1. open": "63.3400",
|
||||
"2. high": "63.3400",
|
||||
"3. low": "62.8700",
|
||||
"4. close": "63.2500",
|
||||
"5. volume": "28728"
|
||||
},
|
||||
"2020-08-27": {
|
||||
"1. open": "62.8800",
|
||||
"2. high": "63.2500",
|
||||
"3. low": "62.7400",
|
||||
"4. close": "62.9400",
|
||||
"5. volume": "26563"
|
||||
},
|
||||
"2020-08-26": {
|
||||
"1. open": "62.4500",
|
||||
"2. high": "62.9200",
|
||||
"3. low": "62.4500",
|
||||
"4. close": "62.9100",
|
||||
"5. volume": "17282"
|
||||
},
|
||||
"2020-08-25": {
|
||||
"1. open": "62.4500",
|
||||
"2. high": "62.5100",
|
||||
"3. low": "62.2100",
|
||||
"4. close": "62.5100",
|
||||
"5. volume": "29454"
|
||||
},
|
||||
"2020-08-24": {
|
||||
"1. open": "61.8300",
|
||||
"2. high": "62.4500",
|
||||
"3. low": "61.8300",
|
||||
"4. close": "62.4500",
|
||||
"5. volume": "21240"
|
||||
},
|
||||
"2020-08-21": {
|
||||
"1. open": "61.3200",
|
||||
"2. high": "61.8000",
|
||||
"3. low": "61.3200",
|
||||
"4. close": "61.7200",
|
||||
"5. volume": "20473"
|
||||
},
|
||||
"2020-08-20": {
|
||||
"1. open": "61.2600",
|
||||
"2. high": "61.5600",
|
||||
"3. low": "61.2400",
|
||||
"4. close": "61.4900",
|
||||
"5. volume": "22203"
|
||||
},
|
||||
"2020-08-19": {
|
||||
"1. open": "61.6100",
|
||||
"2. high": "61.7700",
|
||||
"3. low": "61.4300",
|
||||
"4. close": "61.5200",
|
||||
"5. volume": "25104"
|
||||
},
|
||||
"2020-08-18": {
|
||||
"1. open": "61.5700",
|
||||
"2. high": "61.6500",
|
||||
"3. low": "61.3300",
|
||||
"4. close": "61.5700",
|
||||
"5. volume": "14373"
|
||||
},
|
||||
"2020-08-17": {
|
||||
"1. open": "61.6000",
|
||||
"2. high": "61.6500",
|
||||
"3. low": "61.5300",
|
||||
"4. close": "61.5700",
|
||||
"5. volume": "26781"
|
||||
},
|
||||
"2020-08-14": {
|
||||
"1. open": "61.5100",
|
||||
"2. high": "61.6800",
|
||||
"3. low": "61.4200",
|
||||
"4. close": "61.5700",
|
||||
"5. volume": "24463"
|
||||
},
|
||||
"2020-08-13": {
|
||||
"1. open": "61.4500",
|
||||
"2. high": "61.6600",
|
||||
"3. low": "61.3000",
|
||||
"4. close": "61.4600",
|
||||
"5. volume": "36195"
|
||||
},
|
||||
"2020-08-12": {
|
||||
"1. open": "61.2900",
|
||||
"2. high": "61.7600",
|
||||
"3. low": "61.2900",
|
||||
"4. close": "61.6700",
|
||||
"5. volume": "20120"
|
||||
},
|
||||
"2020-08-11": {
|
||||
"1. open": "61.6000",
|
||||
"2. high": "61.8400",
|
||||
"3. low": "61.0000",
|
||||
"4. close": "61.1100",
|
||||
"5. volume": "47027"
|
||||
},
|
||||
"2020-08-10": {
|
||||
"1. open": "61.7700",
|
||||
"2. high": "61.8500",
|
||||
"3. low": "61.4300",
|
||||
"4. close": "61.7500",
|
||||
"5. volume": "18231"
|
||||
},
|
||||
"2020-08-07": {
|
||||
"1. open": "61.4900",
|
||||
"2. high": "61.7700",
|
||||
"3. low": "61.4000",
|
||||
"4. close": "61.7500",
|
||||
"5. volume": "24413"
|
||||
},
|
||||
"2020-08-06": {
|
||||
"1. open": "60.8900",
|
||||
"2. high": "61.3700",
|
||||
"3. low": "60.8200",
|
||||
"4. close": "61.3200",
|
||||
"5. volume": "36824"
|
||||
},
|
||||
"2020-08-05": {
|
||||
"1. open": "60.8000",
|
||||
"2. high": "60.9400",
|
||||
"3. low": "60.6200",
|
||||
"4. close": "60.9100",
|
||||
"5. volume": "28663"
|
||||
},
|
||||
"2020-08-04": {
|
||||
"1. open": "60.6100",
|
||||
"2. high": "60.9000",
|
||||
"3. low": "60.4900",
|
||||
"4. close": "60.6400",
|
||||
"5. volume": "36923"
|
||||
},
|
||||
"2020-07-31": {
|
||||
"1. open": "60.0400",
|
||||
"2. high": "60.3200",
|
||||
"3. low": "59.4400",
|
||||
"4. close": "60.2500",
|
||||
"5. volume": "45159"
|
||||
},
|
||||
"2020-07-30": {
|
||||
"1. open": "59.5900",
|
||||
"2. high": "60.2300",
|
||||
"3. low": "59.3400",
|
||||
"4. close": "60.1700",
|
||||
"5. volume": "50678"
|
||||
},
|
||||
"2020-07-29": {
|
||||
"1. open": "59.4900",
|
||||
"2. high": "59.9400",
|
||||
"3. low": "59.4600",
|
||||
"4. close": "59.8700",
|
||||
"5. volume": "34381"
|
||||
},
|
||||
"2020-07-28": {
|
||||
"1. open": "59.4600",
|
||||
"2. high": "59.6600",
|
||||
"3. low": "59.2300",
|
||||
"4. close": "59.2500",
|
||||
"5. volume": "29191"
|
||||
},
|
||||
"2020-07-27": {
|
||||
"1. open": "59.3100",
|
||||
"2. high": "59.6300",
|
||||
"3. low": "59.2600",
|
||||
"4. close": "59.5500",
|
||||
"5. volume": "55342"
|
||||
},
|
||||
"2020-07-24": {
|
||||
"1. open": "59.6300",
|
||||
"2. high": "59.6300",
|
||||
"3. low": "59.1700",
|
||||
"4. close": "59.3200",
|
||||
"5. volume": "21478"
|
||||
},
|
||||
"2020-07-23": {
|
||||
"1. open": "60.4400",
|
||||
"2. high": "60.5500",
|
||||
"3. low": "59.4700",
|
||||
"4. close": "59.7500",
|
||||
"5. volume": "47024"
|
||||
},
|
||||
"2020-07-22": {
|
||||
"1. open": "60.3600",
|
||||
"2. high": "60.4600",
|
||||
"3. low": "60.0600",
|
||||
"4. close": "60.4100",
|
||||
"5. volume": "26229"
|
||||
},
|
||||
"2020-07-21": {
|
||||
"1. open": "60.4200",
|
||||
"2. high": "60.6000",
|
||||
"3. low": "60.2100",
|
||||
"4. close": "60.2900",
|
||||
"5. volume": "29388"
|
||||
},
|
||||
"2020-07-20": {
|
||||
"1. open": "59.9000",
|
||||
"2. high": "60.6400",
|
||||
"3. low": "59.9000",
|
||||
"4. close": "60.5600",
|
||||
"5. volume": "34699"
|
||||
},
|
||||
"2020-07-17": {
|
||||
"1. open": "60.1600",
|
||||
"2. high": "60.3100",
|
||||
"3. low": "59.8500",
|
||||
"4. close": "60.2000",
|
||||
"5. volume": "38438"
|
||||
},
|
||||
"2020-07-16": {
|
||||
"1. open": "59.7900",
|
||||
"2. high": "60.0300",
|
||||
"3. low": "59.4300",
|
||||
"4. close": "59.9500",
|
||||
"5. volume": "503405"
|
||||
},
|
||||
"2020-07-15": {
|
||||
"1. open": "59.9800",
|
||||
"2. high": "60.2700",
|
||||
"3. low": "59.4500",
|
||||
"4. close": "59.9400",
|
||||
"5. volume": "790194"
|
||||
},
|
||||
"2020-07-14": {
|
||||
"1. open": "58.6700",
|
||||
"2. high": "59.7200",
|
||||
"3. low": "58.4300",
|
||||
"4. close": "59.6700",
|
||||
"5. volume": "397750"
|
||||
},
|
||||
"2020-07-13": {
|
||||
"1. open": "59.4400",
|
||||
"2. high": "60.2900",
|
||||
"3. low": "58.7900",
|
||||
"4. close": "58.8900",
|
||||
"5. volume": "63627"
|
||||
},
|
||||
"2020-07-10": {
|
||||
"1. open": "58.8000",
|
||||
"2. high": "59.5100",
|
||||
"3. low": "58.7200",
|
||||
"4. close": "59.4600",
|
||||
"5. volume": "20406"
|
||||
},
|
||||
"2020-07-09": {
|
||||
"1. open": "58.8300",
|
||||
"2. high": "58.9700",
|
||||
"3. low": "58.0800",
|
||||
"4. close": "58.8500",
|
||||
"5. volume": "20507"
|
||||
},
|
||||
"2020-07-08": {
|
||||
"1. open": "58.6600",
|
||||
"2. high": "58.9700",
|
||||
"3. low": "58.3600",
|
||||
"4. close": "58.8100",
|
||||
"5. volume": "23001"
|
||||
},
|
||||
"2020-07-07": {
|
||||
"1. open": "58.8100",
|
||||
"2. high": "59.3500",
|
||||
"3. low": "58.7300",
|
||||
"4. close": "58.7300",
|
||||
"5. volume": "27759"
|
||||
},
|
||||
"2020-07-06": {
|
||||
"1. open": "58.9400",
|
||||
"2. high": "59.2400",
|
||||
"3. low": "58.9100",
|
||||
"4. close": "59.1000",
|
||||
"5. volume": "33222"
|
||||
},
|
||||
"2020-07-03": {
|
||||
"1. open": "58.1900",
|
||||
"2. high": "58.4900",
|
||||
"3. low": "58.0100",
|
||||
"4. close": "58.0100",
|
||||
"5. volume": "9478"
|
||||
},
|
||||
"2020-07-02": {
|
||||
"1. open": "58.5700",
|
||||
"2. high": "59.0200",
|
||||
"3. low": "58.2700",
|
||||
"4. close": "58.3400",
|
||||
"5. volume": "31396"
|
||||
},
|
||||
"2020-06-30": {
|
||||
"1. open": "57.1600",
|
||||
"2. high": "57.9900",
|
||||
"3. low": "57.1600",
|
||||
"4. close": "57.8500",
|
||||
"5. volume": "27328"
|
||||
},
|
||||
"2020-06-29": {
|
||||
"1. open": "56.6200",
|
||||
"2. high": "57.3200",
|
||||
"3. low": "56.3600",
|
||||
"4. close": "57.3100",
|
||||
"5. volume": "34049"
|
||||
},
|
||||
"2020-06-26": {
|
||||
"1. open": "57.7000",
|
||||
"2. high": "57.7000",
|
||||
"3. low": "56.3900",
|
||||
"4. close": "56.4500",
|
||||
"5. volume": "39764"
|
||||
},
|
||||
"2020-06-25": {
|
||||
"1. open": "56.0600",
|
||||
"2. high": "57.7600",
|
||||
"3. low": "56.0600",
|
||||
"4. close": "57.7600",
|
||||
"5. volume": "38729"
|
||||
},
|
||||
"2020-06-24": {
|
||||
"1. open": "58.3500",
|
||||
"2. high": "58.3500",
|
||||
"3. low": "56.7000",
|
||||
"4. close": "57.2100",
|
||||
"5. volume": "33249"
|
||||
},
|
||||
"2020-06-23": {
|
||||
"1. open": "58.4800",
|
||||
"2. high": "58.7400",
|
||||
"3. low": "58.3100",
|
||||
"4. close": "58.4700",
|
||||
"5. volume": "25160"
|
||||
}
|
||||
}
|
||||
}
|
BIN
test.sqlite
Normal file
BIN
test.sqlite
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user