saizk / lunarcrushapi Goto Github PK
View Code? Open in Web Editor NEWAn unofficial LunarCrush API v2 and v3 Wrapper for Python. No API key needed for LCv2!
License: MIT License
An unofficial LunarCrush API v2 and v3 Wrapper for Python. No API key needed for LCv2!
License: MIT License
Hi,
Thanks for very convenient package, it is amazing.
I'm having troubles with understanding get_assets() function, it is mentioned that it returns time series metrics as well, yet I only see one aggregated value.
lc.get_assets(symbol=['STETH'], data_points=30, interval='day')
returns this (sample)
'social_score_24h_rank': 102,
'social_volume': 493,
'social_volume_24h_rank': 226,
'social_volume_global': 1800655,
'time': 1658793600,
'tweet_favorites': 398,
'tweet_followers': 2603942,
'tweet_quotes': 2,
'tweet_replies': 50,
'tweet_retweets': 156,
'tweet_sentiment1': 12,
'tweet_sentiment2': 49,
'tweet_sentiment3': 77,
'tweet_sentiment4': 279,
'tweet_sentiment5': 70,
I wonder why you set the maximum number of datapoints = 720 in get_asset()
method? It seems like I can request more than 720 points.
Is there any specific instruction on this limitation?
Your documentation indicates this library supports Python 3.6+. I'm currently trying to use this library in my Python 3.9 environment but I'm receiving this error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 from lunarcrush import LunarCrush
3 lc = LunarCrush()
File ~/miniconda3/envs/trading/lib/python3.9/site-packages/lunarcrush/__init__.py:2, in <module>
1 from lunarcrush.lcv2 import LunarCrush
----> 2 from lunarcrush.lcv3 import LunarCrushV3
4 __all__ = ['LunarCrush', 'LunarCrushV3']
File ~/miniconda3/envs/trading/lib/python3.9/site-packages/lunarcrush/lcv3.py:8, in <module>
4 import urllib.parse
5 from lunarcrush.base import LunarCrushABC
----> 8 class LunarCrushV3(LunarCrushABC):
9 _BASE_URL = 'https://lunarcrush.com/api3'
11 def __init__(self, api_key):
File ~/miniconda3/envs/trading/lib/python3.9/site-packages/lunarcrush/lcv3.py:77, in LunarCrushV3()
61 """
62 Get a general snapshot of LunarCrush metrics on the entire list of tracked coins. It is designed as a
63 lightweight mechanism for monitoring the universe of available assets, either in aggregate or relative to each
(...)
73 :param bool desc: Pass any value as desc and the output will be reversed (descending).
74 """
75 return self._request('/coins', sort=sort, limit=limit, desc=desc)
---> 77 def get_coin(self, coin: str | int) -> dict:
78 """
79 Get a robust and detailed snapshot of a specific coin's metrics. This endpoint was designed to provide a
80 granular look at the coin at the timestamp that the call is made. Depending on the call frequency, can be used
(...)
86 :param str coin: Pass any value as desc and the output will be reversed (descending).
87 """
88 return self._request(f'/coins/{coin}')
TypeError: unsupported operand type(s) for |: 'type' and 'type'
I looked up the pipe syntax for typing and it appears to have been added in PEP 604 which wasn't added until Python 3.10.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.