# /v1/config/fork_schedule

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

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule

Retrieve all forks (past, present, and future) known to the node.   Each fork entry contains the previous and current protocol version along with the epoch at which the fork occurred.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-config-fork-schedule

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule
```

### JavaScript

```javascript
const options = {method: 'GET'};

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

### Python

```python
import requests

url = "https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

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

func main() {

	url := "https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule"

	req, _ := http.NewRequest("GET", url, nil)

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

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

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

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

```


## Operation Specification

```yaml
path: /eth/v1/config/fork_schedule
method: GET
operation:
  summary: /v1/config/fork_schedule
  description: |
    Retrieve all forks (past, present, and future) known to the node.   Each fork entry contains the previous and current protocol version along with the epoch at which the fork occurred.
  tags:
    - Ethereum Beacon API Endpoints
  security:
    - apiKey: []
  responses:
    '200':
      description: List of known fork schedule entries.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                description: List of forks known by the node.
                items:
                  type: object
                  properties:
                    previous_version:
                      type: string
                      description: Previous fork version (hex).
                      example: '0x00000000'
                    current_version:
                      type: string
                      description: Current fork version (hex).
                      example: '0x01000000'
                    epoch:
                      type: string
                      description: Epoch number at which the fork occurred.
                      example: '74240'
          examples:
            response_example:
              summary: Example response
              value:
                data:
                  - previous_version: '0x00000000'
                    current_version: '0x00000000'
                    epoch: '0'
                  - previous_version: '0x00000000'
                    current_version: '0x01000000'
                    epoch: '74240'
                  - previous_version: '0x01000000'
                    current_version: '0x02000000'
                    epoch: '144896'
                  - previous_version: '0x02000000'
                    current_version: '0x03000000'
                    epoch: '194048'
                  - previous_version: '0x03000000'
                    current_version: '0x04000000'
                    epoch: '269568'
                  - previous_version: '0x04000000'
                    current_version: '0x05000000'
                    epoch: '364032'
```
