ExBovespa v0.4.0 ExBovespa View Source
ExBovespa helps retrieving stocks data from bovespa website by webscraping their HTML data
Link to this section Summary
Functions
Returns a list of all brokers from bovespa website.
Returns a list of all stocks from bovespa website.
Link to this section Types
Specs
success_price_return() :: [ header: ExBovespa.Structs.PriceRowHeader.t(), items: [ExBovespa.Structs.PriceRowItem.t()] ]
Link to this section Functions
Specs
broker_list() :: {:ok, [ExBovespa.Structs.Broker.t()]} | {:error, :invalid_response}
Returns a list of all brokers from bovespa website.
This resource on bovespa's website uses pagination, so each html request and parser will return a list of items and paging information, that will be used to loop until all pages are visited.
Example
iex> ExBovespa.broker_list()
{:ok, [
%Broker{}
]}
Specs
historical_price(year :: String.t()) :: success_price_return() | {:error, :invalid_response}
Specs
historical_price(year :: String.t(), month :: String.t()) :: success_price_return() | {:error, :invalid_response}
Specs
historical_price(year :: String.t(), month :: String.t(), day :: String.t()) :: success_price_return() | {:error, :invalid_response}
Specs
stock_list() :: {:ok, [ExBovespa.Structs.Stock.t()]} | {:error, :invalid_response}
Returns a list of all stocks from bovespa website.
While running tests on development environment, it took more than 1min 30s to load the entire list of currently availble stocks on B3.
Example
iex> ExBovespa.stock_list()
{:ok, [
%Stock{}
]}