GET /v0/state/key_accounts

Fetches the accounts controlled by the given public key, at any block height.


Sample request:

curl -H "Authorization: Bearer eyJhbGciOiJLTVNFUzI1Ni..." \

fetch('', {
  headers: {
    'Authorization': 'Bearer eyJhbGciOiJLTVNFUzI1Ni...'

headers = { 'Authorization' : 'Bearer eyJhbGciOiJLTVNFUzI1Ni...' }
r = requests.get('', headers=headers, verify=False)
j = json.loads(r.text)
print(json.dumps(j, indent=4))

req, err := http.NewRequest("GET", "", nil)
if err != nil {
// handle err
req.Header.Set("Authorization", "Bearer eyJhbGciOiJLTVNFUzI1Ni...")

resp, err := http.DefaultClient.Do(req)
if err != nil {
// handle err
defer resp.Body.Close()


This endpoint is a drop-in replacement for the /v1/history/get_key_accounts API endpoint from standard nodeos. Simply tweak the URL, and add the Bearer token.

Requesting past blocks

The block_num parameter determines for which block height you want a list of accounts associated to the given public key. This can be anywhere in the chain’s history.

If the requested block_num is irreversible, you will get an immutable list of accounts. Otherwise, there are chances that the returned value moves as the chain reorganizes.

Input parameters

PublicKey .  The public key to fetch controlled accounts for.
Number .  Defaults to head block num. The block number for which you want to retrieve the list of accounts.


Number .  Block number used to serve your request. Will be the head block_num if it was not provided or 0 was passed as block_num, otherwise, will be the block_num you’ve passed in the request.
Array<AccountName> .  An array of account names that the public key is associated with, sorted alphabetically.

Here is a sample response, for a request at block_num: 10000000:

  "block_num": 10000000,
  "account_names": [