Show HN: Stock Trading with Insomnia REST Client and Alpaca API
I've created an Insomnia workspace to make it easier to debug your stock trading code and learn the Alpaca API. You can read about how here:
https://medium.com/automation-generation/using-alpacas-stock...
The actual workspace JSON for you to import into Insomnia can be found here: https://github.com/alpacahq/insomnia-workspace
39 comments
[ 4.7 ms ] story [ 26.9 ms ] threadExcept between the time the user clicks buy and when it the buy actually happens. Basically hedge funds are able to receive and parse this data, and change their orders to an advantage before the users order hits the actual exchange
Its analogous to a MITM attack
Despite my wording its not necessarily bad, but I think users should have a better understanding of it.
Imagine that a stock is bid at $100.00 and offered at $100.01. Assume that market makers estimate the fair price to be $100.005 unconditionally.
A customer sends a marketable buy limit order at $100.01.
If this hits the exchange then the person who's offering at $100.01 will make $0.005.
If the order flow gets sold (i.e. someone gets to see the flow before it hits the exchange) then the internalizer can fill it at $100.01 and make the $0.005 themselves instead of letting someone else on the exchange do it. It has nothing to do with front running or even information.
This is really valuable because you're not competing for speed with other market participants and you expect the customer flow to be uninformed so the trade is less likely to move against you before you trade out.
This is a problem for market structure because it discourages people from quoting on the exchange.
This also why I think payment for order flow is bad even if the first order effects are not bad for Robinhood customers under reasonable assumptions.
They're probably not front-running. They are almost certainly selling trade information to HFT firms.
[0] https://www.bloomberg.com/news/articles/2018-10-15/robinhood...
Nearly all brokers tend to sell order information to one or many market makers. It is neither illegal nor harm retail customers, not unless these customers are trying to run some HFT algos on their own.
I am a pretty traditional long term investor, $AAPL, Berkshire, Bank of America, Ford, Amazon, AMD, $SPY, with 10+ years in the market. However with the crazy volatility, I have been toying with the idea of buying ProShares UltraPro Short $SQQQ to hedge my losses on big pre-market open down days. Today for example would have been a good day to own $SQQQ for the day (up 7.3%). Any insight on how to go about this hedge strategy using Alpaca? Can I get pre-market quotes for the Nasdaq?
For a large majority of S&P 500 stocks this prediction will be within 2% of the actual price very often (more than 80% of the days). In aggregate, the hit rate is over 80% as well.
I used to work next to the stock loan desk at a bank. The equity markets are generally pretty tech driven these days but stock loan is still operating in a 1980s mentality.