pub struct RequestQuoteResponse {
pub data: RequestQuoteResponseData,
}Expand description
RequestQuoteResponse
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": "new",
"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",
"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"
}
}
}
]
},
"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: RequestQuoteResponseDataTrait Implementations§
Source§impl Clone for RequestQuoteResponse
impl Clone for RequestQuoteResponse
Source§fn clone(&self) -> RequestQuoteResponse
fn clone(&self) -> RequestQuoteResponse
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 RequestQuoteResponse
impl Debug for RequestQuoteResponse
Source§impl<'de> Deserialize<'de> for RequestQuoteResponse
impl<'de> Deserialize<'de> for RequestQuoteResponse
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<&RequestQuoteResponse> for RequestQuoteResponse
impl From<&RequestQuoteResponse> for RequestQuoteResponse
Source§fn from(value: &RequestQuoteResponse) -> Self
fn from(value: &RequestQuoteResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestQuoteResponse
impl RefUnwindSafe for RequestQuoteResponse
impl Send for RequestQuoteResponse
impl Sync for RequestQuoteResponse
impl Unpin for RequestQuoteResponse
impl UnwindSafe for RequestQuoteResponse
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