LiquidityPoolPriceResponse class

Represents a price in a liquidity pool as a rational number.

Prices in liquidity pools are represented as fractions (numerator/denominator) to maintain precision. This is used in deposit and withdraw operations to specify acceptable price ranges for the exchange rate between pooled assets.

The actual price is calculated as: n / d

Example: If n = 3 and d = 2, the price is 1.5 (meaning 1.5 units of asset A per 1 unit of asset B)

Inheritance

Constructors

LiquidityPoolPriceResponse(int n, int d)
Creates a LiquidityPoolPriceResponse from Horizon API data.
LiquidityPoolPriceResponse.fromJson(Map<String, dynamic> json)
Deserializes a liquidity pool price response from JSON.
factory

Properties

d int
Price denominator
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
n int
Price numerator
getter/setter pair
rateLimitLimit int?
Maximum number of requests allowed in the current rate limit window.
getter/setter pairinherited
rateLimitRemaining int?
Number of requests remaining in the current rate limit window.
getter/setter pairinherited
rateLimitReset int?
Unix timestamp when the rate limit window will reset.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setHeaders(Map<String, String> headers) → void
Populates rate limit fields from HTTP response headers.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited