# List\_orders throws error if I specify a query parm of 'side'

**URL:** <https://forum.alpaca.markets/t/list-orders-throws-error-if-i-specify-a-query-parm-of-side/10249>\
**Category:** Getting Started with Alpaca\
**Created:** [August 7, 2022, 10:57pm UTC](https://forum.alpaca.markets/t/list-orders-throws-error-if-i-specify-a-query-parm-of-side/10249 "2022-08-07T22:57:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![livefire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/livefire/32/4457_2.png) [@livefire](https://forum.alpaca.markets/u/livefire)\
**Post date:** [August 7, 2022, 10:57pm UTC](https://forum.alpaca.markets/t/list-orders-throws-error-if-i-specify-a-query-parm-of-side/10249/1 "2022-08-07T22:57:25Z")

</div>

Hi Everyone,

I have 2 paper trade orders I put through on Friday 8/5.

 ![Closed Order -8-05-2022](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/3/315ee5c1f811e69029bc99e30460123ef12911ad.png)

In my program, I can make a call to get a list of orders by specifying this and can debug to see that an array is returned:  
orders = api.list\_orders(status=‘closed’)

 ![Returned Orders](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/3/3a806a0fc5aba0818351e014f75e19a0e9fc30e9.png)

In the get-a-list-of-orders documentation, it indicates that a ‘side’ can be query parm:

> **[Get All Orders](https://docs.alpaca.markets/reference/getallorders)**
>
> Retrieves a list of orders for the account, filtered by the supplied query parameters.

When I update the code to do filter based on the ‘side’ for a buy,  
orders = api.list\_orders(status=‘closed’, side=‘buy’)

I end up getting an error that says the following:  
orders = api.list\_orders(status=‘closed’,side=‘buy’)

> TypeError: REST.list\_orders() got an unexpected keyword argument ‘side’

Any ideas as to why the ‘side’ query parm is considered unexpected, though documentation shows it as an optional query parm?

---

<div class="post-metadata">

**Author:** ![livefire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/livefire/32/4457_2.png) [@livefire](https://forum.alpaca.markets/u/livefire)\
**Post date:** [August 7, 2022, 11:18pm UTC](https://forum.alpaca.markets/t/list-orders-throws-error-if-i-specify-a-query-parm-of-side/10249/2 "2022-08-07T23:18:05Z")

</div>

I guess I am able to answer my own question. In a DIFFERENT set of documentation that is for V2, it appears that the ‘side’ has been dropped.

> **[Orders - Documentation | Alpaca](https://alpaca.markets/deprecated/docs/api-documentation/api-v2/orders/)**
>
> Alpaca API lets you build and trade with real-time market data for free.

So my question is for V2 now with all the other parms that were kept that match V1, but ‘side’ was the only query parm dropped? Why was ‘side’ not continued for V2?

---

<div class="post-metadata">

**Author:** ![livefire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/livefire/32/4457_2.png) [@livefire](https://forum.alpaca.markets/u/livefire)\
**Post date:** [August 7, 2022, 11:46pm UTC](https://forum.alpaca.markets/t/list-orders-throws-error-if-i-specify-a-query-parm-of-side/10249/3 "2022-08-07T23:46:21Z")

</div>

I am still a bit confused. In my account, when clicking “Documentation”, it takes me to this page.

> **[API-first solutions for stocks and crypto](https://alpaca.markets/docs/)**
>
> Alpaca offers simple, modern API-first solutions to get market data, trade stocks and crypto, build apps and more.

From within that, if I select Trading API and then Orders, I get this link:

> **[Orders](https://alpaca.markets/docs/api-references/trading-api/orders/)**
>
> Orders # The Orders API allows a user to monitor, place and cancel their orders with Alpaca. Each order has a unique identifier provided by the client. This client-side unique order ID will be automatically generated by the system if not provided by...

From within this link for reviewing **Get a list of orders** , it states that ‘side’ is a valid query parm. Of course, there is an error indicating it is not supported.

 ![side](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/8/81716febc3eb0f947e285f05d4737f27d6105bc2.png)

So what is supposed to be the current documentation? is this out dated? was there an error made by the technical writer who put this documentation together? or was ‘side’ intended to be included for api functionality support and never was?

If ‘side’ is not supported in the current documentation and for V2, can it please be removed so others don’t lost time trying to determine whether it is or not a valid parm?

Thanks.
