pub struct MovePositionRequest<'a> {
pub from_uid: u64,
pub to_uid: u64,
pub list: Vec<PositionItem<'a>>,
}Expand description
Parameters for moving a position between accounts.
Used to construct a request to the /v5/position/move-position endpoint to transfer a position from one Bybit account (UID) to another. Bots use this for portfolio management, such as consolidating positions or transferring risk between accounts in perpetual futures trading.
Fields§
§from_uid: u64The source account UID.
The unique identifier of the account from which the position is being transferred. Bots must ensure this UID has sufficient permissions and position size.
to_uid: u64The destination account UID.
The unique identifier of the account to which the position is being transferred. Bots must verify the destination account is eligible to receive the position.
list: Vec<PositionItem<'a>>A list of positions to move.
Contains the details of each position to transfer, including symbol, price, side, and quantity. Bots should populate this with valid PositionItem structs to specify the exact positions to move.
Implementations§
Source§impl<'a> MovePositionRequest<'a>
impl<'a> MovePositionRequest<'a>
Sourcepub fn new(from_uid: u64, to_uid: u64, list: Vec<PositionItem<'a>>) -> Self
pub fn new(from_uid: u64, to_uid: u64, list: Vec<PositionItem<'a>>) -> Self
Constructs a new MovePosition request with specified parameters.
Allows customization of the position transfer request. Bots should use this to specify the source and destination UIDs and the list of positions to move.
Sourcepub fn default() -> MovePositionRequest<'a>
pub fn default() -> MovePositionRequest<'a>
Creates a default MovePosition request.
Returns a request with from_uid and to_uid set to 0 and an empty position list. Suitable for testing but should be customized with valid UIDs and positions for production.
Trait Implementations§
Source§impl<'a> Clone for MovePositionRequest<'a>
impl<'a> Clone for MovePositionRequest<'a>
Source§fn clone(&self) -> MovePositionRequest<'a>
fn clone(&self) -> MovePositionRequest<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more