Gdex v0.1.2 Gdex.Websocket.Subscribe View Source
Functions to send subscribe messages to GDAX.
Link to this section Summary
Functions
Subscribe to channels
for the given product_ids
Send the request
to gdax
. Use this if you want more control on channels and products
Link to this section Types
Link to this type
channels()
View Source
channels() :: Gdex.Websocket.channel() | [Gdex.Websocket.channel()]
Link to this section Functions
Link to this function
subscribe(gdax, channels, product_ids, opts \\ [])
View Source
subscribe(Gdex.Websocket.State.t(), channels(), product_ids(), [subscribe_opt()]) :: :ok
Subscribe to channels
for the given product_ids
.
Options
:authenticate
- wheter to send an authenticated subscribe message or not.
Link to this function
subscribe_raw(gdax, request, opts \\ [])
View Source
subscribe_raw(Gdex.Websocket.State.t(), Map.t(), [subscribe_opt()]) :: :ok
Send the request
to gdax
. Use this if you want more control on channels and products
Options
Same as subscribe/4
.
Examples
subscribe_raw(gdax, %{
type: "subscribe",
product_ids: ["ETH-USD", "ETH-EUR"],
channels: [
"level2",
"heartbeat",
%{name: "ticker", product_ids: ["ETH-BTC", "ETH-GBP"]}
]
})
See Also
Check the official GDAX API Documentation for the correct request format.