Git Product home page Git Product logo

lunarcrushapi's People

Contributors

saizk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lunarcrushapi's Issues

get_assets() does not return historic data

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,

Appears to not support Python versions below 3.10

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.