Close a position
Place an order to close an existing position. Isn't guaranteed to close the positions, or close it immediately. Will attempt to place an IOC, then GTC closing order, so the execution might be delayed. If you want to fully close position set parameter qty to 0, but if you want to partially close a position just set the qty parameter to the number of lots that you want to close.
NOTE: if you don't know what is the positionId value (you only have an orderId of the order that opened the position), you can use the GET /trade/accounts/{accountId}/ordersHistory route to get the list of all final orders and their IDs. Just match the orderId with the positionId.
Request
- Base URLhttps://demo.tradelocker.com/backend-api
- URLhttps://demo.tradelocker.com/backend-api/trade/positions/{positionId}
- AuthHTTP bearer
Path parameters
Position identifier.
Query parameters
Strategy ID
Headers
Account number
developer-api-key
Request body
Response
Example response
{
"s": "ok"
}Changes
No recorded changes to this operation across all 2 revisions of this API.