示例#1
0
        public async Task <IActionResult> GetHistoryFromAddress([Required] string address,
                                                                [Required, FromQuery] int take,
                                                                [FromQuery] string afterHash)
        {
            var dynamicAddress = _dynamicService.GetBitcoinAddress(address);

            if (dynamicAddress == null)
            {
                return(BadRequest(ErrorResponse.Create($"{nameof(address)} is not a valid")));
            }

            var txs = await _dynamicService.GetFromAddressTxs(address, take, afterHash);

            return(Ok(txs.Select(f => f.ToHistoricalTransactionContract(address, true))));
        }