/// <summary>
        /// Get the symbol
        /// </summary>
        /// <returns>Symbol</returns>
        public async Task <CallResult <HitBTCSymbol> > GetSymbolAsync(string id)
        {
            var req    = new GetSymbolRequest(NextId(), id);
            var result = await Query <HitBTCSocketResponse <HitBTCSymbol> >(req, false).ConfigureAwait(false);

            return(new CallResult <HitBTCSymbol>(result.Data?.Result, result.Error));
        }
        public override Task <GetSymbolResponse> GetSymbol(GetSymbolRequest request,
                                                           ServerCallContext context)
        {
            var address  = addressStore.GetObject(request.Address.Id);
            var symbol   = address.GetSymbol();
            var response = new GetSymbolResponse();

            if (symbol != null)
            {
                response.Symbol = new GrpcSbSymbol {
                    Id = symbolStore.AddObject(symbol)
                };
            }
            return(Task.FromResult(response));
        }
Beispiel #3
0
        public override Task <GetSymbolResponse> GetSymbol(GetSymbolRequest request,
                                                           ServerCallContext context)
        {
            RemoteFrame frame  = frameStore.GetObject(request.Frame.Id);
            SbSymbol    symbol = frame.GetSymbol();

            var response = new GetSymbolResponse();

            if (symbol != null)
            {
                response.Symbol = new GrpcSbSymbol {
                    Id = symbolStore.AddObject(symbol)
                };
            }
            return(Task.FromResult(response));
        }