pub struct GetPortfolioDetailsResponse {
pub data: GetPortfolioDetailsResponseData,
}Expand description
GetPortfolioDetailsResponse
JSON schema
{
"examples": [
{
"data": {
"result": {
"assets": [
{
"asset": "BTC",
"avail_trade": "0.15000000",
"avail_trade_value": "9900.00",
"avg_entry_price": "65000.00",
"cash_balance": "0.15000000",
"cash_value": "9900.00",
"class": "currency",
"cost_basis": "9750.00",
"held_orders_spot": "0.00000000",
"index_price": "66000.00",
"lots_upnl": "0.00"
}
],
"currency": "USD",
"timestamp": "2024-04-15T12:00:00Z"
}
}
}
],
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"result"
],
"properties": {
"error": {
"type": "array",
"items": {}
},
"errors": {
"type": "array",
"items": {}
},
"result": {
"type": [
"object",
"null"
],
"required": [
"assets",
"currency",
"timestamp"
],
"properties": {
"assets": {
"type": "array",
"items": {
"type": "object",
"required": [
"asset",
"avail_trade",
"avail_trade_value",
"cash_balance",
"cash_value",
"class",
"held_orders_spot",
"index_price",
"lots_upnl"
],
"properties": {
"asset": {
"type": "string",
"maxLength": 16
},
"avail_trade": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"avail_trade_value": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"avg_entry_price": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"cash_balance": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"cash_value": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"class": {
"type": [
"string",
"null"
],
"enum": [
"bond",
"commodity",
"currency",
"derivative",
"stock"
]
},
"cost_basis": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"credit_line_available": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"credit_line_used": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"held_orders_spot": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"index_price": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
},
"lots_upnl": {
"type": [
"string",
"null"
],
"maxLength": 64,
"minLength": 1,
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
}
}
},
"currency": {
"type": "string",
"maxLength": 16
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}
}
}
}Fields§
§data: GetPortfolioDetailsResponseDataTrait Implementations§
Source§impl Clone for GetPortfolioDetailsResponse
impl Clone for GetPortfolioDetailsResponse
Source§fn clone(&self) -> GetPortfolioDetailsResponse
fn clone(&self) -> GetPortfolioDetailsResponse
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 GetPortfolioDetailsResponse
impl Debug for GetPortfolioDetailsResponse
Source§impl<'de> Deserialize<'de> for GetPortfolioDetailsResponse
impl<'de> Deserialize<'de> for GetPortfolioDetailsResponse
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<&GetPortfolioDetailsResponse> for GetPortfolioDetailsResponse
impl From<&GetPortfolioDetailsResponse> for GetPortfolioDetailsResponse
Source§fn from(value: &GetPortfolioDetailsResponse) -> Self
fn from(value: &GetPortfolioDetailsResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GetPortfolioDetailsResponse
impl RefUnwindSafe for GetPortfolioDetailsResponse
impl Send for GetPortfolioDetailsResponse
impl Sync for GetPortfolioDetailsResponse
impl Unpin for GetPortfolioDetailsResponse
impl UnwindSafe for GetPortfolioDetailsResponse
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