fireblocks_sdk/models/retry_requote_request_details.rs
1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RetryRequoteRequestDetails {
16 /// Indicates that the order should be re-quoted if the original quote is
17 /// expired, trying to match the original quote.
18 #[serde(rename = "type")]
19 pub r#type: Type,
20 /// If quote is expired, how many times to re-generate new quotes to try
21 /// having the order executed as in the original quote.
22 #[serde(rename = "count")]
23 pub count: f64,
24 /// Slippage tolerance in basis points (bps) for quote orders - 1 is 0.01%
25 /// and 10000 is 100%
26 #[serde(rename = "slippageBps", skip_serializing_if = "Option::is_none")]
27 pub slippage_bps: Option<f64>,
28}
29
30impl RetryRequoteRequestDetails {
31 pub fn new(r#type: Type, count: f64) -> RetryRequoteRequestDetails {
32 RetryRequoteRequestDetails {
33 r#type,
34 count,
35 slippage_bps: None,
36 }
37 }
38}
39/// Indicates that the order should be re-quoted if the original quote is
40/// expired, trying to match the original quote.
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43 #[serde(rename = "RETRY")]
44 Retry,
45}
46
47impl Default for Type {
48 fn default() -> Type {
49 Self::Retry
50 }
51}