MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / fetchCvmData

Function fetchCvmData

services/cvm/fundos.js:54–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52};
53
54const fetchCvmData = async () => {
55 const response = await axios.get(
56 'https://dados.cvm.gov.br/dados/FI/CAD/DADOS/cad_fi.csv',
57 { timeout: 3000, responseType: 'arraybuffer' }
58 );
59
60 const string = response.data.toString('latin1');
61
62 return string;
63};
64
65const parseCvmData = (data, opts = {}) => {
66 const parsedData = Papa.parse(data, {

Callers 2

getFundsFunction · 0.85
getFundDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected