https://github.com/piquette/edgr
A set of tools for dealing with SEC EDGAR corporate filings
https://github.com/piquette/edgr
api cli-app data-analysis data-mining edgar-database edgar-scraper finance financial-analysis sec-edgar sec-filings
Last synced: 19 days ago
JSON representation
A set of tools for dealing with SEC EDGAR corporate filings
- Host: GitHub
- URL: https://github.com/piquette/edgr
- Owner: piquette
- License: apache-2.0
- Created: 2019-11-13T04:37:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-18T03:15:28.000Z (over 5 years ago)
- Last Synced: 2024-06-19T04:13:47.467Z (12 months ago)
- Topics: api, cli-app, data-analysis, data-mining, edgar-database, edgar-scraper, finance, financial-analysis, sec-edgar, sec-filings
- Language: Go
- Homepage: https://piquette.io/projects/edgr
- Size: 918 KB
- Stars: 23
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# edgr | Makes SEC filings not terrible
[](https://goreportcard.com/badge/github.com/piquette/edgr)
[](https://travis-ci.org/piquette/edgr)
[](https://godoc.org/github.com/piquette/qtrn)
[](https://opensource.org/licenses/Apache-2.0)This project consists of:
* `edgr` - a cli tool that can populate a postgres db with SEC filings for use in data analysis projects
* `github.com/edgr/core` a go module that requests SEC filers/filings and can be used in other go projects## edgr CLI
The `edgr` tool makes jumpstarting your data analysis projects that much easier by abstacting away a lot of annoying SEC EDGAR data gathering and parsing. `edgr` can download, parse full text, and persist large quantities of SEC filings in a pre-configured postgres db.### Installation
`edgr` supports macOS, linux, and windows systems.#### Brew
The preferred way to install, run the following commands in the terminal after installing homebrew
```sh
brew tap piquette/edgr
brew install edgr
```
#### Download the binary
Distributions for your specific OS can be found on the releases page for this repo.#### Build from source
Clone this repository and run `make build`### Usage
`edgr` is a standard cli executable. A running/reachable postgres instance is required for proper usage. You can easily run one locally through docker.
```sh
docker run -p 5432:5432 -d postgres:9.6
```
The default parameters for `edgr` commands will be able to access this instance immediately.
Next, we need to set up the proper db tables to store data. In the terminal, run
```sh
edgr init
```
Finally, we need to insert some desired filers into the db so we can pull some filings.
```sh
# add the filer.
edgr filers init --symbol AAPL
# download 8-K filings for apple inc.
edgr get --symbol AAPL --form 8-K
```
Now you can access the raw text and meta-data associated with those filings in the database as you normally would, through other analytical tools or a command-line pg client. Run `edgr help` for more information regarding commands.## `github.com/edgr/core` module
### Installation
Supports Go v1.13+ and modules. Run the usual
```sh
go get -u github.com/piquette/edgr
```### Usage
There are 3 easy functions
```go
// GetPublicCompanies returns a list of public companies.
func GetPublicCompanies() ([]Company, error) {...}// GetFiler gets a single filer from the SEC website based on symbol.
func GetFiler(symbol string) (filer *model.Filer, err error) {...}// GetFilings gets a list of filings for a single CIK.
func GetFilings(cik, formtype, stoptime string) (filings []SECFiling, err error) {...}
```