Transaction Structure
Every orderbook interaction goes throughcreateVaultSyncTransaction, which returns three parts:
Trade Directions
TheOrderbookTradeDirection enum specifies the side of the trade:
Post Offer
orderbookAction.postOffer posts a limit order on the orderbook at a specified APY price.
Parameters
A matching policy must exist before executing. See Policy Builders.
Market Offer
orderbookAction.marketOffer executes a market order against existing resting offers on the orderbook.
Parameters
A matching policy must exist before executing. See Policy Builders.
Remove Offer
orderbookAction.removeOffer cancels an existing limit order on the orderbook.
Parameters
A matching policy must exist before executing. See Policy Builders.
Withdraw Funds
orderbookAction.withdrawFunds withdraws settled funds from the user escrow on the orderbook back to the vault’s token accounts.
Parameters
A matching policy must exist before executing. See Policy Builders.