Check balances of bitcoin adress

I want to check balances of bitcoin address. I cant find the way so i must use output value - inputs value = Balance value now. Somebody told me How can i make the best querry?

{
bitcoin(network: bitcoin) {
inputs(inputAddress: {is: “34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo”}) {
value
}
outputs(outputAddress: {is: “34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo”}) {
value
}
}
}

1 Like

Yes

Output - Input = Balance

Example query

{
  bitcoin {
    inputs(
      inputAddress: {is: "18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX"}) {
      value
    }
    outputs( outputAddress: {is: "18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX"}) {
      value
    }
  }
}

Hi Ad
i can’t run this query, please show to us check list inputAddress BTC incorrect
{
bitcoin {
inputs(
inputAddress: {in: [“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”]}) {
value
}
outputs( outputAddress: {in:[ “18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”]}) {
value
}
}
}
Thank You

Working fine for me

1 Like

I want to check two or more inputAddress
Expect: inputAddress: {in: [“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”,“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”]})
but not working
How to built query use inputAddress with para In

1 Like

i want this too, what query can check muti adress of bitcoin

1 Like

@gaurav check for me this issue, thank a lot

Can you answer this for me?
I want to check two or more inputAddress
Expect: inputAddress: {in: [“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”,“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”]})
but not working
How to built query use inputAddress with para In

So This list is string …not a list,

Screenshot 2021-06-06 at 9.08.30 AM

So this works

  {in: "18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX"})

But when i am trying to do more than 1, it’s not taking it, I have raised it with Dev team and reply, once i get the answer

oke thanks Gaurav. I will follow this thread

when this issue done?

Sorry not yet picked up by devs. Let me nudge it again with the team.

P:S - Related Issue - AddressSelector Type should be an array?

This is solved, please check.

Thank you, when it is updated, please let me know

i check it still not work

This is solved

{
  bitcoin(network: bitcoin) {
    inputs(
      inputAddress: {in: ["18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX", "34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo"]}
    ) {
      value
      inputAddress{
        address
      }
    }
  }
}

Hi Gaurv
I get history address BTC but it still an address
------------------------------Query----------------------------
query ($network: BitcoinNetwork!,
$address: [String!],
$limit: Int!,
$offset: Int!,
$from: ISO8601DateTime,
$till: ISO8601DateTime)
{
bitcoin(network: $network) {
inputs(
date: {
since: $from,
till: $till
}, inputAddress: {in: $address},
options: {desc: “block.height”, limit: $limit, offset: $offset})
{block {height,timestamp { time(format: “%Y-%m-%d %H:%M:%S”)}},
transaction { hash, index}, value, inputAddress {annotation}},
outputs(date: {since: $from, till: $till},outputAddress: {is: $address},
options: {desc: “block.height”, limit: $limit, offset: $offset})
{block {timestamp {time(format: “%Y-%m-%d %H:%M:%S”)},height},
transaction { hash, index }, value, outputAddress {annotation}}}}

------------------------------END Query----------------------------
-------------------Para-----------------
{ “limit” : 100,
“offset” : 0,
“address” : [“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”,“18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX”],
“network”: “bitcoin”,
“dateFormat” : “%Y-%m”
}
-------------------EndPara-----------------
Now it not working please check this query for me
Thank

Check this, it is working. You had made the same address as a list and passed it as a single address in the query.

I can translate for Cu-API
He asks " He can not use this query" like

{ “limit” : 100,
“offset” : 0,
“address” : [“Address 1”,“Address 2”,“Address N” …],
“network”: “bitcoin”,
“dateFormat” : “%Y-%m”

may be 10 btc address only 1 query