Skip to content

v0.3.1 — Bug fixes: timezone, input validation, error propagation

Choose a tag to compare

@jpramirez jpramirez released this 25 May 10:43

What changed

scheduler — timezone correctness

  • Replaced hardcoded UTC-4 (EDT) offset with time.LoadLocation("America/New_York") for proper EST/EDT transitions across the year. Orders scheduled between December and March were firing 1 hour early due to the fixed EDT offset.
  • nextSessionTime now accepts *time.Location so time arithmetic is done against the real timezone, not a shifted UTC value.
  • Falls back to UTC-5 (EST) if the system timezone database is unavailable.

scheduler — input validation

  • buy/sell: rejects empty symbols, quantity ≤ 0, and non-positive limit prices.
  • stop/target: validates symbol, quantity > 0, and --price > 0.
  • Errors exit with code 1 before anything is written to the queue.

tiger — error propagation in analyze

  • http.NewRequest failure was silently dropped; a nil request would panic in http.Client.Do. Now returns the error.
  • io.ReadAll failure was silently dropped; produced an opaque JSON parse error instead of a network error. Now returns the error with context.

tiger — json.Marshal error in Call

  • json.Marshal(params) error was discarded; now propagated to callers.

tiger — emergency close error in FuturesEntry

  • When stop-order response parsing fails after a live futures entry, the emergency FuturesClose call's error was silently dropped. Both the stop failure and any close failure are now printed to stderr before returning.

Full changelog: See CHANGELOG.md