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
.envfile in the root of the project and in thenadex-bot-dashboardfolder, based on the respective.env.examplefiles.
-
Root Configuration:
- Create a
.envfile in the root directory of the project. - Populate it with the necessary environment variables as specified in the
.env.examplefile.
- Create a
-
Dashboard Configuration:
- Create a
.envfile inside thenadex-bot-dashboardfolder. - Add the required environment variables as per the
.env.examplefile in thenadex-bot-dashboardfolder.
- Create a
To start the bot API server, execute the following commands:
pnpm install
pnpm start:prodThe 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:nadexThe dashboard provides a user interface to interact with the bot. To launch the dashboard in your browser, execute:
pnpm start:dashboardTo 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
.envfiles 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
.envfile. - The Nadex Bot Dashboard provides a user interface to interact with the bot and place orders on Nadex.