pub struct GetPositionInfoParams {
pub category: Category,
pub symbol: Option<String>,
pub base_coin: Option<String>,
pub settle_coin: Option<String>,
pub limit: Option<u64>,
pub cursor: Option<String>,
}Expand description
Query parameters of GET /v5/position/list (Client::get_position_info).
Fields§
§category: CategoryProduct type UTA2.0, UTA1.0: linear, inverse, option Classic account: linear, inverse
symbol: Option<String>Symbol name, like BTCUSDT, uppercase only If symbol passed, it returns data regardless of having position or not. If symbol=null and settleCoin specified, it returns position size greater than zero.
base_coin: Option<String>Base coin, uppercase only. option only. Return all option positions if not passed
settle_coin: Option<String>Settle coin linear: either symbol or settleCoin is required. symbol has a higher priority
limit: Option<u64>Limit for data size per page. [1, 200]. Default: 20
cursor: Option<String>Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set
Implementations§
Source§impl GetPositionInfoParams
impl GetPositionInfoParams
Sourcepub fn new(category: Category) -> Self
pub fn new(category: Category) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_symbol(self, v: impl Into<String>) -> Self
pub fn with_symbol(self, v: impl Into<String>) -> Self
Set symbol: symbol name, like BTCUSDT, uppercase only If symbol passed, it returns data regardless of having position or not. If symbol=null and settleCoin specified, it returns position size greater than zero.
Sourcepub fn with_base_coin(self, v: impl Into<String>) -> Self
pub fn with_base_coin(self, v: impl Into<String>) -> Self
Set base_coin: base coin, uppercase only. option only. Return all option positions if not passed.
Sourcepub fn with_settle_coin(self, v: impl Into<String>) -> Self
pub fn with_settle_coin(self, v: impl Into<String>) -> Self
Set settle_coin: settle coin linear: either symbol or settleCoin is required. symbol has a higher priority.
Sourcepub fn with_limit(self, v: u64) -> Self
pub fn with_limit(self, v: u64) -> Self
Set limit: limit for data size per page. [1, 200]. Default: 20.
Sourcepub fn with_cursor(self, v: impl Into<String>) -> Self
pub fn with_cursor(self, v: impl Into<String>) -> Self
Set cursor: cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set.