Skip to content

Commit 7ab7aa5

Browse files
committed
modify order util
1 parent 67772d0 commit 7ab7aa5

File tree

5 files changed

+817
-773
lines changed

5 files changed

+817
-773
lines changed

demo/openapi_cpp_test/openapi_cpp_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class TestTradeClient {
5858

5959
static void test_place_order(const std::shared_ptr<TradeClient>& trade_client) {
6060
Contract contract = ContractUtil::stock_contract(U("AAPL"), U("USD"));
61-
Order order = limit_order(contract, U("BUY"), 1, 100.0);
61+
Order order = OrderUtil::limit_order(contract, U("BUY"), 1, 100.0);
6262
value res = trade_client->place_order(order);
6363
long id = res[U("id")].as_integer();
6464
ucout << U("order id: ") << id << endl;
@@ -67,7 +67,7 @@ class TestTradeClient {
6767

6868
static void test_get_order(const std::shared_ptr<TradeClient>& trade_client) {
6969
// Contract contract = stock_contract(U("AAPL"), U("USD"));
70-
// Order order = limit_order(contract, U("BUY"), 1, 100.0);
70+
// Order order = OrderUtil::limit_order(contract, U("BUY"), 1, 100.0);
7171
// trade_client->place_order(order);
7272
Order my_order = trade_client->get_order(29270263515317248);
7373
ucout << U("order : ") << my_order.to_string() << endl;
@@ -80,7 +80,7 @@ class TestTradeClient {
8080

8181
static void test_modify_order(const std::shared_ptr<TradeClient>& trade_client) {
8282
Contract contract = ContractUtil::stock_contract(U("AAPL"), U("USD"));
83-
Order order = limit_order(contract, U("BUY"), 1, 100.0);
83+
Order order = OrderUtil::limit_order(contract, U("BUY"), 1, 100.0);
8484
long id = (long)trade_client->place_order(order)[U("id")].as_number().to_uint64();
8585
value res = trade_client->modify_order(order, 105);
8686
ucout << U("modify order res: ") << res << endl;

0 commit comments

Comments
 (0)