A template/example using Python3 to connect/stream market data/updates from Phemex.
Disclaimer: Use at your own risk.
Pitfalls/Features to add:
- Implement a way to manage heartbeats (ping/pong message correspondence), so as to keep the connection alive.
Instructions:
- Clone the repository.
- Create a new virtual environment, or use an existing virtual environment.
- To get this working with your own Phemex API key ID and secret key, you'll need to create a .env file in the same repository/directory of the project.
- Your key ID variable should be named key_id and your secret key variable should be named secret_key, in your .env file.
- Finally, create a new project (if using an IDE) and use the repository as the root directory of the project, and hit build/run.
NOTE: This was built and tested with PyCharm on Windows10.