Skip to content

Onofre-Portfolio/live-data-feed-system-challenge

Repository files navigation

Live Stock Price Feed System

Versions

  • Erlang/OTP 27
  • Elixir 1.17.3

Usage

My solution prioritized simplicity, so I chose to use IEX to enhance usability.

  • Start the interactive Elixir:
$ iex -S mix
  • Check the available stocks with the following function:
iex(1)> StockPriceStream.Interactive.get_available_stocks()

# Expected:
{:ok, ["STK1", "STK2", "STK3", "STK4", "STK5"]}
  • Choose one stock and start to listening:
iex(2)> StockPriceStream.Interactive.start_listening("STK3")

# Expected:
[info] Subscribed for stock: STK3
[info] Started client subscribed for STK3, PID: #PID<0.223.0>
{:ok, #PID<0.223.0>}
  • Stop listening:
iex(3)> StockPriceStream.Interactive.stop_listening("STK3")

Expected:
[info] Terminanting client #PID<0.223.0>
:ok

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published