Referencia de Tablas del Agregador NFT
Esta página documenta las tablas PostgreSQL generadas y actualizadas por el Agregador NFT.
Estas tablas alimentan tanto la API GraphQL como la API REST, y reflejan el estado en vivo de la actividad de marketplace en Aptos.
Para consultas, consulta:
Resumen de Tablas del Agregador NFT
Sección titulada «Resumen de Tablas del Agregador NFT»| Nombre de Tabla | Descripción |
|---|---|
nft_marketplace_activities | Datos históricos de todos los eventos de marketplace NFT |
current_nft_marketplace_listing | Últimos listings activos por token |
current_nft_marketplace_token_offer | Últimas ofertas activas por token y comprador |
current_nft_marketplace_collection_offer | Últimas ofertas activas por colección |
current_collections_v2 | Últimas colecciones activas |
current_token_datas_v2 | Últimos tokens activos |
current_token_ownerships_v2 | Últimas propiedades de token activas |
current_collection_ownerships_v2_view | Últimas propiedades de colección activas |
- Usa
is_deleted = falsepara consultar solo registros activos en tablas de estado actual. - La tabla
nft_marketplace_activitieses tu fuente de verdad para actividad histórica de marketplace.
nft_marketplace_activities
Sección titulada «nft_marketplace_activities»Tabla histórica que captura todos los eventos de marketplace NFT — listings, ofertas, ventas, y más. Tiene una vista agregada para datos de resumen llamada nft_marketplace_activities_aggregate.
Clave Primaria: txn_version, index, marketplace
Índices
Sección titulada «Índices»| Nombre de Índice | Columnas |
|---|---|
idx_collection_event_ts | collection_id, standard_event_type, block_timestamp DESC |
idx_token_id | token_data_id |
idx_buyer | buyer |
idx_seller | seller |
idx_listing_id | listing_id |
idx_offer_id | offer_id |
idx_timestamp | block_timestamp DESC |
| Campo | Tipo | Descripción |
|---|---|---|
| txn_version | i64 | Versión blockchain de la transacción |
| index | i64 | Índice del evento en la transacción |
| listing_id | Option<String> | ID del listing (si aplica) |
| offer_id | Option<String> | ID de la oferta (si aplica) |
| raw_event_type | String | Tipo de evento de marketplace crudo |
| standard_event_type | String | Tipo de evento normalizado |
| creator_address | Option<String> | Dirección del creador de colección |
| collection_id | Option<String> | Identificador de colección |
| collection_name | Option<String> | Nombre de colección |
| token_data_id | Option<String> | Identificador de token |
| token_name | Option<String> | Nombre de token |
| price | i64 | Precio en Octas |
| token_amount | Option<i64> | Cantidad de token (para bundles etc.) |
| buyer | Option<String> | Dirección del comprador |
| seller | Option<String> | Dirección del vendedor |
| expiration_time | Option<String> | Tiempo de expiración de listing/oferta |
| marketplace | String | Nombre del marketplace |
| contract_address | String | Dirección del contrato del marketplace |
| json_data | serde_json::Value | Payload de evento crudo interno (no público) |
| block_timestamp | NaiveDateTime | Timestamp del bloque del evento |
current_nft_marketplace_listing
Sección titulada «current_nft_marketplace_listing»Rastrea listings activos actuales. Actualizado en tiempo real.
Clave Primaria: token_data_id, marketplace
Índices
Sección titulada «Índices»| Nombre de Índice | Columnas |
|---|---|
idx_current_nft_marketplace_listings_token_data_id | token_data_id |
idx_current_nft_marketplace_listings_collection_id | collection_id |
idx_current_nft_marketplace_listings_collection_id_price | collection_id, price |
idx_current_nft_marketplace_listings_seller | seller |
| Campo | Tipo | Descripción |
|---|---|---|
| token_data_id | String | Identificador de token |
| listing_id | Option<String> | ID del listing |
| collection_id | Option<String> | Identificador de colección |
| seller | String | Dirección del vendedor |
| price | i64 | Precio del listing |
| token_amount | i64 | Número de tokens listados |
| token_name | Option<String> | Nombre del token |
| standard_event_type | String | Tipo de evento normalizado |
| is_deleted | bool | True si el listing está inactivo |
| marketplace | String | Nombre del marketplace |
| contract_address | String | Dirección del contrato del marketplace |
| last_transaction_version | i64 | Última versión de transacción |
| last_transaction_timestamp | NaiveDateTime | Último timestamp de actualización |
current_nft_marketplace_token_offer
Sección titulada «current_nft_marketplace_token_offer»Rastrea ofertas de token activas actuales por token y comprador.
Clave Primaria: token_data_id, buyer, marketplace
Índices
Sección titulada «Índices»| Nombre de Índice | Columnas |
|---|---|
idx_current_nft_marketplace_token_offers_token_data_id | token_data_id |
idx_current_nft_marketplace_token_offers_price | price |
idx_current_nft_marketplace_token_offers_buyer | buyer |
| Campo | Tipo | Descripción |
|---|---|---|
| token_data_id | String | Identificador de token |
| offer_id | Option<String> | ID de la oferta |
| buyer | String | Dirección del comprador |
| collection_id | String | Identificador de colección |
| price | i64 | Precio de la oferta |
| token_amount | Option<i64> | Cantidad de token |
| token_name | Option<String> | Nombre del token |
| standard_event_type | String | Tipo de evento normalizado |
| bid_key | Option<i64> | Clave de puja única |
| is_deleted | bool | Estado activo de la oferta |
| marketplace | String | Nombre del marketplace |
| contract_address | String | Dirección del contrato del marketplace |
| last_transaction_version | i64 | Última versión de transacción |
| last_transaction_timestamp | NaiveDateTime | Último timestamp de actualización |
current_nft_marketplace_collection_offer
Sección titulada «current_nft_marketplace_collection_offer»Rastrea ofertas activas actuales a nivel de colección.
Clave Primaria: collection_offer_id
Índices
Sección titulada «Índices»| Nombre de Índice | Columnas |
|---|---|
idx_current_nft_marketplace_collection_offers_collection_id | collection_id |
idx_current_nft_marketplace_collection_offers_token_data_id | token_data_id |
idx_current_nft_marketplace_collection_offers_collection_offer_id_token_data_id | collection_offer_id, token_data_id |
| Campo | Tipo | Descripción |
|---|---|---|
| collection_offer_id | String | ID único de oferta de colección |
| token_data_id | String | Identificador de token |
| collection_id | String | Identificador de colección |
| buyer | String | Dirección del comprador |
| price | i64 | Precio de la oferta |
| remaining_token_amount | Option<i64> | Cantidad restante en la oferta |
| standard_event_type | String | Tipo de evento normalizado |
| is_deleted | bool | Estado activo de la oferta |
| marketplace | String | Nombre del marketplace |
| contract_address | String | Dirección del contrato del marketplace |
| last_transaction_version | i64 | Última versión de transacción |
| last_transaction_timestamp | NaiveDateTime | Último timestamp de actualización |
Otras Tablas
Sección titulada «Otras Tablas»Más información sobre tablas (ej. current_token_datas_v2, current_collections_v2, current_token_ownerships_v2, current_collection_ownerships_v2_view) está disponible aquí