KaskoazulAlgoDex tx buys/sells with ALGO volume
Updated 2022-02-24
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 TXGROUP AS (
SELECT
block_timestamp::date as fecha,
tx_group_id,
CASE tx_message:txn:apid
WHEN 354073834 then 'ASA'
WHEN 354073718 then 'ALGO'
END AS ESCROW
FROM
algorand.transactions
WHERE
ESCROW IN ('ASA', 'ALGO')
AND fecha = '2022-02-10'
),
ORDER_TYPE AS (
SELECT
BLOCK_TIMESTAMP,
TX_GROUP_ID,
TX_MESSAGE:txn:amt/pow(10,6) as ALGO_amount,
CASE tx_message:txn:apid
WHEN 354073834 then 'ASA'
WHEN 354073718 then 'ALGO'
END AS ESCROW,
--INTRA,
ASSET_ID,
--TX_TYPE_NAME,
--TX_MESSAGE,
REGEXP_SUBSTR( TRY_BASE64_DECODE_STRING(TX_MESSAGE:txn:note), '.* ":(.*)', 1, 1, 'e', 1) as substr_note,
PARSE_JSON(SUBSTRING( substr_note, 0, LEN(substr_note) -1 )) as json_note,
json_note:escrowAddr as escrow_wallet,
json_note:escrowOrderType as OrderType
FROM
algorand.transactions
WHERE
tx_group_id IN (SELECT tx_group_id FROM TXGROUP)
Run a query to Download Data