pub struct FuturesOrderHistoryResponse {
pub result: Option<KrakenApiResult>,
pub error: Option<String>,
pub server_time: Option<String>,
pub elements: Option<Vec<FuturesOrderHistoryElement>>,
pub continuation_token: Option<String>,
}Expand description
Response from the Kraken Futures order history endpoint, /api/history/v3/orders.
Each element carries one lifecycle event keyed by its kind, and the order inside it names the
contract as tradeable and the side as direction, with millisecond timestamps. The venue
can answer with a success status and an error body, so result and error are read before
the shape is checked; see Self::into_order_events.
Fields§
§result: Option<KrakenApiResult>§error: Option<String>§server_time: Option<String>§elements: Option<Vec<FuturesOrderHistoryElement>>§continuation_token: Option<String>Implementations§
Source§impl FuturesOrderHistoryResponse
impl FuturesOrderHistoryResponse
Sourcepub fn into_order_events(
self,
) -> Result<FuturesOrderEventsResponse, KrakenHttpError>
pub fn into_order_events( self, ) -> Result<FuturesOrderEventsResponse, KrakenHttpError>
Projects each element onto the event wrapper the readers consume.
A venue error reported with a success status fails the read with the venue’s reason, and a
body without an elements array fails it as a parse error, so neither reads as an empty
page. An update, and a refused edit, are represented by the order as it stands afterwards.
A not-found event carries no order state and is skipped. A kind the documentation does not
list, an order whose direction the venue could not decode, an order whose type is missing
or reported as Unknown, and an order with a timestamp before the epoch may carry order
state the projection cannot read, so each is skipped with a warning and counted in
skipped_rows, which leaves the set incomplete. Unknown is how the venue reports a
source type it could not decode, so it establishes no order type, and in particular not a
market order. The venue fills the required limitPrice of a market order with a zero or
an empty string and a missing client id with an empty string, so a market-like order (a
market order or a venue-initiated kind) carries no price and an empty client id is
None; a limit order keeps its price even at zero, since futures instruments allow
non-positive prices. The contract name is kept as the venue spells it;
the readers resolve it case-insensitively. The history order carries no trigger price, and
the engine cannot materialize a stop order without one, so a stop row is reported as the
limit or market order it executes as once triggered.
§Errors
Returns an error if the body carries a venue error or has no elements array.
Trait Implementations§
Source§impl Clone for FuturesOrderHistoryResponse
impl Clone for FuturesOrderHistoryResponse
Source§impl Debug for FuturesOrderHistoryResponse
impl Debug for FuturesOrderHistoryResponse
Source§impl<'de> Deserialize<'de> for FuturesOrderHistoryResponse
impl<'de> Deserialize<'de> for FuturesOrderHistoryResponse
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>,
Auto Trait Implementations§
impl Freeze for FuturesOrderHistoryResponse
impl RefUnwindSafe for FuturesOrderHistoryResponse
impl Send for FuturesOrderHistoryResponse
impl Sync for FuturesOrderHistoryResponse
impl Unpin for FuturesOrderHistoryResponse
impl UnsafeUnpin for FuturesOrderHistoryResponse
impl UnwindSafe for FuturesOrderHistoryResponse
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more