pub struct GetQuoteResponse {
pub data: GetQuoteResponseData,
}Expand description
GetQuoteResponse
JSON schema
{
"examples": [
{
"data": {
"result": {
"expires": "2024-04-15T12:30:00Z",
"quote_id": "QTE-12345-ABCDE",
"quoted_receive": null,
"quoted_spend": null,
"quoted_unit_price": null,
"receive": {
"asset": "BTC",
"asset_class": "currency",
"fee": "0.00000150",
"subtotal": "0.00149850",
"total": "0.00150000"
},
"spend": {
"asset": "USD",
"asset_class": "currency",
"fee": "1.00",
"subtotal": "99.00",
"total": "100.00"
},
"status": "accepted",
"transaction_id": "TXN-67890-FGHIJ",
"type": "spend",
"unit_price": {
"asset": "BTC",
"asset_class": "currency",
"denomination_asset": "USD",
"denomination_asset_class": "currency",
"unit_price": "66000.00"
}
}
}
}
],
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"result"
],
"properties": {
"error": {
"type": "array",
"items": {}
},
"errors": {
"type": "array",
"items": {}
},
"result": {
"type": [
"object",
"null"
],
"required": [
"expires",
"quote_id",
"quoted_receive",
"quoted_spend",
"quoted_unit_price",
"receive",
"spend",
"status",
"transaction_id",
"type",
"unit_price"
],
"properties": {
"expires": {
"type": "string",
"format": "date-time"
},
"quote_id": {
"type": "string"
},
"quoted_receive": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"quoted_spend": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"quoted_unit_price": {
"type": [
"object",
"null"
],
"required": [
"asset",
"asset_class",
"denomination_asset",
"denomination_asset_class",
"unit_price"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"denomination_asset": {
"type": "string",
"maxLength": 16
},
"denomination_asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"unit_price": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"receive": {
"type": "object",
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"spend": {
"type": "object",
"required": [
"asset",
"asset_class",
"fee",
"subtotal",
"total"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"fee": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"subtotal": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"total": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
},
"status": {
"oneOf": [
{
"type": "string",
"enum": [
"accepted",
"credit_transfer_complete",
"new",
"order_complete",
"quote_cancelled",
"quote_execution_failed"
]
},
{
"type": "object",
"required": [
"unknown"
],
"properties": {
"unknown": {
"type": "string"
}
}
}
]
},
"transaction_id": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"receive",
"spend"
]
},
"unit_price": {
"type": "object",
"required": [
"asset",
"asset_class",
"denomination_asset",
"denomination_asset_class",
"unit_price"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"denomination_asset": {
"type": "string",
"maxLength": 16
},
"denomination_asset_class": {
"type": [
"string",
"null"
],
"enum": [
"currency"
]
},
"unit_price": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
}
}
}
}
}
}
}Fields§
§data: GetQuoteResponseDataTrait Implementations§
Source§impl Clone for GetQuoteResponse
impl Clone for GetQuoteResponse
Source§fn clone(&self) -> GetQuoteResponse
fn clone(&self) -> GetQuoteResponse
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 GetQuoteResponse
impl Debug for GetQuoteResponse
Source§impl<'de> Deserialize<'de> for GetQuoteResponse
impl<'de> Deserialize<'de> for GetQuoteResponse
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<&GetQuoteResponse> for GetQuoteResponse
impl From<&GetQuoteResponse> for GetQuoteResponse
Source§fn from(value: &GetQuoteResponse) -> Self
fn from(value: &GetQuoteResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GetQuoteResponse
impl RefUnwindSafe for GetQuoteResponse
impl Send for GetQuoteResponse
impl Sync for GetQuoteResponse
impl Unpin for GetQuoteResponse
impl UnwindSafe for GetQuoteResponse
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