# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://rise-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/rise/rise-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://rise-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'eth_syncing'})
};

fetch('https://rise-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://rise-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_syncing"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rise-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_syncing\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://rise-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_syncing\"\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://rise-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"eth_syncing\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: eth_syncing
description: Returns an object with data about the sync status or `false` if not syncing.
params: []
result:
  name: Syncing status
  description: An object with synchronization status data when syncing, or `false` when not syncing.
  schema:
    oneOf:
      - type: boolean
      - title: Syncing status
        oneOf:
          - title: Syncing progress
            type: object
            additionalProperties: false
            properties:
              startingBlock:
                title: Starting block
                type: string
                pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              currentBlock:
                title: Current block
                type: string
                pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
              highestBlock:
                title: Highest block
                type: string
                pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
          - title: Not syncing
            description: Should always return false if not syncing.
            type: boolean
examples:
  - name: eth_syncing example (syncing)
    params: []
    result:
      name: Syncing status
      value:
        startingBlock: '0x0'
        currentBlock: '0x1518'
        highestBlock: '0x9567a3'
  - name: eth_syncing example (not syncing)
    params: []
    result:
      name: Syncing status
      value: false
```
