-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I've been trying to test my project using the LNMarkets API on testnet mode but it's been giving me headache. I've gone through the documentation, applied the requested params but kept getting the below error:
┌──(venv)─(winter02㉿Antioch)-[~/dumb-hedge-test]
└─$ python run.py
04/18/2025 09:00:43 AM - app - INFO - Creating application
04/18/2025 09:00:43 AM - app - INFO - Loading configuration from ./website.ini
04/18/2025 09:00:43 AM - app - INFO - Database initialized successfully
04/18/2025 09:00:43 AM - app - INFO - Configuration loaded successfully
04/18/2025 09:00:46 AM - app - ERROR - Failed to initialize LNMarkets client: Unable to generate user tokens:
Status code: 404
Response:
Headers: {'Content-Type': 'application/json', 'LNM-ACCESS-KEY': 'qY7YnSikLZRw4Ymv42YrSudAMoLDVKaVFUD3bj5n+uE=', 'LNM-ACCESS-SIGNATURE': 'ukZKRkAjY5uZiaQbuWit93iLkoN84EMGr299OM0aGvI=', 'LNM-ACCESS-PASSPHRASE': 'i2ga2ei4j0c7', 'LNM-ACCESS-TIMESTAMP': '1744981243302'}
Payload: {"expiry":3600,"scopes":["deposit","withdraw","positions","user"]}
04/18/2025 09:00:46 AM - app - ERROR - Traceback (most recent call last):
File "/home/winter02/dumb-hedge-test/app/init.py", line 99, in create_app
token = User.generateToken(
expiry=3600, # 1 hour expiry
...<6 lines>...
api_passphrase=config.get('SERVICE', 'LNM_PASSPHRASE')
)
File "/home/winter02/dumb-hedge-test/venv/lib/python3.13/site-packages/LNMarkets/User.py", line 278, in generateToken
raise RuntimeError(
...<5 lines>...
)
RuntimeError: Unable to generate user tokens:
Status code: 404
Response:
Headers: {'Content-Type': 'application/json', 'LNM-ACCESS-KEY': 'qY7YnSikLZRw4Ymv42YrSudAMoLDVKaVFUD3bj5n+uE=', 'LNM-ACCESS-SIGNATURE': 'ukZKRkAjY5uZiaQbuWit93iLkoN84EMGr299OM0aGvI=', 'LNM-ACCESS-PASSPHRASE': 'i2ga2ei4j0c7', 'LNM-ACCESS-TIMESTAMP': '1744981243302'}
Payload: {"expiry":3600,"scopes":["deposit","withdraw","positions","user"]}
Traceback (most recent call last):
File "/home/winter02/dumb-hedge-test/run.py", line 5, in
app = create_app()
File "/home/winter02/dumb-hedge-test/app/init.py", line 99, in create_app
token = User.generateToken(
expiry=3600, # 1 hour expiry
...<6 lines>...
api_passphrase=config.get('SERVICE', 'LNM_PASSPHRASE')
)
File "/home/winter02/dumb-hedge-test/venv/lib/python3.13/site-packages/LNMarkets/User.py", line 278, in generateToken
raise RuntimeError(
...<5 lines>...
)
RuntimeError: Unable to generate user tokens:
Status code: 404
Response:
Headers: {'Content-Type': 'application/json', 'LNM-ACCESS-KEY': 'qY7YnSikLZRw4Ymv42YrSudAMoLDVKaVFUD3bj5n+uE=', 'LNM-ACCESS-SIGNATURE': 'ukZKRkAjY5uZiaQbuWit93iLkoN84EMGr299OM0aGvI=', 'LNM-ACCESS-PASSPHRASE': 'i2ga2ei4j0c7', 'LNM-ACCESS-TIMESTAMP': '1744981243302'}
Payload: {"expiry":3600,"scopes":["deposit","withdraw","positions","user"]}
┌──(venv)─(winter02㉿Antioch)-[~/dumb-hedge-test]
Can anyone help please