Skip to content

Latest commit

 

History

History
73 lines (60 loc) · 5.77 KB

index.mdx

File metadata and controls

73 lines (60 loc) · 5.77 KB

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 limiting 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 controls or higher throughput of the information.
https://github.com/xelis-project/xelis-index

How to use

The API consist 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

Views

Name Link
accounts /views/accounts
blocks /views/blocks
contracts /views/contracts
market_history /views/market_history
transaction_transfers /views/transaction_transfers
transactions /views/transactions
blockchain_size /views/blockchain_size
market_tickers /views/market_tickers
get_accounts_active_time(*) /views/get_accounts_active_time(*)?param=86400
get_accounts_count_time(*) /views/get_accounts_count_time(*)?param=86400
get_accounts_txs_time(*) /views/get_accounts_txs_time(*)?param=86400
get_blocks_time(*) /views/get_blocks_time(*)?param=86400
get_blocks_topo(*) /views/get_blocks_topo()
get_market_assets() /views/get_market_assets()
get_market_exchanges() /views/get_market_exchanges()
get_market_history_exchange_time(*) /views/get_market_history_exchange_time(*)?param=86400
get_market_history_time(*) /views/get_market_history_time(*)?param=86400
get_miners_blocks_time(*) /views/get_miners_blocks_time(*?param=86400)
get_miners_blocks() /views/get_miners_blocks()
get_miners_count_time(*) /views/get_miners_count_time(*)?param=86400
get_stats() /views/get_stats()
get_txs_time(*) /views/get_txs_time(*)?param=86400
get_txs() /views/get_txs()
get_market_tickers_exchange_time(*) /views/get_market_tickers_exchange_time(*)?param=86400
get_market_tickers_time(*) /views/get_market_tickers_time(*)?param=86400

The asterisk means that there is a mandatory parameter needed 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 &param=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 inhance readability.

Operators (where)

Op Description
eq Equal =
neq Not equal != or <>
gt Greater than >
gte Greater or equel >=
lt Lower than <
lte Lower or equal <=
like LIKE