v0.3.1 — Bug fixes: timezone, input validation, error propagation
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. nextSessionTimenow accepts*time.Locationso 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.NewRequestfailure was silently dropped; a nil request would panic inhttp.Client.Do. Now returns the error.io.ReadAllfailure 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
FuturesClosecall'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