massive-com / massive-com/client-go

Agg timestamps should be consistent between WS/REST

Open
#537 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
198
Forks
59
Avg merge
33m
Merged PRs (30d)
2

Description

Is your feature request related to a problem? Please describe.
Currently the Timestamps values for the REST models.Agg and WS models.EquityAgg structs are different in two ways:

  1. Agg only has the start timestamp, EquityAgg has start and end
  2. Agg timestamp is a time.Time, EquityAgg is an int64

I realize that the REST agg and WS agg aren't necessarily the same exact data (the WS agg contains more info in each datapoint), but I think it would be very useful (and hopefully a light lift) to standardize the timestamps for ease of client development.

Describe the solution you'd like

  1. EquityAgg timestamps changed to time.Time (ideally all API timestamps would be time.Time)
  2. Agg given an end timestamp OR remove EquityAgg end timestamp and add a Timespan field to both structs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the models.Agg and models.EquityAgg entry points and compare their timestamp fields and usages in the REST and WebSocket clients. Resolve whether the API should use time.Time consistently or align both structs around an end timestamp or Timespan field; the work is done when the chosen representation is consistent across both models and their exposed API behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.