Skip to main content
The getQuote function calculates a quote for a potential trade on the Exponent orderbook.

Usage

Parameters

QuoteDirection

The QuoteDirection enum specifies the trade direction:

Getting the Unix Timestamp

Use the onchain clock for accurate timing. Avoid Date.now() as it may drift from the onchain clock:

Returns

Returns an object with:
  • outAmount - Expected output amount in lamports
  • makerFees - Total maker fees charged in lamports
  • takerFees - Total taker fees charged in lamports