Пример #1
0
        static void EndLoggedIn(ReliableAsyncResult result)
        {
            _ctx.EndLogIn(result);
            Console.WriteLine("\r\nLogged in.\r\n");

            BeginListNewsHeadlines("UK", 10);
        }
Пример #2
0
        public void InitializeStreamingClient(ReliableAsyncResult ar)
        {
            RpcClient.EndLogIn(ar);
            // need to set up the serializer to be used by stream listeners
            StreamingClientFactory.SetSerializer(new Serializer());

            StreamingClient = StreamingClientFactory.CreateStreamingClient(STREAMING_URI, RpcClient.UserName,
                                                                           RpcClient.Session);
            LogToScreen("rpc client logged in");
        }
Пример #3
0
        static void EndListNewsHeadlines(ReliableAsyncResult result)
        {
            var response = _ctx.News.EndListNewsHeadlinesWithSource(result);

            foreach (var item in response.Headlines)
            {
                Console.WriteLine("{0} {1} {2}\r\n", item.StoryId, item.Headline, item.PublishDate);
            }

            BeginLogOut();
        }
Пример #4
0
 public ListMarketSearchResponseDTO EndListMarketSearch(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListMarketSearchResponseDTO>(asyncResult);
 }
Пример #5
0
 public ListSpreadMarketsResponseDTO EndListSpreadMarkets(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListSpreadMarketsResponseDTO>(asyncResult);
 }
Пример #6
0
 public ListNewsHeadlinesResponseDTO EndListNewsHeadlines(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListNewsHeadlinesResponseDTO>(asyncResult);
 }
Пример #7
0
 public ApiChangePasswordResponseDTO EndChangePassword(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiChangePasswordResponseDTO>(asyncResult);
 }
Пример #8
0
 internal ApiLogOnResponseDTO EndLogOn(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiLogOnResponseDTO>(asyncResult);
 }
Пример #9
0
 public FullMarketInformationSearchWithTagsResponseDTO EndFullSearchWithTags(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<FullMarketInformationSearchWithTagsResponseDTO>(asyncResult);
 }
Пример #10
0
 public ListTradeHistoryResponseDTO EndListTradeHistory(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListTradeHistoryResponseDTO>(asyncResult);
 }
Пример #11
0
 public GetOpenPositionResponseDTO EndGetOpenPosition(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<GetOpenPositionResponseDTO>(asyncResult);
 }
Пример #12
0
 public ApiClientAccountMarginResponseDTO EndGetClientAccountMargin(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiClientAccountMarginResponseDTO>(asyncResult);
 }
Пример #13
0
 public ListOpenPositionsResponseDTO EndListOpenPositions(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListOpenPositionsResponseDTO>(asyncResult);
 }
Пример #14
0
 public ApiTradeOrderResponseDTO EndUpdateOrder(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiTradeOrderResponseDTO>(asyncResult);
 }
Пример #15
0
 public UpdateDeleteClientPreferenceResponseDTO EndDelete(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<UpdateDeleteClientPreferenceResponseDTO>(asyncResult);
 }
Пример #16
0
 public ListWatchlistResponseDTO EndGetWatchlists(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListWatchlistResponseDTO>(asyncResult);
 }
Пример #17
0
 public ApiDeleteWatchlistResponseDTO EndDeleteWatchlist(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiDeleteWatchlistResponseDTO>(asyncResult);
 }
Пример #18
0
 public ListStopLimitOrderHistoryResponseDTO EndListStopLimitOrderHistory(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListStopLimitOrderHistoryResponseDTO>(asyncResult);
 }
Пример #19
0
 public ListActiveOrdersResponseDTO EndListActiveOrders(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ListActiveOrdersResponseDTO>(asyncResult);
 }
Пример #20
0
 public GetOrderResponseDTO EndGetOrder(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<GetOrderResponseDTO>(asyncResult);
 }
Пример #21
0
 internal ApiLogOffResponseDTO EndDeleteSession(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiLogOffResponseDTO>(asyncResult);
 }
Пример #22
0
 public ApiSimulateTradeOrderResponseDTO EndSimulateTrade(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiSimulateTradeOrderResponseDTO>(asyncResult);
 }
Пример #23
0
 public GetPriceTickResponseDTO EndGetPriceTicks(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<GetPriceTickResponseDTO>(asyncResult);
 }
Пример #24
0
 public AccountInformationResponseDTO EndGetClientAndTradingAccount(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<AccountInformationResponseDTO>(asyncResult);
 }
Пример #25
0
 public GetNewsDetailResponseDTO EndGetNewsDetail(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<GetNewsDetailResponseDTO>(asyncResult);
 }
Пример #26
0
 public ApiSaveAccountInformationResponseDTO EndSaveAccountInformation(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiSaveAccountInformationResponseDTO>(asyncResult);
 }
Пример #27
0
 public GetMarketInformationResponseDTO EndGetMarketInformation(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<GetMarketInformationResponseDTO>(asyncResult);
 }
Пример #28
0
 public ApiLookupResponseDTO EndGetSystemLookup(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiLookupResponseDTO>(asyncResult);
 }
        public virtual string EndRequest(ReliableAsyncResult result)
        {
            if (_disposed)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }
            try
            {

                result.End();
                return result.ResponseText;
            }
#pragma warning disable 168
            catch (ReliableHttpException ex)
#pragma warning restore 168
            {
                // this throw is simply to isolate defects in request implementations
                throw;
            }
            catch (Exception ex)
            {
                throw new DefectException("expecting only ReliableHttpException here. See inner for details", ex);
            }
        }
Пример #30
0
 public ApiClientApplicationMessageTranslationResponseDTO EndGetClientApplicationMessageTranslationWithInterestingItems(ReliableAsyncResult asyncResult)
 {
     return _client.EndRequest<ApiClientApplicationMessageTranslationResponseDTO>(asyncResult);
 }