Skip to content

Commit 929bc71

Browse files
ranjanrakRakesh R
andauthored
chore: add iceberg ttl order example (#72)
Co-authored-by: Rakesh R <rakesh.ranjan@zerodha.com>
1 parent ee29a56 commit 929bc71

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

examples/example2.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,27 @@ int main() {
104104
// };
105105
//! [placing an order]
106106

107+
//! [placing an iceberg order]
108+
/* std::string orderId = Kite.placeOrder(kc::placeOrderParams()
109+
.Symbol("SBIN")
110+
.Exchange("NSE")
111+
.TransactionType("BUY")
112+
.OrderType("LIMIT")
113+
.Price(580.0)
114+
.Quantity(2000)
115+
.Product("MIS")
116+
.IcebergQuantity(1000)
117+
.IcebergLegs(2)
118+
.ValidityTtl(2)
119+
.Variety(kc::VARIETY_ICEBERG)
120+
.Validity(kc::VALIDITY_TTL));
121+
if (!orderId.empty()) {
122+
std::cout << "order ID: " << orderId << "\n";
123+
} else {
124+
std::cout << "failed to place iceberg order\n";
125+
}; */
126+
//! [placing an iceberg order]
127+
107128
//! [modifying an order]
108129
// std::string modifiedOrderId =
109130
// Kite.modifyOrder(kc::modifyOrderParams()
@@ -357,7 +378,8 @@ int main() {
357378

358379
//! [get sip info]
359380
// kc::mfSip sip = Kite.getSip("555299391983723");
360-
// std::cout << "SIP ID: " << sip.ID << " status:" << sip.status << '\n';
381+
// std::cout << "SIP ID: " << sip.ID << " status:" << sip.status <<
382+
// '\n';
361383
//! [get sip info]
362384

363385
//! [cancel mf sip]

0 commit comments

Comments
 (0)