Readonly
premiaPrivate
bestPrivate
Selects the best quote from a list of quotes based on a pricing strategy.
An array of quotes.
The size of the trade.
Optional
minimumSize: BigNumberishThe minimum size of the trade (optional).
Calculates the hash of a quote.
calculateQuoteHash
The quote to hash.
The address of the pool.
The calculated hash of the quote.
Checks whether a quote is valid. Can optionally throw an error if the quote is invalid.
The quote to check.
Optional
size: BigNumberishThe size of the trade (optional).
Optional
throwError: boolean = falseWhether to throw an error if the quote is invalid (default is false).
Publishes a quote.
The quote to publish.
A promise that resolves to the transaction receipt or null if failed.
Publishes a quote using an API key.
The quote to publish.
Publishes a list of quotes.
The list of quotes to publish.
A promise that resolves to the transaction receipt or null if failed.
Publishes a list of quotes with an API key.
The list of quotes to publish.
A promise that resolves to the list of returned OB quotes.
Publishes an unsigned quote.
The address of the pool.
The unsigned quote to publish.
A promise that resolves to the transaction receipt or null if failed.
Publishes an unsigned quote with an API key.
The address of the pool.
The unsigned quote to publish.
A promise that resolves to the list of returned OB quotes.
Publishes a list of unsigned quotes.
The address of the pool.
The list of unsigned quotes to publish.
A promise that resolves to the transaction receipt or null if failed.
Publishes a list of unsigned quotes with an API key.
The address of the pool.
The list of unsigned quotes to publish.
A promise that resolves to the list of returned OB quotes.
Fetches the best quote for a specified pool address and trade size.
The address of the pool.
The size of the trade.
Whether it's a buy or a sell.
Optional
minimumSize: BigNumberishThe minimum size of the trade (optional).
Optional
referrer: stringThe address of the referrer (optional).
Optional
taker: stringThe address of the taker (optional).
Signs a quote.
The address of the pool.
The quote to be signed.
A promise that resolves to the signed quote.
Streams quotes for the given options and executes a callback for the best quote.
The options for the quotes stream:
Whether it's a buy or a sell.
Optional
minimumThe minimum size of the trade (optional).
The address of the pool.
Optional
referrer?: stringThe address of the referrer (optional).
The size of the trade.
Optional
taker?: stringThe callback to execute for the best quote.
Private
tradePrivate
Converts a quote into a fillable quote, with additional properties required for execution.
The address of the pool.
The size of the trade.
The quote to be converted.
Optional
createdAt: numberThe timestamp of the quote's creation (optional).
Optional
referrer: stringThe address of the referrer (optional).
Static
calculateCalculates the hash of a quote. This is a static method.
The quote to hash.
The address of the pool.
The id of the chain.
The calculated hash of the quote.
Generated using TypeDoc
Represents a class for handling Orderbook (OB) related operations.