flipsidecrypto⚡️ LQ / Credmark LiveQuery Function Guide
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
›
⌄
-- Credmark 🤝 Flipside LiveQuery Function Guide
-------------------------------------------------------------------------
-- The Credmark LiveQuery integration enables you to retrieve Credmark's
-- curated API data directly in SQL.
-- -----------------------------------------------------------------
-- 🚨 WARNING 🚨
-- To run these examples you must associate your Credmark API Key
-- with your Flipside Account here:
-- https://flipsidecrypto.xyz/livequery/credmark-labs-api
-- ======================================================================
--
-- ⚡️ Credmark Functions
-- schema: `credmark_utils`
-- function docs: https://gateway.credmark.com/api/
--
-- ======================================================================
--
-- #️⃣ credmark_utils.get
-- Issue a GET request to the Credmark API
--
-- example: Use the Token API to retrieve token metadata for USDC
-- (https://gateway.credmark.com/api/#/Token%20API)
SELECT
credmark_utils.get('/v1/tokens/1/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', {
'blockNumber': 17767007
}) as resp
--
-- #️⃣ credmark_utils.post
-- Issue a POST request to the Credmark API
--
-- example: Use the DeFi API to run a Credmark Model
Run a query to Download Data