Last updated
Last updated
To get the current PnL, take the SUM of all the block_hour_profit
and subtract the SUM of block_hour_fees
grouped by the token column.
Since block_hour_profit
is just the difference between total_profit
at consecutive trades (but without tx fees), It is equivalent to finding the max block_hour
, which refers to the latest trade for the token, and taking the corresponding total_profit
.
Same process as above, but grouped by the trader column.
Use the following formula to calculate % P&L.