
Show HN: Stock Trading with Insomnia REST Client and Alpaca API - shift8
I&#x27;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: 
<a href="https:&#x2F;&#x2F;medium.com&#x2F;automation-generation&#x2F;using-alpacas-stock-trading-api-with-insomnia-client-a796f064a5d7" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;automation-generation&#x2F;using-alpacas-stock...</a><p>The actual workspace JSON for you to import into Insomnia can be found here: <a href="https:&#x2F;&#x2F;github.com&#x2F;alpacahq&#x2F;insomnia-workspace" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alpacahq&#x2F;insomnia-workspace</a>
======
nodesocket
I've been playing with the Alpaca streaming API's in Node to get quotes. I
have it working, the next step is figure out a trading algorithm.

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?

------
9712263
Seems inherit the same limitation of RobinHood: you can't do short selling.
Not sure how actually they could do a free commission order, so not sure why
short selling is not supported, but it limits the use of long only strategy.

~~~
anonu
Interesting. I suppose it's a much more involved process where you need to
locate shares to borrow. You need to maintain a list of easy to borrow and
hard to borrow names. ETFs by definition are hard to borrow.

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.

------
ta1234567890
Open question: If, for one stock, you could predict tomorrow's closing price
today (with 80% accuracy within 2% of the actual price), how would you trade
that stock?

~~~
kgwgk
It's easy to predict tomorrow's closing price with that accuracy: it will be
the same as today's closing price.

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.

~~~
ta1234567890
Great, so how do you use that for a trading strategy?

~~~
hartator
You can't. What parent tries to explain is your predictions is no different
than regular fluctuations, so you can't use it to get an edge.

------
rpedela
Alpaca looks awesome, but doesn't support after hours trading. Does anyone
know of a good API that does?

~~~
malhotra_chetan
Yes. Narwhal. Narwhal provides commission free flat rate brokerage trading via
tradier and you can trade both in pre and post market hours.

------
hellofunk
How is the access to historical data with these services?

------
kaycebasques
A commission-free trading API? How does Alpaca make money?

~~~
gschier
Likely the same as similar services like RobinHood. A quick Google suggests
they make most of their money on interest from cash sitting around in user's
accounts that has not been invested yet.

~~~
JonasJSchreiber
And by selling info about customer orders to front runners. IIUC, these are
high frequency traders who may place similar orders milliseconds in advance of
yours then profit from the fact that you have to pay a bit more to fill your
order. Full disclosure, I continue to use Robinhood despite this.

~~~
paperwork
This is highly illegal and taken very seriously. Is this speculation on your
part or do you know this for a fact (in which case, you should report it).

~~~
mjlee
[https://seekingalpha.com/article/4205379-robinhood-making-
mi...](https://seekingalpha.com/article/4205379-robinhood-making-millions-
selling-millennial-customers-high-frequency-traders)

They're probably not front-running. They are almost certainly selling trade
information to HFT firms.

