pub struct TransferEstimate {
pub estimated_at: DateTime<Utc>,
pub exchange_rate: Option<TransferExchangeRate>,
pub fees: Option<TransferFees>,
pub target_amount: Option<String>,
pub target_asset: Option<Asset>,
}Expand description
A point-in-time snapshot of estimated values for a transfer where exact amounts cannot be locked in at quote time (e.g., when the executed rate is determined at execution time and moves with the market).
Present in both pre-execution and post-execution states:
* **Quoted state:** top-level fields whose values cannot be guaranteed are absent;
`estimate` holds their estimated values.
* **Completed state:** top-level fields contain the actual executed values;
`estimate` is retained as an immutable audit snapshot of the pre-execution estimate.JSON schema
{
"description": "A point-in-time snapshot of estimated values for a transfer where exact amounts cannot be locked in at quote time (e.g., when the executed rate is determined at execution time and moves with the market).\n\nPresent in both pre-execution and post-execution states:\n* **Quoted state:** top-level fields whose values cannot be guaranteed are absent;\n `estimate` holds their estimated values.\n\n* **Completed state:** top-level fields contain the actual executed values;\n `estimate` is retained as an immutable audit snapshot of the pre-execution estimate.",
"examples": [
{
"estimatedAt": "2023-10-08T14:30:00Z",
"exchangeRate": {
"rate": "0.85",
"sourceAsset": "usdc",
"targetAsset": "eur"
},
"fees": [
{
"amount": "0.01",
"asset": "usdc",
"type": "conversion"
}
],
"targetAmount": "85.00",
"targetAsset": "eur"
}
],
"type": "object",
"required": [
"estimatedAt"
],
"properties": {
"estimatedAt": {
"description": "The date and time when this estimate was captured.",
"examples": [
"2023-10-08T14:30:00Z"
],
"type": "string",
"format": "date-time"
},
"exchangeRate": {
"$ref": "#/components/schemas/TransferExchangeRate"
},
"fees": {
"$ref": "#/components/schemas/TransferFees"
},
"targetAmount": {
"description": "Estimated amount of the target asset that will be received, as a decimal string in standard unit denomination.",
"examples": [
"85.00"
],
"type": "string"
},
"targetAsset": {
"description": "The asset symbol of the estimated target amount.",
"examples": [
"eur"
],
"allOf": [
{
"$ref": "#/components/schemas/Asset"
}
]
}
}
}Fields§
§estimated_at: DateTime<Utc>The date and time when this estimate was captured.
exchange_rate: Option<TransferExchangeRate>§fees: Option<TransferFees>§target_amount: Option<String>Estimated amount of the target asset that will be received, as a decimal string in standard unit denomination.
target_asset: Option<Asset>The asset symbol of the estimated target amount.
Implementations§
Source§impl TransferEstimate
impl TransferEstimate
pub fn builder() -> TransferEstimate
Trait Implementations§
Source§impl Clone for TransferEstimate
impl Clone for TransferEstimate
Source§fn clone(&self) -> TransferEstimate
fn clone(&self) -> TransferEstimate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TransferEstimate
impl Debug for TransferEstimate
Source§impl<'de> Deserialize<'de> for TransferEstimate
impl<'de> Deserialize<'de> for TransferEstimate
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<&TransferEstimate> for TransferEstimate
impl From<&TransferEstimate> for TransferEstimate
Source§fn from(value: &TransferEstimate) -> Self
fn from(value: &TransferEstimate) -> Self
Converts to this type from the input type.
Source§impl From<TransferEstimate> for TransferEstimate
impl From<TransferEstimate> for TransferEstimate
Source§fn from(value: TransferEstimate) -> Self
fn from(value: TransferEstimate) -> Self
Converts to this type from the input type.
Source§impl Serialize for TransferEstimate
impl Serialize for TransferEstimate
Source§impl TryFrom<TransferEstimate> for TransferEstimate
impl TryFrom<TransferEstimate> for TransferEstimate
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: TransferEstimate) -> Result<Self, ConversionError>
fn try_from(value: TransferEstimate) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TransferEstimate
impl RefUnwindSafe for TransferEstimate
impl Send for TransferEstimate
impl Sync for TransferEstimate
impl Unpin for TransferEstimate
impl UnsafeUnpin for TransferEstimate
impl UnwindSafe for TransferEstimate
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