@@ -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