aptos holds the standardized Aptos tables, following the Aptos-style schema documented in the family overview exactly, with no differences. The same schema applies to Movement, which uses the same tables.
A module is a published unit of Move code, the equivalent of a contract elsewhere. A resource is a piece of data stored under an account, such as its balance of a particular coin; the changes tables record what a transaction wrote to those.
Above the raw tables sits the rest of the catalog, and Aptos shows up in two parts of it: the list of tokens we know about with their daily prices, and the tokenized assets issued on the chain. Real-world assets and Stablecoins cover the tokenized assets and their daily tables. Tokens covers the token list and the daily price table.
Tables
| Table | Since | Description |
|---|
blocks | 2022-10 | One row per block, with the first and last transaction version in it. |
transactions | 2022-10 | One row per transaction version, keyed on version. |
events | 2022-10 | One row per event a transaction emitted. |
changes | 2022-10 | One row per state change a transaction wrote. |
resources | 2022-10 | One row per account resource write or delete. |
modules | 2022-10 | One row per Move module publish or update. |
table_items | 2022-10 | One row per onchain table item write or delete. |
resources, modules and table_items are slices of changes: the writes that touched data stored under an account, the ones that published or upgraded code, and the ones that wrote to a contract’s own key-value store.
Every table except blocks splits by day on block_timestamp, and blocks on timestamp. Bound that column in every query; without a bound the query reads the whole table.
blocks
transactions
events
changes
resources
modules
table_items
A block is a batch of transactions added to the chain. Aptos also numbers every transaction it has ever run, and that number is the transaction’s version, so each block covers a range of versions. blocks contains one row per block, with the first and last version in it.| Column | Type | Description |
|---|
timestamp | TIMESTAMP | The time the block was produced. Partition column. |
block_height | INT64 | The block height. |
first_version | STRING | The first transaction version in the block. |
last_version | STRING | The last transaction version in the block. |
block_hash | STRING | The hash of the block. |
Count blocks per day and the version range they cover. Not every transaction comes from a user: the chain writes its own bookkeeping entries into the same numbered sequence. transactions contains one row per transaction, identified by its version number, whichever kind it is: a user transaction, a block metadata entry, or a state checkpoint. The type column says which.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
hash | STRING | The hash of the transaction. |
timestamp | STRING | The onchain transaction timestamp, in microseconds. |
accumulator_root_hash | STRING | The accumulator root hash after the transaction. |
epoch | STRING | The epoch of the transaction. |
event_root_hash | STRING | The root hash of the transaction’s events. |
expiration_timestamp_secs | STRING | The expiration time set by the sender, in seconds. |
failed_proposer_indices | ARRAY<INT64> | The indices of proposers that failed in the round. |
gas_unit_price | STRING | The gas unit price, in octas. |
gas_used | STRING | The gas units consumed. |
id | STRING | The identifier of block metadata transactions. |
max_gas_amount | STRING | The gas limit set by the sender. |
previous_block_votes_bitvec | ARRAY<INT64> | The vote bitvector for the previous block. |
proposer | STRING | The proposer of the block, for block metadata transactions. |
round | STRING | The consensus round. |
sender | STRING | The sending account. |
sequence_number | STRING | The sender’s sequence number. |
state_change_hash | STRING | The hash of the transaction’s state changes. |
state_checkpoint_hash | STRING | The state checkpoint hash, when present. |
success | BOOL | Whether the transaction succeeded. |
type | STRING | The transaction type, such as user or block metadata. |
version | STRING | The global transaction version, the identifier used everywhere else. |
vm_status | STRING | The VM execution status. |
signature_type | STRING | The signature scheme used. |
signature_public_key | STRING | The signing public key. |
signature | STRING | The transaction signature. |
payload | JSON | The full transaction payload. |
payload_function | STRING | The entry function called, as address::module::function. |
payload_type | STRING | The payload type. |
payload_type_arguments | JSON | The generic type arguments of the call. |
payload_arguments | JSON | The arguments of the call. |
Count daily Aptos transactions and their success rate over one week. An event is a note that published code writes when something happens inside it: a transfer, a swap, a deposit. events contains one row per event a transaction produced.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
sequence_number | STRING | The sequence number of the event in its stream. |
transaction_hash | STRING | The hash of the emitting transaction. |
event_type | STRING | The Move type of the event. |
event_index | INT64 | The position of the event within the transaction. |
event_guid_account_address | STRING | The account address of the event stream. |
event_guid_creation_number | INT64 | The creation number of the event stream. |
data | JSON | The event payload. |
Count events by type on one day. Everything a transaction actually altered on the chain is recorded here. changes contains one row per alteration, of any kind. The tables that follow are slices of this one.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_index | INT64 | The position of the change within the transaction. |
changes_type | STRING | The change type, such as write resource or delete resource. |
changes_address | STRING | The account address the change applies to. |
data_type | STRING | The Move type of the changed data. |
data | JSON | The changed data. |
changes | JSON | The raw change record. |
Count changes by type on one day. resources is the part of changes that touched data stored under an account, a coin balance for instance. One row per write or delete.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
changes_address | STRING | The account address the change applies to. |
resource_address | STRING | The address of the resource. |
data | JSON | The resource contents after the change. |
data_type | STRING | The Move type of the resource. |
state_key_hash | STRING | The state key hash of the resource slot. |
Rank resource types by writes on one day. modules contains one row per time Move code was published or upgraded, along with the functions and data types that code exposes.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the publishing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
changes_address | STRING | The account address the change applies to. |
module_address | STRING | The address the module lives under. |
module_name | STRING | The name of the module. |
exposed_functions | JSON | The public functions of the module. |
friends | JSON | The friend modules. |
structs | JSON | The struct definitions of the module. |
bytecode | STRING | The compiled module bytecode. |
state_key_hash | STRING | The state key hash of the module slot. |
Count module publishes and upgrades per day over one week. Move code can keep its own key-value store on the chain, and each entry in one is a table item. table_items contains one row per entry written or deleted.| Column | Type | Description |
|---|
block_timestamp | TIMESTAMP | The time of the containing block. Partition column. |
block_height | INT64 | The height of the containing block. |
transaction_hash | STRING | The hash of the writing transaction. |
changes_type | STRING | The change type. |
changes_index | INT64 | The position of the change within the transaction. |
data | JSON | The raw item record. |
handle | STRING | The handle of the table. |
key | STRING | The key of the item. |
value | STRING | The value of the item after the change. |
state_key_hash | STRING | The state key hash of the item slot. |
Count table item writes and deletes per day over one week.
Sample queries
Rank entry functions by user transactions on one day. Rank the tokenized assets deployed on Aptos by circulating market cap. List the Aptos tokens that had a daily price over one week.