# Tutorials

**URL:** https://forum.alpaca.markets/c/trading/tutorials/9.md

[Latest](https://forum.alpaca.markets/latest.md) · [Categories](https://forum.alpaca.markets/categories.md)

---

## [About the Tutorials category](https://forum.alpaca.markets/t/about-the-tutorials-category/18)

<div class="topic-metadata">

**Author:** [@AlpacaAlex](https://forum.alpaca.markets/u/AlpacaAlex)\
**Replies:** 0

</div>

For all tutorials, tips and tricks, and other helpful content.

---

## [I want to help Noobs!](https://forum.alpaca.markets/t/i-want-to-help-noobs/55)

<div class="topic-metadata">

**Author:** [@joshcogburn](https://forum.alpaca.markets/u/joshcogburn)\
**Replies:** 105\
**Last updated:** [October 31, 2026, 12:25pm UTC](https://forum.alpaca.markets/t/i-want-to-help-noobs/55 "2026-10-31T12:25:13Z")

</div>

I would like to offer help in any way I can. Hello everybody, I’m Josh Cogburn & I’ve been working with Alpaca’s API & other projects since 2018. I’m no expert by any means, but I have been around for a while. About Me…

---

## [Response: {"code":42210000,"message":"asset \\"SPY 260320P00685000\\" not found"}](https://forum.alpaca.markets/t/response-code-42210000-message-asset-spy-260320p00685000-not-found/18444)

<div class="topic-metadata">

**Author:** [@ptrader](https://forum.alpaca.markets/u/ptrader)\
**Replies:** 3\
**Last updated:** [February 18, 2026, 12:39pm UTC](https://forum.alpaca.markets/t/response-code-42210000-message-asset-spy-260320p00685000-not-found/18444 "2026-02-18T12:39:10Z")

</div>

Hi, received the above response today. response: {“code”:42210000,“message”:“asset “SPY 260320P00685000” not found”} (time: PT 11:38:16.0153391) From a different source the same symbol had the results below to withi…

---

## [Option symbol generator](https://forum.alpaca.markets/t/option-symbol-generator/18388)

<div class="topic-metadata">

**Author:** [@ptrader](https://forum.alpaca.markets/u/ptrader)\
**Replies:** 2\
**Last updated:** [February 3, 2026, 5:18pm UTC](https://forum.alpaca.markets/t/option-symbol-generator/18388 "2026-02-03T17:18:50Z")

</div>

I program in C#. Do Alpaca Nuget packages (basic and/or extensions) provide an option symbol generator function? If so, can you please describe the function and its parameters. I am mostly interested in SPY at the money …

---

## [Iron Condor or Calendar Spread Orders](https://forum.alpaca.markets/t/iron-condor-or-calendar-spread-orders/18318)

<div class="topic-metadata">

**Author:** [@Amol\_Haval](https://forum.alpaca.markets/u/Amol_Haval)\
**Replies:** 0\
**Last updated:** [January 12, 2026, 2:54am UTC](https://forum.alpaca.markets/t/iron-condor-or-calendar-spread-orders/18318 "2026-01-12T02:54:20Z")

</div>

Does Alpaca support multi-leg option strategies such as Iron Condors or Calendar Spreads as a single order, so that all legs are executed together and we avoid orphan legs?

---

## [Can someone look at my withdrawals please](https://forum.alpaca.markets/t/can-someone-look-at-my-withdrawals-please/17966)

<div class="topic-metadata">

**Author:** [@3lluSiiv3](https://forum.alpaca.markets/u/3lluSiiv3)\
**Replies:** 3\
**Last updated:** [October 14, 2025, 8:27pm UTC](https://forum.alpaca.markets/t/can-someone-look-at-my-withdrawals-please/17966 "2025-10-14T20:27:13Z")

</div>

Can a dev check my withdrawals please check everything okay.

---

## [Updating Profit and Stoploss](https://forum.alpaca.markets/t/updating-profit-and-stoploss/11641)

<div class="topic-metadata">

**Author:** [@Rishab\_Maheshwari](https://forum.alpaca.markets/u/Rishab_Maheshwari)\
**Replies:** 5\
**Last updated:** [August 15, 2025, 1:57pm UTC](https://forum.alpaca.markets/t/updating-profit-and-stoploss/11641 "2025-08-15T13:57:16Z")

</div>

Hi, I am trying to develop a program with the Alpaca API, which has both a stop loss and a profit target which will be updated daily based on certain conditions. I tried implementing this with a bracket order, but I fou…

---

## [How to make good profit trading bitcoing from the comfort of my own](https://forum.alpaca.markets/t/how-to-make-good-profit-trading-bitcoing-from-the-comfort-of-my-own/16733)

<div class="topic-metadata">

**Author:** [@GEOGIA](https://forum.alpaca.markets/u/GEOGIA)\
**Replies:** 0\
**Last updated:** [April 12, 2025, 10:52am UTC](https://forum.alpaca.markets/t/how-to-make-good-profit-trading-bitcoing-from-the-comfort-of-my-own/16733 "2025-04-12T10:52:04Z")

</div>

---

## [Solution: TradingView Alerts Webhook to Alpaca for Automated Trading](https://forum.alpaca.markets/t/solution-tradingview-alerts-webhook-to-alpaca-for-automated-trading/4680)

<div class="topic-metadata">

**Author:** [@GGBB](https://forum.alpaca.markets/u/GGBB)\
**Replies:** 2\
**Last updated:** [December 26, 2024, 6:50am UTC](https://forum.alpaca.markets/t/solution-tradingview-alerts-webhook-to-alpaca-for-automated-trading/4680 "2024-12-26T06:50:37Z")

</div>

Hi there, For many time I have wondered how great would be to: Have your TradingView alerts triggering automated orders at Alpaca, in a simple way with no Python or any coding needed. Does this ever happen to you? Wel…

---

## [Day 7 Total (-4.5% P&L)](https://forum.alpaca.markets/t/day-7-total-4-5-p-l/14200)

<div class="topic-metadata">

**Author:** [@kris](https://forum.alpaca.markets/u/kris)\
**Replies:** 0\
**Last updated:** [May 13, 2024, 10:36pm UTC](https://forum.alpaca.markets/t/day-7-total-4-5-p-l/14200 "2024-05-13T22:36:47Z")

</div>

Found another bug in buying script lol, you can see the uptrend starting yayyyyy! ill post a bigger tomorrow if its in the profit, i think i should be in the profit from the trends soooo yahh

---

## [The world is getting a little bit better](https://forum.alpaca.markets/t/the-world-is-getting-a-little-bit-better/13955)

<div class="topic-metadata">

**Author:** [@kris](https://forum.alpaca.markets/u/kris)\
**Replies:** 1\
**Last updated:** [April 9, 2024, 2:15am UTC](https://forum.alpaca.markets/t/the-world-is-getting-a-little-bit-better/13955 "2024-04-09T02:15:08Z")

</div>

ive been waiting a long time finviz has an api now, ive been pushing them to do this for a while alpaca has a priority api that im 100% willing to pay for (i just wish the 99$ price point comes down a bit) ive moved m…

---

## [Placing a option order (Secured put or covered call)](https://forum.alpaca.markets/t/placing-a-option-order-secured-put-or-covered-call/13911)

<div class="topic-metadata">

**Author:** [@jan2jack](https://forum.alpaca.markets/u/jan2jack)\
**Replies:** 0\
**Last updated:** [March 22, 2024, 5:01pm UTC](https://forum.alpaca.markets/t/placing-a-option-order-secured-put-or-covered-call/13911 "2024-03-22T17:01:20Z")

</div>

Hi, Has anyone tried placing an option order ? If yes, can you please share the code ?

---

## [How do find Market Cap?](https://forum.alpaca.markets/t/how-do-find-market-cap/13102)

<div class="topic-metadata">

**Author:** [@jschaenzle](https://forum.alpaca.markets/u/jschaenzle)\
**Replies:** 2\
**Last updated:** [November 7, 2023, 11:54pm UTC](https://forum.alpaca.markets/t/how-do-find-market-cap/13102 "2023-11-07T23:54:47Z")

</div>

Is Market Cap and/or Float available via the API? I don’t see either but thought maybe I’m missing it. Shouldn’t MarketCap at least be very easy to obtain?

---

## [Margin Day Trade Settlement](https://forum.alpaca.markets/t/margin-day-trade-settlement/4413)

<div class="topic-metadata">

**Author:** [@Jonathan\_Jurevis](https://forum.alpaca.markets/u/Jonathan_Jurevis)\
**Replies:** 6\
**Last updated:** [September 6, 2023, 1:57pm UTC](https://forum.alpaca.markets/t/margin-day-trade-settlement/4413 "2023-09-06T13:57:15Z")

</div>

Hello, I am trying to fully understand how many business days after a day trade is the trade cleared. (ie. If I make a full round trip trade on Jan 12, 2020, is that day trade included in the 5 business day settlement…l…

---

## [OTOCO (bracket) order with separate time in force](https://forum.alpaca.markets/t/otoco-bracket-order-with-separate-time-in-force/8462)

<div class="topic-metadata">

**Author:** [@memcpy\_command](https://forum.alpaca.markets/u/memcpy_command)\
**Replies:** 2\
**Last updated:** [February 23, 2022, 9:27pm UTC](https://forum.alpaca.markets/t/otoco-bracket-order-with-separate-time-in-force/8462 "2022-02-23T21:27:19Z")

</div>

Platforms like fidelity supports OTOCO with initial buy order time\_in\_force set to Day and OCO orders set to time in force to GTC. I tried the same in Alpaca API, it does not support a way to mention two separate time\_i…

---

## [422 Unprocessable entity for the following order](https://forum.alpaca.markets/t/422-unprocessable-entity-for-the-following-order/12316)

<div class="topic-metadata">

**Author:** [@DeBechamel](https://forum.alpaca.markets/u/DeBechamel)\
**Replies:** 1\
**Last updated:** [May 8, 2023, 3:55am UTC](https://forum.alpaca.markets/t/422-unprocessable-entity-for-the-following-order/12316 "2023-05-08T03:55:07Z")

</div>

{“symbol”: “AEHL”, “qty”: “1567”, “side”: “buy”, “type”: “limit”, “limit\_price”: “1.1”, “time\_in\_force”: “ioc”, “client\_order\_id”: “7B60A120-9AFB-4352-A672-B9F4D7A40D0F”} I got this yesterday, could you please advice wh…

---

## [Creating a watchlist in Python](https://forum.alpaca.markets/t/creating-a-watchlist-in-python/12054)

<div class="topic-metadata">

**Author:** [@Ray\_Riordan](https://forum.alpaca.markets/u/Ray_Riordan)\
**Replies:** 0\
**Last updated:** [March 25, 2023, 1:42pm UTC](https://forum.alpaca.markets/t/creating-a-watchlist-in-python/12054 "2023-03-25T13:42:30Z")

</div>

I’ve created a watchlist of specific stocks I want to trade. The program is supposed to loop through various socks in the watchlist and make a trade once my conditions are met. Here is what I have for the watch list: fr…

---

## [Bracket order trailing limit with minimum?](https://forum.alpaca.markets/t/bracket-order-trailing-limit-with-minimum/11856)

<div class="topic-metadata">

**Author:** [@jeff8j](https://forum.alpaca.markets/u/jeff8j)\
**Replies:** 0\
**Last updated:** [February 17, 2023, 9:48pm UTC](https://forum.alpaca.markets/t/bracket-order-trailing-limit-with-minimum/11856 "2023-02-17T21:48:00Z")

</div>

Is there a way to make a trailing limit order with a minimum? Like buy at $100 if it goes up to $102 then sell if it goes down to $101 but ignore everything below $100 so if it dips it doesn’t sell?

---

## [Is paper trading included in the Local curreny Trading- Broker API](https://forum.alpaca.markets/t/is-paper-trading-included-in-the-local-curreny-trading-broker-api/11309)

<div class="topic-metadata">

**Author:** [@sai\_srinu](https://forum.alpaca.markets/u/sai_srinu)\
**Replies:** 0\
**Last updated:** [December 9, 2022, 7:39am UTC](https://forum.alpaca.markets/t/is-paper-trading-included-in-the-local-curreny-trading-broker-api/11309 "2022-12-09T07:39:06Z")

</div>

I want to know that, is that possible to have paper trading method in local currency trading of Broker api?

---

## [Account Not Allowed to Short? The "No Shorting" thing is off](https://forum.alpaca.markets/t/account-not-allowed-to-short-the-no-shorting-thing-is-off/8967)

<div class="topic-metadata">

**Author:** [@Elan\_Dassani](https://forum.alpaca.markets/u/Elan_Dassani)\
**Replies:** 8\
**Last updated:** [November 12, 2022, 3:29am UTC](https://forum.alpaca.markets/t/account-not-allowed-to-short-the-no-shorting-thing-is-off/8967 "2022-11-12T03:29:53Z")

</div>

Hey guys, API is returning I’m not allowed to short. Any idea what’s going on?

---

## [Help with Python API, sell all at the close](https://forum.alpaca.markets/t/help-with-python-api-sell-all-at-the-close/10610)

<div class="topic-metadata">

**Author:** [@V-Spec](https://forum.alpaca.markets/u/V-Spec)\
**Replies:** 1\
**Last updated:** [September 25, 2022, 11:49pm UTC](https://forum.alpaca.markets/t/help-with-python-api-sell-all-at-the-close/10610 "2022-09-25T23:49:03Z")

</div>

Trying to make a script that will sell all open positions at the close, im a bit stuck portfolio = api.list\_positions() for position in portfolio: print(“{} shares of {}”.format(position.qty, position.symbol)) order …

---

## [What is the best way to retrieve current price?](https://forum.alpaca.markets/t/what-is-the-best-way-to-retrieve-current-price/9622)

<div class="topic-metadata">

**Author:** [@jmisiuk](https://forum.alpaca.markets/u/jmisiuk)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 9:29am UTC](https://forum.alpaca.markets/t/what-is-the-best-way-to-retrieve-current-price/9622 "2022-06-01T09:29:57Z")

</div>

I am having an issue while trying to retrieve current price. I know this is not specifically current price, but it would be good enough for me if it worked. I am using the following line: self.currentPrice = float(self.…

---

## [FAQ/Guidelines](https://forum.alpaca.markets/t/faq-guidelines/5)

<div class="topic-metadata">

**Author:** [@system](https://forum.alpaca.markets/u/system)\
**Replies:** 0\
**Last updated:** [July 10, 2019, 11:05pm UTC](https://forum.alpaca.markets/t/faq-guidelines/5 "2019-07-10T23:05:49Z")

</div>

This is a Civilized Place for Public Discussion Please treat this discussion forum with the same respect you would a public park. We, too, are a shared community resource — a place to share skills, knowledge and intere…

---

## [Changing the margin on paper and live account](https://forum.alpaca.markets/t/changing-the-margin-on-paper-and-live-account/8622)

<div class="topic-metadata">

**Author:** [@sirname](https://forum.alpaca.markets/u/sirname)\
**Replies:** 0\
**Last updated:** [March 4, 2022, 11:40pm UTC](https://forum.alpaca.markets/t/changing-the-margin-on-paper-and-live-account/8622 "2022-03-04T23:40:53Z")

</div>

hello everybody , currently in paper account I have 13K in equity and 26K in buying power. my question is how do I remove this leverage. i want my buying power to be equal to my equity

---

## [PHP, React, and Alpaca API = page that takes a ticker symbol as input and returns ticker quote](https://forum.alpaca.markets/t/php-react-and-alpaca-api-page-that-takes-a-ticker-symbol-as-input-and-returns-ticker-quote/8440)

<div class="topic-metadata">

**Author:** [@Victor\_S](https://forum.alpaca.markets/u/Victor_S)\
**Replies:** 0\
**Last updated:** [February 19, 2022, 9:13pm UTC](https://forum.alpaca.markets/t/php-react-and-alpaca-api-page-that-takes-a-ticker-symbol-as-input-and-returns-ticker-quote/8440 "2022-02-19T21:13:27Z")

</div>

Hi Friends, Can you share Blog posts \\ Videos that show how to build a simple stock quoting and, to lesser extent trading, app using PHP and React and Alpaca API? Please point me in the right direction. This is for a co…

---

## [Mobile Trading App People Use in Japan](https://forum.alpaca.markets/t/mobile-trading-app-people-use-in-japan/7893)

<div class="topic-metadata">

**Author:** [@joko](https://forum.alpaca.markets/u/joko)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 8:54pm UTC](https://forum.alpaca.markets/t/mobile-trading-app-people-use-in-japan/7893 "2022-01-04T20:54:24Z")

</div>

Off topic but maybe someone knows … is there a Robinhood-style (mobile) stock trading application that residents of Japan can use in Japan.

---

## [Alpaca Bracket Order Behavior](https://forum.alpaca.markets/t/alpaca-bracket-order-behavior/7771)

<div class="topic-metadata">

**Author:** [@CaptainZ](https://forum.alpaca.markets/u/CaptainZ)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 2:26pm UTC](https://forum.alpaca.markets/t/alpaca-bracket-order-behavior/7771 "2021-12-21T14:26:36Z")

</div>

Hello, quite puzzled about the behavior of the Alpaca bracket order. I am sending a market sell bracket order filled at 24.24, with stop buy at 24.38 and limit buy to take profit at 24.04. Three questions here Since st…

---

## [Connection are forcefully closed 10054](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447)

<div class="topic-metadata">

**Author:** [@magniocean](https://forum.alpaca.markets/u/magniocean)\
**Replies:** 2\
**Last updated:** [December 11, 2021, 6:31pm UTC](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447 "2021-12-11T18:31:29Z")

</div>

My alpaca connection was closed forcefully by error code 10054. The exception is requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(10054, ‘An existing connection was forcibly closed by t…

---

## [Tracking Bracket Orders](https://forum.alpaca.markets/t/tracking-bracket-orders/7173)

<div class="topic-metadata">

**Author:** [@Ryan\_McGuigan](https://forum.alpaca.markets/u/Ryan_McGuigan)\
**Replies:** 2\
**Last updated:** [October 27, 2021, 8:32pm UTC](https://forum.alpaca.markets/t/tracking-bracket-orders/7173 "2021-10-27T20:32:40Z")

</div>

I’m working in Python and using the alpaca\_trade\_api. I submit custom order ids that I use to track each trade individually on my side. When submitting a bracket order, how do you tie the profit\_taking and stop\_loss ord…

---

## [Internal server error (500)?](https://forum.alpaca.markets/t/internal-server-error-500/7053)

<div class="topic-metadata">

**Author:** [@vampiretooth](https://forum.alpaca.markets/u/vampiretooth)\
**Replies:** 0\
**Last updated:** [October 8, 2021, 3:26pm UTC](https://forum.alpaca.markets/t/internal-server-error-500/7053 "2021-10-08T15:26:10Z")

</div>

Not sure if anyone else is getting this today? No changes to trade execution code on my end. Market data, etc. work alright

[Next page](https://forum.alpaca.markets/c/trading/tutorials/9.md?page=1)
