From 80461d7e9c77b025dc294eb21cdc03e158a4294f Mon Sep 17 00:00:00 2001 From: Mike Holloway Date: Wed, 11 Nov 2020 00:49:35 -0500 Subject: [PATCH] On branch apitesting Changes to be committed: new file: stockminder.scm switched api to alphavantage basic API call working with parameters for: symbol, dataset, apikey --- stockminder.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 stockminder.scm diff --git a/stockminder.scm b/stockminder.scm new file mode 100755 index 0000000..2987abc --- /dev/null +++ b/stockminder.scm @@ -0,0 +1,24 @@ +#!/bin/env gxi + +(import :std/net/request) + +#|(print (request-text + (http-get "https://apidojo-yahoo-finance-v1.p.rapidapi.com/market/v2/get-quotes?symbols=AMD%252CIBM%252CAAPL®ion=US" + headers: '( ("x-rapidapi-host" . "apidojo-yahoo-finance-v1.p.rapidapi.com") + ("x-rapidapi-key" . "98c32048f8mshe6f4d8a686ddce9p18cc5ajsn8b8888e7e256") ) + ) +) ) +(http-get "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=VBU.TO&apikey=EC4C0NRKZAK1Q2UG") +(print "Hello, Asshole!") +|# + + +(let + ((stock-symbol "VCN.TO") + (api-function "TIME_SERIES_DAILY") + (api-key "EC4C0NRKZAK1Q2UG") + (api-url "https://www.alphavantage.co/") ) + + (print (request-text (http-get + (string-join (list api-url "query?function=" api-function + "&symbol=" stock-symbol "&apikey=" api-key) "" ) ))) )