> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GET /v0/top-validators-by-validator-rewards

> **Deprecated**. Get a list of top-earning validators, and the total earned validator rewards for each

Scan API

# GET /v0/top-validators-by-validator-rewards

OpenAPI

[Deprecated 0.5.10](#history-deprecated-0-5-10)

[Removed in 0.6.6](#history-removed-0-6-6)

GET

`/v0/top-validators-by-validator-rewards`

**Removed in 0.6.6.** Historical definition from 0.6.5.

**Deprecated**. Get a list of top-earning validators, and the total earned validator rewards for each

## Protocol Details

Operation ID
getTopValidatorsByValidatorRewards

Published
0.6.5

## Inputs

### Query parameters

`round`
integer (int64)

required

`limit`
integer (int32)

required

## Outputs

### 200

application/json

`validatorsAndRewards`
PartyAndRewards\[]

required

### 400

application/json

`error`
string

required

### 404

application/json

`error`
string

required

## History

Removed in
`0.6.6`

Last available in 0.6.5. Retained for historical reference.

Deprecated
`0.5.10`

cURL

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --request GET \
  --url 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards'
```

Python

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import json
import requests

url = "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards"
response = requests.request("GET", url)

print(response.text)
```

JavaScript

```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const response = await fetch('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards', {
  method: 'GET',
});

console.log(await response.text());
```

PHP

```php PHP theme={"theme":{"light":"github-light","dark":"github-dark"}}
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
]);

$response = curl_exec($curl);
echo $response;
```

Go

```go Go theme={"theme":{"light":"github-light","dark":"github-dark"}}
package main

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

func main() {
  req, _ := http.NewRequest("GET", "https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards", nil)
  response, _ := http.DefaultClient.Do(req)
  defer response.Body.Close()
  body, _ := io.ReadAll(response.Body)
  fmt.Println(string(body))
}
```

Java

```java Java theme={"theme":{"light":"github-light","dark":"github-dark"}}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
var response = HttpClient.newHttpClient().send(
    request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

Ruby

```ruby Ruby theme={"theme":{"light":"github-light","dark":"github-dark"}}
require 'net/http'
require 'uri'

uri = URI('https://scan.sv-1.global.canton.network.sync.global/api/scan/v0/top-validators-by-validator-rewards')
request = Net::HTTP::Get.new(uri)
response = Net::HTTP.start(uri.hostname, uri.port) do |http|
  http.request(request)
end
puts response.body
```

200

application/json

```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "validatorsAndRewards": [
    {
      "provider": "<string>",
      "rewards": "<string>"
    }
  ]
}
```

400

application/json

```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": "<string>"
}
```

404

application/json

```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": "<string>"
}
```
