JimMyersTech⚡️ LQ / CoinMarketCap 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
›
⌄
-- CoinMarketCap 🤝 Flipside LiveQuery Function Guide
-------------------------------------------------------------------------
-- The CoinMarketCap LiveQuery integration enables you to interact with
-- any CoinMarketCap API endpoint directly in SQL.
-- -----------------------------------------------------------------
-- 🚨 WARNING 🚨
-- To run these examples you must associate your CoinMarketCap API Key
-- with your Flipside Account here:
-- https://flipsidecrypto.xyz/livequery/cmc
-- ======================================================================
--
-- ⚡️ CoinMarketCap Functions
-- schema: `cmc`
-- function docs: https://coinmarketcap.com/api/documentation/v1/
--
-- ======================================================================
--
-- #️⃣ cmc.get('url', 'query args')
-- Issue a GET request to a CoinMarketCap Endpoint
--
-- example:
SELECT cmc.get('/v2/cryptocurrency/ohlcv/historical', {
'interval': 'hourly',
'time_period': 'hourly',
'time_start': 1691524740,
'time_end': 1691528400,
'id': '15478,15479'
}) as resp
--
-- #️⃣ cmc.post('url', 'body')
-- Issue a POST request to CoinMarketCap Endpoint
Run a query to Download Data