pub struct PageResponseDexPoolSnapshot {
pub data: Vec<PageResponseDexPoolSnapshotDataItem>,
pub end_cursor: Option<String>,
pub has_next: Option<bool>,
pub has_prev: Option<bool>,
pub start_cursor: Option<String>,
}Expand description
Generic pagination response
JSON schema
{
"description": "Generic pagination response",
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"description": "Page data",
"type": "array",
"items": {
"description": "DEX pool liquidity snapshot",
"examples": [
{
"blockHeight": 123456789,
"blockSlot": 123456789,
"blockTimestamp": 1705312800000,
"poolAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
"snapshotTime": 1705312800000,
"tokenA": {
"amountInNative": "5000.123",
"amountInUsd": "1000000.45",
"decimals": 6,
"priceNative": "0.005",
"priceUsd": "1.0001",
"tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"vaultAmount": "1000000000000"
},
"tokenB": {
"amountInNative": "5000.123",
"amountInUsd": "1000000.45",
"decimals": 6,
"priceNative": "0.005",
"priceUsd": "1.0001",
"tokenAddress": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"vaultAmount": "1000000000000"
},
"tvlInNative": "5000",
"tvlInUsd": "1000000.45"
}
],
"type": "object",
"required": [
"blockHeight",
"blockTimestamp",
"poolAddress",
"snapshotTime",
"tokenA",
"tokenB",
"tvlInNative",
"tvlInUsd"
],
"properties": {
"blockHeight": {
"description": "Block height",
"type": "integer",
"format": "int64"
},
"blockSlot": {
"description": "Block slot (optional)",
"type": "integer",
"format": "int64"
},
"blockTimestamp": {
"description": "Block timestamp (ms)",
"type": "integer",
"format": "int64"
},
"poolAddress": {
"description": "Pool address",
"type": "string"
},
"snapshotTime": {
"description": "Snapshot timestamp (ms)",
"type": "integer",
"format": "int64"
},
"tokenA": {
"$ref": "#/components/schemas/DexPoolTokenSnapshot"
},
"tokenB": {
"$ref": "#/components/schemas/DexPoolTokenSnapshot"
},
"tvlInNative": {
"description": "TVL in native token",
"type": "string"
},
"tvlInUsd": {
"description": "TVL in USD",
"type": "string"
}
}
}
},
"endCursor": {
"description": "Cursor for the end of current page",
"examples": [
"eyJpZCI6ImVuZCJ9"
],
"type": "string"
},
"hasNext": {
"description": "Whether there is a next page",
"examples": [
false
],
"type": "boolean"
},
"hasPrev": {
"description": "Whether there is a previous page",
"examples": [
false
],
"type": "boolean"
},
"startCursor": {
"description": "Cursor for the start of current page",
"examples": [
"eyJpZCI6InN0YXJ0In0="
],
"type": "string"
}
}
}Fields§
§data: Vec<PageResponseDexPoolSnapshotDataItem>Page data
end_cursor: Option<String>Cursor for the end of current page
has_next: Option<bool>Whether there is a next page
has_prev: Option<bool>Whether there is a previous page
start_cursor: Option<String>Cursor for the start of current page
Implementations§
Trait Implementations§
Source§impl Clone for PageResponseDexPoolSnapshot
impl Clone for PageResponseDexPoolSnapshot
Source§fn clone(&self) -> PageResponseDexPoolSnapshot
fn clone(&self) -> PageResponseDexPoolSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageResponseDexPoolSnapshot
impl Debug for PageResponseDexPoolSnapshot
Source§impl<'de> Deserialize<'de> for PageResponseDexPoolSnapshot
impl<'de> Deserialize<'de> for PageResponseDexPoolSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
impl From<&PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
Source§fn from(value: &PageResponseDexPoolSnapshot) -> Self
fn from(value: &PageResponseDexPoolSnapshot) -> Self
Converts to this type from the input type.
Source§impl From<PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
impl From<PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
Source§fn from(value: PageResponseDexPoolSnapshot) -> Self
fn from(value: PageResponseDexPoolSnapshot) -> Self
Converts to this type from the input type.
Source§impl TryFrom<PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
impl TryFrom<PageResponseDexPoolSnapshot> for PageResponseDexPoolSnapshot
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PageResponseDexPoolSnapshot) -> Result<Self, ConversionError>
fn try_from(value: PageResponseDexPoolSnapshot) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PageResponseDexPoolSnapshot
impl RefUnwindSafe for PageResponseDexPoolSnapshot
impl Send for PageResponseDexPoolSnapshot
impl Sync for PageResponseDexPoolSnapshot
impl Unpin for PageResponseDexPoolSnapshot
impl UnsafeUnpin for PageResponseDexPoolSnapshot
impl UnwindSafe for PageResponseDexPoolSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more