NAME | TEST | DEPOSITED_TOKEN_AMOUNT | SELL_PRICE | BUY_PRICE | ACTION_DATA | |
---|---|---|---|---|---|---|
1 | [swing]BRR#1-2 | 222728 | 222728 | 0.002871000004 | 0.00235 | {"args":{"entry_price":"2720124960000000","fill_base_or_quote":true,"fir... |
csp88gREF LP Stables calc
Updated 2025-03-13
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
›
⌄
with tokens_in_bot as(
select
SPLIT_PART(ACTION_DATA:args:pair_id, ':', 1) as t1,
SPLIT_PART(ACTION_DATA:args:pair_id, ':', 2) as t2,
from near.core.ez_actions
where TX_HASH = 'EnXjXKa8yWtzXrKHbKVZ6M4Ahsx3YCKgmQdRVrp6FbJq'
and RECEIPT_RECEIVER_ID = 'grid.deltatrade.near'
)
select
ACTION_DATA:args:name as name,
ACTION_DATA:args:first_base_amount / POW(10,18) as test,
ACTION_DATA:args:first_base_amount / POW(10,
(select decimals from near.core.dim_ft_contract_metadata
where CONTRACT_ADDRESS = (select t1 from tokens_in_bot))
) as Deposited_Token_amount,
(ACTION_DATA:args:last_quote_amount
/ POW(10,
(select decimals from near.core.dim_ft_contract_metadata
where CONTRACT_ADDRESS = (select t2 from tokens_in_bot))))
/ (ACTION_DATA:args:last_base_amount / POW(10,
(select decimals from near.core.dim_ft_contract_metadata
where CONTRACT_ADDRESS = (select t1 from tokens_in_bot))
))
as sell_price,
(ACTION_DATA:args:first_quote_amount
/ POW(10,
(select decimals from near.core.dim_ft_contract_metadata
where CONTRACT_ADDRESS = (select t2 from tokens_in_bot))))
/ (ACTION_DATA:args:first_base_amount / POW(10,
(select decimals from near.core.dim_ft_contract_metadata
where CONTRACT_ADDRESS = (select t1 from tokens_in_bot))
))
as buy_price,
Last run: 3 months ago
1
741B
6s