To subscribe to websocket feed of one of the 4 exchanges use:
{:ok, pid} = ExPriceAggregator.track_trades(:okex, "btc", "usdt")
:ok = ExPriceAggregator.untrack_trades(:okex, "btc", "usdt")
If available in Hex, the package can be installed
by adding ex_price_aggregator
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_price_aggregator, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_price_aggregator.