1

Try to get balance :

var bitcoinPrivateKey = new BitcoinSecret("xxxx");
var network = bitcoinPrivateKey.Network;
var address = bitcoinPrivateKey.GetAddress();

var client = new QBitNinjaClient(network);
var balance = client.GetBalance(address).Result;

but i get a error One or more errors occurred in line var balance = client.GetBalance(address).Result; . Private key is valid. Previously, everything worked well, but now not. Where my mistake ?

Edit: i wanted to check inner exc

try
{
  var client = new QBitNinjaClient(network);

  var balance = client.GetBalance(address).Result;

  Console.WriteLine(balance);
}
 catch(Exception e) {
  if (e.InnerException !=null)
      Console.WriteLine("error"+e.InnerException.Message);
 }

but now he didnt go to exception, he show me balance. what could be the problem ? why doesn't it always work ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.