This crate provides tools to query the SEC's EDGAR API.
Define USER_AGENT in your environment variables. According to the SEC, it must be in the format:
USER_AGENT="Sample Company Name AdminContact@<sample company domain>.com"
Sample Query: ```rust use secedgar::edgar::{edgarclient, getfeedentries, getfeedentrycontent}; use secedgar::edgarquery::cikquery::CIKQuery; use secedgar::edgarquery::filingtypes::FilingTypeOption::10Q; use secedgar::edgarquery::edgarquerybuilder::{FilingInput, EdgarQueryBuilder};
async fn somefunc() { let ticker = "c"; // To save yourself a trip, you can store the file locally and query it instead. // The file can be downloaded from here. // let cikquery = CIKQuery::new(Some("./ignore/ticker.txt")) let cikquery = CIKQuery::new(None) .getcik(ticker) .await .expect("ticker not found"); let query = EdgarQueryBuilder::new(&cikquery) .setfilingtype(FilingInput::TypeFiling(10Q)) .build() .unwrap(); let entries = getfeedentries(edgarclient(), query).await; let filingtype = getfeedentrycontent(entries.first().unwrap()) .await .filingtype .value; } ```