Vai al contenuto

database_api.list_witnesses ​

Purpose ​

Restituisce l’elenco dei witness. Parametri: start:object; limit:int; order:string

  • start dipende da order (vedere sotto)
  • limit è fino a 1000.
  • order può essere uno tra:
    • by_name - ordina per nome
      • start è un valore stringa: account
    • by_vote_name - ordina per voto, nome
      • start è un array di due valori: votes, account
    • by_schedule_time - ordina per orario di programmazione
      • start è un array di due valori: virtual_scheduled_time, account

| start (object) | limit (int) | order (string) | | |----------------------------|---------------|-| | "" | 10 | "by_name" | Interroga i primi 10 witness, ordina per nome dell’account | | [0, ""] | 10 | "by_vote_name" | Interroga i primi 10 witness, ordina per voti | | ["473718186844702107410533306", "alice"] | 10 | "by_schedule_time" | Interroga i primi 10 witness, ordina per programmazione |

Vedere anche: Paginated API Methods

Parameters ​

PARAMETERS
json
{
  "start": null,
  "limit": 0,
  "order": "by_name"
}

Example ​

Example 1 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_witnesses",
    "params": {
      "start": "",
      "limit": 10,
      "order": "by_name"
    },
    "id": 1
  }'

Example 2 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_witnesses",
    "params": {
      "start": [
        0,
        ""
      ],
      "limit": 10,
      "order": "by_vote_name"
    },
    "id": 1
  }'

Example 3 ​

BASH
bash
curl -s https://api.steemit.com \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "jsonrpc": "2.0",
    "method": "database_api.list_witnesses",
    "params": {
      "start": [
        "473718186844702107410533306",
        "alice"
      ],
      "limit": 10,
      "order": "by_schedule_time"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "witnesses": [
    {
      "id": 6950,
      "owner": "a-0",
      "created": "1970-01-01T00:00:00",
      "url": "",
      "votes": 0,
      "virtual_last_update": "0",
      "virtual_position": "0",
      "virtual_scheduled_time": "340282366920938463463374607431768211455",
      "total_missed": 0,
      "last_aslot": 1063323,
      "last_confirmed_block_num": 1040423,
      "pow_worker": 0,
      "signing_key": "STM5RrTRNDhhrMaA24SzSeE5AvmUcutb1q1VZp1imnT8p871s3UjN",
      "props": {
        "account_creation_fee": {
          "amount": "1",
          "precision": 3,
          "nai": "@@000000021"
        },
        "maximum_block_size": 131072,
        "sbd_interest_rate": 1000,
        "account_subsidy_budget": 797,
        "account_subsidy_decay": 347321
      },
      "sbd_exchange_rate": {
        "base": {
          "amount": "0",
          "precision": 3,
          "nai": "@@000000021"
        },
        "quote": {
          "amount": "0",
          "precision": 3,
          "nai": "@@000000021"
        }
      },
      "last_sbd_exchange_update": "1970-01-01T00:00:00",
      "last_work": "000000127cb0e335667f30100bc1a061175c2d789f808e0e9ac82ee70fa8e604",
      "running_version": "0.0.0",
      "hardfork_version_vote": "0.0.0",
      "hardfork_time_vote": "2016-03-24T16:00:00",
      "available_witness_account_subsidies": 0
    }
  ]
}