Skip to main content
POST
Place a limit order

Authorizations

X-API-Key
string
header
required

Body

application/json
market
string
required

Market address (PDA). Get one from GET /v1/markets.

Example:

"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4"

price
string
required

Limit price, quote per base (human units).

Example:

"150.00"

side
enum<string>
required
Available options:
buy,
sell
Example:

"buy"

signer
string
required

The wallet that signs: the book's maker, or with accountOwner the account's owner or delegate. Existing clients may keep sending it as owner; send one name only.

Example:

"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4"

size
string
required

Order size in base tokens (human units).

Example:

"1.5"

accountOwner
string | null

The wallet that owns the ArcherAccount this request acts through. With platform it derives the account PDA server-side — you never handle a PDA. Omit for a plain wallet-owned book. Replaces the earlier archerAccount field, which is no longer read.

crossSpread
boolean
default:false

When false (default), a price that crosses the spread — a buy at/above the best registered ask, or a sell at/below the best registered bid — is rejected (or auto-swapped, see swapIfReject), and the tx is sent post-only so the program rejects it too if the books move before it lands. Set true to explicitly rest a spread-crossing limit order (the program's post-only check is skipped).

maxSlippageBps
integer<int32> | null
default:50

Slippage tolerance (bps) for the swapIfReject market fallback. Ignored unless a swap fires. Defaults to 50 bps (0.5%).

platform
enum<string> | null
default:self

Platform namespace for accountOwner. Ignored unless accountOwner is set.

Available options:
self,
treadfi
swapIfReject
boolean
default:false

When true and the order would be rejected for crossing the spread (crossSpread false), build a market order for the same base size instead of erroring (from the ArcherAccount when archerAccount is given). The response then has orderKind='market'.

withInstructions
boolean | null
default:false

Also return the unsigned instructions under instructions, for composing your own transaction instead of signing ours. Omitted or false leaves the response exactly as it was.

Response

Unsigned transaction built (limit order, or a market order when swapIfReject fired).

Result of placing a limit order. When orderKind='limit', all LimitOrderActionResponse fields are present at the top level. When the price crossed the spread and swapIfReject was set, orderKind='market' and all BuildOrderResponse fields are present at the top level instead.

addressLookupTables
string[]
required
anchorMidTicks
integer<int64>
required

The book's mid anchor in ticks. Always 0 for limit-order books: a level's offset is its absolute price tick.

depositBaseLots
integer<int64>
required
depositQuoteLots
integer<int64>
required
expiresAt
integer<int64>
required
includesDeposit
boolean
required
nextSequenceNumber
integer<int64>
required

The maker-book sequence number this tx writes.

orderIds
string[]
required
requiredBaseLots
integer<int64>
required

Total base lots the resulting book state requires as collateral (the program's update_book solvency check).

requiredQuoteLots
integer<int64>
required

Total quote lots required, including the positive-maker-fee buffer.

transaction
string
required

Base64 unsigned VersionedTransaction in its wire encoding: a v0 message when the write fits 1232 bytes, otherwise a v1 (SIMD-0385) message, which a full maker registry needs. A v1 transaction must be sent base64-encoded and signed by a wallet that supports version 1.

orderKind
enum<string>
required

Which kind of order was built. 'market' only when a spread-crossing price triggered the swapIfReject fallback.

Available options:
limit,
market
instructions
object | null

Unsigned instructions, present only when the request set withInstructions.

price
string | null

Human price (quote per base) the order rests/rested at. Absent for cancel-all.

side
enum<string> | null

Side this action targets. Absent for cancel-all.

Available options:
buy,
sell
size
string | null

Human base-token size the action targets — placed size (place), new size (modify), or canceled size (cancel-one). Absent for cancel-all.