deriv_api_schema/buy.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/buy/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7
8
9
10
11// Import shared types from the *same* crate
12
13// It's a struct
14/// Receipt confirmation for the purchase
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct Buy {
18 /// The new account balance after completion of the purchase\n
19 // Correct serde attribute construction - Use helper
20
21 pub balance_after: f64,
22 /// Actual effected purchase price\n
23 // Correct serde attribute construction - Use helper
24
25 pub buy_price: String,
26 /// Internal contract identifier\n
27 // Correct serde attribute construction - Use helper
28
29 pub contract_id: i64,
30 /// The description of contract purchased\n
31 // Correct serde attribute construction - Use helper
32
33 pub longcode: String,
34 /// Proposed payout value\n
35 // Correct serde attribute construction - Use helper
36
37 pub payout: String,
38 /// Epoch value of the transaction purchase time\n
39 // Correct serde attribute construction - Use helper
40
41 pub purchase_time: String,
42 /// Compact description of the contract purchased\n
43 // Correct serde attribute construction - Use helper
44
45 pub shortcode: String,
46 /// Epoch value showing the expected start time of the contract\n
47 // Correct serde attribute construction - Use helper
48
49 pub start_time: String,
50 /// Internal transaction identifier\n
51 // Correct serde attribute construction - Use helper
52
53 pub transaction_id: i64,
54}
55