コード例 #1
0
ファイル: TradeController.cs プロジェクト: yadewe/Esunny
        private void TradeNotify_OnAPIReadyEvent(int errorCode)
        {
            Console.WriteLine($"TradeNotify_OnAPIReadyEvent code:{errorCode}");
            m_api.QryAccount(out m_sessionID, null);
            m_api.QryOrder(out m_sessionID, new TapAPIOrderQryReq()
            {
                AccountNo = m_loginInfo.UserNo, CommodityNo = "HSI"
            });
            m_api.QryExchange(out m_sessionID);
            var order = new TapAPINewOrder()
            {
                AccountNo        = m_loginInfo.UserNo,
                ContractNo       = "1911",
                CommodityNo      = "HSI",
                ExchangeNo       = "HKEX",
                OrderType        = TapTradeWrapper.TAPI_ORDER_TYPE_LIMIT,
                OrderPrice       = 27008,
                TacticsType      = TapTradeWrapper.TAPI_TACTICS_TYPE_NONE,
                PositionEffect   = TapTradeWrapper.TAPI_PositionEffect_OPEN,
                CommodityType    = TapTradeWrapper.TAPI_COMMODITY_TYPE_FUTURES,
                OrderSide        = TapTradeWrapper.TAPI_SIDE_BUY,
                OrderQty         = 1,
                TriggerCondition = TapTradeWrapper.TAPI_TRIGGER_CONDITION_NONE
            };

            //var result = m_api.InsertOrder(out m_sessionID, "", order);
            //Console.WriteLine($"InsertOrder result:{result}");
            //order.OrderSide = TapTradeWrapper.TAPI_SIDE_SELL;
            //result = m_api.InsertOrder(out m_sessionID, "", order);
            //Console.WriteLine($"InsertOrder result:{result}");
        }
コード例 #2
0
 private void TradeNotify_OnAPIReadyEvent(int errorCode)
 {
     m_api.QryAccount(out m_sessionID, null);
     m_api.QryOrder(out m_sessionID, null);
     m_api.QryExchange(out m_sessionID);
 }
コード例 #3
0
 void TradeNotify_OnAPIReadyEvent()
 {
     m_api.QryAccount(out m_sessionID, null);
     m_api.QryOrder(out m_sessionID, null);
 }