Skip to content

Add historical orders to order-book blob - #21

Merged
IamJasonBian merged 1 commit into
mainfrom
IamJasonBian/add-historical-orders
Feb 23, 2026
Merged

IamJasonBian merged 1 commit into
mainfrom
IamJasonBian/add-historical-orders

Conversation

@IamJasonBian

Copy link
Copy Markdown
Owner

Summary

Changes

  • utils/safe_cash_bot.py — New get_recent_orders(days=7) method using the same symbol resolution and order-type mapping logic as get_open_orders()
  • trading_system/main.py — Calls get_recent_orders() in run_once() and passes result to log_state_to_blob
  • trading_system/state/blob_logger.py — Threads recent_orders through _serialize_state, _log_local, _log_remote, and log_state_to_blob

Test plan

  • Dry-run the trading system and verify recent_orders appears in the local JSON state log
  • Confirm the blob payload structure matches what the dashboard UI expects
  • Verify no regressions when recent_orders is empty (no historical orders in window)

@IamJasonBian
IamJasonBian force-pushed the IamJasonBian/add-historical-orders branch from c248960 to 02ffb5f Compare February 23, 2026 20:39
@IamJasonBian
IamJasonBian merged commit 48a18e4 into main Feb 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant