pub struct OrderQueryBuilder { /* private fields */ }Expand description
Provider-native request, response, order, position, trade, and market-data models.
Provider-native request, response, order, position, trade, and market-data models.
Provider-native request, response, order, position, trade, and market-data models.
Builder for a validated OrderQuery.
Implementations§
Source§impl OrderQueryBuilder
impl OrderQueryBuilder
Sourcepub fn statuses(self, statuses: impl IntoIterator<Item = OrderStatus>) -> Self
pub fn statuses(self, statuses: impl IntoIterator<Item = OrderStatus>) -> Self
Replaces the lifecycle-status filter.
Sourcepub fn contract_id(self, contract_id: ContractId) -> Self
pub fn contract_id(self, contract_id: ContractId) -> Self
Restricts results to one provider contract.
Sourcepub const fn created_after(self, created_after: Timestamp) -> Self
pub const fn created_after(self, created_after: Timestamp) -> Self
Sets the lower creation-time bound.
Sourcepub const fn created_before(self, created_before: Timestamp) -> Self
pub const fn created_before(self, created_before: Timestamp) -> Self
Sets the upper creation-time bound.
Sourcepub const fn page_size(self, page_size: i32) -> Self
pub const fn page_size(self, page_size: i32) -> Self
Sets the positive number of orders requested per page.
Sourcepub const fn page_offset(self, page_offset: i32) -> Self
pub const fn page_offset(self, page_offset: i32) -> Self
Sets the non-negative result offset.
Sourcepub const fn sort_by(self, sort_by: OrderSortBy) -> Self
pub const fn sort_by(self, sort_by: OrderSortBy) -> Self
Selects the result sort field.
Sourcepub const fn sort_direction(self, sort_direction: OrderSortDirection) -> Self
pub const fn sort_direction(self, sort_direction: OrderSortDirection) -> Self
Selects the result sort direction.
Sourcepub const fn include_total_count(self, include: bool) -> Self
pub const fn include_total_count(self, include: bool) -> Self
Selects whether the response should include a total matching count.
Sourcepub fn build(self) -> Result<OrderQuery, RequestValidationError>
pub fn build(self) -> Result<OrderQuery, RequestValidationError>
Validates and builds the v2 order query.
§Errors
Returns an error for an unknown request-status code, a creation range that does not increase, a non-positive page size, or a negative page offset.