Yat

How to fetch market capitalization data

Economy & Market


Hello people,

As the title says, how can I get the market cap of each coin in each day?



 
Mukesh Ram
Hey, that's easy. Take a look the getChain_MarketCap.function. 

For notebook, 
from AlgoAPI.AlgoAPIUtil import getChain_MarketCap

data = getChain_MarketCap(
    asset='BTC', 
    starttime='2022-01-01', 
    endtime='2022-01-31'
)

print(data)





For backtest,