cripsy_binary_api/broker/iq_option/
endpoints.rs1pub fn api_base_url(auth_host: &str) -> String {
5 format!("https://{auth_host}/api")
6}
7
8pub const LOGIN_PATH: &str = "/v2/login";
10
11pub fn ws_url(ws_host: &str) -> String {
12 format!("wss://{ws_host}/echo/websocket")
13}
14
15pub mod msg {
17 pub const SSID: &str = "ssid";
19 pub const PROFILE: &str = "profile";
21 pub const BALANCES: &str = "balances";
23 pub const TIME_SYNC: &str = "timeSync";
25 pub const GET_INITIALIZATION_DATA: &str = "get-initialization-data";
27 pub const INITIALIZATION_DATA: &str = "initialization-data";
28 pub const API_OPTION_INIT_ALL: &str = "api_option_init_all";
30 pub const API_OPTION_INIT_ALL_RESULT: &str = "api_option_init_all_result";
31 pub const GET_CANDLES: &str = "get-candles";
33 pub const QUOTES_HISTORY_GET_CANDLES: &str = "quotes-history.get-candles";
34 pub const CANDLES: &str = "candles";
35 pub const CANDLE_GENERATED: &str = "candle-generated";
37 pub const CANDLES_GENERATED: &str = "candles-generated";
38 pub const BALANCE_CHANGED: &str = "balance-changed";
39 pub const TRADERS_MOOD_CHANGED: &str = "traders-mood-changed";
40 pub const TRADERS_MOOD: &str = "traders-mood";
41 pub const TOP_ASSETS_UPDATED: &str = "top-assets-updated";
42 pub const PRICE_SPLITTER: &str = "price-splitter.client-price-generated";
43 pub const CLIENT_PRICE_GENERATED: &str = "client-price-generated";
45 pub const OPEN_OPTION: &str = "binary-options.open-option";
47 pub const PLACE_DIGITAL_OPTION: &str = "digital-options.place-digital-option";
48 pub const DIGITAL_OPTION_PLACED: &str = "digital-option-placed";
49 pub const BUY_COMPLETE: &str = "buyComplete";
50 pub const OPTION: &str = "option";
51 pub const OPTION_OPENED: &str = "option-opened";
52 pub const OPTION_CLOSED: &str = "option-closed";
53 pub const SOCKET_OPTION_OPENED: &str = "socket-option-opened";
54 pub const SOCKET_OPTION_CLOSED: &str = "socket-option-closed";
55 pub const LIVE_DEAL: &str = "live-deal";
57 pub const LIVE_DEAL_BINARY: &str = "live-deal-binary-option-placed";
58 pub const COMMISSION_CHANGED: &str = "commission-changed";
59
60 pub const POSITION_CHANGED: &str = "position-changed";
62 pub const SELL_OPTIONS: &str = "sell-options";
64 pub const SOLD_OPTIONS: &str = "sold-options";
65
66 pub const PORTFOLIO_GET_HISTORY: &str = "portfolio.get-history-positions";
68 pub const HISTORY_POSITIONS: &str = "history-positions";
69
70 pub const GET_FINANCIAL_INFORMATION: &str = "get-financial-information";
72 pub const FINANCIAL_INFORMATION: &str = "financial-information";
73
74 pub const TECHNICAL_INDICATORS: &str = "trading-signals.get-technical-indicators";
77 pub const TECHNICAL_INDICATORS_RESPONSE: &str = "technical-indicators";
78 pub const SEND_MESSAGE: &str = "sendMessage";
80 pub const SUBSCRIBE_MESSAGE: &str = "subscribeMessage";
81 pub const API_PROFILE_CHANGEBALANCE: &str = "api_profile_changebalance";
83 pub const GET_BALANCES: &str = "get-balances";
84}
85
86pub mod option_type_id {
88 pub const BINARY: u32 = 1;
89 pub const TURBO: u32 = 3;
90 pub const BLITZ: u32 = 12;
91}
92
93pub mod balance_type {
95 pub const REAL: i64 = 1;
96 pub const PRACTICE: i64 = 4;
97}
98
99pub const ASSET_NAME_PREFIX: &str = "front.";