Creating Custom Network Data Metrics Using ATLAS
Last updated
Last updated
While Coin Metrics Network Data Pro offers users the ability to analyze aggregated on-chain metrics for a variety of cryptoassets, some power users may require additional customization and granularity. Coin Metrics ATLAS search engine equips users with the on-chain analytical toolset they need to workshop their own custom metrics.
This notebook demonstrates basic functionality offered by the Coin Metrics Python API Client, ATLAS, and Network Data Pro.
Coin Metrics offers a vast assortment of data for hundreds of cryptoassets. The Python API Client allows for easy access to this data using Python without needing to create your own wrappers using requests
and other such libraries.
To understand the data that Coin Metrics offers, feel free to peruse the resources below.
The Coin Metrics API v4 website contains the full set of endpoints and data offered by Coin Metrics.
The Coin Metrics Product Documentation gives detailed, conceptual explanations of the data that Coin Metrics offers.
The API Spec contains a full list of functions.
Download the entire notebook as either a jupyter notebook to run yourself or as a pdf from the two links below
With Network Data Pro, block-by-block metrics are offered for both BTC and ETH. With ATLAS, however, we have the ability to retrieve block-by-block metrics for any asset in ATLAS coverage.
In this example, we quantify the total amount of USDC and USDT transferred on a block-by-block basis.
4839
e4349a2d37cb71ea25068fdae029f99903585d3c221281...
2024-09-16 14:50:23+00:00
89180189833035782
2
1047.039959
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035790
89180189833035791
0
4840
9c224f0fd2e8a82561351ace87d0b4db0e382d948ec8fe...
2024-09-16 14:50:23+00:00
89180189833035783
2
560.0
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035792
89180189833035793
0
4841
559ba39db4ccd441c3a22ac6de2536567b7e9c78280925...
2024-09-16 14:50:23+00:00
89180189833035784
2
82426.032272
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035794
89180189833035795
0
4842
fe0d66654af63c8c31f2f012daae75efaff9d91f85be58...
2024-09-16 14:50:23+00:00
89180189833035785
2
1455.127734
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035796
89180189833035797
0
4843
8651c23909accf78b1ad45cadc85eb74aeb4afe2031f50...
2024-09-16 14:50:23+00:00
89180189833035786
2
30.0
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035798
89180189833035799
0
height
20763288
113663.822406
20763289
99292.054782
20763290
7651.824353
20763291
1018865.93048
20763292
384271.09176
Transaction info can also be viewed in the ATLAS graphical user interface: Largest Transaction: https://atlas.coinmetrics.io/transaction-details?asset=usdc&tx_hash=ca9d6c9c2e86a71c5482845abf9a8821d743bd2923fb73cb87177e6e83d86d9e
15151
0493f4f094032f2fc01a6a67d1bb7b18cad05d6b3727eb...
2024-09-16 14:50:23+00:00
89180189833035822
2
0.111413
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035890
89180189833035891
0
15152
616e8f6cbb50ed258575820c0cdac2b4d768bbb7c4cd7a...
2024-09-16 14:50:23+00:00
89180189833035823
2
75.0
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035892
89180189833035893
0
15153
bdb7bee6537d63c72055b0b015f9a07e6129aff9fb2c43...
2024-09-16 14:50:23+00:00
89180189833035824
2
5.0
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035894
89180189833035895
0
15154
38988bf92c9a968df5d7db4c0307a08a3c857d6879e7c0...
2024-09-16 14:50:23+00:00
89180189833035825
2
211.714933
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035896
89180189833035897
0
15155
562fc4b718a681f189cf9aa452937d49527fce7a265193...
2024-09-16 14:50:23+00:00
89180189833035826
2
300.0
0a590f6b2dd842efa8a7f1a0ebce2746cdb20a2c069bb8...
20763881
2024-09-16 14:50:23+00:00
89180189833035898
89180189833035899
0
height
20763288
523600.540279
20763289
149740.436168
20763290
143192.868507
20763291
79358.83167
20763292
1944483.921281
Transaction info can also be viewed in the ATLAS graphical user interface: Largest Transaction: https://atlas.coinmetrics.io/transaction-details?asset=usdt_eth&tx_hash=ec6ca03c17cea5c528378bbfa65ef1fb7471395c74a6e89d7344be0932c94a1c
With Network Data Pro, users have the ability to retrieve aggregated daily transfers for specific assets such as USDC and USDT. With ATLAS, however, we have the ability to create more customized, granular metrics.
In this example, we quantify the total size of transactions where USDT and USDC are transferred simultaneously, on a block-by-block basis.
310
20763867
149.890998
6288646aa12f6e17854e0e567d33e59baadb000fcccaa7...
225.073709
374.964707
311
20763868
20.215977
33b82dd5137e8610868966f7738467b3cca7aadee525f0...
40.291364
60.507341
312
20763872
59998.50869
973b87937c485db542909d2c69730a3d5ce41f78cfe01e...
60000.0
119998.50869
313
20763877
160.087258
97d6b653d389cb1b1a31e26d555e1e9f182633295b0e88...
2087.301319
2247.388577
314
20763878
56908.231643
8bd1605839db7cf700ac524012a09c71cf9add77d0edec...
23055.975936
79964.207579
Transaction info can also be viewed in the ATLAS graphical user interface: USDC: https://atlas.coinmetrics.io/transaction-details?asset=usdc&tx_hash=8bd1605839db7cf700ac524012a09c71cf9add77d0edec1b81a8342285d092db USDT: https://atlas.coinmetrics.io/transaction-details?asset=usdt_eth&tx_hash=8bd1605839db7cf700ac524012a09c71cf9add77d0edec1b81a8342285d092db
height
20763294
161872.380601
20763296
195635.133756
20763306
28362.220094
20763309
7325.095764
20763316
796760.645528
...
...
20763867
374.964707
20763868
60.507341
20763872
119998.50869
20763877
2247.388577
20763878
79964.207579
240 rows × 1 columns
With ATLAS, we can derived our own metrics based on externally-sourced tagged addresses.
In this example, we leverage our catalog of Uniswap liquidity pool contract addresses to estimate USDC inflows and DEX Supply for major trading pairs.
372
uniswap_v3_eth-agg-wbtc-usdc-spot
uniswap_v3_eth
wbtc
usdc
wbtc-usdc
<NA>
spot
<NA>
<NA>
<NA>
...
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
True
373
uniswap_v3_eth-agg-wsteth-usdc-spot
uniswap_v3_eth
wsteth
usdc
wsteth-usdc
<NA>
spot
<NA>
<NA>
<NA>
...
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
True
374
uniswap_v3_eth-agg-xaut_2_eth-usdc-spot
uniswap_v3_eth
xaut_2_eth
usdc
xaut_2_eth-usdc
<NA>
spot
<NA>
<NA>
<NA>
...
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
True
375
uniswap_v3_eth-agg-xsgd_eth-usdc-spot
uniswap_v3_eth
xsgd_eth
usdc
xsgd_eth-usdc
<NA>
spot
<NA>
<NA>
<NA>
...
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
True
376
uniswap_v3_eth-agg-yfi-usdc-spot
uniswap_v3_eth
yfi
usdc
yfi-usdc
<NA>
spot
<NA>
<NA>
<NA>
...
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
<NA>
True
5 rows × 37 columns
0
89149553831313431
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
0.496
8838821.586622
8838822.082622
1
449800
479578
7ed29942135604bafad3c2820bd06b9757c2ef380e1a87...
20756748
2024-09-15 14:55:23+00:00
True
52777858266.775307
52769019444.692688
20756718
20756719
89149429277261831
fa419c42e98bb83b53529891a8ba32768709eb8b254fc2...
1
89149738514907201
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
588.944621
8838822.082622
8839411.027243
0
449800
479579
304588d181e196c16aedf2a9721aa6e27ae16484662d13...
20756791
2024-09-15 15:03:59+00:00
True
52777858855.719925
52769019444.692688
20756718
20756748
89149553831313431
9c6bfbf5f155940e832deb6150585f4022f5b07d65c8c8...
2
89149777169612812
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-287.318755
8839411.027243
8839123.708488
0
449801
479579
19b757a736ac358fe9f269806a985eb32a8549b01ebfa3...
20756800
2024-09-15 15:05:47+00:00
False
52777858855.719925
52769019732.011436
20756718
20756791
89149738514907201
2095dd79f657e109c82e0589c610a313b873cfa5c5e874...
3
89149794349482033
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
1801.0
8839123.708488
8840924.708488
0
449801
479580
148424378d89962dee8f9bd2c63de38cb13ff02297ed31...
20756804
2024-09-15 15:06:35+00:00
True
52777860656.719925
52769019732.011436
20756800
20756791
89149777169612812
09498f7b3ec4307371fc300365d99a0d9eba79a5c69b68...
4
89149957558239248
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-399.070421
8840924.708488
8840525.638067
0
449802
479580
c51c6f67d2af4dcb65c712c13ed8bfc6f87051b60e2e50...
20756842
2024-09-15 15:14:11+00:00
False
52777860656.719925
52769020131.081856
20756800
20756804
89149794349482033
3c89ecbd238ff474415db6b9d5b4f1821667ea4cb08061...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
1031
89179966494736406
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-2.047597
11071334.757652
11071332.710055
0
450269
480108
9468ed9db151616d84f3206a3c865f15cd1a844d1dabce...
20763829
2024-09-16 14:39:59+00:00
False
52795130311.495941
52784058978.785889
20763827
20763803
89179957904801814
b7292f6c1fa6f8e32b9f0934ed1f2ae3564335bee8f755...
1032
89179970789703720
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-57.627626
11071332.710055
11071275.082429
0
450270
480108
6db5093f808e69f6e0871973efb6ef56e845c595c7b357...
20763830
2024-09-16 14:40:11+00:00
False
52795130311.495941
52784059036.413513
20763829
20763803
89179966494736406
3aaf4aa1784b63c9498315d8d3e6efb39b81bb95cd03c7...
1033
89180005149442094
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-28863.215208
11071275.082429
11042411.867221
1
450271
480108
1edac3c91bbe0bb36fb8c807ed9e41b8f7ee200f16df59...
20763838
2024-09-16 14:41:47+00:00
False
52795130311.495941
52784087899.628723
20763830
20763803
89179970789703720
4756f0560c8b10673f64b914c1bdc938fd14166a0fbfd6...
1034
89180005149442110
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
-29995.561842
11042411.867221
11012416.305379
0
450272
480108
1edac3c91bbe0bb36fb8c807ed9e41b8f7ee200f16df59...
20763838
2024-09-16 14:41:47+00:00
False
52795130311.495941
52784117895.190559
20763838
20763803
89180005149442094
b9ea155e1f0d6e98a1cb085f4fd4b4efcd5e7df9bbdd35...
1035
89180056689049603
3416cf6c708da44db2624d63ea0aaef7113527c6
13609065
4160.547575
11012416.305379
11016576.852954
1
450272
480109
2b8cab87607901cf45b8739a8ac88ff4c80b3edf3e2bed...
20763850
2024-09-16 14:44:11+00:00
True
52795134472.043518
52784117895.190559
20763838
20763803
89180005149442110
2184156b4af099618f7ce8773c06881027e3ebf711768b...
1036 rows × 19 columns
Transaction info can also be viewed in the ATLAS graphical user interface: Largest Transaction: https://atlas.coinmetrics.io/transaction-details?asset=usdc&tx_hash=efdc8d8347d53459d3a581d9700b291cb75311f63289ea0d1859b358d91d8b7f
height
20756748
0.496
20756791
588.944621
20756804
1801.0
20756883
20.0
20756906
28.88709
...
...
20763786
90000.0
20763794
1000.0
20763798
33356.45
20763803
25530.595361
20763850
4160.547575
510 rows × 1 columns
0
2024-09-15 14:55:23+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
8838822.082622
20756748
1
2024-09-15 15:03:59+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
8839411.027243
20756791
2
2024-09-15 15:05:47+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
8839123.708488
20756800
3
2024-09-15 15:06:35+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
8840924.708488
20756804
4
2024-09-15 15:14:11+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
8840525.638067
20756842
...
...
...
...
...
1030
2024-09-16 14:39:35+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
11071334.757652
20763827
1031
2024-09-16 14:39:59+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
11071332.710055
20763829
1032
2024-09-16 14:40:11+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
11071275.082429
20763830
1033
2024-09-16 14:41:47+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
11042411.867221
20763838
1035
2024-09-16 14:44:11+00:00
3416cf6c708da44db2624d63ea0aaef7113527c6
11016576.852954
20763850
933 rows × 4 columns
height
20756748
8838822.082622
1201350.942506
9178.353003
1.004935e+07
20756791
8839411.027243
1201350.942506
9178.353003
1.004994e+07
20756800
8839123.708488
1201350.942506
9178.353003
1.004965e+07
20756804
8840924.708488
1201350.942506
9178.353003
1.005145e+07
20756842
8840525.638067
1201350.942506
9178.353003
1.005105e+07
...
...
...
...
...
20763827
11071334.757652
1250073.026459
9178.353003
1.233059e+07
20763829
11071332.710055
1250073.026459
9178.353003
1.233058e+07
20763830
11071275.082429
1250073.026459
9178.353003
1.233053e+07
20763838
11042411.867221
1250073.026459
9178.353003
1.230166e+07
20763850
11016576.852954
1250073.026459
9178.353003
1.227583e+07
926 rows × 4 columns