Esempio n. 1
0
        private void Quoter_OnQueryAllTickersEvent(RspInfoStruct A_0, QuoteStaticInfoStruct quoteInfo, bool A_2)
        {
            SymbolMap.Add(quoteInfo.ticker, quoteInfo);
            string msg = string.Format("Quoter_OnQueryAllTickersEvent():{0}({1}),PreClose={2}", quoteInfo.ticker, quoteInfo.ticker_name.Trim('\0'), quoteInfo.pre_close_price);

            log(msg);
        }
Esempio n. 2
0
 private void Trader_OnOrderEvent(RspInfoStruct rsp, OrderInfoStruct orderInfo, UInt64 session_id)
 {
     log("Trader_OnOrderEvent():");
     if (rsp.error_id == 0)
     {
         log("{0} {1} {2} Traded:{3} Remain:{4}", orderInfo.ticker, orderInfo.side.ToString(), orderInfo.quantity,
             orderInfo.qty_traded, orderInfo.trade_amount);
     }
     else
     {
         log("{0}:{1}", rsp.error_id, rsp.error_msg);
     }
 }
Esempio n. 3
0
 private void Quoter_OnQueryTickersPriceInfoEvent(TickerPriceInfo ticker_info, RspInfoStruct error_info, bool is_last)
 {
     log("Quoter_OnQueryTickersPriceInfoEvent():{0} Last {1}",
         ticker_info.ticker, ticker_info.last_price);
 }
Esempio n. 4
0
 private void Quoter_OnSubOrderBookEvent(SpecificTickerStruct ticker, RspInfoStruct error_info, bool is_last)
 {
     log("Quoter_OnSubOrderBookEvent():{0}", ticker.ticker);
 }
Esempio n. 5
0
 private void Quoter_OnSubscribeAllMarketDataEvent(RspInfoStruct error_info)
 {
     log("Quoter_OnSubscribeAllMarketDataEvent():{0}", error_info.error_id == 0 ? "success" : "fail");
 }
Esempio n. 6
0
 private void Quoter_OnUnSubscribeAllOrderBookEvent(RspInfoStruct error_info)
 {
     log("Quoter_OnUnSubscribeAllOrderBookEvent():{0}", error_info.error_id == 0 ? "success" : "fail");
 }
Esempio n. 7
0
 private void Quoter_OnSubMarketDataEvent(RspInfoStruct rspinfo, SpecificTickerStruct tick, bool A_2)
 {
     log("Quoter_OnSubMarketDataEvent():{0} subscribe {1} {2}",
         tick.ticker, rspinfo.error_id == 0 ? "success" : "fail", rspinfo.error_msg);
 }
Esempio n. 8
0
 private void Quoter_OnErrorEvent(RspInfoStruct A_0)
 {
     log("Quoter_OnErrorEvent():{0}", A_0.error_msg);
 }
Esempio n. 9
0
 private void Quoter_OnUnSubMarketDataEvent(RspInfoStruct A_0, SpecificTickerStruct A_1, bool A_2)
 {
     log("OnUnSubMarketDataEvent():{0}", A_1.ticker);
 }
Esempio n. 10
0
 private void Trader_OnOrderCancelEvent(RspInfoStruct A_0, OrderCancelInfoStruct A_1, UInt64 session_id)
 {
     log("Trader_OnOrderCancelEvent():");
 }
Esempio n. 11
0
 private void Trader_OnQueryAssetEvent(QueryAssetRsp A_1, RspInfoStruct A_0, int A_2, bool A_3, UInt64 session_id)
 {
     log("Trader_OnQueryAssetEvent");
 }
Esempio n. 12
0
 private void Trader_OnQueryOrderEvent(RspInfoStruct A_0, OrderInfoStruct A_1, int A_2, bool A_3, UInt64 session_id)
 {
     log("Trader_OnQueryOrderEvent");
 }
Esempio n. 13
0
 private void Trader_OnQueryPositionEvent(QueryStkPositionRsp A_1, RspInfoStruct A_0, int A_2, bool A_3, UInt64 session_id)
 {
     log("Trader_OnQueryPositionEvent");
 }
Esempio n. 14
0
 private void Trader_OnQueryTradeEvent(RspInfoStruct A_0, TradeReportStruct A_1, int A_2, bool A_3, UInt64 session_id)
 {
     log("Trader_OnQueryTradeEvent");
 }