Skip to main content
Version: 2.0.4

Quote

QuoteResponse

The QuoteResponse type represents the response from the quote API. It contains the following properties:

PropertyTypeDescription
quotes{ [strategy_id: string]: string }Map of strategy IDs to their corresponding quotes
input_token_pricenumberThe price of the input token
output_token_pricenumberThe price of the output token

Strategies

The Strategies type represents a mapping of OrderPair identifiers to their corresponding strategy details. Each strategy provides specific limits and fees associated with it. The structure is as follows:

Type Definition

export type Strategies = Record<
string,
{
id: string;
minAmount: string;
maxAmount: string;
fee: number;
}
>;

Explanation

  • Key: A string representing the OrderPair for which the strategy is applicable.
  • Value: An object containing the following properties:
PropertyTypeDescription
idstringUnique identifier for the strategy.
minAmountstringMinimum amount allowed for the strategy (as a string).
maxAmountstringMaximum amount allowed for the strategy (as a string).
feenumberFee percentage applied to the strategy.