Automated Trading Bot for Phemex API using Node.js and RESTful API calls. This repository provides a basic framework for developing trading bots that can automatically make trades on the Phemex platform. The bot utilizes the Phemex API to retrieve market data, manage orders, and execute trades based on pre-configured strategies. The code is written in Node.js and uses RESTful API calls to interact with the Phemex API. The project is intended for educational purposes only and should not be used for live trading without proper testing and risk assessment.
- Install dependencies
npm install
-
Set your apiKey and secret in .env file
-
Run
npm start
https://github.com/phemex/phemex-api-docs
- Name: Phemex Node
Method: GET
URL: {{REQUEST_URL}}/account?currency=USDT
currency
:USDT
Method: GET
URL: {{REQUEST_URL}}/active-orders?symbol=BTCUSDT
symbol
:BTCUSDT
Descripción:
They are not open positions, they are Active Limit Orders that are waiting to be opened.
Method: POST
URL: {{REQUEST_URL}}/place-order
{
"symbol": "BTCUSDT",
"side": "Buy",
"posSide": "Long",
"orderQtyRq": "0.001",
"ordType": "Limit",
"priceRp": 64000
}
Method: DELETE URL: {{REQUEST_URL}}/cancel-order
{
"symbol": "BTCUSDT",
"orderID": "3ea9cbac-af8b-4edb-b482-64b06dcbe586",
"posSide": "Long"
}