DEX (dex)
Decentralized exchange pools, swaps, liquidity events, and candles.
15 queryable tables. Every table supports the standard Hasura query arguments — where, order_by, limit, offset, distinct_on — plus an _aggregate field.
Access: Team and Premium (Playground on lower plans)
Tables
candlefee_eventflash_eventfunction_signatureliquidity_eventlp_transfer_eventpoolpool_call_eventpool_statepositionposition_eventprice_eventspot_priceswap_eventwatermark
candle
| Column | Postgres type | GraphQL type |
|---|---|---|
token_id | bigint | bigint |
period | text | String |
timestamp_range | int8range | int8range |
source | text | String |
open_hbar | numeric | numeric |
high_hbar | numeric | numeric |
low_hbar | numeric | numeric |
close_hbar | numeric | numeric |
open_usd | numeric | numeric |
high_usd | numeric | numeric |
low_usd | numeric | numeric |
close_usd | numeric | numeric |
volume_tinybar | bigint | bigint |
volume_microusd | bigint | bigint |
liquidity_tinybar | bigint | bigint |
liquidity_microusd | bigint | bigint |
volume_hbar | numeric | numeric |
volume_usd | numeric | numeric |
liquidity_hbar | numeric | numeric |
liquidity_usd | numeric | numeric |
num_trades | integer | Int |
query GetCandle {
dex_candle(limit: 10) {
token_id
period
timestamp_range
source
}
}
fee_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
log_index | integer | Int |
pool_id | bigint | bigint |
event_type | text | String |
owner_evm_address | bytea | bytea |
recipient_evm_address | bytea | bytea |
tick_lower | integer | Int |
tick_upper | integer | Int |
amount0 | numeric | numeric |
amount1 | numeric | numeric |
payer_account_id | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetFeeEvent {
dex_fee_event(limit: 10) {
consensus_timestamp
log_index
pool_id
event_type
}
}
flash_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
log_index | integer | Int |
pool_id | bigint | bigint |
sender_evm_address | bytea | bytea |
recipient_evm_address | bytea | bytea |
amount0 | numeric | numeric |
amount1 | numeric | numeric |
paid0 | numeric | numeric |
paid1 | numeric | numeric |
payer_account_id | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetFlashEvent {
dex_flash_event(limit: 10) {
consensus_timestamp
log_index
pool_id
sender_evm_address
}
}
function_signature
| Column | Postgres type | GraphQL type |
|---|---|---|
selector | bytea | bytea |
name | text | String |
signature | text | String |
target | text | String |
query GetFunctionSignature {
dex_function_signature(limit: 10) {
selector
name
signature
target
}
}
liquidity_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
log_index | integer | Int |
pool_id | bigint | bigint |
source | text | String |
event_type | text | String |
owner_evm_address | bytea | bytea |
tick_lower | integer | Int |
tick_upper | integer | Int |
token0_amount | numeric | numeric |
token1_amount | numeric | numeric |
liquidity_delta | numeric | numeric |
payer_account_id | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetLiquidityEvent {
dex_liquidity_event(limit: 10) {
consensus_timestamp
log_index
pool_id
source
}
}
lp_transfer_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
token_id | bigint | bigint |
pool_id | bigint | bigint |
account_id | bigint | bigint |
amount | numeric | numeric |
is_approval | boolean | Boolean |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetLpTransferEvent {
dex_lp_transfer_event(limit: 10) {
consensus_timestamp
token_id
pool_id
account_id
}
}
pool
| Column | Postgres type | GraphQL type |
|---|---|---|
pool_id | bigint | bigint |
pool_evm_address | text | String |
source | text | String |
factory_id | bigint | bigint |
token0_id | bigint | bigint |
token1_id | bigint | bigint |
token0_evm_address | text | String |
token1_evm_address | text | String |
token0_decimals | bigint | bigint |
token1_decimals | bigint | bigint |
token0_symbol | text | String |
token1_symbol | text | String |
token0_name | text | String |
token1_name | text | String |
is_whbar_paired | boolean | Boolean |
whbar_token_position | smallint | smallint |
is_usdc_paired | boolean | Boolean |
usdc_token_position | smallint | smallint |
fee_tier | integer | Int |
is_active | boolean | Boolean |
lp_token_id | bigint | bigint |
query GetPool {
dex_pool(limit: 10) {
pool_id
pool_evm_address
source
factory_id
}
}
pool_call_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
call_index | integer | Int |
pool_id | bigint | bigint |
source | text | String |
function_selector | bytea | bytea |
function_name | text | String |
caller | bigint | bigint |
caller_type | text | String |
call_depth | integer | Int |
call_operation_type | integer | Int |
top_caller | bigint | bigint |
top_caller_type | text | String |
payer_account_id | bigint | bigint |
result_status | text | String |
gas_offered | bigint | bigint |
gas_used | bigint | bigint |
value_tinybar | bigint | bigint |
input_data | bytea | bytea |
result_data | bytea | bytea |
recipient | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetPoolCallEvent {
dex_pool_call_event(limit: 10) {
consensus_timestamp
call_index
pool_id
source
}
}
pool_state
| Column | Postgres type | GraphQL type |
|---|---|---|
pool_id | bigint | bigint |
reserve0 | numeric | numeric |
reserve1 | numeric | numeric |
sqrt_price_x96 | numeric | numeric |
tick | integer | Int |
liquidity | numeric | numeric |
liquidity_tinybar | bigint | bigint |
liquidity_microusd | bigint | bigint |
liquidity_hbar | numeric | numeric |
liquidity_usd | numeric | numeric |
last_event_timestamp | bigint | bigint |
updated_at | timestamptz | timestamptz |
query GetPoolState {
dex_pool_state(limit: 10) {
pool_id
reserve0
reserve1
sqrt_price_x96
}
}
position
| Column | Postgres type | GraphQL type |
|---|---|---|
token_id | bigint | bigint |
current_owner_evm_address | bytea | bytea |
liquidity | numeric | numeric |
cumulative_fees0 | numeric | numeric |
cumulative_fees1 | numeric | numeric |
minted_timestamp | bigint | bigint |
last_event_timestamp | bigint | bigint |
last_event_log_index | integer | Int |
inserted_at | timestamptz | timestamptz |
updated_at | timestamptz | timestamptz |
pool_id | bigint | bigint |
tick_lower | integer | Int |
tick_upper | integer | Int |
query GetPosition {
dex_position(limit: 10) {
token_id
current_owner_evm_address
liquidity
cumulative_fees0
}
}
position_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
log_index | integer | Int |
token_id | bigint | bigint |
event_type | text | String |
from_evm_address | bytea | bytea |
to_evm_address | bytea | bytea |
liquidity_delta | numeric | numeric |
amount0 | numeric | numeric |
amount1 | numeric | numeric |
payer_account_id | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
query GetPositionEvent {
dex_position_event(limit: 10) {
consensus_timestamp
log_index
token_id
event_type
}
}
price_event
| Column | Postgres type | GraphQL type |
|---|---|---|
pool_id | bigint | bigint |
log_index | integer | Int |
source | text | String |
consensus_timestamp | bigint | bigint |
token0_id | bigint | bigint |
token1_id | bigint | bigint |
token0_amount_delta | numeric | numeric |
token1_amount_delta | numeric | numeric |
price_hbar | numeric | numeric |
price_usd | numeric | numeric |
volume_tinybar | bigint | bigint |
volume_microusd | bigint | bigint |
liquidity_tinybar | bigint | bigint |
liquidity_microusd | bigint | bigint |
volume_hbar | numeric | numeric |
volume_usd | numeric | numeric |
liquidity_hbar | numeric | numeric |
liquidity_usd | numeric | numeric |
query GetPriceEvent {
dex_price_event(limit: 10) {
pool_id
log_index
source
consensus_timestamp
}
}
spot_price
| Column | Postgres type | GraphQL type |
|---|---|---|
token_id | bigint | bigint |
price_hbar | numeric | numeric |
price_usd | numeric | numeric |
pool_id | bigint | bigint |
source | text | String |
liquidity_tinybar | bigint | bigint |
liquidity_hbar | numeric | numeric |
consensus_timestamp | bigint | bigint |
updated_at | timestamptz | timestamptz |
query GetSpotPrice {
dex_spot_price(limit: 10) {
token_id
price_hbar
price_usd
pool_id
}
}
swap_event
| Column | Postgres type | GraphQL type |
|---|---|---|
consensus_timestamp | bigint | bigint |
log_index | integer | Int |
pool_id | bigint | bigint |
source | text | String |
token0_id | bigint | bigint |
token1_id | bigint | bigint |
token0_amount_delta | numeric | numeric |
token1_amount_delta | numeric | numeric |
price_hbar | numeric | numeric |
price_usd | numeric | numeric |
volume_tinybar | bigint | bigint |
volume_microusd | bigint | bigint |
fee_tinybar | bigint | bigint |
fee_microusd | bigint | bigint |
volume_hbar | numeric | numeric |
volume_usd | numeric | numeric |
fee_hbar | numeric | numeric |
fee_usd | numeric | numeric |
payer_account_id | bigint | bigint |
transaction_hash | bytea | bytea |
inserted_at | timestamptz | timestamptz |
is_routed | boolean | Boolean |
route_position | integer | Int |
price_impact_pct | numeric | numeric |
direct_caller | bigint | bigint |
direct_caller_type | text | String |
top_caller | bigint | bigint |
top_caller_type | text | String |
call_depth | integer | Int |
gas_used_for_swap | bigint | bigint |
query GetSwapEvent {
dex_swap_event(limit: 10) {
consensus_timestamp
log_index
pool_id
source
}
}
watermark
| Column | Postgres type | GraphQL type |
|---|---|---|
job_name | text | String |
last_processed_ns | bigint | bigint |
updated_at | timestamptz | timestamptz |
query GetWatermark {
dex_watermark(limit: 10) {
job_name
last_processed_ns
updated_at
}
}