Fix bugs and improve script robustness for Bybit listings#1
Conversation
- Corrected countdown calculation to handle durations over 24 hours using total_seconds(). - Updated Bybit API parameters: renamed recv_window to recvWindow and removed invalid max_retrives. - Converted order quantity (qty) to string to avoid float precision issues. - Implemented retry logic for wallet balance retrieval to account for delays in listing. - Added a robust retry loop (10 attempts) for the market sell order. - Verified changes with a mocked unit test suite. Co-authored-by: webcuser <97110714+webcuser@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The script had several bugs that would prevent it from working correctly:
time_diff.secondsonly counts seconds within a day, causing incorrect time remaining displays for listings more than 24 hours away. Fixed by usingtotal_seconds().recvWindow(notrecv_window) and doesn't supportmax_retrivesin theplace_ordercall.qtyas a string to ensure the API receives exact values.PR created automatically by Jules for task 13773144813208891684 started by @webcuser