> For the complete documentation index, see [llms.txt](https://electrum-docs.gitbook.io/electrum-bitcoin-wallet-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://electrum-docs.gitbook.io/electrum-bitcoin-wallet-documentation/for-developers/electrum-protocol-specification.md).

# Electrum Protocol Specification

Stratum is a universal bitcoin communication protocol used mainly by bitcoin client Electrum and miners.

{% hint style="warning" %}

#### NOTE:

This document is outdated. For newer versions of the protocol than 0.10, see
{% endhint %}

### Format

Stratum protocol is based on [JSON-RPC 2.0](http://www.jsonrpc.org/specification) (although it doesn’t include “jsonrpc” information in every message). Each message has to end with a line end character (n).

#### Request

Typical request looks like this:

```
{ "id": 0, "method":"some.stratum.method", "params": [] }
```

* id begins at 0 and every message has its unique id number
* list and description of possible methods is below
* params is an array, e.g.: \[ “1myfirstaddress”, “1mysecondaddress”, “1andonemoreaddress” ]

#### Response[](https://electrum.readthedocs.io/en/latest/protocol.html#response)

Responses are similar:

```
{ "id": 0, "result": "616be06545e5dd7daec52338858b6674d29ee6234ff1d50120f060f79630543c"}
```

* id is copied from the request message (this way client can pair each response to one of his requests)
* result can be:
  * null
  * a string (as shown above)
  * a hash, e.g.:

    ```
    { "nonce": 1122273605, "timestamp": 1407651121, "version": 2, "bits": 406305378 }
    ```
  * an array of hashes, e.g.:

    ```
    [ { "tx_hash:
    "b87bc42725143f37558a0b41a664786d9e991ba89d43a53844ed7b3752545d4f",
    "height": 314847 }, { "tx_hash":
    "616be06545e5dd7daec52338858b6674d29ee6234ff1d50120f060f79630543c",
    "height": 314853 } ]
    ```

### Methods
