bybit_rust_api/rest/enums/
copy_trading.rs

1use std::fmt::{Display, Formatter, Result};
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Deserialize, PartialEq)]
6pub enum CopyTrading {
7    #[serde(rename = "none")]
8    None, // Regardless of normal account or UTA account, this trading pair does not support copy trading
9    #[serde(rename = "both")]
10    Both, // For both normal account and UTA account, this trading pair supports copy trading
11    #[serde(rename = "utaOnly")]
12    UtaOnly, // Only for UTA account,this trading pair supports copy trading
13    #[serde(rename = "normalSpotOnly")]
14    NormalSpotOnly, // Only for normal account, this trading pair supports copy trading
15}
16
17impl Display for CopyTrading {
18    fn fmt(&self, f: &mut Formatter) -> Result {
19        match self {
20            CopyTrading::None => write!(f, "none"),
21            CopyTrading::Both => write!(f, "both"),
22            CopyTrading::UtaOnly => write!(f, "utaOnly"),
23            CopyTrading::NormalSpotOnly => write!(f, "normalSpotOnly"),
24        }
25    }
26}