Skip to main content
1

Set Up

Imports, env config, and the wallet and RPC client used across every step.
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 for that wallet to sign. Equity Order Execution describes the equity fields in the response.
4

Sign and Choose the Submission Path

Sign the transaction. Where to submit it depends on the order response: Submit a Sync Response when submitEndpointRequired is true, Submit an Async Response when executionMode is async, and through your own RPC otherwise.

Submit a Sync Response

Send the signed transaction to the submit transaction endpoint and confirm the signature onchain through your own RPC. Submit Transaction Errors lists the endpoint’s errors.

Submit an Async Response

An async response’s transaction is complete once the user signs it. Send it through your own RPC, then track the order with the returned signature and the response’s lastValidBlockHeight, as in Track an Async Equity Order.

Sell an Equity

To sell, set inputMint to the equity mint. Set amount to the raw token amount, in the mint’s decimals and before the ScaledUiAmount multiplier. Read the decimals from the mint with getTokenSupply.
Sign sell.transaction, then branch as above.