1#[derive(Clone, Debug)]
2pub struct Config {
3 pub rest_api_endpoint: String,
4 pub ws_endpoint: String,
5
6 pub usdm_futures_rest_api_endpoint: String,
7 pub usdm_futures_ws_endpoint: String,
8
9 pub coinm_futures_rest_api_endpoint: String,
10 pub coinm_futures_ws_endpoint: String,
11
12 pub european_options_rest_api_endpoint: String,
13 pub european_options_ws_endpoint: String,
14
15 pub recv_window: u64,
16}
17
18impl Default for Config {
19 fn default() -> Self {
20 Self {
21 rest_api_endpoint: "https://api.binance.com".into(),
22 ws_endpoint: "wss://stream.binance.com:9443".into(),
23
24 usdm_futures_rest_api_endpoint: "https://fapi.binance.com".into(),
25 usdm_futures_ws_endpoint: "wss://fstream.binance.com".into(),
26
27 coinm_futures_rest_api_endpoint: "https://dapi.binance.com".into(),
28 coinm_futures_ws_endpoint: "wss://dstream.binance.com".into(),
29
30 european_options_rest_api_endpoint: "https://eapi.binance.com".into(),
31 european_options_ws_endpoint: "wss://estream.binance.com".into(),
32
33 recv_window: 5000,
34 }
35 }
36}
37
38impl Config {
39 pub fn testnet() -> Self {
40 todo!()
46 }
47}