upbit/response/
order_chance.rs1use serde::{Deserialize, Serialize};
2
3use crate::{
4 api_exchange::OrderSide,
5 constant::{AskType, BidType},
6};
7
8use super::accounts_info::*;
9
10#[derive(Serialize, Deserialize, Debug)]
12pub struct ObjectMarket {
13 pub id: String,
14 pub name: String,
15 pub ask_types: Option<Vec<AskType>>,
17 pub bid_types: Option<Vec<BidType>>,
18 pub order_sides: Vec<OrderSide>,
19 pub bid: ObjectAskBid,
20 pub ask: ObjectAskBid,
21 pub max_total: u64,
22 pub state: String,
23}
24
25#[derive(Serialize, Deserialize, Debug)]
27pub struct ObjectAskBid {
28 pub currency: String,
29 pub price_unit: Option<String>,
30 pub min_total: u32,
31}
32
33#[derive(Serialize, Deserialize, Debug)]
35pub struct OrderChance {
36 pub bid_fee: f32,
37 pub ask_fee: f32,
38 pub market: ObjectMarket,
39 pub bid_account: AccountsInfo,
40 pub ask_account: AccountsInfo,
41 pub maker_bid_fee: f32,
42 pub maker_ask_fee: f32,
43}
44
45#[derive(Deserialize)]
47pub struct ObjectMarketSource {
48 pub id: String,
49 pub name: String,
50 pub order_types: Vec<String>,
51 pub order_sides: Vec<String>,
52 pub ask_types: Option<Vec<String>>,
53 pub bid_types: Option<Vec<String>>,
54 pub bid: ObjectAskBidSource,
55 pub ask: ObjectAskBidSource,
56 pub max_total: String,
57 pub state: String,
58}
59
60#[derive(Deserialize)]
62pub struct ObjectAskBidSource {
63 pub currency: String,
64 pub price_unit: Option<String>,
65 pub min_total: String,
66}
67
68#[derive(Deserialize)]
70pub struct OrderChanceSource {
71 pub bid_fee: String,
72 pub ask_fee: String,
73 pub market: ObjectMarketSource,
74 pub ask_types: Option<Vec<String>>,
75 pub bid_types: Option<Vec<String>>,
76 pub bid_account: AccountsInfoSource,
77 pub ask_account: AccountsInfoSource,
78 pub maker_bid_fee: String,
79 pub maker_ask_fee: String,
80}