🏃Advanced Components
Even more powerful queries
The following components are optional when building your query:
Aggregation (optional)
As the name suggests, it used to reduce the dimensions of your data by providing an aggregation method. Aggregation is useful when you want to analyse a group of data together.
Aggregation is by default applied to all data points sharing the same timestamp, but you can additionally define delimiters you want to aggregate by.
Available aggregation methods:
S
(Sum)AVG
(Average)MED
(Median)MAX
MIN
Average liquidity of USDC in all pools on UniswapV3 app.
[UNIV3]APP [USDC]A L AVG G 180D
Average liquidity of USDC in all pools on UniswapV3 app by chain.
[UNIV3]APP [USDC]A L AVG[C] G 180D
Operators (optional)
Operators are a way for you to implement your own metrics in an easy way. There are two types of operators:
Single value operator
Multiple value operator
Single value operator
&
(indexing -> value between 0 and 100 )%
(percentage change -> value between 0 and 1)
To apply these operators, just add them after the function.
Percentage change of price for all stablecoin assets
(assets in stable sector).
[STB]SEC P% G 180D
Multi value operator
+
(Addition)-
(Subtraction)/
(Division)
Priority rules for operators are not yet implemented, so they are executed from left to right.
Ratio of ether and other eth assets prices.
[ETH]A P / [wETH, sETH, stETH, wstETH, frxETH]A P G 180D
Transaction count of Ethereum and Polygon chains.
[ETH]C TXC + [POLYGON]C TXC G 180D
Time Buckets (optional)
The User can specify a Time Bucket that will group and aggregate data based on the timestamp of the data point similar to how data is windowed for timeseries analysis.
For example, you can bucket your data by 5 days and apply SUM to analyse data in buckets of 5 days.
Time buckets consists of:
B (symbol for time buckets)
Number of days for the window
Aggregation method
Bucket transaction count of ethereum chain in 7 days and look at the average.
[ETH]C TXC G 180D B[7, AVG]
S
(Sum)AVG
(Average)MED
(Median)MAX
MIN
F
(First)L
(Last)
Additional Tools
Last updated
Was this helpful?