Skip to main content
POST
Prepare a buy

Authorizations

x-api-key
string
header
required

Your API key, issued by Securitize. Send it in the x-api-key header on every request. The key identifies your partner account; investorId names the investor each call concerns.

Path Parameters

contractAddress
string
required

The stock's buy contract address, from your Securitize contact. A stock has a different address for selling.

Body

application/json
investorId
string
required

Securitize's id for the investor. The transaction is built for their linked wallet.

signedPrice
string
required

signedPrice from GET /stocks/realtime-price, unchanged and unexpired, for this stock.

slippageBps
string
required

The slippage the investor accepted, in basis points, as a string of digits. Recorded with the order; the bound enforced on chain is minOutputAmount.

Pattern: ^\d+$
liquidityAmount
string
required

USDC to spend, in base units (6 decimals).

Pattern: ^\d+$
minOutputAmount
string
required

The fewest stock tokens the investor accepts, in the token's base units. Below this, the trade reverts and nothing moves. Work it out as liquidityAmount ÷ 10^6 ÷ bestAsk × (1 − slippageBps ÷ 10,000) × 10^tokenDecimals, rounded down.

Pattern: ^\d+$

Response

The transaction for the investor's wallet to sign.

unsignedTransaction
string
required

A base64-encoded transaction for the stock's chain, already signed by Securitize and awaiting the investor's signature. Have it signed unchanged and submit it within 120 seconds.

additionalData
object