A Lua wrapper for the alphavantage API
Please refer to: https://www.alphavantage.co/documentation/ for what everything does. If you find any bugs feel free to contact me.
This requires luasec to be installed. However, luajit request is also compatiable with this.
#Usage
alpha = require("alphavantage")
alpha.setAPIKey("your-api-key")
List of methods and arguments, again for details refer to the above link, it explains it in detail. I am only going over how I wraped things.
alpha.setAPIKey(string: key)
Sets the API key
alpha.getPhysicalCurrencyList(boolean: force)
returns a list of Physical Currencies
alpha.getDigitalCurrencyList(boolean: force)
returns a list of Digital Currencies Note: The above 2 function have a table format of key: "currency code" val: "name of currency". Also these functions also cache a file containing a list of currencies. Setting force to true will force the function to request a list of currencies again.
alpha.globalQuote(symbols)
returns the current price and metadata of a stock or a table of stocks