Skip to main content
DELETE
/
positions
/
{ticket}
Error
A valid request URL is required to generate request examples
{
  "comment": "novosky",
  "commission": -0.05,
  "entry": 1,
  "magic": 20250101,
  "order": 123456789,
  "position_id": 123456789,
  "price": 95200,
  "profit": 200,
  "swap": -0.12,
  "symbol": "BTCUSD",
  "ticket": 111111111,
  "time": 1777879100,
  "type": 1,
  "volume": 0.01
}

Documentation Index

Fetch the complete documentation index at: https://docs.novosky.app/llms.txt

Use this file to discover all available pages before exploring further.

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