Place multileg order
Place a new multi-leg order
Submits a new multi-leg order asynchronously for the specified account. Note: Order placement is asynchronous. This response confirms submission only. To verify the order status or execution details, use the GET /{orderId} endpoint after placement.
You are using your live production account. These commands will execute real orders in your real account, proceed with caution.
Parameters
Path Parameters
Request body
Required*Parameters
Name | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | - |
Body
application/jsonRequest Body
The OrderId, a UUID conforming to RFC 4122 (8-4-4-4-12 format, e.g., 0d2abd8d-3625-4c83-a806-98abf35567cc), globally unique over time. Serves as the deduplication key; if reused on the same account, the operation is idempotent.
The order quantity
The order type. Only LIMIT order are allowed
MARKET
,LIMIT
,STOP
,STOP_LIMIT
The limit price for the order. For debit spreads the limit price must be positive, for create spreads the limit price is negative
From 2-6 legs. There can be at most 1 equity leg
Responses
Response
Response
Order validation failed.
No response body defined
curl --request POST \
--url https://api.public.com/userapigateway/trading/{accountId}/order/multileg \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"orderId": "f4ac4fe7-5097-462a-83c4-521a6fb81388",
"quantity": 123,
"type": "LIMIT",
"limitPrice": "string",
"expiration": {
"timeInForce": "GTD",
"expirationTime": "2025-11-20T09:33:37.242Z"
},
"legs": [
{
"instrument": {
"symbol": "string",
"type": "EQUITY"
},
"side": "BUY",
"openCloseIndicator": "OPEN",
"ratioQuantity": 123
}
]
}'
{
"orderId": "3472269a-591b-481f-9aaf-a29accc099d1"
}