GET /v0/state/table_scopes

Fetches a list of scopes, for a given table on a contract account, at any block height.


Not to be confused with /v0/state/tables/scopes which retrieves the actual tables. Paired with this endpoint, you can get a consistent view of all tables in a contract.


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()

Requesting past blocks

The block_num parameter determines for which block you want the list of scopes for the given contract account’s table. 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

AccountName     Contract account holding the requested table.
TableName     The name-encoded table name you want to retrieve scopes from. Refer to the contract’s ABI for a list of available tables. This is contract dependent.
Number     Defaults to head block num. The block number for which you want to retrieve the consistent table scopes snapshot.


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<Name>     The name-encoded scope of the table you are requesting. For example, user balances for tokens live in their account name’s scope. This is contract dependent, so inspect the ABI for the contract you are interested in.

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

  "block_num": 9000000,
  "scopes": [