MarketLists.jl
October 19, 2022
MarketLists.jl on GitHub
Introduction
MarketLists provides a convinience package to download sets of stock symbols.
There are 6 basic functions provided by MarketLists.
The two get Options functions list the valid enchanges, and indexes handled by the other frunctions in the package
getExchangeOptions()
3-element Vector{String}:
"NASDAQ"
"NYSE"
"AMEX"
getIndexOptions()
12-element Vector{Pair{String, String}}:
"CQQQ" => "China Tech ETF"
"DGT" => "DOW Global"
"DIA" => "DOW 30"
"MDY" => "S&P 400"
"ONEK" => "Russell 1000"
"QQQ" => "Nasdaq 100"
...
The getExchangeMembers function downloads the current members of the given exchange in JSON format.
getExchangeMembers("NASDAQ")
Dict{Symbol, Union{Int16, String, Vector{UInt8}}} with 3 entries:
:code => 200
:message => "OK"
:body => "{\"data\":{\"headers\":{\"symbol ...
The getIndexMembersFile function downloads the current index ETF holdings as a file, which is stored in the system temp directory
getIndexMembersFile("SPY")
Dict{Symbol, Union{Int16, String, Vector{UInt8}}} with 3 entries:
:file => "/tmp/holdings-daily-us-en-spy.xlsx"
:code => 200
:message => "OK"
Finally there are 2 additional convienence functions to convert the Exchange JSON, and the Index ETF data to DataFrames.
- parseExchangeResponseToDataFrame
- parseIndexMembersFileToDataFrame