Skip to main content
DELETE
Error

Authorizations

Authorization
string
header
required

Set API_TOKEN in .env to match the token configured on the server.

Path Parameters

ticket
integer
required

Position ticket number

Example:

123456789

Body

application/json

Optional body for partial close. Omit entirely to close the full position.

deviation
integer

Max allowed price deviation in points.

Example:

20

volume
number

Lot size to close. Omit to close the full position.

Example:

0.005

Response

Closing deal result

A closed deal from trade history.

comment
string
Example:

"novosky"

commission
number
Example:

-0.05

entry
integer

0=entry (open), 1=exit (close), 2=reversal.

Example:

1

magic
integer
Example:

20250101

order
integer

Linked order ticket.

Example:

123456789

position_id
integer
Example:

123456789

price
number
Example:

95200

profit
number

Profit in raw account currency (USC for cent accounts — NOT converted to USD).

Example:

200

swap
number
Example:

-0.12

symbol
string
Example:

"BTCUSD"

ticket
integer
Example:

111111111

time
integer

Deal execution time as Unix epoch.

Example:

1777879100

type
integer

0=BUY, 1=SELL, 2=BALANCE, 3=CREDIT.

Example:

1

volume
number
Example:

0.01