# Anyone seeing issues with Python API list\_orders not returning anything, REST API does return them

**URL:** <https://forum.alpaca.markets/t/anyone-seeing-issues-with-python-api-list-orders-not-returning-anything-rest-api-does-return-them/13907>\
**Category:** Alpaca Trading\
**Created:** [March 21, 2024, 10:39pm UTC](https://forum.alpaca.markets/t/anyone-seeing-issues-with-python-api-list-orders-not-returning-anything-rest-api-does-return-them/13907 "2024-03-21T22:39:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![torobot](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@torobot](https://forum.alpaca.markets/u/torobot)\
**Post date:** [March 21, 2024, 10:39pm UTC](https://forum.alpaca.markets/t/anyone-seeing-issues-with-python-api-list-orders-not-returning-anything-rest-api-does-return-them/13907/1 "2024-03-21T22:39:28Z")

</div>

Below is my code, I request the orders through the Phython API which does NOT work, and then through the REST API which DOES work. The Python API stopped working yesterday some time…

Any help would be greatly appreciated.  
Bill

alpaca = tradeapi.REST(ALPACA\_API\_KEY, ALPACA\_API\_SECRET, ALPACA\_URL, ‘v2’)  
config = alpaca.get\_account\_configurations()  
print (config) # this works fine  
orders = alpaca.list\_orders(status=‘closed’, symbols=‘AMD’, limit=10, after=‘2024-03-19T15:50:00Z’, direction=‘desc’)  
print(orders) # returns an empty list

```
url = "https://paper-api.alpaca.markets/v2/orders? status=closed&limit=10&after=2024-03-21T15%3A50%3A00Z&direction=desc&symbols=AMD"

headers = {
        "accept": "application/json",
        "APCA-API-KEY-ID": "my_key",
        "APCA-API-SECRET-KEY": "my_secret"
}
response = requests.get(url, headers=headers)
print(response.text) # THIS WORKS FINE AND SHOWS THE ORDER

```

---

<div class="post-metadata">

**Author:** ![Dan\_Whitnable\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable_alpaca/32/1658_2.png) [@Dan\_Whitnable\_Alpaca](https://forum.alpaca.markets/u/Dan_Whitnable_Alpaca)\
**Post date:** [March 22, 2024, 4:31pm UTC](https://forum.alpaca.markets/t/anyone-seeing-issues-with-python-api-list-orders-not-returning-anything-rest-api-does-return-them/13907/2 "2024-03-22T16:31:06Z")

</div>

@torobot The aalpaca-trade-api SDK is particular about the symbols parameter. Specifically, this needs to be a list (even a list of one symbol). Replace your code with the following and it should work

> orders = alpaca.list\_orders(status=‘closed’, symbols=[‘AMD’], limit=10, after=‘2024-03-19T15:50:00Z’, direction=‘desc’)

---

<div class="post-metadata">

**Author:** ![torobot](https://avatars.discourse-cdn.com/v4/letter/t/c5a1d2/32.png) [@torobot](https://forum.alpaca.markets/u/torobot)\
**Post date:** [March 22, 2024, 5:18pm UTC](https://forum.alpaca.markets/t/anyone-seeing-issues-with-python-api-list-orders-not-returning-anything-rest-api-does-return-them/13907/3 "2024-03-22T17:18:44Z")

</div>

Thanks Dan, that was the issue!  
Did something change recently as I don’t think I changed anything on my side and I had it working previously. Either way, it’s working now so thanks very much for the quick response.  
Bill
