Perps Market | Actions count | Collateral Deployed | Total Size | Open Interest | Profit & Loss | Total Trading Fees | NET Profit & Loss | |
---|---|---|---|---|---|---|---|---|
1 | ETH | 5 | 19765.89 | 474738.41 | 0 | 14546.682 | 2476.177 | 12070.505 |
2 | SOL | 41 | 4581141.556 | 19564643.54 | 0 | 637681.365 | 57326.39 | 580354.975 |
magindigoTotals by Perps Market copy
Updated 2025-01-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from flyingfish / Totals by Perps Market @ https://flipsidecrypto.xyz/flyingfish/q/SCdhzn5Ad5rB/totals-by-perps-market
with get_data as (
select
-- live.udf_api('https://perp-api.jup.ag/trpc/trades?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22wallet%22%3A%22{{address}}%22%2C%22limit%22%3A{__{trades_count}__}%2C%22offset%22%3A0%7D%7D%7D') as resp
live.udf_api('https://perp-api.jup.ag/trpc/trades?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22wallet%22%3A%22{{address}}%22%2C%22limit%22%3A10000%2C%22offset%22%3A0%7D%7D%7D') as resp
)
, date_filtered as (
select
iff('{{full_trade_history}}' = 'Yes', '2023-07-18', '{{start_date}}') as start_date_filter
, iff('{{full_trade_history}}' = 'Yes', current_date, '{{end_date}}') as end_date_filter
)
, parsed_data as (
select
value:updatedAt::timestamp as timestamp
, value:side as side
, value:requestType as request_type
, value:requestChange as request_change
, value:custody as custody
, value:mint as market
, value:collateralMint as collateral_mint
, value:collateralUsd as collateral_usd
, value:sizeUsd as size_usd
, zeroifnull(value:feeUsd) as fee_usd
, zeroifnull(value:liquidationFeeUsd) as liquidation_fee_usd
, value:price as price
, value:priceSlippage as price_slippage
, zeroifnull(value:pnlUsd) as pnl
, value:positionKey as position_key
, value:txId as tx_id
from get_data
, lateral flatten (input => resp:data[0]:result:data:json:trades)
)
Last run: about 2 months ago
2
129B
18s