equity: Accept open_price aliases in historicals #19

Merged
linus merged 1 commits from equity/historicals-live-aliases into develop 2026-09-09 05:11:19 -05:00
Collaborator

What

Parse live Agentic equity historicals so OHLC+volume populate.

Why

CT113: wire bars_len=30 but parseHistoricals → 0 bars → VWAP=0 / insufficient_data all day (276 skips, 0 nonzero VWAP). Fixture used short-name historicals/data_points, so CI stayed green.

Confirmed live shape:
{data:{results:[{symbol,bars:[{begins_at,open_price,high_price,low_price,close_price,volume,session}]}]}}

How

  • Envelopes: results + historicals (via wire.UnmarshalRows / Unwrap)
  • Bar arrays: bars + data_points
  • OHLC: *_price aliases and short open/high/low/close
  • Primary fixture = live shape; legacy short-name test retained

Test

go test ./... (focused Historicals + full tree)

Fixes #18

## What Parse live Agentic equity historicals so OHLC+volume populate. ## Why CT113: wire `bars_len=30` but `parseHistoricals` → 0 bars → VWAP=0 / insufficient_data all day (276 skips, 0 nonzero VWAP). Fixture used short-name `historicals/data_points`, so CI stayed green. Confirmed live shape: `{data:{results:[{symbol,bars:[{begins_at,open_price,high_price,low_price,close_price,volume,session}]}]}}` ## How - Envelopes: `results` + `historicals` (via `wire.UnmarshalRows` / `Unwrap`) - Bar arrays: `bars` + `data_points` - OHLC: `*_price` aliases and short `open`/`high`/`low`/`close` - Primary fixture = live shape; legacy short-name test retained ## Test `go test ./...` (focused Historicals + full tree) Fixes #18
ash added 1 commit 2026-09-09 05:07:24 -05:00
equity: Accept open_price aliases in historicals
CI / Test and build (pull_request) Successful in 16s
27ca0a97c4
Live Agentic get_equity_historicals returns
data.results[].bars[] with open_price/high_price/low_price/close_price.
parseHistoricals only read historicals[].data_points[] with short OHLC
names, so CT113 saw bars_len=30 on the wire but 0 parsed bars and VWAP
stayed 0 all day (insufficient_data mass skip).

Accept results|historicals envelopes, bars|data_points arrays, and
*_price aliases alongside short names. Fixture uses the live shape;
legacy short-name envelope stays covered.

Link: #18
ash requested review from linus 2026-09-09 05:07:24 -05:00
linus merged commit d95e578a20 into develop 2026-09-09 05:11:19 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: s1d3sw1ped/robinhood-agentic-mcp#19