Add a fill to a position.
POST
/api/positions/{id}/fills
const url = 'https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fills';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"fees":"0","filledAt":"2026-04-15T12:00:00Z","notes":"example","price":"example","quantity":"example","type":"entry"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/fills \ --header 'Content-Type: application/json' \ --data '{ "fees": "0", "filledAt": "2026-04-15T12:00:00Z", "notes": "example", "price": "example", "quantity": "example", "type": "entry" }'Authed. A position is a sequence of fills, not a single trade: add an entry fill to open or scale in, an exit fill to scale out or close. The position’s average price, open quantity, status, and realised P&L are all derived from its fills, so adding one recomputes them. Monetary and quantity fields are strings to preserve decimal precision.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
The position the fill belongs to.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
fees
Non-negative decimal.
string
filledAt
required
string format: date-time
notes
string
price
required
Non-negative decimal.
string
quantity
required
Positive decimal.
string
type
required
string
Responses
Section titled “Responses”The created fill.
Validation error: an exit quantity beyond the available entry quantity, or a fractional quantity on an options position.
No such position for this user.
The position is closed