I have a query that fetch transactions for a specific address. I managed to create the filter in OR condition, so that inputAddress OR outputAddress must match the given one.
That works but it seems it misses the information about the address. I would like to fetch the inputAddress and outputAddress to understand where the filter did the match, but those fields are unavailable in the transactions API. I need some other field that helps me to understand the direction ofr the transaction, if the given wallet was in input or in output.
This is my query
query ($network: BitcoinNetwork!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime, $address: String!) {
bitcoin(network: $network) {
transactions(
options: {desc: ["block.height", "index"], limit: $limit, offset: $offset}
any: [{inputAddress: {is: $address}}, {outputAddress: {is: $address}}]
) {
block(time: {since: $from, till: $till}) {
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
height
}
inputValue
outputValue
index
hash
feeValue
txCoinbase
fee_value_usd: feeValue(in: USD)
minedValue
outputCount
inputCount
}
}
}