Access Token·InactiveLog in to your Public account to generate your access code.
Order Placement

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.

POST/userapigateway/trading/{accountId}/order/multileg

Parameters

Path Parameters

string

Request body

Required*

Parameters

NameTypeRequiredDescription
accountIdstringYes-

Body

application/json

Request Body

application/json
orderIdstringrequired

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.

quantityintegerrequired

The order quantity

typeenum<string>required

The order type. Only LIMIT order are allowed

Available options: MARKET,LIMIT,STOP,STOP_LIMIT
limitPricestringrequired

The limit price for the order. For debit spreads the limit price must be positive, for create spreads the limit price is negative

expirationrequired
legsobject[]required

From 2-6 legs. There can be at most 1 equity leg

Responses

Response

200
application/json
orderIdstring

Response

400application/json

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"
}
The Public Individual API is for your own personal, non-commercial use. Unauthorized access is prohibited. You are responsible for all trades made via the API. Learn more