m_account placeorder FA Java Interactive Brokers

时间:2017-04-13 15:31:22

标签: java algorithmic-trading interactive-brokers

我有一个F帐户和一个U帐户。这将正确填充TWS中的API订单选项卡,但不会分配U帐户的订单。如何将此分配给U帐户?

    nextOrderID = orderId;
    c.m_symbol = "SPY";
    c.m_exchange = "SMART";
    c.m_secType = "STK";
    c.m_currency = "USD";

    Order order = new Order();
    order.m_action = "BUY";
    order.m_totalQuantity = 1;
    order.m_lmtPrice = 1.00;
    order.m_orderType = "LMT";  
    String m_account = "U123123";
    int randomNum = ThreadLocalRandom.current().nextInt(1, 100 + 1);

    m_s.placeOrder(randomNum, c, order);

1 个答案:

答案 0 :(得分:0)

简单的答案,包括在订单方面:

     order.m_account = "U123123";