CPPKiteConnect
userconstants.hpp
Go to the documentation of this file.
1 /*
2  * Licensed under the MIT License <http://opensource.org/licenses/MIT>.
3  * SPDX-License-Identifier: MIT
4  *
5  * Copyright (c) 2020-2022 Bhumit Attarde
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11  * and/or sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in
15  * all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
20  * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
22  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
23  * USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */
25 
26 #pragma once
27 
33 #include <string>
34 
35 namespace kiteconnect {
36 // NOLINTBEGIN(cert-err58-cpp)
37 
38 using std::string;
39 
40 // Products
41 const string PRODUCT_MIS = "MIS";
42 const string PRODUCT_CNC = "CNC";
43 const string PRODUCT_NRML = "NRML";
44 const string PRODUCT_CO = "CO";
45 const string PRODUCT_BO = "BO";
46 
47 // Order types
48 const string ORDER_TYPE_MARKET = "MARKET";
49 const string ORDER_TYPE_LIMIT = "LIMIT";
50 const string ORDER_TYPE_SLM = "SL-M";
51 const string ORDER_TYPE_SL = "SL";
52 
53 // Varities
54 const string VARIETY_REGULAR = "regular";
55 const string VARIETY_BO = "bo";
56 const string VARIETY_CO = "co";
57 const string VARIETY_AMO = "amo";
58 const string VARIETY_ICEBERG = "iceberg";
59 
60 // Transaction type
61 const string TRANSACTION_TYPE_BUY = "BUY";
62 const string TRANSACTION_TYPE_SELL = "SELL";
63 
64 // Validity
65 const string VALIDITY_DAY = "DAY";
66 const string VALIDITY_IOC = "IOC";
67 const string VALIDITY_TTL = "TTL";
68 
69 // Exchanges
70 const string EXCHANGE_NSE = "NSE";
71 const string EXCHANGE_BSE = "BSE";
72 const string EXCHANGE_NFO = "NFO";
73 const string EXCHANGE_CDS = "CDS";
74 const string EXCHANGE_BFO = "BFO";
75 const string EXCHANGE_MCX = "MCX";
76 
77 // Margins segments
78 const string MARGIN_EQUITY = "equity";
79 const string MARGIN_COMMODITY = "commodity";
80 
81 // Status constants
82 const string STATUS_COMPLETE = "COMPLETE";
83 const string STATUS_REJECTED = "REJECTED";
84 const string STATUS_CANCELLED = "CANCELLED";
85 
86 // GTT order type
87 const string GTT_TYPE_OCO = "two-leg";
88 const string GTT_TYPE_SINGLE = "single";
89 
90 // GTT order status
91 const string GTT_STATUS_ACTIVE = "active";
92 const string GTT_STATUS_TRIGGERED = "triggered";
93 const string GTT_STATUS_DISABLED = "disabled";
94 const string GTT_STATUS_EXPIRED = "expired";
95 const string GTT_STATUS_CANCELLED = "cancelled";
96 const string GTT_STATUS_REJECTED = "rejected";
97 const string GTT_STATUS_DELETED = "deleted";
98 
99 // kiteWS modes
100 const string MODE_LTP = "ltp";
101 const string MODE_QUOTE = "quote";
102 const string MODE_FULL = "full";
103 
104 // NOLINTEND(cert-err58-cpp)
105 } // namespace kiteconnect