Skip to main content
POST
Error
Most programs should use Create an order: it pays from the other venue in the same call. This endpoint is the first of two calls for programs that sign each payment themselves. See Advanced: self-signed routed orders.

Authorizations

Authorization
string
header
required

A Lean API key, sent as Authorization: Bearer <key>. A test key (lean_sk_test_...) simulates orders and fills with no money; a live key (lean_sk_live_...) trades for real within the key's limits. Every successful response says which mode answered in data.livemode.

Body

application/json
client_order_id
string
required

Unique per API key. Replaying an id returns the original order.

Pattern: ^[A-Za-z0-9_-]{1,64}$
market_id
string
required

A market id from GET /markets, or a venue symbol that names one market: a Polymarket token id, a Hyperliquid book coin (#…, written %23… in a path), or a leg ticker (pm:…, hl:…, pmus:… or a Kalshi market ticker) that lists only this outcome. A symbol that names more than one market, such as a Polymarket condition id, is refused with 400; use the token id or the market id instead. A venue symbol must name the listing on the execution venue, which the route buys.

Required string length: 1 - 512
quantity
string
required
Pattern: ^\d+(?:\.\d+)?$
limit_price
string
required

Worst price per share you accept on the execution venue, in dollars.

funding_venue
enum<string>
required

The venue whose cash pays for the order. It is bought on the other venue.

Available options:
polymarket,
hyperliquid

Response

The order, pending until its payment is signed, with the payment to sign; the original without a payment on replay

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required