Query balance in Cosmos

Returns address details and transfers on cosmoshub, where address is cosmos…ffym, receiver is cosmos…ffym and sender is cosmos…ffym: balance, annotation, count, minimum of date, maximum of date and maximum of time.

By Aleksey · saved 6 February 2023 · run 3 times · Bitquery API v1

What it returns

Filters

The query

query ($address: String!) {
   cosmos(network: cosmoshub) {
     address(address: {is: $address}) {
       balance
       annotation
     }
  ins: transfers(receiver: {is: $address}) {
       count
       first_time: minimum(of: date)
       last_time: maximum(of: date)
    	 maximum(of: time get: value)


     }
     outs: transfers(sender: {is: $address}) {
       count
       first_time: minimum(of: date)
       last_time: maximum(of: date)
       maximum(of: time get: value)
     }
   }
 }

Variables

{"address": "cosmos1chfn9xl8fjkympg2cujgnjefhju86s8yucffym", "network": "bitcoinsv"}

Similar queries