# S3 E4: A Stock Trading API for Developers with Yoshi Yokokawa of Alpaca

Published: 2020-08-11
Duration: 1155s
Audio: https://pdst.fm/e/pscrb.fm/rss/p/audio4.redcircle.com/episodes/0b4e213d-534c-4dc6-8573-a63f01066e6b/stream.mp3

## Key Takeaways
- Pivot From Models to APIs: Alpaca began by building deep neural net prediction models for trading firms and hedge funds. The struggle to integrate with broker-dealers that had no open API documents led the team to build a stock trading API instead.
- A License Before an MVP: To offer stock trading by API, Alpaca had to become a fully licensed broker-dealer, which took about a year, and connect to the market and clearing houses. The backend had to be complete, while mobile apps and polished web interfaces were left out.
- Go and Free Hosting Credits: The team built the backend in Go and picked hosting where it had free credits. Heavy spending on backend and compliance forced thrift elsewhere, and the hosting choice later caused painful moments.
- Interviews Drove the Roadmap: Yoshi ran about five or six user interviews a day after launch. Users wanted more than buying and selling stocks, so Alpaca quickly added features such as short selling and margin lending.
- Volatility Forced a Mindset Shift: Pandemic-era market swings caused spikes in Alpaca's system, requiring quick fixes and upgrades. Over a few weeks, the focus changed from growth alone to making sure operations were stable.

Born and raised in Japan, Yoshi Yokokawa started his career at Leimen Brothers in the US. In doing so, he was exposed to the fragility of the economies, yet saw how all things were connected and potential for areas of automation - IE, where things didn't need a human hand. A marathon runner, triathlete and yoga teacher, he attempts to understand himself physically, spiritually and mentally. When he set out on a venture of his own, he originally started building deep neural net prediction models for trading funds and hedge funds. In doing so, he quickly figured out that in order to scale this quickly, his solution would need to work with existing brokerage firms and banks. It was at this pain point that he decided to pivot and build Alpaca, the best way for developers to trade US stocks through an API.

  

Links

- [https://alpaca.markets/](https://alpaca.markets/)
- [https://www.linkedin.com/in/yoshiyokokawa/](https://www.linkedin.com/in/yoshiyokokawa/)
- [https://www.crunchbase.com/person/yoshi-yokokawa](https://www.crunchbase.com/person/yoshi-yokokawa)
- [https://twitter.com/iyoshyoshi?lang=en](https://twitter.com/iyoshyoshi?lang=en)

  

Leave us a [review on Apple Podcasts](https://ratethispodcast.com/codestory)

 

Amazing tools we use:

- If you want the best publishing platform for your podcast, with amazing support & people - use [Transistor.fm](https://transistor.fm/?via=code-story)
- Want to record your remote interviews with class? Then, you need to use [Squadcast](https://squadcast.fm/?ref=noahlabhart).
- Code Story uses the 1-click product [ClipGain](https://clipgain.io/?utm_campaign=clipgain&utm_medium=episode&utm_source=codestory), sign up now to get 3hrs of podcast processing time FREE

  

*Credits: Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on *[*Apple Podcasts*](https://podcasts.apple.com/us/podcast/code-story/id1466861744)*, *[*Spotify*](https://open.spotify.com/show/0f5HGQ2EPd63H83gqAifXp)*, *[*Pocket Casts*](https://pca.st/Z1k7)*, *[*Google Play*](https://play.google.com/music/listen?pcampaignid=MKT-na-all-co-pr-mu-pod-16&t=Code_Story&view=%2Fps%2FIcdmshauh7jgmkjmh6iu3wd4oya)*, *[*Breaker*](https://www.breaker.audio/code-story)*, *[*Youtube*](https://www.youtube.com/channel/UCgjZsiUDp-oKY_ffHc5AUpQ)*, or the podcasting app of your choice.*

  

Timestamps

00:00 – Intro

03:45 – Building the Alpaca MVP

05:27 – MVP Tools and Tradeoffs

06:42 – Maturing the Product

07:25 – Building the Roadmap

08:13 – Building the Alpaca Team

10:11 – Leading a Distributed Team

11:32 – Approaching Scalability

12:46 – Proudest Moment

13:35 – Mistakes and Lessons

14:37 – The Future of Alpaca

15:58 – Influences and Role Models

16:50 – What He'd Do Differently

17:40 – Advice for Young Entrepreneurs

Times are from the episode recording; ad breaks in your player may shift them a bit later.

  

Read the key answers from this episode, with quotes and timestamps from Yoshi Yokokawa from Alpaca: [https://www.codestory.co/episodes/s3-e4-building-stripe-for-investing-scaling-alpacas-trading-apis-globally-with-yoshi-yokokawa/](https://www.codestory.co/episodes/s3-e4-building-stripe-for-investing-scaling-alpacas-trading-apis-globally-with-yoshi-yokokawa/)

  
  

Current Sponsors:

- [Tiger Data](https://tigerdata.com/)

- [Protected Harbor](http://protectedharbor.com/codestory)

- [Render](https://render.com/)

- [Fitnexa](https://www.fitnexa.com/)

- [Perplexity](https://pplx.ai/codestory)

- [Entelligence](https://entelligence.ai/)

Checkout our Stacklist! [https://stacks.codestory.co/](https://stacks.codestory.co/)

Check out our [Patreon!](https://www.patreon.com/cw/codestory)

Hosted by  [Noah Labhart | Technical Founder & Startup Mentor.](https://noahlabhart.com/)

  
  
Our Sponsors:  
* Check out Granola and use my code granola.ai/CODESTORY for a great deal: https://granola.ai  
* Check out Perplexity: https://pplx.ai/codestory  
  
  
Advertising Inquiries: [https://redcircle.com/brands](https://redcircle.com/brands)  
  
Privacy & Opt-Out: [https://redcircle.com/privacy](https://redcircle.com/privacy)

## Chapters
- 0:00 — Intro
- 3:45 — Building the Alpaca MVP
- 5:27 — MVP Tools and Tradeoffs
- 6:42 — Maturing the Product
- 7:25 — Building the Roadmap
- 8:13 — Building the Alpaca Team
- 10:11 — Leading a Distributed Team
- 11:32 — Approaching Scalability
- 12:46 — Proudest Moment
- 13:35 — Mistakes and Lessons
- 14:37 — The Future of Alpaca
- 15:58 — Influences and Role Models
- 16:50 — What He'd Do Differently
- 17:40 — Advice for Young Entrepreneurs

## Frequently Asked Questions
- **Q:** What is Alpaca and why did it pivot to a stock trading API? — **A:** Alpaca offers a U.S. stock trading API and aims to become API infrastructure for financial assets in general. It started with prediction models for financial firms, but Yoshi Yokokawa said, "the pain point actually is at this interface with developers to handle financial assets" [03:27].
- **Q:** Why did Alpaca's MVP require a broker-dealer license? — **A:** Yoshi explained that to build a stock trading API, "we actually had to be a registered, fully licensed broker dealer" [04:00]. The license took about a year, and the team also had to connect to the market and clearing houses before the product could work.
- **Q:** What programming language did Alpaca use to build its backend? — **A:** Performance was a priority, and the team approached the problem from a technology perspective rather than a financial firm's. Yoshi said, "we chose Go as the code for us to build our backend" [05:59].
- **Q:** How did Alpaca gather user feedback and decide what to build? — **A:** The team found potential users through Craigslist, Reddit, Stack Overflow and API product forums, then used Intercom after launch to start conversations and book meetings. Yoshi recalled, "I was doing probably five, six user interviews a day after launching the product" [08:00].
- **Q:** How did pandemic market volatility affect Alpaca's platform? — **A:** Yoshi said the volatility caused spikes in the system, and the team had to move extremely quickly to fix and upgrade it for the increased volume. Stability became a priority, and as he put it, "we actually really changed the mindset over the course of a few weeks" [12:39].
