pub enum Objective {
Acquire {
asset_id: String,
target_notional: u128,
max_unit_price: u128,
},
Exit {
asset_id: String,
quantity: u128,
min_unit_price: u128,
},
Rebalance {
targets: Vec<AssetWeight>,
},
Hedge {
asset_id: String,
notional: u128,
instrument: String,
},
Yield {
asset_id: String,
amount: u128,
min_apy_bps: u32,
},
}Expand description
The financial objective an intent expresses. Amounts are in the smallest unit of the quote asset (notional) or the asset itself (quantity).
Variants§
Acquire
Acquire up to target_notional of asset_id, paying at most max_unit_price.
Exit
Sell quantity of asset_id, accepting at least min_unit_price.
Rebalance
Rebalance the principal’s holdings toward the given target weights.
Fields
§
targets: Vec<AssetWeight>Hedge
Open a hedge of notional against asset_id using instrument.
Yield
Deploy amount of asset_id into a yield venue at >= min_apy_bps.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Objective
impl<'de> Deserialize<'de> for Objective
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
impl Eq for Objective
impl StructuralPartialEq for Objective
Auto Trait Implementations§
impl Freeze for Objective
impl RefUnwindSafe for Objective
impl Send for Objective
impl Sync for Objective
impl Unpin for Objective
impl UnsafeUnpin for Objective
impl UnwindSafe for Objective
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