Close a Position

DELETE {{baseUrl}}/v2/positions/:symbol_or_asset_id

Closes (liquidates) the account’s open position for the given symbol. Works for both long and short positions.

Request Params

KeyDatatypeRequiredDescription
qtystringthe number of shares to liquidate. Can accept up to 9 decimal points. Cannot work with percentage
percentagestringpercentage of position to liquidate. Must be between 0 and 100. Would only sell fractional if position is originally fractional. Can accept up to 9 decimal points. Cannot work with qty

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
Apca-Api-Key-Idstring
Apca-Api-Secret-Keystring

RESPONSES

status: OK

[{"symbol":"NVDA","status":200,"body":{"id":"a91ce2b6-2d9f-4e49-b53b-292231823cca","client_order_id":"c11555ae-d56d-4f01-a331-ddcaadb9c2a7","created_at":"2024-03-27T01:28:13.08592107Z","updated_at":"2024-03-27T01:28:13.08592107Z","submitted_at":"2024-03-27T01:28:13.08554177Z","filled_at":null,"expired_at":null,"canceled_at":null,"failed_at":null,"replaced_at":null,"replaced_by":null,"replaces":null,"asset_id":"4ce9353c-66d1-46c2-898f-fce867ab0247","symbol":"NVDA","asset_class":"us_equity","notional":null,"qty":"4","filled_qty":"0","filled_avg_price":null,"order_class":"","order_type":"market","type":"market","side":"sell","time_in_force":"day","limit_price":null,"stop_price":null,"status":"accepted","extended_hours":false,"legs":null,"trail_percent":null,"trail_price":null,"hwm":null,"subtag":null,"source":null}}]