getCompanyFacts method
Get raw company facts from SEC EDGAR.
Implementation
@override
Future<Map<String, dynamic>> getCompanyFacts(String ticker) async {
final cik = await getCik(ticker);
if (cik == null) {
throw Exception('Ticker $ticker not found.');
}
// CIK must be 10 digits, zero-padded
final cikStr = cik.toString().padLeft(10, '0');
final url = '$_baseUrl/companyfacts/CIK$cikStr.json';
_logger.info('Fetching facts for $ticker (CIK: $cikStr)...');
final response = await _get(url);
return json.decode(response.body) as Map<String, dynamic>;
}