I am trying to retrieve some information on cryptocurrencies from the api offered by https://lunarcrush.com, I have the following code:
from websocket import create_connection
ws = create_connection('wss://stream.lunarcrush.com/v2')
ws.send('auth:ly4qodsfafbqq0mr04lml') # must authenticate using command: auth:<api_key>
result = ws.recv()
print(f'Received: {result}')
But this returns
Received: {"action":"auth","error":"API
key does not provide websocket access
"}
The only familiarity I have with APIs is going to <api.somewebsite.com> and using requests to parse the data, though I imagine this is not how it is supposed to be done. I have never used the websocket package, but according to this website this how I am supposed to connect and I am using the api key they generated for me. Can anyone help with this? I am not even sure it there is a problem with the code, I see they offer a paid version but that says it is for commercial use, so I think I should be able to access the data via my free account? Thanks for any help.