# ClosePositionRequest Syntax

**URL:** <https://forum.alpaca.markets/t/closepositionrequest-syntax/13283>\
**Category:** Getting Started with Alpaca\
**Created:** [December 11, 2023, 7:12am UTC](https://forum.alpaca.markets/t/closepositionrequest-syntax/13283 "2023-12-11T07:12:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph\_kibuthu\_Chege](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/joseph_kibuthu_chege/32/5717_2.png) [@joseph\_kibuthu\_Chege](https://forum.alpaca.markets/u/joseph_kibuthu_Chege)\
**Post date:** [December 11, 2023, 7:12am UTC](https://forum.alpaca.markets/t/closepositionrequest-syntax/13283/1 "2023-12-11T07:12:10Z")

</div>

REQUEST:  
Kindly assist with the correct PYTHON syntax for ClosePositionRequest for a specific ticker eg. SPY

market\_order\_data = ClosePositionRequest(  
symbol= str(symbol.upper()),  
percentage = str(100)  
#qty = str(1.0)  
)

ERROR MESSAGE:  
_alpaca.common.exceptions.APIError: {“code”: 40010001,“message”:qty or notional is required"}_
