Introduction
Learn how to seamlessly integrate our APIs into your application.
Before you begin!
You should create a free Blockradar account that you can test the API against. We will provide you with test keys that you can use to make API calls.
Postman Collection
View the Postman Collection
The Blockradar API gives you access to pretty much all the features you can use on our dashboard and lets you extend them for use in your application. It strives to be RESTful and is organized around the main resources you would be interacting with - with a few notable exceptions.
Sample Requests
We provide sample API calls next to each method using cURL. All you need to do is insert your specific parameters, and you can test the calls from the command line. See this tutorial on using cURL with APIs.
You can also use Postman if you aren’t familiar with cURL. Postman is an easy to use API development and testing platform. You can explore the Blockradar Postman Collection to understand how our APIs work.
Requests and Response
Both request body data and response data are formatted as JSON. Content type for responses will always be application/json. Generally, all responses will be in the following format:
Keys
Property | Type | Description |
---|---|---|
statusCode | number | This is the request status code that lets you know if your request was succesful or not. We recommend that you use this to determine the result of an API call. |
message | string | This is a summary of the response and its status. For instance when trying to retrieve a list of customers, message might read “Transactions fetched successfully”. In the event of an error, the message key will contain a description of the error as with the authorization header situation above. This is the only key that is universal across requests. |
data | object | This contain the results of your request. It can either be an object, or an array depending on the request made. For instance, a request to retrieve a single transaction will return a transaction object in the data key, while the key would be an array of transactions if a list is requested instead. |
Meta Object
The meta key is used to provide context for the contents of the data key. For instance, if a list of transactions performed by a customer is being retrieved, pagination parameters can be passed along to limit the result set. The meta key will then contain an object with the following attributes:
Property | Description |
---|---|
totalItems | The total number of items available. This represents the complete count of items across all pages. |
itemCount | The number of items on the current page. This indicates how many items are being returned in the current response. |
itemsPerPage | The maximum number of items per page. This defines the pagination limit set for each page. Default: 100 |
totalPages | The total number of pages available. This is calculated based on the total number of items and the number of items per page. |
currentPage | The current page number. This indicates which page of the pagination is being returned in the current response. Default: 1 |