# Alpaca API Stop\_Loss is an object

**URL:** <https://forum.alpaca.markets/t/alpaca-api-stop-loss-is-an-object/17748>\
**Category:** Alpaca Trading\
**Created:** [September 2, 2025, 2:28pm UTC](https://forum.alpaca.markets/t/alpaca-api-stop-loss-is-an-object/17748 "2025-09-02T14:28:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex33](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@Alex33](https://forum.alpaca.markets/u/Alex33)\
**Post date:** [September 2, 2025, 2:28pm UTC](https://forum.alpaca.markets/t/alpaca-api-stop-loss-is-an-object/17748/1 "2025-09-02T14:28:22Z")

</div>

Dear all.

I noticed that the stop\_loss and take\_profit options of creating an order are considered as Object in the OpenAPI format.

==\> [https://docs.alpaca.markets/openapi/673e19fc6dc876001ff495b2](https://docs.alpaca.markets/openapi/673e19fc6dc876001ff495b2)

![image](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/d/dd807c8e35b698870502cd6163040e5c88584dfd.png)

Therefore, this cannot be used inside the OpenAPI library to build, for example, a java library. In result, only a json Object is used and this cannot be correct:

In java:

```auto
@SerializedName("stop_loss")
private Object stopLoss;

```

Do you know if there is anyway to contact the development team and ask if this Alpaca OpenAPI standard can be fixed ?

Many thanks for your help.

---

<div class="post-metadata">

**Author:** ![Petersoj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/petersoj/32/8490_2.png) [@Petersoj](https://forum.alpaca.markets/u/Petersoj)\
**Post date:** [July 7, 2026, 10:56pm UTC](https://forum.alpaca.markets/t/alpaca-api-stop-loss-is-an-object/17748/2 "2026-07-07T22:56:24Z")

</div>

This should be fixed in the latest pre-release of the [Alpaca Java](https://github.com/Petersoj/alpaca-java) library.
