CCXT.WS.Auth.InlineSubscribe (ccxt_client v0.6.1)

Copy Markdown View Source

Inline Subscribe auth pattern — coinbaseexchange.

Auth data is attached to each private subscribe frame rather than sent as a standalone auth message. build_auth_message/3 therefore returns :no_message; the per-subscribe fields come from build_subscribe_auth/4.

Payload Format (matches CCXT's coinbaseexchange.authenticate())

timestamp_seconds <> "GET" <> "/users/self/verify"

The secret is base64-decoded before HMAC-SHA256 and the signature is base64-encoded. credentials.password (passphrase) is included when set.

Example Subscribe with Auth (coinbase)

%{
  "type" => "subscribe",
  "product_ids" => ["BTC-USD"],
  "channels" => ["level2"],
  "key" => "api_key_here",
  "timestamp" => "1699999999",
  "signature" => "base64_signature",
  "passphrase" => "my_passphrase"
}