Supervised signed Spot User Data Stream over Binance WebSocket API.
Reconnects use a fresh timestamp and signature. Events are held in a bounded queue; consumers must resynchronize account and order state after drops or reconnects.
Summary
Functions
Returns a specification to start this module under a supervisor.
Pops and normalizes the oldest account event or WebSocket API response.
Renews the connection and signs a fresh subscription request.
Builds a signed WebSocket API subscription request. Keep its return value out of logs.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec pop(GenServer.server()) :: {:ok, map()} | :empty
@spec pop_normalized(GenServer.server()) :: {:ok, map()} | :empty
Pops and normalizes the oldest account event or WebSocket API response.
@spec renew(GenServer.server()) :: :ok | {:error, :disconnected}
Renews the connection and signs a fresh subscription request.
@spec signed_request(BinanceElixir.t(), String.t()) :: map()
Builds a signed WebSocket API subscription request. Keep its return value out of logs.
@spec start_link(BinanceElixir.t(), keyword()) :: GenServer.on_start()
@spec stats(GenServer.server()) :: map()
@spec subscribe(GenServer.server()) :: :ok
@spec subscriptions(GenServer.server()) :: :ok
@spec unsubscribe(GenServer.server()) :: :ok