Skip to main content
1

Set Up

2

Find the Equity Mint

Find Equities adds retries and lookup by mint.
3

Call the Order Endpoint

Set inputMint to USDC and outputMint to the equity mint. Pass userPublicKey so the /order response includes a transaction. Equity Fills describes the equity fields in the response.
4

Sign and Choose the Submission Path

The user signs the transaction. submitEndpointRequired and executionMode decide the submission path: Submit a Direct Fill for a response with submitEndpointRequired: true, and Submit an Escrow Fill for an async response. Any other response is an ordinary route, and the app sends it through its own RPC.

Submit a Direct Fill

The app sends the signed transaction to the submit transaction endpoint and confirms the signature onchain through its own RPC. Submitting Equity Transactions lists the endpoint’s errors.

Submit an Escrow Fill

The transaction of an async response is complete after the user signs, so the app sends it through its own RPC. The app then tracks the escrow fill with this signature and the response’s lastValidBlockHeight, as in Track an Escrow Fill.

Sell an Equity

A sell sets the equity mint as inputMint. amount is the raw token amount in the equity mint’s decimals, before the ScaledUiAmount multiplier. The app reads the decimals from the mint account, decoding it with the token program that owns the account.
The user signs sell.transaction, and the app then branches as above.