You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rad! Just to confirm, any new structs/types would go in entities.go, correct?
And there could be a solid middle ground between the two ideas too, perhaps a map[ExchangeCode]ExchangeName? Where both the keys and values are typed (using structs as enum-like). That way, you still get the concept of having Name and Code fields, while still being flexible as a map for various use cases.
If so, that's equivalent to what I was suggesting for GetExchangeCodes in my first post, though having the types instead of strings may be nicer for type safety.
https://docs.alpaca.markets/reference/stockmetaexchanges-1
Need to add a new
marketdata.Client
method.Two potential approaches:
GetExchanges
and return[]Exchange
(requires a newExchange
entity with e.g.Code
andName
fields)GetExchangeCodes
and returnmap[string]string
(with the code as the key and the name as the value)I prefer
GetExchanges
butGetExchangeCodes
might fit better with the library.@gnvk what do you prefer?
Example API response body:
The text was updated successfully, but these errors were encountered: