Index API
This is an API to access an indexed version of the blockchain and more goodies.
You can easily search data with very specific parameters and create custom awesome statistics.
We provide a rate limited free access for the data at this endpoint.
https://index.xelis.io/
You can also clone the repo and index the blockchain yourself if you want more control or higher throughput of the information.
https://github.com/xelis-project/xelis-index (opens in a new tab)
How to use
The API consists of a list of exclusive views that you can request and add parameters on top of it.
For example, if you want the last 5 transactions of an account, the query would look like this:
https://index.xelis.io/views/transactions?count=true&pretty=true&limit=5&order=nonce::desc&where=source::eq::xel:fjqn40v9q8ghystrnpzfczzuuylj9wdcs6gegqe76x970g3xy4kqq6gk3d4 (opens in a new tab)
Views
The asterisk means that there is a mandatory parameter for the view.
Parameters
Parameter | Default | Type | Format | Query Format | Description |
---|---|---|---|---|---|
offset | 0 | int | &offset=10 | Start query at this offset. | |
limit | 100 | int | &limit=50 | Maximum of rows returned. | |
where | string | column::op::value | &where=height::eq::0 | Filter the data with column and operator. | |
order | string | column::sort | &order=time::desc | Sort with the column either desc or asc. | |
param | any | ¶m=10000 | Set the param value of the asterisk. | ||
count | false | boolean | &count=true | Return the total number of rows in the query. | |
pretty | false | boolean | &pretty=true | Indent the data to enhance readability. |
Operators (where)
Op | Description |
---|---|
eq | Equal = |
neq | Not equal != or <> |
gt | Greater than > |
gte | Greater or equal >= |
lt | Lower than < |
lte | Lower or equal <= |
like | LIKE |