[Discussion Needed] State of Market Sell / Buy APIs
ahmedsakr opened this issue · comments
WS Trade used to handle market sell/buy requests by inserting the market price behind the scenes. That has been changed since and now the market sell / buy APIs require you to provide a limit price in the body of the request. To us (users of wstrade-api), market APIs are now going to be essentially the same as limit APIs since we have to provide limit prices as part of the market buy/sell request. So, what should happen to the market APIs?
Discussion points
- There is likely an undiscovered endpoint on WS Trade that can allow us to discover the market price of a security. If we can discover it, then we would be able to restore the market APIs while not requiring the user to provide a limit price. I have tried to listen to network traffic to see if i can discover this endpoint, but due to TLS and inability to use MITM to sniff the protocol, I was unable to discover these endpoints.
- We can require an external hook for deriving market quotes. This would put the burden on the wstrade-api user to provide an external mechanism to get market prices (for example, using xignite)
Looking forward to your feedback
MarkGalloway/wealthsimple-trade@02b4772
The contributors of the API documentation that i based this wrapper on have already discovered the endpoint!
I will be wiring this endpoint to restore functionality of the market API.