Skip to content

Instantly share code, notes, and snippets.

@nrese
Created June 5, 2020 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrese/a9cff0d3888e3fe3700f32432e442528 to your computer and use it in GitHub Desktop.
Save nrese/a9cff0d3888e3fe3700f32432e442528 to your computer and use it in GitHub Desktop.
import urllib.request
url = "https://api.lunarcrush.com/v2?data=assets&key={API_KEY_HERE}&symbol=BTC"
print(urllib.request.urlopen(url).read())
{
"config": {
"data": "assets",
"symbol": "'BTC'",
"interval": "hour",
"data_points": 24
},
"usage": {
"day": 15,
"month": 103
},
"data": [{
"id": 1,
"name": "Bitcoin",
"symbol": "BTC",
"price": 9798.977911,
"price_btc": 1,
"market_cap": 180245643159,
"percent_change_24h": 1.41,
"percent_change_7d": -1.89,
"percent_change_30d": 4.73,
"volume_24h": 26140524526.52,
"max_supply": "21000000",
"social_contributors_calc_24h_previous": 44556,
"url_shares_calc_24h_previous": 22474,
"tweet_spam_calc_24h_previous": 7607,
"news_calc_24h_previous": 779,
"average_sentiment_calc_24h_previous": 3.7,
"social_score_calc_24h_previous": 275399174,
"social_volume_calc_24h_previous": 69984,
"alt_rank_30d_calc_24h_previous": 1,
"alt_rank_calc_24h_previous": 26,
"social_contributors_calc_24h": 32456,
"social_contributors_calc_24h_percent": 72.84316365921538,
"url_shares_calc_24h": 37791,
"url_shares_calc_24h_percent": 168.15431164901665,
"tweet_spam_calc_24h": 13446,
"tweet_spam_calc_24h_percent": 176.75824898120152,
"news_calc_24h": 1218,
"news_calc_24h_percent": 156.35430038510913,
"average_sentiment_calc_24h": 3.7,
"average_sentiment_calc_24h_percent": 100,
"social_score_calc_24h": 404486652,
"social_score_calc_24h_percent": 146.87286316988008,
"social_volume_calc_24h": 110788,
"social_volume_calc_24h_percent": 158.30475537265662,
"asset_id": 1,
"time": 1591315200,
"open": 9801.616408,
"high": 9806.977146,
"low": 9801.616408,
"volume": 353205420,
"url_shares": 1135,
"unique_url_shares": 659,
"reddit_posts": 1,
"reddit_posts_score": 1,
"reddit_comments": 1,
"reddit_comments_score": 1,
"tweets": 3758,
"tweet_spam": 338,
"tweet_followers": 14174661,
"tweet_quotes": 11,
"tweet_retweets": 338,
"tweet_replies": 110,
"tweet_favorites": 551,
"tweet_sentiment1": 85,
"tweet_sentiment2": 206,
"tweet_sentiment3": 685,
"tweet_sentiment4": 2564,
"tweet_sentiment5": 218,
"tweet_sentiment_impact1": 181592,
"tweet_sentiment_impact2": 1455907,
"tweet_sentiment_impact3": 3225871,
"tweet_sentiment_impact4": 8750266,
"tweet_sentiment_impact5": 562035,
"social_score": 14176806,
"average_sentiment": 3.7,
"sentiment_absolute": 3,
"sentiment_relative": 91,
"news": 47,
"price_score": 3,
"social_impact_score": 4.3,
"correlation_rank": 4.1,
"galaxy_score": 75.5,
"volatility": 0.01008901,
"alt_rank": 26,
"alt_rank_30d": 1,
"market_cap_rank": 1,
"percent_change_24h_rank": 657,
"volume_24h_rank": 2,
"social_volume_24h_rank": 1,
"social_score_24h_rank": 1,
"youtube": 47,
"social_contributors": 1963,
"social_volume": 4466,
"social_volume_global": 7118,
"social_dominance": 62.74234335487496,
"market_cap_global": 278814602122,
"market_dominance": 64.55374708002002,
"medium": 1,
"close": 9798.977911,
"timeSeries": [{
"asset_id": 1,
"time": 1591228800,
"open": 9660.001054,
"close": 9644.590254,
"high": 9660.001054,
"low": 9644.590254,
"volume": 928644431,
"market_cap": 177232754215,
"url_shares": 1126,
"unique_url_shares": 765,
"reddit_posts": 48,
"reddit_posts_score": 110,
"reddit_comments": 41,
"reddit_comments_score": 209,
"tweets": 3443,
"tweet_spam": 552,
"tweet_followers": 11173675,
"tweet_quotes": 36,
"tweet_retweets": 919,
"tweet_replies": 272,
"tweet_favorites": 1764,
"tweet_sentiment1": 109,
"tweet_sentiment2": 174,
"tweet_sentiment3": 555,
"tweet_sentiment4": 2339,
"tweet_sentiment5": 266,
"tweet_sentiment_impact1": 149899,
"tweet_sentiment_impact2": 357895,
"tweet_sentiment_impact3": 1448425,
"tweet_sentiment_impact4": 8503962,
"tweet_sentiment_impact5": 716485,
"social_score": 11178111,
"average_sentiment": 3.7,
"sentiment_absolute": 3,
"sentiment_relative": 90,
"news": 28,
"price_score": 3.1,
"social_impact_score": 3,
"correlation_rank": 3.7,
"galaxy_score": 67.5,
"volatility": 0.02091719,
"alt_rank": 64,
"alt_rank_30d": 1,
"market_cap_rank": 1,
"percent_change_24h_rank": 853,
"volume_24h_rank": 2,
"social_volume_24h_rank": 1,
"social_score_24h_rank": 1,
"youtube": 4,
"social_contributors": 2616,
"social_volume": 4325,
"price_btc": 1,
"social_volume_global": 7229,
"social_dominance": 59.82846866786554,
"market_cap_global": 275337345211,
"market_dominance": 64.36931179066202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment