SYMBOL | TIMESTAMP | ACTION | ORDER_TYPE | DEPOSIT_WITHDRAWAL | PRICE | SIZE_USD | PNL | FEE_USD | LIQUIDATION_FEE_USD | TX_ID | |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | sol | 2024-10-25 17:54:08.484 | Decrease Long | Liquidation | 0 | 168.861998 | 33220.573341 | -673.74397 | 26.217545 | 64.773829 | 3AUuM3kJCJZ3zg8gd1PJ5S2fh4YT9uYeAs3apHbRsFRY4u6zFJCsKvttiubcfZHsmdTGYy1nxJ7nGrEjQc7sWsds |
2 | sol | 2024-10-25 16:11:57.367 | Increase Long | Market | -693.635112 | 172.546047 | 26651.834096 | 0 | 18.673619 | 0 | 5TNpa5J5WR9BT7nMsWi1LUz5AFbHofnniUs5NujvueE7kjc1nzBMctauWcxXRHPSehynagqCbdVT5nUFDSoYfNnA |
3 | sol | 2024-10-25 16:08:51.143 | Increase Long | Market | -94.371969 | 171.597045 | 6568.739245 | 0 | 4.598118 | 0 | 3i9kP68dRS7byujXDtc8oFvuBwZxDMNn1CSEp59mNm81jj94AAgcfi5KhtLFxWMBGgn1L6GnGkVxuGSWD6DVuDD6 |
daphmelUser Perps Trading History copy
Updated 2025-01-30
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 / User Perps Trading History @ https://flipsidecrypto.xyz/flyingfish/q/J38q8EPtF1c2/user-perps-trading-history
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
livequery.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 order_type
, value:requestChange as request_change
, value:custody as custody
, value:mint as market
, value:collateralMint as collateral_mint
, value:collateralUsd / 1e6 as collateral_usd
, zeroifnull(value:sizeUsd) / 1e6 as size_usd
, zeroifnull(value:feeUsd) / 1e6 as fee_usd
, zeroifnull(value:liquidationFeeUsd) / 1e6 as liquidation_fee_usd
, value:price / 1e6 as price
, value:priceSlippage as price_slippage
, zeroifnull(value:pnlUsd) / 1e6 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 1 month ago
3
610B
8s