nadex-cli 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nadex_cli-1.0.0/.env ADDED
@@ -0,0 +1,18 @@
1
+ # Nadex Demo Account Credentials
2
+ NADEX_USERNAME=demo-shivam001
3
+ NADEX_PASSWORD=cBj2AfSSAX4NBXc
4
+ NADEX_USER_ID=SHIVAM001
5
+
6
+ # API URLs
7
+ NADEX_AUTH_URL=https://demo-trade.nadex.com/iDeal/v2/security/authenticate
8
+ NADEX_SESSION_URL=https://demo-upd.nadex.com/lightstreamer/create_session.js
9
+ NADEX_MARKET_TREE_URL=https://demo-trade.nadex.com/iDeal/markets/hierarchy/tree/full
10
+ NADEX_NAVIGATION_URL=https://demo-trade.nadex.com/iDeal/markets/navigation
11
+
12
+ # WebSocket Configuration
13
+ PING_INTERVAL=30
14
+ RESUBSCRIBE_INTERVAL=300
15
+ INITIAL_TABLE_COUNTER=15
16
+ INITIAL_REQ_PHASE_COUNTER=663
17
+ WIN_PHASE=63
18
+ FRONTEND_PORT=8765
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2025] [SHIVAM GARG]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include .env
4
+ recursive-include nadex_dashboard *.py
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.4
2
+ Name: nadex-cli
3
+ Version: 1.0.0
4
+ Description-Content-Type: text/markdown
5
+ License-File: LICENSE
6
+ Requires-Dist: python-dotenv
7
+ Requires-Dist: requests
8
+ Requires-Dist: websockets
9
+ Dynamic: description
10
+ Dynamic: description-content-type
11
+ Dynamic: license-file
12
+ Dynamic: requires-dist
13
+
14
+ # πŸ“ˆ nadex β€” Real-Time 5-Minute Binary Options Market Data CLI
15
+
16
+ `nadex` is a powerful Python CLI tool that fetches **live 5-minute binary options forex data** directly from the Nadex exchange. With a single command, you can access comprehensive market data including all available forex pairs, trading levels (strikes), bid/ask prices, and order book quantities β€” transforming your terminal into a real-time trading dashboard.
17
+
18
+ Perfect for traders, developers, and financial analysts who need instant access to Nadex's binary options market structure and live pricing data.
19
+
20
+ ---
21
+
22
+ ## πŸš€ Key Features
23
+
24
+ - ⏱ **Real-time 5-minute binary options data** for all major forex pairs
25
+ - πŸ’΅ **Complete strike levels** with bid/ask prices and available quantities
26
+ - πŸ“Š **Full order book visualization** in your terminal
27
+ - πŸ” **Built-in test credentials** (easily replaceable with your own)
28
+ - 🎯 **Clean, parsable CLI output** for both human reading and automation
29
+ - 🐍 **One-command installation** via PyPI (`pip install nadex`)
30
+ - 🌐 **WebSocket streaming** for real-time updates
31
+ - πŸ“ˆ **Professional-grade market data** from Nadex exchange
32
+
33
+ ---
34
+
35
+ ## πŸ“¦ Quick Installation
36
+
37
+ Install the package globally using pip:
38
+
39
+ ```bash
40
+ pip install nadex
41
+ ```
42
+
43
+ That's it! No additional setup required.
44
+
45
+ ---
46
+
47
+ ## ⚑ Quick Start
48
+
49
+ After installation, simply run:
50
+
51
+ ```bash
52
+ nadex_dashboard
53
+ ```
54
+
55
+ The CLI will immediately:
56
+ 1. Connect to Nadex using built-in test credentials
57
+ 2. Subscribe to the live 5-minute binary options feed
58
+ 3. Display real-time market data in a clean, organized format
59
+
60
+ ## 🎯 What You Get
61
+
62
+ ### Complete Market Overview
63
+ - **All Active Forex Pairs**: EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, EUR/GBP,
64
+ - **Strike Levels**: Every available trading level for 5-minute binary options
65
+ - **Bid/Ask Prices**: Real-time pricing from the Nadex order book
66
+ - **Contract Quantities**: Available volume at each price level
67
+
68
+ ### Real-Time Updates
69
+ The dashboard refreshes automatically as new market data arrives via WebSocket connection, ensuring you always see the latest:
70
+ - Price movements
71
+ - Quantity changes
72
+ - New strike levels
73
+ - Market status updates
74
+
75
+ ---
76
+
77
+ ## πŸ”‘ Authentication & Credentials
78
+
79
+ ### Default Test Mode
80
+ The package comes with **built-in test credentials** that connect to Nadex's demo environment. This means:
81
+ - βœ… No real money involved
82
+ - βœ… Full access to live market data structure
83
+ - βœ… Perfect for learning and development
84
+ - βœ… No registration required
85
+
86
+ ### Using Your Own Credentials
87
+
88
+ If you have a Nadex account and want to use your own credentials:
89
+
90
+ #### Method 1: Environment Variables
91
+ ```bash
92
+ export NADEX_USERNAME=your-username
93
+ export NADEX_PASSWORD=your-password
94
+ nadex_dashboard
95
+ ```
96
+
97
+ #### Method 2: .env File
98
+ Create a `.env` file in your working directory:
99
+ ```env
100
+ NADEX_USERNAME=your-username
101
+ NADEX_PASSWORD=your-password
102
+ ```
103
+
104
+ Then run the command as usual:
105
+ ```bash
106
+ nadex_dashboard
107
+ ```
108
+
109
+ #### Method 3: Direct Configuration
110
+ ```python
111
+ # Custom script using the package
112
+ from nadex_dashboard import NadexClient
113
+
114
+ client = NadexClient(
115
+ username="your-username",
116
+ password="your-password"
117
+ )
118
+ client.start_dashboard()
119
+ ```
120
+
121
+ ---
122
+
123
+ ## πŸ—οΈ Architecture & Project Structure
124
+
125
+ ```
126
+ nadex/
127
+ β”œβ”€β”€ nadex_dashboard/
128
+ β”‚ β”œβ”€β”€ __init__.py # Package initialization
129
+ β”‚ β”œβ”€β”€ config.py # Configuration and environment handling
130
+ β”‚ β”œβ”€β”€ helpers.py # Utility functions and data processing
131
+ β”‚ β”œβ”€β”€ messages.py # WebSocket message formats and protocols
132
+ β”‚ β”œβ”€β”€ parsing.py # Market data parsing and validation
133
+ β”‚ β”œβ”€β”€ dashboard.py # CLI formatting and display logic
134
+ β”‚ β”œβ”€β”€ websocket_manager.py # WebSocket connection management
135
+ β”‚ └── __main__.py # CLI entry point
136
+ β”œβ”€β”€ setup.py # Package configuration
137
+ β”œβ”€β”€ requirements.txt # Dependencies
138
+ β”œβ”€β”€ README.md # This file
139
+ └── LICENSE # MIT License
140
+ ```
141
+
142
+ ---
143
+
144
+ ## πŸ“Š Market Data Specifications
145
+
146
+ ### Supported Instruments
147
+ - **EUR/USD** - Euro vs US Dollar
148
+ - **GBP/USD** - British Pound vs US Dollar
149
+ - **USD/JPY** - US Dollar vs Japanese Yen
150
+ - **AUD/USD** - Australian Dollar vs US Dollar
151
+ - **USD/CAD** - US Dollar vs Canadian Dollar
152
+ - **EUR/JPY** - Euro vs Japanese Yen
153
+ - **GBP/JPY** - British Pound vs Japanese Yen
154
+
155
+ ---
156
+
157
+ ### Local Development Setup
158
+ ```bash
159
+ # Clone the repository
160
+ git clone https://github.com/shivamgarg-dev/nadex-dashboard.git
161
+ cd nadex-dashboard
162
+
163
+ # Install in development mode
164
+ pip install -e .
165
+
166
+ # Run tests
167
+ python -m pytest tests/
168
+
169
+ # Run the CLI
170
+ nadex_dashboard
171
+ ```
172
+
173
+ ---
174
+
175
+ ## ❓ Frequently Asked Questions
176
+
177
+ ### General Questions
178
+
179
+ **Q: Is this connected to real money?**
180
+ A: By default, no. The package uses Nadex's test environment with demo credentials. No real funds are involved unless you explicitly provide your own production credentials.
181
+
182
+ **Q: Do I need a Nadex account?**
183
+ A: No, the package works out-of-the-box with built-in test credentials. However, you can use your own Nadex account if you prefer.
184
+
185
+ **Q: Is the data real-time?**
186
+ A: Yes, the data is streamed live via WebSocket from Nadex's servers with minimal latency.
187
+
188
+ ### Technical Questions
189
+
190
+ **Q: Can I use this in trading bots?**
191
+ A: Absolutely. The package is designed with automation in mind. You can import modules and build custom applications on top of it.
192
+
193
+ **Q: How often does the data update?**
194
+ A: Updates are pushed in real-time as market conditions change, typically 1-5 times per second during active trading hours.
195
+
196
+ ---
197
+
198
+ ## πŸ—ΊοΈ Roadmap
199
+
200
+ ### Upcoming Features
201
+ - [ ] **Historical data export** for backtesting
202
+ - [ ] **Alert system** for price/volume thresholds
203
+ - [ ] **Multiple timeframes** (1-minute, 15-minute options)
204
+ - [ ] **Advanced filtering** by instrument, strike range, etc.
205
+ - [ ] **REST API mode** for web applications
206
+ - [ ] **Docker container** for easy deployment
207
+ - [ ] **Grafana dashboard** integration
208
+ - [ ] **Telegram/Discord bot** notifications
209
+
210
+ ### Long-term Vision
211
+ - Support for other Nadex instrument types (indices, commodities)
212
+ - Machine learning integration for pattern recognition
213
+ - Advanced analytics and visualization tools
214
+ - Mobile app companion
215
+
216
+ ---
217
+
218
+ ## πŸ‘¨β€πŸ’» Author & Maintainer
219
+
220
+ **Shivam Garg**
221
+ - 🌐 **GitHub**: [@shivamgarg001](https://github.com/shivamgarg001)
222
+
223
+ ---
224
+
225
+ ## ⭐️ Show Your Support
226
+
227
+ If you find this tool helpful for your trading, development, or learning:
228
+
229
+ - ⭐ **Star the repository** on GitHub
230
+ - 🍴 **Fork it** to contribute
231
+ - πŸ› **Report issues** to help improve it
232
+ - πŸ’‘ **Suggest features** for future releases
233
+ - πŸ“’ **Share it** with others who might benefit
234
+
235
+ **GitHub Repository**: [https://github.com/shivamgarg001/Nadex]
236
+
237
+ ---
238
+
239
+ **Happy trading! πŸ“ˆ**
@@ -0,0 +1,226 @@
1
+ # πŸ“ˆ nadex β€” Real-Time 5-Minute Binary Options Market Data CLI
2
+
3
+ `nadex` is a powerful Python CLI tool that fetches **live 5-minute binary options forex data** directly from the Nadex exchange. With a single command, you can access comprehensive market data including all available forex pairs, trading levels (strikes), bid/ask prices, and order book quantities β€” transforming your terminal into a real-time trading dashboard.
4
+
5
+ Perfect for traders, developers, and financial analysts who need instant access to Nadex's binary options market structure and live pricing data.
6
+
7
+ ---
8
+
9
+ ## πŸš€ Key Features
10
+
11
+ - ⏱ **Real-time 5-minute binary options data** for all major forex pairs
12
+ - πŸ’΅ **Complete strike levels** with bid/ask prices and available quantities
13
+ - πŸ“Š **Full order book visualization** in your terminal
14
+ - πŸ” **Built-in test credentials** (easily replaceable with your own)
15
+ - 🎯 **Clean, parsable CLI output** for both human reading and automation
16
+ - 🐍 **One-command installation** via PyPI (`pip install nadex`)
17
+ - 🌐 **WebSocket streaming** for real-time updates
18
+ - πŸ“ˆ **Professional-grade market data** from Nadex exchange
19
+
20
+ ---
21
+
22
+ ## πŸ“¦ Quick Installation
23
+
24
+ Install the package globally using pip:
25
+
26
+ ```bash
27
+ pip install nadex
28
+ ```
29
+
30
+ That's it! No additional setup required.
31
+
32
+ ---
33
+
34
+ ## ⚑ Quick Start
35
+
36
+ After installation, simply run:
37
+
38
+ ```bash
39
+ nadex_dashboard
40
+ ```
41
+
42
+ The CLI will immediately:
43
+ 1. Connect to Nadex using built-in test credentials
44
+ 2. Subscribe to the live 5-minute binary options feed
45
+ 3. Display real-time market data in a clean, organized format
46
+
47
+ ## 🎯 What You Get
48
+
49
+ ### Complete Market Overview
50
+ - **All Active Forex Pairs**: EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, EUR/GBP,
51
+ - **Strike Levels**: Every available trading level for 5-minute binary options
52
+ - **Bid/Ask Prices**: Real-time pricing from the Nadex order book
53
+ - **Contract Quantities**: Available volume at each price level
54
+
55
+ ### Real-Time Updates
56
+ The dashboard refreshes automatically as new market data arrives via WebSocket connection, ensuring you always see the latest:
57
+ - Price movements
58
+ - Quantity changes
59
+ - New strike levels
60
+ - Market status updates
61
+
62
+ ---
63
+
64
+ ## πŸ”‘ Authentication & Credentials
65
+
66
+ ### Default Test Mode
67
+ The package comes with **built-in test credentials** that connect to Nadex's demo environment. This means:
68
+ - βœ… No real money involved
69
+ - βœ… Full access to live market data structure
70
+ - βœ… Perfect for learning and development
71
+ - βœ… No registration required
72
+
73
+ ### Using Your Own Credentials
74
+
75
+ If you have a Nadex account and want to use your own credentials:
76
+
77
+ #### Method 1: Environment Variables
78
+ ```bash
79
+ export NADEX_USERNAME=your-username
80
+ export NADEX_PASSWORD=your-password
81
+ nadex_dashboard
82
+ ```
83
+
84
+ #### Method 2: .env File
85
+ Create a `.env` file in your working directory:
86
+ ```env
87
+ NADEX_USERNAME=your-username
88
+ NADEX_PASSWORD=your-password
89
+ ```
90
+
91
+ Then run the command as usual:
92
+ ```bash
93
+ nadex_dashboard
94
+ ```
95
+
96
+ #### Method 3: Direct Configuration
97
+ ```python
98
+ # Custom script using the package
99
+ from nadex_dashboard import NadexClient
100
+
101
+ client = NadexClient(
102
+ username="your-username",
103
+ password="your-password"
104
+ )
105
+ client.start_dashboard()
106
+ ```
107
+
108
+ ---
109
+
110
+ ## πŸ—οΈ Architecture & Project Structure
111
+
112
+ ```
113
+ nadex/
114
+ β”œβ”€β”€ nadex_dashboard/
115
+ β”‚ β”œβ”€β”€ __init__.py # Package initialization
116
+ β”‚ β”œβ”€β”€ config.py # Configuration and environment handling
117
+ β”‚ β”œβ”€β”€ helpers.py # Utility functions and data processing
118
+ β”‚ β”œβ”€β”€ messages.py # WebSocket message formats and protocols
119
+ β”‚ β”œβ”€β”€ parsing.py # Market data parsing and validation
120
+ β”‚ β”œβ”€β”€ dashboard.py # CLI formatting and display logic
121
+ β”‚ β”œβ”€β”€ websocket_manager.py # WebSocket connection management
122
+ β”‚ └── __main__.py # CLI entry point
123
+ β”œβ”€β”€ setup.py # Package configuration
124
+ β”œβ”€β”€ requirements.txt # Dependencies
125
+ β”œβ”€β”€ README.md # This file
126
+ └── LICENSE # MIT License
127
+ ```
128
+
129
+ ---
130
+
131
+ ## πŸ“Š Market Data Specifications
132
+
133
+ ### Supported Instruments
134
+ - **EUR/USD** - Euro vs US Dollar
135
+ - **GBP/USD** - British Pound vs US Dollar
136
+ - **USD/JPY** - US Dollar vs Japanese Yen
137
+ - **AUD/USD** - Australian Dollar vs US Dollar
138
+ - **USD/CAD** - US Dollar vs Canadian Dollar
139
+ - **EUR/JPY** - Euro vs Japanese Yen
140
+ - **GBP/JPY** - British Pound vs Japanese Yen
141
+
142
+ ---
143
+
144
+ ### Local Development Setup
145
+ ```bash
146
+ # Clone the repository
147
+ git clone https://github.com/shivamgarg-dev/nadex-dashboard.git
148
+ cd nadex-dashboard
149
+
150
+ # Install in development mode
151
+ pip install -e .
152
+
153
+ # Run tests
154
+ python -m pytest tests/
155
+
156
+ # Run the CLI
157
+ nadex_dashboard
158
+ ```
159
+
160
+ ---
161
+
162
+ ## ❓ Frequently Asked Questions
163
+
164
+ ### General Questions
165
+
166
+ **Q: Is this connected to real money?**
167
+ A: By default, no. The package uses Nadex's test environment with demo credentials. No real funds are involved unless you explicitly provide your own production credentials.
168
+
169
+ **Q: Do I need a Nadex account?**
170
+ A: No, the package works out-of-the-box with built-in test credentials. However, you can use your own Nadex account if you prefer.
171
+
172
+ **Q: Is the data real-time?**
173
+ A: Yes, the data is streamed live via WebSocket from Nadex's servers with minimal latency.
174
+
175
+ ### Technical Questions
176
+
177
+ **Q: Can I use this in trading bots?**
178
+ A: Absolutely. The package is designed with automation in mind. You can import modules and build custom applications on top of it.
179
+
180
+ **Q: How often does the data update?**
181
+ A: Updates are pushed in real-time as market conditions change, typically 1-5 times per second during active trading hours.
182
+
183
+ ---
184
+
185
+ ## πŸ—ΊοΈ Roadmap
186
+
187
+ ### Upcoming Features
188
+ - [ ] **Historical data export** for backtesting
189
+ - [ ] **Alert system** for price/volume thresholds
190
+ - [ ] **Multiple timeframes** (1-minute, 15-minute options)
191
+ - [ ] **Advanced filtering** by instrument, strike range, etc.
192
+ - [ ] **REST API mode** for web applications
193
+ - [ ] **Docker container** for easy deployment
194
+ - [ ] **Grafana dashboard** integration
195
+ - [ ] **Telegram/Discord bot** notifications
196
+
197
+ ### Long-term Vision
198
+ - Support for other Nadex instrument types (indices, commodities)
199
+ - Machine learning integration for pattern recognition
200
+ - Advanced analytics and visualization tools
201
+ - Mobile app companion
202
+
203
+ ---
204
+
205
+ ## πŸ‘¨β€πŸ’» Author & Maintainer
206
+
207
+ **Shivam Garg**
208
+ - 🌐 **GitHub**: [@shivamgarg001](https://github.com/shivamgarg001)
209
+
210
+ ---
211
+
212
+ ## ⭐️ Show Your Support
213
+
214
+ If you find this tool helpful for your trading, development, or learning:
215
+
216
+ - ⭐ **Star the repository** on GitHub
217
+ - 🍴 **Fork it** to contribute
218
+ - πŸ› **Report issues** to help improve it
219
+ - πŸ’‘ **Suggest features** for future releases
220
+ - πŸ“’ **Share it** with others who might benefit
221
+
222
+ **GitHub Repository**: [https://github.com/shivamgarg001/Nadex]
223
+
224
+ ---
225
+
226
+ **Happy trading! πŸ“ˆ**