Skip to content

Commit

Permalink
chore: add iceberg ttl order example (#72)
Browse files Browse the repository at this point in the history
Co-authored-by: Rakesh R <[email protected]>
  • Loading branch information
ranjanrak and Rakesh R authored Sep 13, 2023
1 parent ee29a56 commit 929bc71
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion examples/example2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,27 @@ int main() {
// };
//! [placing an order]

//! [placing an iceberg order]
/* std::string orderId = Kite.placeOrder(kc::placeOrderParams()
.Symbol("SBIN")
.Exchange("NSE")
.TransactionType("BUY")
.OrderType("LIMIT")
.Price(580.0)
.Quantity(2000)
.Product("MIS")
.IcebergQuantity(1000)
.IcebergLegs(2)
.ValidityTtl(2)
.Variety(kc::VARIETY_ICEBERG)
.Validity(kc::VALIDITY_TTL));
if (!orderId.empty()) {
std::cout << "order ID: " << orderId << "\n";
} else {
std::cout << "failed to place iceberg order\n";
}; */
//! [placing an iceberg order]

//! [modifying an order]
// std::string modifiedOrderId =
// Kite.modifyOrder(kc::modifyOrderParams()
Expand Down Expand Up @@ -357,7 +378,8 @@ int main() {

//! [get sip info]
// kc::mfSip sip = Kite.getSip("555299391983723");
// std::cout << "SIP ID: " << sip.ID << " status:" << sip.status << '\n';
// std::cout << "SIP ID: " << sip.ID << " status:" << sip.status <<
// '\n';
//! [get sip info]

//! [cancel mf sip]
Expand Down

0 comments on commit 929bc71

Please sign in to comment.