Nadex Bot is an automated trading application designed to interact with the Nadex platform, allowing users to place binary options orders programmatically. This README provides detailed instructions on configuring, running, and using the Nadex Bot and its associated dashboard.
- Ensure you have pnpm installed on your system.
- Create a
.env
file in the root of the project and in thenadex-bot-dashboard
folder, based on the respective.env.example
files.
-
Root Configuration:
- Create a
.env
file in the root directory of the project. - Populate it with the necessary environment variables as specified in the
.env.example
file.
- Create a
-
Dashboard Configuration:
- Create a
.env
file inside thenadex-bot-dashboard
folder. - Add the required environment variables as per the
.env.example
file in thenadex-bot-dashboard
folder.
- Create a
To start the bot API server, execute the following commands:
pnpm install
pnpm start:prod
The Nadex Bot will open the Nadex site and log in using the credentials configured in the .env
file. To start the bot, run:
pnpm start:nadex
The dashboard provides a user interface to interact with the bot. To launch the dashboard in your browser, execute:
pnpm start:dashboard
To place a binary order on Nadex, make a POST request to the following endpoint:
POST http://localhost:8000/nadex/place-binary-order
The request should include a JSON payload with the following structure:
{
"symbol": "USD/JPY", // The currency pair you want to trade
"orderAction": "BUY", // Action to perform: BUY or SELL
"orderType": "LIMIT", // Type of order: LIMIT or MARKET
"selectedDuration": "5 minute" // Duration for the order: e.g., 5 minute etc
}
- Ensure that your
.env
files are correctly configured with the necessary credentials and environment variables. - The Nadex Bot will automatically log in to the Nadex site using the credentials provided in the
.env
file. - The Nadex Bot Dashboard provides a user interface to interact with the bot and place orders on Nadex.