Skip to main content
POST
Create position request

Body Parameters

string
required
Request style: market (funds-based, executes at market) or limit (resting limit at price for shares).
string
required
Market condition id.
boolean
default:"true"
Position side.
number
default:"1"
Leverage multiplier.
string
Optional take-profit trigger price.
string
Optional stop-loss trigger price.

When type is market

string
required
Position collateral (decimal string). Do not send price or shares. Minimum depends on the market backend: 1.00∗∗forHyperliquid−routedmarkets,∗∗1.00** for Hyperliquid-routed markets, **5.00 for Polymarket-routed markets. Requests below the minimum return 400 with a field error on funds.

When type is limit

string
required
Limit entry price. Do not send funds.
string
required
Share size for the limit order. Do not send funds.
After creation, sign the returned message and call Submit position request with the hex signature. To abandon a draft, use Cancel position request.For type limit, the success response is the same envelope as market (201), but data includes non-null price and shares (and funds reflects margin computed from your limit rather than a direct funds input).On success the API returns 201 Created with a Location header pointing to GET /margin/positions/requests/{pubkey}/.

Response

object
Created margin position request row.
object
Empty object on success for this endpoint.
object | null
null on success. Error object on failed requests.