Skip to main content
Tokenized equities trade through the same /order endpoint as crypto. DFlow requests quotes from market makers, picks the best one, and returns a transaction for the user to sign. What happens after the user signs depends on the executionMode of the response.

Overview

  1. The app gets tradable equities from /equities.
  2. The app requests an order from /order with the equity mint as the input or output mint.
  3. DFlow requests quotes from market makers. DFlow accepts quotes from multiple makers when they exist.
  4. DFlow picks the best quote and returns a transaction for the user to sign.
  5. The user signs.
The executionMode of the response says how the trade settles: sync or async.
  • A sync response settles the trade in one transaction. When the response has submitEndpointRequired: true, the market maker co-signs after the user and submits it.
  • An async response settles the trade in two transactions. The user’s first transaction opens an escrow, an onchain account that stays open until the maker fills or cancels. The market maker then delivers the equities in a second transaction, which closes the escrow.
A trade can fill in full or in part under either mode.

Sync Execution

When the response has submitEndpointRequired: true, the app returns the user’s signed transaction to the submit transaction endpoint, and DFlow forwards it to the maker. Before signing, the maker does a last look: a final check that the price still holds. If it does, the maker co-signs and submits. If it does not, the maker rejects and nothing is submitted. Because the maker submits the transaction, the app does not send it to a Solana RPC. Submit Equity Transactions covers which responses use the endpoint.

Async Execution

The app submits the first transaction itself, which opens the escrow. The maker buys the equities offchain, then fills the escrow in the second transaction, which sends the equities to the user. If the maker cannot fill, it cancels the escrow instead. To see whether the escrow fills, cancels, or expires, the app watches for transactions involving the escrow account. See Detecting Async Order Outcomes.