# `CCXT.WS.Subscription.JsonRpc`
[🔗](https://github.com/ZenHive/ccxt_client/blob/main/lib/ccxt/ws/subscription/jsonrpc.ex#L1)

Deribit-style JSON-RPC 2.0 subscribe frame.

    %{
      "jsonrpc" => "2.0",
      "method"  => "public/subscribe",
      "params"  => %{"channels" => ["ticker.BTC-PERPETUAL"]},
      "id"      => 1
    }

The `id` field carries a correlation integer that `ZenWebsocket.Client`
uses to route the response back to the caller. Callers may inject an id
via `config[:id]`; otherwise a fresh monotonic integer is generated.

Config keys:
- `:method` (default `"public/subscribe"` for subscribe, `"public/unsubscribe"`
  for unsubscribe) — set to `"private/subscribe"` for authenticated streams
- `:id` — explicit correlation id (optional)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
