Entities
Last updated
Last updated
Entities define the schema of the subgraph, and represent the data that can be queried. Within each entity are sets of fields that store useful information related to the entity. Below is a list of the available entities within the Uniswap Subgraph, and descriptions for the available fields.
Each entity is defined with a value type, which will always be a base AssemblyScript type, or a custom type provided by The Graph's custom TypeScript library.
The VeneraSwap Factory entity is responsible for storing aggregate information across all VeneraSwap pairs. It can be used to view stats about total liquidity, volume, amount of pairs and more.
Field Name | Value Type |
---|---|
Token Stores aggregated information for a specific token across all pairs that token is included in.
Field Name | Value Type |
---|---|
Pair Information about a pair. Includes references to each token within the pair, volume information, liquidity information, and more. The pair entity mirrors the pair smart contract, and also contains aggregated information about use.
Transactions
Transaction entities are created for each BNBChain transaction that contains an interaction within VeneraSwap contracts. This subgraph tracks Mint, Burn, and Swap events on the VeneraSwap core contracts.
Mint
Mint entities are created for every emitted Mint event on the VeneraSwap core contracts. The Mint entity stores key data about the event like token amounts, who sent the transaction, who received the liquidity, and more. This entity can be used to track liquidity provisions on pairs.
Burn
Burn entities are created for every emitted Burn event on the VeneraSwap core contracts. The Burn entity stores key data about the event like token amounts, who burned LP tokens, who received tokens, and more. This entity can be used to track liquidity removals on pairs.
Bundle
The Bundle is used as a global store of derived BNB price in USD. Because there is no guaranteed common base token across pairs, a global reference of USD price is useful for deriving other USD values. The Bundle entity stores an updated weighted average of BNB<->Stablecoin pair prices. This provides a strong estimate for the USD price of BNB that can be used in other places in the subgraph.
PancakeDayData
Tracks data across all pairs aggregated into a daily bucket.
PairHourData
Tracks data across all pairs aggregated into a hourly bucket.
PairDayData
Tracks pair data across each day.
TokenDayData
Tracks token data aggregated across all pairs that include token.
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Field Name | Value Type |
---|---|
Id
ID
Total of pairs
totalPairs
BigInt
totalTransactions
BigInt
totalVolume
BigDecimal
totalVolumeBNB
BigDecimal
untrackedVolumeUSD
BigDecimal
totalLiquidity
BigDecimal
totalLiqudityBNB
BigDecimal
name
String
decimals
BigInt
tradeVolume
BigDecimal
tradeVolumeUSD
DerivedBNB
untrackedVolumeUSD
DerivedUSD
totalTransactions
BigInt
totalLiquidity
BigDecimal!
derivedBNB
BigDecimal!
derivedUSD
BigDecimal!
tokenDayData
[TokenDayData!]
pairDayDataBase
[PairDayData!]
pairDayDataQuote
[PairDayData!]
pairBase
[Pair!]
pairQuote
[Pair!]
id
ID
name
String
token0:
Token
token1:
Token
Reserve0
BigDecimal
Reserve1
BigDecimal
totalSupply
BigDecimal
reserveBNB
BNB: BigDecimal!
reserveUSD
USD: BigDecimal!
trackedReserveBNB
BigDecimal
token0
BigDecimal
token1
BigDecimal
volumeToken0
BigDecimal
volumeToken1
BigDecimal
volumeUSD
BigDecimal
untrackedVolumeUSD
BigDecimal
totalTransactions
BigInt
block
BigInt
timesta
BigInt
pairHourData
[PairHourData!]
mints
[Mint!]
burns
[Burn!]
swaps
[Swap!]
Id
ID
block
BigInt
Timestamp
BigInt
mints
[Mint]
burns
[Burn]
swaps
[Swap]
id
ID
transaction
Transaction
timestamp
BigInt
pair
Pair
to
Bytes
liquidity
BigDecimal
sender
Bytes
amount0
BigDecimal
amount1
BigDecimal
logIndex
BigInt
amountUSD
BigDecimal
feeTo
Bytes
feeLiquidity
BigDecimal
id
ID
transaction
Transaction
timestamp
BigInt
pair
Pair
to
Bytes
liquidity
BigDecimal
sender
Bytes
from
Bytes
amount0
BigDecimal
amount1
BigDecimal
logIndex
BigInt
amountUSD
BigDecimal
feeTo
Bytes
feeLiquidity
BigDecimal
id
ID
BNBPrice
BigDecimal
id
ID
date
Int
dailyVolumeETH
BigDecimal
dailyVolumeUSD
BigDecimal
dailyVolumeUntracked
BigDecimal
totalVolumeETH
BigDecimal
totalLiquidityETH
BigDecimal
totalVolumeUSD
BigDecimal
totalLiquidityUSD
BigDecimal
totalTransactions
BigDecimal
id
ID
hourStartUnix
Int
pair
Pair
reserve0
BigDecimal
reserve1
BigDecimal
totalSupply
BigDecimal
reserveUSD
BigDecimal
hourlyVolumeToken0
BigDecimal
hourlyVolumeToken1
BigDecimal
hourlyVolumeUSD
BigDecimal
hourlyTxns
BigInt
id
ID
date
Int
pairAddress
Bytes
token0
Token
token1
Token
reserve0
BigDecimal
reserve1
BigDecimal
totalSupply
BigDecimal
reserveUSD
BigDecimal
dailyVolumeToken0
BigDecimal
dailyVolumeToken1
BigDecimal
dailyVolumeUSD
BigDecimal
dailyTxns
BigInt
id
ID
date
Int
token
Token
dailyVolumeToken
BigDecimal
dailyVolumeETH
BigDecimal
dailyVolumeUSD
BigDecimal
dailyTxns
BigInt
totalLiquidityToken
BigDecimal
totalLiquidityETH
BigDecimal
totalLiquidityUSD
BigDecimal
priceUSD
BigDecimal