alpacahq / alpaca-trade-api-go

Go client for Alpaca's trade API
Apache License 2.0
315 stars 85 forks source link

GetConditionCodes is missing from the library #287

Open gcatlin opened 2 months ago

gcatlin commented 2 months ago

https://docs.alpaca.markets/reference/stockmetaconditions-1

ankitsridhar16 commented 2 months ago

is the requirement for the ticket to implement this rest route ?

gcatlin commented 2 months ago

Yes, exactly. It also entails creating a new Conditions entity, ConditionType enum, and Tape enum. The response body looks like this:

{
  "4": "On Demand Intra Day Auction",
  "A": "Slow Quote Offer Side",
  "B": "Slow Quote Bid Side",
  "C": "Closing Quote",
  "E": "Slow Quote LRP Bid Side",
  "F": "Slow Quote LRP Offer Side",
  "H": "Slow Quote Bid And Offer Side",
  "L": "Market Maker Quotes Closed",
  "N": "Non Firm Quote",
  "O": "Opening Quote",
  "R": "Regular Market Maker Open",
  "U": "Slow Quote LRP Bid And Offer",
  "W": "Slow Quote Set Slow List"
}

I'd have the function return a []Condition, where Condition has fields: Tape, Type, Code, Description.

I'd probably name the function GetConditions. All of this goes in the marketdata package.

ankitsridhar16 commented 2 months ago

Okay you can assign me the issue I would like to work on this

gcatlin commented 2 months ago

I don't have access to assign it to you, but it's safe for you to start working on it. Thanks for taking these issues on!