Live data from Hacker News

Show HN: Trade stocks from the command line with no commission

gitlab.com

11–20 of 170 posts

Re: Show HN: Trade stocks from the command line with no commission

#11
Heard about alpaca a while back, so I made this as a small fun side project. The main features are buying, selling, and viewing stocks. In the future I may add additional features if I find something I want to add (or others want to add).

The code is just Go, using the cobra library.

Re: Show HN: Trade stocks from the command line with no commission

#15

A problem I've bumped into with Alpaca compared to other services is my bot needs 1 second bars, and I believe Alpaca goes down to 1min bars and nothing smaller.

Yeah there are definitely a number of limitations if you are using just alpaca (which I limited myself to for this), which is why this project is intended for just a few basic use cases.

Re: Show HN: Trade stocks from the command line with no commission

#17

A problem I've bumped into with Alpaca compared to other services is my bot needs 1 second bars, and I believe Alpaca goes down to 1min bars and nothing smaller.

Did you try the Alpaca Market Data (streaming) they just released? You should be able to get real-time data now that is aggregated from multiple exchanges.

Re: Show HN: Trade stocks from the command line with no commission

#18

A problem I've bumped into with Alpaca compared to other services is my bot needs 1 second bars, and I believe Alpaca goes down to 1min bars and nothing smaller.

Couldn't you just make your own off the tick data you're streaming?

Re: Show HN: Trade stocks from the command line with no commission

#19
What's really cool about Alpaca is the integration with zipline via pylivetrader. This means that you can take your backtested factor models and easily convert them to live trading. Also, they have pretty lax margin requirements. You can borrow 2x the cash you have, 4x for intraday if you're a pattern day trader, and the maintenance requirement is only 25%. And with zero commissions, suddenly it's possible for the average joe retail investor to actually run a legit factor strat. If you're only trading highly liquid securities, it could even make sense to run a intraday only strat at 4x leverage. Lets say you're trading stuff that has spreads around 4 bips, your lost returns are going to be around 10% per year from trading costs. That's certainly a lot and you'll need a kick-ass strategy, but that 4x leverage might let you get there.

Re: Show HN: Trade stocks from the command line with no commission

#20
post #16
post #5

Is there a reason that the repo size should be 10 MB? Seems odd.

Oh didn't realize that! Thanks for pointing that out

Maybe just remove it from the commit history? People are still going to pay the cost even if you removed it in the most recent commit.
Post reply on HN