1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use serde::{Deserialize, Serialize};

use crate::market::{SpotMarketIdentifier, SpotMarketTradingFee, SpotMarketTradingSettings};
use crate::{AssetAmount, SpotMarketId, WalletRegisterId};

/// Register market
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct SpotMarketRegistration {
    /// Spot market identifier
    pub identifier: SpotMarketIdentifier,

    /// Base asset quantity
    pub base_asset_quantity: AssetAmount,

    /// Quote asset quantity
    pub quote_asset_quantity: AssetAmount,

    /// Market trading settings
    pub trading_settings: SpotMarketTradingSettings,
}

/// Update spot market trading settings
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpdateSpotMarketTradingSettings {
    /// Market id
    pub market_id: SpotMarketId,

    /// Market trading settings
    pub trading_settings: SpotMarketTradingSettings,
}

/// Update spot market initial trading fee
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpdateSpotMarketInitialTradingFee {
    /// Fee
    pub fee: SpotMarketTradingFee,
}

/// Update spot market initial fee to
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpdateSpotMarketInitialFeeTo {
    /// Fee to
    pub fee_to: WalletRegisterId,
}

/// Update spot market fee to
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpdateSpotMarketFeeTo {
    /// Market id
    pub market_id: SpotMarketId,

    /// Fee to
    pub fee_to: WalletRegisterId,
}

/// Update market fee
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct UpdateSpotMarketTradingFee {
    /// Market id
    pub market_id: SpotMarketId,

    /// Fee
    pub fee: SpotMarketTradingFee,
}