Skip to content

Commit 6778d13

Browse files
authored
Merge branch 'bitquery:main' into main
2 parents 07cf2b4 + f309887 commit 6778d13

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

docs/Examples/bitcoin/Bitcoin-Input-and-Output API.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,53 @@ query ($network: BitcoinNetwork!, $dateFormat: String!, $from: ISO8601DateTime,
191191

192192
We can get the miner Block reward per day by using the outputs API and using the filters of outputDirection set to mining and we get parameters such as miner address, miner rewards in the whole day and blocks they mined. Yo can try running the example query [here](https://ide.bitquery.io/bitcoin-miners-rewards).
193193

194+
## Get Miners Activity in a Specific Timeframe
195+
196+
This query returns the activity count of miners within a specific date range. You can run this query [here](https://ide.bitquery.io/get-miners-activity-in-a-specific-timeframe).
197+
198+
```
199+
query MyQuery {
200+
bitcoin(network: bitcoin) {
201+
outputs(
202+
outputDirection: {is: mining}
203+
date: {since: "2025-01-01", till: "2025-01-10"}
204+
outputScriptType: {notIn: ["nulldata", "nonstandard"]}
205+
) {
206+
outputAddress {
207+
address
208+
}
209+
count
210+
}
211+
}
212+
}
213+
```
214+
215+
## Get Miners First Activity
216+
217+
This query returns the first mining activity for specific miner addresses, showing when each miner first received a block reward. You can run this query [here](https://ide.bitquery.io/get-miners-first-activity).
218+
219+
```
220+
query MyQuery {
221+
bitcoin(network: bitcoin) {
222+
outputs(
223+
outputDirection: {is: mining}
224+
options: {asc: "block.timestamp.iso8601", limitBy: {each: "outputAddress.address", limit: 1}}
225+
outputAddress: {in: ["1K6KoYC69NnafWJ7YgtrpwJxBLiijWqwa6", "1KGG9kvV5zXiqyQAMfY32sGt9eFLMmgpgX"]}
226+
outputScriptType: {notIn: ["nulldata", "nonstandard"]}
227+
) {
228+
outputAddress {
229+
address
230+
}
231+
block {
232+
timestamp {
233+
iso8601
234+
}
235+
}
236+
}
237+
}
238+
}
239+
```
240+
194241
## Video Tutorial to Get Daily Miner Rewards Info
195242

196243
<VideoPlayer url="https://youtu.be/3RC7Mxitfzg" />

0 commit comments

Comments
 (0)