create account

SteemTools Rest API has been Released by nawab69

View this thread on: hive.blogpeakd.comecency.com
· @nawab69 ·
$44.21
SteemTools Rest API has been Released
### Repository
https://github.com/nawab69/steemtools

------

![PicsArt_03-04-09.27.32.png](https://cdn.steemitimages.com/DQmeSWyKLaajUN3xSPJR7VvJgzteks2TsGJwGFEbSuZjFEj/PicsArt_03-04-09.27.32.png)

-------

### New Features

#### SteemTools REST API

SteemTools released a REST API. The Rest API is build with PHP,  JSON and steemit api.

Few days ago steemjs REST API stopped working. So I have decided to make a rest API. Finally I have made this.

**API URL** : https://api.steemtools.cf
**Method** : GET

### Endpoints

-------
### /get_withdraw_routes

get_withdraw_routes has 1 parameters. its ``account``.

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |

API: https://api.steemtools.cf/get_withdraw_routes?account=value

Result:

```
[{"id":0,"from_account":"","to_account":"","percent":0,"auto_vest":false}]
```

CURL 

```
curl -X GET -v -i 'https://api.steemtools.cf/get_withdraw_routes?account=value'
```
--------
### /get_volume

No parameters

API:  https://api.steemtools.cf/get_volume

Result:  
```
{"steem_volume":"11083.861 STEEM","sbd_volume":"4343.484 SBD"}
```

Curl:
```
curl -X GET -v -i 'https://api.steemtools.cf/get_volume'
```

-------

### /get_vesting_delegations

It has three parameters. These are ``account,start,limit``

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |
| start       | string   | start from        |
| limit       | int    | limit upto 1000   |

API: https://api.steemtools.cf/get_vesting_delegations?account=value&start=value&limit=value

Example Result
```
[
  {
    "id": 97323,
    "delegator": "steem",
    "delegatee": "null-a",
    "vesting_shares": "9139.384274 VESTS",
    "min_delegation_time": "2017-07-24T14:04:57"
  },
  {
    "id": 1057809,
    "delegator": "steem",
    "delegatee": "null-name",
    "vesting_shares": "9836.682166 VESTS",
    "min_delegation_time": "2018-10-04T06:59:15"
  }
]
```
Curl:
```
curl -X GET -v -i 'https://api.steemtools.cf/get_vesting_delegations?account=value&start=value&limit=value'
```

-------

### /get_version

No parameters

API : https://api.steemtools.cf/get_version

Example Result:
```
{"blockchain_version":"0.20.9","steem_revision":"46c3bdbff14166355e81b4b543e3be4b767ac0d2","fc_revision":"46c3bdbff14166355e81b4b543e3be4b767ac0d2"}
```
Curl Command:
```
curl -X GET -v -i 'https://api.steemtools.cf/get_version'
```
------

### /get_trending_tags

Parameters

| parameters  | type | details          |
|-------------|------|------------------|
| start       | string  | start from tag   |
| limit       | int  | limit total tags |

API : https://api.steemtools.cf/get_trending_tags?start=value&limit=value

Example result  [First 10 trending tags]

```
[{"name":"dtube","comments":10784,"top_posts":3247,"total_payouts":"8605.089 SBD"},{"name":"photography","comments":8959,"top_posts":2733,"total_payouts":"5513.981 SBD"},{"name":"utopian-io","comments":1400,"top_posts":194,"total_payouts":"4781.642 SBD"},{"name":"life","comments":5733,"top_posts":1595,"total_payouts":"4462.091 SBD"},{"name":"steem","comments":6276,"top_posts":693,"total_payouts":"4122.676 SBD"},{"name":"steemhunt","comments":6671,"top_posts":1322,"total_payouts":"3996.732 SBD"},{"name":"kr","comments":7481,"top_posts":1248,"total_payouts":"3487.843 SBD"},{"name":"spanish","comments":6527,"top_posts":1620,"total_payouts":"3241.260 SBD"},{"name":"art","comments":4315,"top_posts":1038,"total_payouts":"3103.509 SBD"},{"name":"tasteem","comments":5570,"top_posts":466,"total_payouts":"2489.056 SBD"}]
```

CURL COMMAND :
```
curl -X GET -v -i 'https://api.steemtools.cf/get_trending_tags?start=value&limit=value'
```
-------

### /get_trade_history

| parameters  	| type 	| details 	|
|-------------	|-----------	|-----------------	|
| start 	| timestamp 	| start timestamp 	|
| end 	| timestamp 	| end timestamp 	|

API : https://api.steemtools.cf/get_trade_history?start=value&end=value

Example Result :
```
[]
```
Curl Command : 
```
curl -X GET -v -i 'https://api.steemtools.cf/get_trade_history?start=value&end=value'
```

-----

### /get_ticker

No parameters

API : https://api.steemtools.cf/get_ticker

Example Result :

```
{"latest":"0.42857142857142855","lowest_ask":"0.40211953785662852","highest_bid":"0.40210843373493976","percent_change":"0.00000000000000000","steem_volume":"11885.420 STEEM","sbd_volume":"4689.431 SBD"}
```

Curl Command :
```
curl -X GET -v -i 'https://api.steemtools.cf/get_ticker'
```

### /get_recovery_request

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |

API: https://api.steemtools.cf/get_recovery_request?account=value

Example result 
```
null
```

Curl Command

```
curl -X GET -v -i 'https://api.steemtools.cf/get_recovery_request?account=value
```

----

### /get_savings_withdraw_to

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |

API: https://api.steemtools.cf/get_savings_withdraw_to?account=value

Example result 
```
[]
```

Curl Command

```
curl -X GET -v -i 'https://api.steemtools.cf/get_savings_withdraw_to?account=value
```
------

### /get_savings_withdraw_from

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |

API: https://api.steemtools.cf/get_savings_withdraw_from?account=value

Example result 
```
[]
```

Curl Command

```
curl -X GET -v -i 'https://api.steemtools.cf/get_savings_withdraw_from?account=value
```
 -----

### /get_account_count

No parameters

API 
https://api.steemtools.cf/get_account_count

Example Result
```
{
    "total_account": 1231573
}
```

Curl Command
```
curl -X GET -v -i 'https://api.steemtools.cf/get_account_count'
```

### /get_blog_count (unique API End point)

It results total number of words & characters of a steemit post/blog.


| parameters  | type   | details           |
|-------------|--------|-------------------|
| url     | string | steemit post url |

API
https://api.steemtools.cf/get_blog_count?url=value

Example Result

```
{
    "name": "nawab69",
    "url": "https:\/\/steemit.com\/utopian-io\/@nawab69\/steemtools-check-account-status-for-blacklist-tool-building-tutorial-part-9",
    "total_words": 1202,
    "total_char": 9701,
    "net_votes": 120
}
```
CURL Command
```
curl -X GET -v -i 'http://api.steemtools.cf/get_blog_count?url=value'
```
----

### /get_active_votes 

| parameters  | type   | details           |
|-------------|--------|-------------------|
| author   | string | steemit post author name |
| permlink | string | post permlink |

API
https://api.steemtools.cf/get_active_votes?author=value&permlink=value

Example Result

```
[
{"voter":"tombstone","weight":183546,"rshares":"2528467723996","percent":1068,"reputation":0,"time":"2019-03-01T11:07:06"},{"voter":"roy2016","weight":122632,"rshares":"128588800380","percent":2500,"reputation":0,"time":"2019-02-28T21:54:06"},{"voter":"techslut","weight":51310,"rshares":"66325979308","percent":2000,"reputation":0,"time":"2019-02-28T22:50:12"}
]
```
CURL Command
```
curl -X GET -v -i 'http://api.steemtools.cf/get_active_votes?author=value&permlink=value'
```
-----

### /get_accounts

| parameters  | type   | details           |
|-------------|--------|-------------------|
| account     | string | user account name |

API:
https://api.steemtools.cf/get_accounts?account=value

Example Result
```
[{"id":1160113,"name":"nawab69","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["STM5Q1cCzmr7dQmJZSrJA7wDaaZc2KpqW2o8RbkDmHugHnXLAKEuX",1]]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["STM7GURmxTARsCX3tgRJ6rAcYpswc4HXmiw2mUpHMuuMsTkR6JMFX",1]]},"posting":{"weight_threshold":1,"account_auths":[["actifit.app",1],["busy.app",1],["dtube.app",1],["esteem-app",1],["fundition.app",1],["knacksteem.app",1],["partiko-steemcon",1],["peakmonsters.app",1],["smartsteem",1],["steeditor.app",1],["steem.app",1]],"key_auths":[["STM6NUNNqHkfC3zDhAiW9TK8SiUMWbAkrqe2TguNH8PgB7ZwMdKqH",1]]},"memo_key":"STM8FVULWcdLukbJ5BhJQZpXWPGiLfRzz5vyAeawnunDr8t7Nk2jZ","json_metadata":"{\"profile\":{\"name\":\"Nawab\",\"about\":\"A professional web application developer. Frontend and Backend Developer. Software Engineer. Game Developer. Nodejs, reactjs and blockchain Developer.\",\"website\":\"https:\/\/steemtools.cf\",\"location\":\"UK\",\"cover_image\":\"https:\/\/cdn.steemitimages.com\/DQmQdxKgsJXHUstxoei8sPAV4YFr7hWfgCosckkqxBtfCe8\/images%20(9).jpeg\",\"profile_image\":\"https:\/\/cdn.steemitimages.com\/DQmPJzT9qae7sDGi1YzB3MxjRbGdY84jkqcGYhb6D8oBdqD\/483127560-612x612.jpg\"}}","proxy":"","last_owner_update":"1970-01-01T00:00:00","last_account_update":"2019-02-14T04:33:27","created":"2018-10-28T13:04:24","mined":false,"recovery_account":"blocktrades","last_account_recovery":"1970-01-01T00:00:00","reset_account":"null","comment_count":0,"lifetime_vote_count":0,"post_count":42,"can_vote":true,"voting_manabar":{"current_mana":"187499397255","last_update_time":1551712185},"voting_power":7885,"balance":"8.228 STEEM","savings_balance":"0.000 STEEM","sbd_balance":"0.591 SBD","sbd_seconds":"73132113","sbd_seconds_last_update":"2019-03-04T13:28:45","sbd_last_interest_payment":"2019-02-21T02:37:39","savings_sbd_balance":"0.000 SBD","savings_sbd_seconds":"0","savings_sbd_seconds_last_update":"1970-01-01T00:00:00","savings_sbd_last_interest_payment":"1970-01-01T00:00:00","savings_withdraw_requests":0,"reward_sbd_balance":"0.000 SBD","reward_steem_balance":"0.000 STEEM","reward_vesting_balance":"4.005786 VESTS","reward_vesting_steem":"0.002 STEEM","vesting_shares":"239814.319762 VESTS","delegated_vesting_shares":"0.000000 VESTS","received_vesting_shares":"13747.039293 VESTS","vesting_withdraw_rate":"15787.521634 VESTS","next_vesting_withdrawal":"2019-03-11T12:40:21","withdrawn":"15787521634","to_withdraw":"205237781243","withdraw_routes":0,"curation_rewards":46,"posting_rewards":288222,"proxied_vsf_votes":[0,0,0,0],"witnesses_voted_for":13,"last_post":"2019-02-28T20:23:27","last_root_post":"2019-02-28T20:23:27","last_vote_time":"2019-03-04T15:09:45","post_bandwidth":0,"pending_claimed_accounts":0,"vesting_balance":"0.000 STEEM","reputation":"4428501705143","transfer_history":[],"market_history":[],"post_history":[],"vote_history":[],"other_history":[],"witness_votes":["abit","bhuz","blocktrades","busy.witness","curie","good-karma","pharesim","reggaemuffin","steemitboard","themarkymark","therealwolf","utopian-io","yabapmatt"],"tags_usage":[],"guest_bloggers":[]}]
```

Curl Command
```
curl -X GET -v -i 'https://api.steemtools.cf/get_accounts?account=value'
```
-----

### Technology Stack

This REST API has built with php & JSON .  

### Roadmap

One and only roadmap is bring all steemjs rest api to steemtools api. And also make some new api endpoints

### Pull - Request

https://github.com/nawab69/steemtools/pull/3

### Commits

https://github.com/nawab69/steemtools/commit/f5e8c9de92c684752b3a8b0b0bfe7c483ae8e940#diff-db974238714ca8de634a7ce1d083a14f

### Bug-Fixing 

I have fixed the cross browser issue and change the api to tower api. Because steemjs api stopped working.

https://github.com/nawab69/steemtools/commit/f5e8c9de92c684752b3a8b0b0bfe7c483ae8e940#diff-f1865b282ce3dc44114413600a9016ad

### Github Account
https://github.com/nawab69

![steemtools logotype2.png](https://cdn.steemitimages.com/DQmcywAbz981ro3VXYQ92RKjKrWdvfRHGUbY7MfAdBTqWoD/steemtools%20logotype2.png)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 428 others
properties (23)
authornawab69
permlinksteemtools-rest-api-has-been-released
categoryutopian-io
json_metadata{"tags":["utopian-io","development","documentation","abuse","steem"],"image":["https://cdn.steemitimages.com/DQmeSWyKLaajUN3xSPJR7VvJgzteks2TsGJwGFEbSuZjFEj/PicsArt_03-04-09.27.32.png","https://cdn.steemitimages.com/DQmcywAbz981ro3VXYQ92RKjKrWdvfRHGUbY7MfAdBTqWoD/steemtools%20logotype2.png"],"links":["https://github.com/nawab69/steemtools","https://api.steemtools.cf","https://api.steemtools.cf/get_withdraw_routes?account=value","https://api.steemtools.cf/get_volume","https://api.steemtools.cf/get_vesting_delegations?account=value&start=value&limit=value","https://api.steemtools.cf/get_version","https://api.steemtools.cf/get_trending_tags?start=value&limit=value","https://api.steemtools.cf/get_trade_history?start=value&end=value","https://api.steemtools.cf/get_ticker","https://api.steemtools.cf/get_recovery_request?account=value","https://api.steemtools.cf/get_savings_withdraw_to?account=value","https://api.steemtools.cf/get_savings_withdraw_from?account=value","https://api.steemtools.cf/get_account_count","https://api.steemtools.cf/get_blog_count?url=value","https://api.steemtools.cf/get_active_votes?author=value&permlink=value","https://api.steemtools.cf/get_accounts?account=value","https://github.com/nawab69/steemtools/pull/3","https://github.com/nawab69/steemtools/commit/f5e8c9de92c684752b3a8b0b0bfe7c483ae8e940#diff-db974238714ca8de634a7ce1d083a14f","https://github.com/nawab69/steemtools/commit/f5e8c9de92c684752b3a8b0b0bfe7c483ae8e940#diff-f1865b282ce3dc44114413600a9016ad","https://github.com/nawab69"],"app":"steemit/0.1","format":"markdown"}
created2019-03-04 18:14:36
last_update2019-03-04 18:14:36
depth0
children5
last_payout2019-03-11 18:14:36
cashout_time1969-12-31 23:59:59
total_payout_value33.434 HBD
curator_payout_value10.772 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11,661
author_reputation6,544,308,216,591
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,736,051
net_rshares62,950,352,435,550
author_curate_reward""
vote details (492)
@justyy ·
$12.88
Thank you @nawab69 for your contribution!.

1. I can see you are wrapping APIs upon the official full node - which you might want to extract that into a common configuration - if the node fails, you may want to have a fall-over mechanism to try next one.
2. The header should really be before your *echo*. Otherwise, depending on network latency, sometimes the browsers may have a warning.
3. Your APIs are not unit tested - could be good to have some tests
4. You don't need the `?>` which is recommended in API, otherwise, you might accidently put extra blank lines after - which will be valid HTML outputs, and you don't want that.
5. Your `curl` code could be extracted into a function/class - this is to remove code duplication in your APIs.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2-2-2-2-2-2-2-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjustyy
permlinkre-nawab69-steemtools-rest-api-has-been-released-20190305t215941627z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["nawab69"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-2-2-2-2-2-2-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-03-05 21:59:42
last_update2019-03-05 21:59:42
depth1
children1
last_payout2019-03-12 21:59:42
cashout_time1969-12-31 23:59:59
total_payout_value9.752 HBD
curator_payout_value3.123 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,196
author_reputation280,616,224,641,976
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,789,834
net_rshares17,036,773,934,709
author_curate_reward""
vote details (22)
@utopian-io ·
Thank you for your review, @justyy! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-nawab69-steemtools-rest-api-has-been-released-20190305t215941627z-20190307t231328z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-07 23:13:30
last_update2019-03-07 23:13:30
depth2
children0
last_payout2019-03-14 23:13:30
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_length58
author_reputation152,955,367,999,756
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,894,398
net_rshares0
@steem-ua ·
#### Hi @nawab69!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-steemtools-rest-api-has-been-released-20190306t002824z
categoryutopian-io
json_metadata"{"app": "beem/0.20.18"}"
created2019-03-06 00:28:27
last_update2019-03-06 00:28:27
depth1
children0
last_payout2019-03-13 00:28:27
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_length286
author_reputation23,214,230,978,060
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,794,204
net_rshares0
@steemitboard ·
Congratulations @nawab69! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@nawab69/voted.png?201903060047</td><td>You received more than 1000 upvotes. Your next target is to reach 2000 upvotes.</td></tr>
</table>

<sub>_[Click here to view your Board](https://steemitboard.com/@nawab69)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</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>

> You can upvote this notification to help all Steem users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-nawab69-20190306t011335000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-03-06 01:13:33
last_update2019-03-06 01:13:33
depth1
children0
last_payout2019-03-13 01:13:33
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_length1,060
author_reputation38,975,615,169,260
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,795,479
net_rshares0
@utopian-io ·
Hey, @nawab69!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-steemtools-rest-api-has-been-released-20190306t002507z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-06 00:25:09
last_update2019-03-06 00:25:09
depth1
children0
last_payout2019-03-13 00:25:09
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_length589
author_reputation152,955,367,999,756
root_title"SteemTools Rest API has been Released"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,794,093
net_rshares0