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
Captures estimated values for transfers where amounts can’t be guaranteed (e.g., USDC -> EURC).
The values in `estimate` are not modified after a transfer is executed. They are preserved as an immutable record of the original pre-execution snapshot.
The actual executed values are populated in the `transfer` resource post-execution.JSON schema
{
"description": "Captures estimated values for transfers where amounts can't be guaranteed (e.g., USDC -> EURC).\n\nThe values in `estimate` are not modified after a transfer is executed. They are preserved as an immutable record of the original pre-execution snapshot.\n\nThe actual executed values are populated in the `transfer` resource post-execution.",
"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§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