Readonly
premiaFilters a list of pool objects according to the provided options.
An array of pool objects to filter.
Optional
options: { An object containing filter conditions.
Optional
maturity?: BigNumberishThe maturity time.
Optional
priceThe address of the price oracle (optional).
Optional
quoteArray of quote tokens' addresses (optional).
Optional
strike?: BigNumberishThe strike price.
Parses a token input to return a token address string.
The token input which can be either a Token object or a string representing the address.
Cancels the streaming of quotes for the provided pool address, isCall, and isBuy parameters.
The pool address.
Whether the quote is for a call option.
Whether the quote is for a buy or sell.
Gets the profit or loss for a given pool, action (buy/sell), and premium.
The address of the pool.
Whether the action is a buy.
The premium for the transaction.
Calculates the increment to use for strike prices based on the spot price.
The spot price.
The number of decimal places for the price (defaults to WAD_DECIMALS).
Generates a list of suggested strike prices based on the spot price.
The spot price.
The number of decimal places for the price (defaults to WAD_DECIMALS).
Provides the best quotes available for each pool that matches the provided options. The method is cached for a second to improve performance.
Multi-quote options object.
Whether the quote is for a buy or sell.
Whether the quote is for a call option.
The maturity time.
Optional
minimumThe minimum size of the trade (optional).
Optional
priceThe address of the price oracle (optional).
Optional
quoteArray of quote tokens' addresses (optional).
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
The strike price.
Optional
taker?: stringThe address of the taker (optional).
The token object or address.
Provides the best quote available from different sources (RFQ, Pool, Vault) based on the provided options. The method is cached for a second to improve performance.
Quote options object.
Whether the quote is a buy or sell.
Optional
minimumThe minimum size of the trade (optional).
The pool's address.
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
Optional
taker?: stringThe address of the taker (optional).
Provides the best quotes available from each provider (RFQ, Pool, Vault) for each pool that matches the provided options. The method is cached for a second to improve performance.
Quotes by provider options object.
Whether the quote is for a buy or sell.
Whether the quote is for a call option.
The maturity time.
Optional
minimumThe minimum size of the trade (optional).
Optional
priceThe address of the price oracle (optional).
Optional
quoteArray of quote tokens' addresses (optional).
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
The strike price.
Optional
taker?: stringThe address of the taker (optional).
The token object or address.
Streams best quotes available for each pool that matches the provided options. Quotes are updated in real-time and passed to a callback.
Quote options object.
Whether the quote is for a buy or sell.
Whether the quote is for a call option.
The maturity time.
Optional
minimumThe minimum size of the trade (optional).
Optional
priceThe address of the price oracle (optional).
Optional
quoteArray of quote tokens' addresses (optional).
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
The strike price.
Optional
taker?: stringThe address of the taker (optional).
The token object or address.
Function to be called when new quotes are available.
Streams the best quotes available from each provider (RFQ, Pool, Vault) for the pool that matches the provided options. The best quote among all providers is updated in real-time and passed to a callback.
Quote options object.
Whether the quote is for a buy or sell.
Optional
minimumThe minimum size of the trade (optional).
The pool address.
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
Optional
taker?: stringThe address of the taker (optional).
Function to be called when a new best quote is available.
Streams best quotes available from each provider (RFQ, Pool, Vault) for each pool that matches the provided options. Quotes are updated in real-time and passed to a callback.
Quote options object.
Whether the quote is for a buy or sell.
Whether the quote is for a call option.
The maturity time.
Optional
minimumThe minimum size of the trade (optional).
Optional
priceThe address of the price oracle (optional).
Optional
quoteArray of quote tokens' addresses (optional).
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
The strike price.
Optional
taker?: stringThe address of the taker (optional).
The token object or address.
Function to be called when new quotes are available.
Generated using TypeDoc
This class provides an API for interacting with options in the Premia system. It includes methods for fetching default base and quote tokens, as well as default token pairs. All methods are asynchronous and return promises.