Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
createPostOfferInstruction
Builds a raw instruction to post a limit order on the orderbook, allowing users to place buy or sell offers for YT tokens at a specified price.Usage
Accounts
| Name | Type | Signer | Writable | Description |
|---|---|---|---|---|
trader | PublicKey | Yes | No | The user posting the offer |
orderbook | PublicKey | No | Yes | Orderbook account |
vault | PublicKey | No | Yes | Vault account |
cpiAccountOrderbook | PublicKey | No | No | CPI accounts orderbook |
yieldPosition | PublicKey | No | Yes | Vault robot yield position |
tokenEscrowYt | PublicKey | No | Yes | Orderbook YT escrow account |
tokenEscrowSy | PublicKey | No | Yes | Orderbook SY escrow account |
tokenEscrowPt | PublicKey | No | Yes | Orderbook PT escrow account |
tokenSyTrader | PublicKey | No | Yes | Trader SY token account |
tokenYtTrader | PublicKey | No | Yes | Trader YT token account |
tokenPtTrader | PublicKey | No | Yes | Trader PT token account |
systemProgram | PublicKey | No | No | System program |
syProgram | PublicKey | No | No | SY program |
tokenProgram | PublicKey | No | No | SPL Token 2022 program |
exponentCore | PublicKey | No | No | Exponent Core program |
addressLookupTable | PublicKey | No | No | Vault address lookup table |
eventAuthority | PublicKey | No | No | Event authority PDA |
program | PublicKey | No | No | Exponent Orderbook program |
Args
| Name | Type | Description |
|---|---|---|
priceApy | number | Price in implied APY (f64) |
amount | bigint | Amount of tokens to offer (in base units) |
offerTypeFlag | OfferType | Type of offer: { sellYt: {} } or { buyYt: {} } |
virtualOffer | boolean | Whether this is a virtual offer |
expirySeconds | number | Expiry time in seconds (u32) |
options | OfferOptions | Offer options: { fillOrKill: [boolean] } |
Returns
TransactionInstruction — a transaction instruction ready to be added to a transaction.