matt313 (OP)
Newbie
Offline
Activity: 20
Merit: 0
|
|
December 26, 2017, 12:48:28 AM |
|
I'm begining to make some tries on python to collect datas. This kind of script, run into Anaconda environment works : http://blockxchain.org/2017/05/29/importing-altcoin-data-with-python-and-the-coinmarketcap-api/http://blockxchain.org/2017/09/05/getting-started-with-the-cryptocompare-api-in-python/top-10-every-5-mins.py
import coinmarketcap import json import pandas as pd import time
market = coinmarketcap.Market()
# coins = json.loads(market.ticker()) doesn't work
coins = market.ticker()
for i in range(10): #this creates a dataframe with the top 10 coins coinArray = pd.DataFrame([pd.Series(coins[i]) for i in range(10)]).set_index('id')-
#timestamps and stores the csv file location = 'Data/'+str(time.time())+'.csv' coinArray.to_csv(location)
#waits 5 minutes until collecting data again time.sleep(300)
id,24h_volume_usd,available_supply,cached,last_updated,market_cap_usd,max_supply,name,percent_change_1h,percent_change_24h,percent_change_7d,price_btc,price_usd,rank,symbol,total_supply bitcoin,10775900000.0,16762962.0,False,1514247862,237730650788,21000000.0,Bitcoin,0.71,2.02,-25.18,1.0,14181.9,1,BTC,16762962.0 ethereum,2474570000.0,96569089.0,False,1514247849,74292434667.0,,Ethereum,0.2,9.52,-3.64,0.054548,769.319,2,ETH,96569089.0 bitcoin-cash,1338570000.0,16875925.0,False,1514247852,50025641996.0,21000000.0,Bitcoin Cash,0.08,2.5,35.3,0.210183,2964.32,3,BCH,16875925.0 ripple,684181000.0,38739144847.0,False,1514247840,43424644416.0,100000000000,Ripple,-0.25,8.34,41.72,0.00007948,1.12095,4,XRP,99993093880.0 litecoin,805232000.0,54471008.0,False,1514247841,14957575426.0,84000000.0,Litecoin,0.41,-0.41,-21.81,0.0194701,274.597,5,LTC,54471008.0 cardano,121627000.0,25927070538.0,False,1514247855,10664063383.0,45000000000.0,Cardano,-2.31,6.18,-20.73,0.00002916,0.41131,6,ADA,31112483745.0 iota,172224000.0,2779530283.0,False,1514247852,9813103869.0,2779530283.0,IOTA,1.1,2.33,-16.87,0.00025033,3.53049,7,MIOTA,2779530283.0 dash,192648000.0,7775162.0,False,1514247842,9204081078.0,18900000.0,Dash,0.81,-0.27,0.79,0.0839347,1183.78,8,DASH,7775162.0 nem,118117000.0,8999999999.0,False,1514247845,8824724999.0,,NEM,-3.64,-0.57,11.58,0.00006952,0.980525,9,XEM,8999999999.0 monero,119962000.0,15523574.0,False,1514247842,5622297054.0,,Monero,0.95,7.98,-3.48,0.0256799,362.178,10,XMR,15523574.0
This is raw datas of all the coins. I should now program something to study a specifical currency. How do you transform the raw datas into charts? vue.js? Thanks for the links above! Do you know links like yours : https://api.bitcoincharts.com/v1/trades.csv?symbol=krakenEUR&start=1303100000 but for altcoins? Could be quicker as runing a script to catch historical datas...
|