# Value cannot be null. (Parameter 's')

**URL:** <https://forum.alpaca.markets/t/value-cannot-be-null-parameter-s/19818>\
**Category:** Alpaca Trading\
**Created:** [October 6, 2026, 6:22pm UTC](https://forum.alpaca.markets/t/value-cannot-be-null-parameter-s/19818 "2026-10-06T18:22:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptrader](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@ptrader](https://forum.alpaca.markets/u/ptrader)\
**Post date:** [October 6, 2026, 6:22pm UTC](https://forum.alpaca.markets/t/value-cannot-be-null-parameter-s/19818/1 "2026-10-06T18:22:49Z")

</div>

Hi ,  
Placing a paper trading orders using C#. This one is a buy order.  
I do this every day without any issues.  
This past Friday, the first order at 9:44 EST for SPY261016P00775000 using try/catch  
returned the following Exception: Value cannot be null. (Parameter ‘s’).  
Two questions

- What is parameter ‘s’. The API does not seem to have such a parameter.
- Perhaps random internet error, the HTTP request had missing characters.  
Do you this type of thing at all?

Thanks!  
ptrader

---

<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:** [October 10, 2026, 3:00pm UTC](https://forum.alpaca.markets/t/value-cannot-be-null-parameter-s/19818/2 "2026-10-10T15:00:14Z")

</div>

@ptrader The error you received was most likely raised when the SDK was trying to parse the _response_ to your order request, and that response was null. Your request was likely OK. As you noted, there is no ‘s’ parameter when sending an order. A null response can happen after a transient network failure, a timeout, or an empty error message. The code then tried to parse it and caused the error you are seeing.

While infrequent, an API request can return null. It’s good that you wrapped your order request in a try/catch block. Do not assume that a null response means the order was not created. A good practice is to 1) always assign a `client_order_id` when submitting orders. This must be unique across all orders, and a common approach is to use a timestamp. Save that `client_order_id` until the order is confirmed. Then 2) if you get an unknown error when submitting the order, query your orders for that `client_order_id`. If you find it, your order succeeded, and your code can continue. If it’s not found, then resend your order.

Hope this gives you some ideas.
