Links

getTransactions

Get all transactions in a given block range
The getTransactions method provides developers with a powerful tool to efficiently access and retrieve the count and detailed information about transactions within the specified range. The response items are thoughtfully sorted in descending order according to their block numbers and transaction index for your convenience.

How to use getTransactions method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getTransactions Builder API method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.
Field
Type
Description
fromBlock
string
Starting block for the query
toBlock
string
Ending block for the query
contractAddress
string
The address of the contract
pageSize
number
Number of records to be retrieved on one page
pageKey
string
Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response

Returns

Discover an insightful explanation of the returned parameters here, offering a deep understanding of their significance and implications.
Field
Type
Description
count
number
Number of records returned in the current page
nextPageKey
string
Key used to get the next page of results. Must be set to the value of nextPageKey returned in the previous response
transaction
array<object>
Array of Transaction objects

Example Request and Result for getTransactions

Explore an example of a request made using the getTransactions method, allowing you to retrieve all transactions within the specified range fromBlock to toBlock that match the specified contractAddress. The response provides a comprehensive overview of the transactions, including block details, events,messages, gas-related data, and more. This example showcases the powerful capabilities of the getTransactions method for accessing and analyzing transaction details within your specified criteria.
The example in this section uses a non-existing project id.
Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.
Don't have a project id? Here's a straightforward guide on how to obtain one!
get
https://starknet-mainnet.blastapi.io/<project-id>/builder/getTransactions?
Parameters
Query
fromBlock
284739
toBlock
313696
contractAddress
0x05c0c9d84f2cea3084e3ac48aa72d4b2cde76ea370d73e1b08f9687f81f28ed2
Responses
200: OK
Expand for a detailed response example

Curl request example

curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getTransactions?fromBlock=284739&toBlock=313696&contractAddress=0x05c0c9d84f2cea3084e3ac48aa72d4b2cde76ea370d73e1b08f9687f81f28ed2 -H 'Content-Type: application/json'