https://github.com/gsscoder/yfinance-lfe
LFE library for querying real time stock market data including indexes such as NASDAQ and the S&P500
https://github.com/gsscoder/yfinance-lfe
Last synced: 2 months ago
JSON representation
LFE library for querying real time stock market data including indexes such as NASDAQ and the S&P500
- Host: GitHub
- URL: https://github.com/gsscoder/yfinance-lfe
- Owner: gsscoder
- Created: 2015-08-29T16:53:06.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-13T05:50:50.000Z (almost 10 years ago)
- Last Synced: 2025-03-26T12:51:10.775Z (3 months ago)
- Language: Erlang
- Homepage:
- Size: 135 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yfinance-lfe
Port of F# library [YFinance.fs](https://github.com/gsscoder/YFinance.fs),
originally ported from [yfinance](https://github.com/owainlewis/yfinance) by @owainlewis.## Introduction
LFE library for querying real time stock market data including indexes such as NASDAQ and the S&P500.
## Installation
Just add it to your ``rebar.config`` deps:
```erlang
{deps, [
...
{yfinance-lfe, ".*",
{git, "[email protected]:gsscoder/yfinance-lfe.git", "master"}}
]}.
```And then do the usual:
```bash
$ rebar get-deps
$ rebar compile
```## Usage
```cl
Starting an LFE REPL ...
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]LFE Shell V6.4 (abort with ^G)
> (yfinance-lfe:start)
(#(inets ok) #(ssl ok) #(lhttpc ok) #(lhc ok) #(yfinance-lfe ok))
> (yfinance-lfe:get-stock-quotes `("ORCL" "GOOGL"))
(#(stock-quote
"Google Inc."
"GOOGL"
"644.91"
"+15.35"
"645.06"
"630.64"
"713.33"
"490.91")
#(stock-quote
"Oracle Corporation Common Stock"
"ORCL"
"36.75"
"+0.74"
"36.75"
"36.11"
"46.71"
"35.14"))
> (yfinance-lfe:get-stock-quotes `("MSFT"))
(#(stock-quote
"Microsoft Corporation"
"MSFT"
"43.36"
"+1.54"
"43.38"
"41.88"
"50.05"
"39.72"))
```