With a more mature blockchain data inserted in elasticsearch database thanks to the bitshares-core plugins it is time to get the most of this tools by providing more endpoints to community in general and developers.
For this reason, I created a small infrastructure consisting in 1 node with the 2 elasticsearch plugins(elasticsearch
and es_objects
) and several services on top of that.
Services are in the mainnet and at this moment fully synchronized.
1- Kibana server: https://bitshares-kibana.info/
Idea here is to theme a bit kibana to make it more Bitshares friendly. This is work in progress but the plan is to provide visualizations of all kinds. Kibana is great for searching and visualizing our data, the addition of data in objects makes it even more powerful, check all the accounts in the blockchain with:
please copy and paste the full link instead of clikicng it.
check all the assets:
filter data, for example check only bitassets:
Possibilities are huge and for that reason a new document on how to use kibana with bitshares will be published soon but you can go ahead and try stuff in this place.
2- A direct elsticsearch endpoint: https://elasticsearch.bitshares-kibana.info
When kibana is not giving what you need or when you want to develop an application using data stored in elasticsearch you can query the database directly as:
alfredo@alfredo-Inspiron-5559 ~ $ curl -X GET 'https://elasticsearch.bitshares-kibana.info/bitshares-*/data/_count?pretty=true' -H 'Content-Type: application/json' -d '
{
"query" : {
"bool" : { "must" : [{"match_all": {}}] }
}
}
'
{
"count" : 758526064,
"_shards" : {
"total" : 205,
"successful" : 205,
"skipped" : 0,
"failed" : 0
}
}
alfredo@alfredo-Inspiron-5559 ~ $
3- A secure api to make queries or connect your wallet: wss://api.bitshares-kibana.info/ws
This are classic Bitshares API websocket endpoints, can use directly as:
alfredo@alfredo-Inspiron-5559 ~/bitshares-kibana-plugin $ curl --silent -d '{"id":1,"method":"call","params":["database","get_ticker",["1.3.0", "1.3.113"]]}' https://api.bitshares-kibana.info/ws | jq
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"time": "2019-02-08T20:50:12",
"base": "1.3.0",
"quote": "1.3.113",
"latest": "3.9651087343835720977",
"lowest_ask": "3.9651087306478943037",
"highest_bid": "3.96510740343068064162",
"percent_change": "-7.21",
"base_volume": "4223287.04734",
"quote_volume": "1046771.2819"
}
}
alfredo@alfredo-Inspiron-5559 ~/bitshares-kibana-plugin $
Or as websocket:
alfredo@alfredo-Inspiron-5559 ~/bitshares-kibana-plugin $ wscat -c https://api.bitshares-kibana.info/ws
connected (press CTRL+C to quit)
>
Or with your wallet, etc.
4- Finally, an explorer API is also up at: https://explorer.bitshares-kibana.info/apidocs/
Stay tuned for more updates, any question/comment/whatever is welcome.