Create a multi-leg strategy group.
POST
/api/position-groups
const url = 'https://api.tradr.cloud/api/position-groups';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"accountId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","filledAt":"2026-04-15T12:00:00Z","labelOverride":"example","legs":[{"assetType":"stock","fees":"example","price":"example","quantity":"example","side":"long","symbol":"example"}]}'};
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/position-groups \ --header 'Content-Type: application/json' \ --data '{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "filledAt": "2026-04-15T12:00:00Z", "labelOverride": "example", "legs": [ { "assetType": "stock", "fees": "example", "price": "example", "quantity": "example", "side": "long", "symbol": "example" } ] }'Authed. Creates 2 to 8 legs sharing one account and one fill date, in one transaction: every leg is written with its entry fill and opened at that date, then linked into a new group. A bad OCC symbol, a symbol repeated across legs, or a leg whose underlying differs from the first writes nothing and names the offending leg’s index. When feature gating is enforced, the whole batch is checked against the position cap (positionCount + legs > limit) and the account writability rule, same as a single create.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
accountId
required
string format: uuid
filledAt
required
string format: date-time
labelOverride
string
legs
required
Array<object>
object
assetType
required
string
fees
string
price
required
string
quantity
required
string
side
required
string
symbol
required
string
Responses
Section titled “ Responses ”The created group
Validation error — bad OCC symbol
TIER_LIMIT_POSITIONS (batched position cap reached) or TIER_ACCOUNT_NOT_WRITABLE.
Account not found (or not owned by the user).