create account

New public Bitshares APIs and services by oxarbitrage

View this thread on: hive.blogpeakd.comecency.com
· @oxarbitrage · (edited)
$0.73
New public Bitshares APIs and services
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:

https://bitshares-kibana.info/app/kibana#/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-5y,mode:quick,to:now))&_a=(columns:!(_source),index:debd10a0-20b6-11e9-82af-8dfbd16c55a9,interval:auto,query:(language:lucene,query:'_index:%20objects-account'),sort:!(block_time,desc))

please copy and paste the full link instead of clikicng it.

check all the assets:

https://bitshares-kibana.info/app/kibana#/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-5y,mode:quick,to:now))&_a=(columns:!(_source),index:debd10a0-20b6-11e9-82af-8dfbd16c55a9,interval:auto,query:(language:lucene,query:'_index:%20objects-asset'),sort:!(block_time,desc))

filter data, for example check only bitassets:

https://bitshares-kibana.info/app/kibana#/discover?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-5y,mode:quick,to:now))&_a=(columns:!(_source),index:debd10a0-20b6-11e9-82af-8dfbd16c55a9,interval:auto,query:(language:lucene,query:'_index:%20objects-asset%20AND%20issuer:%201.2.0'),sort:!(block_time,desc))

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.
πŸ‘  , , , , , , , , , , , , , , ,
properties (23)
authoroxarbitrage
permlinknew-public-bitshares-apis-and-services
categorybitshares
json_metadata{"tags":["bitshares"],"links":["https://bitshares-kibana.info/","https://bitshares-kibana.info/app/kibana#/discover?_g=","https://elasticsearch.bitshares-kibana.info","https://explorer.bitshares-kibana.info/apidocs/"],"app":"steemit/0.1","format":"markdown"}
created2019-02-08 20:56:45
last_update2019-02-10 22:42:48
depth0
children9
last_payout2019-02-15 20:56:45
cashout_time1969-12-31 23:59:59
total_payout_value0.562 HBD
curator_payout_value0.164 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,008
author_reputation321,201,003,590
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,589,359
net_rshares1,595,568,023,436
author_curate_reward""
vote details (16)
@fox ·
Thank you kindly Alfredo for providing this public service and for your continued development of the elasticsearch plugin for BitShares. Awesome work!
πŸ‘  , , , ,
properties (23)
authorfox
permlinkre-oxarbitrage-new-public-bitshares-apis-and-services-20190208t210051965z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2019-02-08 21:00:54
last_update2019-02-08 21:00:54
depth1
children1
last_payout2019-02-15 21:00:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length150
author_reputation4,135,127,298,299
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,589,509
net_rshares4,236,244,319
author_curate_reward""
vote details (5)
@funkit ·
Second that!
properties (22)
authorfunkit
permlinkre-fox-re-oxarbitrage-new-public-bitshares-apis-and-services-20190208t220803767z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2019-02-08 22:08:06
last_update2019-02-08 22:08:06
depth2
children0
last_payout2019-02-15 22:08:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation9,704,012,486,052
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,591,921
net_rshares0
@partiko ·
Hello @oxarbitrage! This is a friendly reminder that you have 3000 Partiko Points unclaimed in your Partiko account!

Partiko is a fast and beautiful mobile app for Steem, and it’s the most popular Steem mobile app out there! Download Partiko using the link below and login using SteemConnect to claim your 3000 Partiko points! You can easily convert them into Steem token!

https://partiko.app/referral/partiko

![](https://d1vof77qrk4l5q.cloudfront.net/statics/partiko-poster-best-steem-app-for-your-phone.jpg)
properties (22)
authorpartiko
permlinkpartiko-re-oxarbitrage-new-public-bitshares-apis-and-services-20190225t204918128z
categorybitshares
json_metadata{"app":"partiko"}
created2019-02-25 20:49:18
last_update2019-02-25 20:49:18
depth1
children0
last_payout2019-03-04 20:49:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length512
author_reputation39,207,160,334,751
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,388,084
net_rshares0
@steemitboard ·
Congratulations @oxarbitrage! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@oxarbitrage/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>

<sub>_[Click here to view your Board](https://steemitboard.com/@oxarbitrage)_</sub>


**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/carnival/@steemitboard/carnival-2019"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/rltzHT.png"></a></td><td><a href="https://steemit.com/carnival/@steemitboard/carnival-2019">Carnival Challenge - Collect badge and win 5 STEEM</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) and get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-oxarbitrage-20190228t162539000z
categorybitshares
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-02-28 16:25:39
last_update2019-02-28 16:25:39
depth1
children0
last_payout2019-03-07 16:25:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length877
author_reputation38,975,615,169,260
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,542,673
net_rshares0
@steemitboard ·
Congratulations @oxarbitrage! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@oxarbitrage/birthday3.png</td><td>Happy Birthday! - You are on the Steem blockchain for 3 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@oxarbitrage) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=oxarbitrage)_</sub>


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-oxarbitrage-20200228t150717000z
categorybitshares
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2020-02-28 15:07:18
last_update2020-02-28 15:07:18
depth1
children0
last_payout2020-03-06 15:07:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length632
author_reputation38,975,615,169,260
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id95,911,052
net_rshares0
@vvk ·
Only plain elastic, no wrapper?
πŸ‘  
properties (23)
authorvvk
permlinkre-oxarbitrage-new-public-bitshares-apis-and-services-20190209t082443818z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2019-02-09 08:24:45
last_update2019-02-09 08:24:45
depth1
children3
last_payout2019-02-16 08:24:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation770,962,651,929
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,609,372
net_rshares1,265,250,331
author_curate_reward""
vote details (1)
@oxarbitrage ·
es-wrapper is part of the explorer api so yes, there is support for the wrapper available in this pack. Unfortunately, the server where i installed everything is out of disk space so i am speaking with hosting to see if i can extend. ill restore the services asap and send you the link to the wrapper. My apologies.
πŸ‘  
properties (23)
authoroxarbitrage
permlinkre-vvk-re-oxarbitrage-new-public-bitshares-apis-and-services-20190209t213155661z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2019-02-09 21:32:57
last_update2019-02-09 21:32:57
depth2
children0
last_payout2019-02-16 21:32:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length315
author_reputation321,201,003,590
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,636,569
net_rshares19,405,612,227
author_curate_reward""
vote details (1)
@oxarbitrage ·
please check https://explorer.bitshares-kibana.info/apidocs/#/wrapper for the es-wrapper api calls.

please also note:
- elasticsearch 6.2(the version i am using) changes the indexes to read only when 95% of disk space is filled by default. i had a hard time figuring out was failing as i had some space left.
- i removed the protection, changed the indexes to write state again and now all the services are working(unprotected).
- however, hosting is going to increase me the SSD in 120G more so everything will be fine for a while.
- for this change they are going to reboot the server so there is going to be some more downtime in this next days. 
- ill update about that as soon as it is happening and when it gets done, you can test the services but should not use them in any production application until then.

thanks for the patience.
properties (22)
authoroxarbitrage
permlinkre-vvk-re-oxarbitrage-new-public-bitshares-apis-and-services-20190212t135812322z
categorybitshares
json_metadata{"tags":["bitshares"],"links":["https://explorer.bitshares-kibana.info/apidocs/#/wrapper"],"app":"steemit/0.1"}
created2019-02-12 13:58:12
last_update2019-02-12 13:58:12
depth2
children1
last_payout2019-02-19 13:58:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length842
author_reputation321,201,003,590
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,768,912
net_rshares0
@oxarbitrage ·
The hard drive upgrade was done, we now have 300G more available so everything should be good for a while. all services are working. thanks again for the patience.
properties (22)
authoroxarbitrage
permlinkre-oxarbitrage-re-vvk-re-oxarbitrage-new-public-bitshares-apis-and-services-20190212t162403683z
categorybitshares
json_metadata{"tags":["bitshares"],"app":"steemit/0.1"}
created2019-02-12 16:24:03
last_update2019-02-12 16:24:03
depth3
children0
last_payout2019-02-19 16:24:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length163
author_reputation321,201,003,590
root_title"New public Bitshares APIs and services"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id79,775,686
net_rshares0