95 Commits

Author SHA1 Message Date
Nawaz Haider ef4cb47d06 Add update_signed_orders_cache method to OrderBook for managing signed orders 2026-01-15 19:57:59 +06:00
Nawaz Haider 5657b087c5 Reduce sleep duration in inventory updater thread from 2 seconds to 1 second 2026-01-15 19:37:36 +06:00
Nawaz Haider d7e2f8d04f Remove debug print statement from get_inventory function 2026-01-15 19:34:17 +06:00
Nawaz Haider 02bb3eefee Add inventory management with configurable limits and updater thread 2026-01-15 19:26:51 +06:00
Nawaz Haider e88752cb23 Refactor trading logic to simplify conditions for order placement 2026-01-15 18:23:14 +06:00
Nawaz Haider fa31c52cc3 Enhance trading logic to include time-based condition for trade execution 2026-01-15 16:43:36 +06:00
Nawaz Haider c1150f927a Fix trading logic conditions for order placement based on market trend direction 2026-01-15 16:32:02 +06:00
Nawaz Haider c97f96765c Fix trading logic conditions for order placement based on market trends 2026-01-15 16:24:53 +06:00
Nawaz Haider 3eeea819a9 Add nohup command to run merger.py in background 2026-01-15 16:13:30 +06:00
Nawaz Haider 768ec1358c Update trading parameters for improved strategy performance 2026-01-15 16:12:31 +06:00
Nawaz Haider bbfb33829e Remove test.py file containing unused asyncio test code 2026-01-14 13:13:53 +06:00
Nawaz Haider 7508654d00 Add Safe contract ABI and implement token merging functionality
- Introduced `safeAbi.py` containing the ABI for the Safe contract, defining events and functions for managing ownership and transactions.
- Created `merger.py` to handle merging conditional tokens back to USDC, including logic for determining merge amounts, signing transactions, and executing them through the Safe contract.
- Integrated environment variable loading for sensitive data and RPC connection setup.
- Implemented asynchronous polling for mergeable positions from the Polymarket API, with error handling and transaction receipt verification.
2026-01-14 13:12:37 +06:00
Nawaz Haider 5a579d49c0 Refactor main function and related methods to remove async/await, replacing with synchronous calls for improved performance and simplicity 2026-01-12 21:43:00 +06:00
Nawaz Haider da9244eabd Remove unused requests session setup from main.py 2026-01-12 21:36:00 +06:00
Nawaz Haider 7abcd3642c Refactor create_signed_orders_cache to be synchronous and remove asyncio task creation 2026-01-12 21:19:23 +06:00
Nawaz Haider 25d7e2a2d4 Refactor order placement to use ThreadPoolExecutor for synchronous execution and improve logging of order IDs 2026-01-12 21:12:31 +06:00
Nawaz Haider fd0e2b31b1 Remove unnecessary async task for caching token trading info in main function 2026-01-12 20:41:05 +06:00
Nawaz Haider ca8e167275 Remove duplicate call to create_signed_orders_cache in OrderBook start method 2026-01-12 20:39:43 +06:00
Nawaz Haider 351a76a308 Add MIN_DELAY_BETWEEN_TRADES_SECONDS to config and main logic for trade pacing 2026-01-12 16:15:16 +06:00
Nawaz Haider b4c3eb90c9 Update trading configuration and enhance order placement logic with signed orders caching 2026-01-12 15:36:24 +06:00
Nawaz Haider 430f2e9ad0 Fix typo in variable name for micro vs mid basis points calculation 2026-01-10 19:12:46 +06:00
Nawaz Haider 32518bfceb Update trading thresholds in config and main logic for improved order placement 2026-01-10 19:10:40 +06:00
Nawaz Haider e0cd82553a Add market data logging to UP and DOWN order placements 2026-01-10 18:59:36 +06:00
Nawaz Haider 1de0ebd22e Refactor place_limit_order to remove expiration handling and simplify order placement 2026-01-06 18:56:29 +06:00
Nawaz Haider bf1c3515c0 Remove order_listener.py 2026-01-04 22:01:35 +06:00
Nawaz Haider a67afb031c Update README.md to reflect recent changes and improvements 2026-01-04 21:42:28 +06:00
Nawaz Haider 145fc5e6f4 Merge branch 'main' of https://github.com/nawaz0x1/py_polymarket_hft_mm 2026-01-04 21:20:27 +06:00
Nawaz Haider a31995f362 Remove in-memory database references and related setup from scripts 2026-01-04 21:17:25 +06:00
Nawaz Haider 98fe566336 Remove in-memory database implementation and associated utility functions 2026-01-04 21:14:55 +06:00
Nawaz Haider 06527f6bcc Refactor order placement logic in place_anchor_and_hedge function for improved clarity and efficiency 2026-01-03 22:27:15 +06:00
Nawaz Haider f692c0819c Refactor hedge order placement logic in place_anchor_and_hedge function for improved clarity and efficiency 2026-01-03 22:13:26 +06:00
Nawaz Haider 1e067d1f57 Refactor iteration calculation for hedge order placement in place_anchor_and_hedge function 2026-01-03 17:36:16 +06:00
Nawaz Haider b44829b474 Reduce sleep duration in hedge order placement retry loop for improved responsiveness 2026-01-03 17:25:54 +06:00
Nawaz Haider e94979f65f Refactor hedge order placement retry logic for improved efficiency 2026-01-03 17:24:21 +06:00
Nawaz Haider b5d7ea9332 Reduce retry attempts for hedge order placement in place_anchor_and_hedge function 2026-01-03 17:20:40 +06:00
Nawaz Haider 556dc430e8 Increase retry attempts for hedge order placement and improve logging for order prices 2026-01-03 16:59:06 +06:00
Nawaz Haider 75c1c20316 Implement trade counter functionality with increment, decrement, reset, and count methods 2026-01-03 16:38:54 +06:00
Nawaz Haider 8886969c32 Add check for ClobClient readiness in main function 2026-01-03 16:26:03 +06:00
Nawaz Haider 173c8e708d Update handle_message to ignore both PLACEMENT and CANCELLATION message types 2026-01-03 16:17:56 +06:00
Nawaz Haider b549edd757 Fix typo in cache_token_trading_infos function and update order placement logic for bid prices 2026-01-03 15:37:11 +06:00
Nawaz Haider 1f2b679e0c Remove price adjustment in order placement for UP and DOWN trades 2026-01-03 15:19:27 +06:00
Nawaz Haider 4d27054357 Reduce sleep duration in main trading loop for improved responsiveness 2026-01-03 15:13:10 +06:00
Nawaz Haider 9381021ac2 Fix trading trend condition by comparing up_bid_price with down_bid_price 2026-01-03 15:11:24 +06:00
Nawaz Haider 1782d25889 Adjust trading price thresholds and invert trading side conditions in main logic 2026-01-03 15:11:01 +06:00
Nawaz Haider 172c57c060 Update README.md 2026-01-03 14:28:06 +06:00
Nawaz Haider 65b903c8a4 Update README.md with recent changes and improvements 2026-01-03 14:26:35 +06:00
Nawaz Haider 09e608edd5 Update README.md with enhancements and clarifications 2026-01-03 14:21:49 +06:00
Nawaz Haider 8274ae9cf6 Add early return for PLACEMENT messages in order_listener 2026-01-03 13:39:29 +06:00
Nawaz Haider 50df9953b6 Fix run script to execute order_listener.py with python 2026-01-03 13:29:39 +06:00
Nawaz Haider 6a00daf67e Fix run script to use sudo for executing main.py 2026-01-03 13:27:26 +06:00