Skip to main content
POST
Close an open position
Send login and optionally volume and comment. Omit volume for a full close; 5000 requests 0.5 lots. The API resolves symbol, direction, price and precision. Keep one Idempotency-Key per intent and confirm execution. See the complete guide.

Authorizations

Authorization
string
header
required

Send the provider-issued token in the Authorization header using Bearer authentication.

Headers

Idempotency-Key
string
required

Persisted key for this intent. Reuse the same key and body when retrying; use a new key for another opening or closing order.

Required string length: 16 - 128
Pattern: ^[A-Za-z0-9._:-]{16,128}$
Example:

"550e8400-e29b-41d4-a716-446655440000"

Path Parameters

position
integer
required

Body

application/json
login
integer
required

Verified owner account login.

Example:

123456

volume
integer | null

Optional MT5 volume units (10000 = 1 lot). Omit for the full current position volume.

Required range: x > 0
Example:

100

comment
string
default:REST API close
Maximum string length: 31

Response

Successful Response

The response is of type Response Close Position Api V1 Positions Position Close Post · object.