Gdex v0.1.1 Gdex.Websocket.Client View Source
This module handles the connection to the GDAX Websocket endpoint, while delegating events to the specified websocket handler.
Link to this section Summary
Link to this section Functions
Link to this function
send_request(gdax, request)
View Source
send_request(Gdex.Websocket.State.t, Map.t) :: :ok
Send json request to gdax.
Link to this function
start_link(message_handler, initial_state, opts \\ [])
View Source
start_link(any, any, Keyword.t) :: any
Connect to GDAX and delegate event handling to message_handler
.
Options
:config
- the config to use, seeGdex.Config
Examples
defmodule MyHandler do
use Gdex.Websocket
end
{:ok, pid} = Gdex.Websocket.Client.start_link(MyHandler, [])