Пример #1
0
        public void onRequestCompleted(string s, O2GResponse response)
        {
            Console.WriteLine(s);

            switch (response.Type)
            {
            case O2GResponseType.CommandResponse:
            case O2GResponseType.CreateOrderResponse:
            case O2GResponseType.GetAccounts:
            case O2GResponseType.GetClosedTrades:
            case O2GResponseType.GetMessages:
            case O2GResponseType.GetOffers:
            case O2GResponseType.GetOrders:
            case O2GResponseType.GetSystemProperties:
            case O2GResponseType.GetTrades:
            {
                try
                {
                    AccountInformationEventArg data = AccountInformationEventArg.ProcessData(_connection,
                                                                                             response);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }

                break;
            }

            case O2GResponseType.MarketDataSnapshot:
            {
                try
                {
                    MarketDataEventArg mData = MarketDataEventArg.ProcessMarketData(_connection, response);
                    OnResponseReceived(mData);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                break;
            }

            case O2GResponseType.ResponseUnknown:
            case O2GResponseType.TablesUpdates:
                break;
            }
        }
Пример #2
0
 public void AccountInformationReceived(object sender, EventArgs e)
 {
     AccountInformationEventArg accData = ((AccountInformationEventArg)e);
 }