https://github.com/zaneh/phemex-margin-example
This example shows how to open and close a position using the example client from Phemex.
https://github.com/zaneh/phemex-margin-example
cex example leverage margin-trading phemex phemex-api
Last synced: about 2 months ago
JSON representation
This example shows how to open and close a position using the example client from Phemex.
- Host: GitHub
- URL: https://github.com/zaneh/phemex-margin-example
- Owner: ZaneH
- Created: 2023-12-05T20:50:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-05T20:55:40.000Z (about 2 years ago)
- Last Synced: 2025-01-15T22:26:32.882Z (about 1 year ago)
- Topics: cex, example, leverage, margin-trading, phemex, phemex-api
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phemex Margin Example
Using the testnet you can create a margin account and trade with leverage. This example shows how to open and close a position using the [example client from Phemex](https://github.com/phemex/phemex-python-api/).
## Quickstart
```
$ conda create -n margins python=3.10
$ conda activate margins
$ pip install -r requirements.txt
$ python main.py
```
## Environment Variables
```
# .env
# Testnet
PHEMEX_API_ID=
PHEMEX_API_SECRET=
```