An Introduction to steemd API Calls, Functions and Usage.

in #steem4 years ago (edited)

The STEEM Network runs on decentralized steemd server nodes which allow for numerous complex functions to be called depending on which API module is referenced.

This page lists various API calls for the steemd binary which acts as a backbone for the entire STEEM network. It should be noted that steemd is different than the STEEM wallet which is cli_wallet which is a completely different program that can be run alongside or independently of a steemd node. STEEM is pretty complex and a number of API call rules apply.

Most bots and other automated scripts accomplish their goal by using the cli_wallet program. You can visit our current documentation on it here: cli_wallet API <-- Under Construction!


Before Attempting steemd RPC Calls

In order to access steemd calls you MUST have a full node running and listening to port 8092, on a local machine (or other server you have access to). If you would like more information on setting up your own full STEEM node please check out the following information: EZSTEEM or STEEM-in-a-box

Make sure to set the rpc-endpoint in your STEEM nodes config.ini file.

Or can start your steemd client with the following to run it listening on port 8092:

./steemd --rpc-endpoint=

This allows our steemd server an RPC endpoint so that we can make calls to the node via RPC-JSON and have the program respond properly.


Call Format for steemd

The STEEM network is built off of Graphene architecture meaning that RPC calls are state-less and can be accessed through regular JSON formatted RPC-HTTP.

The following structure should be used when calling the steemd client: { "jsonrpc": "2.0", "method": "get_accounts", "params": [["klye"]], "id": 1 }

Or like

"jsonrpc": "2.0",
"method": "get_accounts",
"params": [["klye"]],
"id": 1

In the example above the "get_accounts" function calls to the database_api module and would returns information pertaining to the @klye account.


Using curl

A simple way to pass command to the same command to the steemd client is by with curl using the following format:

curl --data '{"jsonrpc": "2.0", "method": "get_accounts", "params": [["klye"]], "id": 1 }'

Calls That Are a Success

When an API call is successful it will return a response JSON formatted. The returned response should also have a similar id number indicating it's from the call you've just put out:

{ "id":1, "result": "data" }

The output of the above curl call invoking the get_accounts function with the id of 1 & the klye username in the only parameter yields a response of:

"json_metadata":"","proxy":"","last_owner_update":"1970-01-01T00:00:00","last_account_update":"1970-01-01T00:00:00","created":"2016-05-25T23:34:03","mined":false,"owner_challenged":false,"active_challenged":false,"last_owner_proved":"1970-01-01T00:00:00","last_active_proved":"1970-01-01T00:00:00","recovery_account":"steem","last_account_recovery":"1970-01-01T00:00:00","comment_count":0,"lifetime_vote_count":0,"post_count":1417,"voting_power":9714,"last_vote_time":"2016-09-18T03:03:09","balance":"0.000 STEEM","sbd_balance":"0.089 SBD","sbd_seconds":"195301723950","sbd_seconds_last_update":"2016-09-16T14:41:15","sbd_last_interest_payment":"2016-09-02T11:15:03","vesting_shares":"8673602.167564 VESTS","vesting_withdraw_rate":"0.000000 VESTS","next_vesting_withdrawal":"1969-12-31T23:59:59","withdrawn":0,"to_withdraw":0,"withdraw_routes":0,"curation_rewards":12180,"posting_rewards":4896836,"proxied_vsf_votes":[0,0,0,0],"witnesses_voted_for":12,"average_bandwidth":236760191,"lifetime_bandwidth":"1827138000000","last_bandwidth_update":"2016-09-18T05:44:51","average_market_bandwidth":122097987,"last_market_bandwidth_update":"2016-09-16T14:41:15","last_post":"2016-09-17T20:57:39","last_root_post":"2016-09-13T16:00:36","post_bandwidth":10000,"last_active":"2016-09-18T05:44:51","activity_shares":"20803969092513102456","last_activity_payout":"1970-01-01T00:00:00","vesting_balance":"0.000 STEEM","reputation":0,"transfer_history":[],"market_history":[],"post_history":[],"vote_history":[],"other_history":[],"witness_votes":["anyx","dantheman","jesta","liondani","pfunk","pharesim","proctologic","riverhead","roadscape","royaltiffany","smooth.witness","someguy123"],"blog_category":{}}]}

As you can see a fair amount of data is given off by some of these calls which can easily be parsed or scraped for whatever intention a coder had for the information.

Calls That Fail

If an API doesn't return a successful call the return output will show some details as shown below:

"id": 0
"error": {
"data": {
"code": error-code,
"name": " .. name of exception .."
"message": " .. message of exception ..",
"stack": [ .. stack trace .. ],
"code": 1,

Error handling will spit out some information pertaining to what went wrong. I've included an actual example of a response from a failed call below:

{"id": 177,"error": {"code": 1,"message": "7 bad_cast_exception: Bad Cast\nInvalid cast from string_type to Array\n {"type":"string_type"}\n th_a variant.cpp:537 get_array","data": {"code": 7,"name": "bad_cast_exception","message": "Bad Cast","stack": [{"context": {"level": "error","file": "variant.cpp","line": 537,"method": "get_array","hostname": "","thread_name": "th_a","timestamp": "2016-09-18T06:41:36"},"format": "Invalid cast from ${type} to Array","data" :{"type": "string_type"}}]}}}

As clearly seen above the failure response is in depth however hard for most humans to decypher. I'll be going into further details of how this is broken down in the future.


login_api functions



Call example: { "id": 1, "method": "login", "params": [["username", "password"]]}
Usage: Allows login to accounts on the STEEM network


Call example: { "id": 2, "method": "get_api_by_name", "params": [["apiname"]]}
Usage: Returns ??? (more info needed)


database_api functions





JSON example: {"id":3,"method":"get_accounts","params":[["username"]]}
Usage: Return displays a large amount of data pertaining to accounts included in call. Call multiples simply by adding a comma between the names.
Example: "params":[["usernamehere", "steem-global"]]


Call example: {"id":4,"method":"get_account_references","params":[["accountid"]]}
Usage: Currently returns an error. Will update in future when more info on this is found.


Call example: {"id":5,"method":"lookup_account_names","params":[["username", "callback"]]}
Usage: Returns information about the accounts. Call multiples simply by adding a comma between the names. example: "usernamehere", "steem-global"


Call example: {"id":6,"method":"lookup_accounts","params":[["username", "limit"]]}
Usage: Acts as a search function to display usernames containing letters given in the first parameter.


Call example: {"id":7,"method":"get_account_count","params":[]}
Usage: Shows the number of STEEM accounts on the network currently.


Call example: {"id":8,"method":"get_conversion_requests","params":[["username"]]}
Usage: Displays current conversion requests of the given account.


Call example: {"id": 9, method: 'get_account_history', 'params': [["username", "from", "limit"]]}
Usage: Allows you to recall the history of given account on the STEEM network.


Call example: {"id": 10, method: 'get_owner_history', 'params': [["username"]]}
Usage: Goes back and display if the given account has changed ownership on the blockchain.


Call example: {"id": 11, method: 'get_recovery_request', 'params': [["username"]]}
Usage: If the status of the account is currently flagged as wanting recovered will return true, returns "null" otherwise.





Call example: {"id": 12, method: 'get_active_votes', 'params': [[ "username", "permalink"]]}
Usage: Check and see if a post currently has any active votes on it.


Call example: {"id": 13, method: 'get_account_votes', 'params': [[ "username"]]}
Usage: Lists the last 100+ votes on the given account.





Call example: {"id":14,"method":"get_order_book","params":["limit"]}
Usage: Returns a list of orders on the internal STEEM market.


Call example: {"id":15,"method":"get_open_orders","params":["username"]}
Usage: If specified username has orders open on the internal STEEM market it will return them.


Call example: {"id":16,"method":"get_liquidity_queue","params":["startusername", "limit"]}
Usage: When there are users in the liquidity queue it will return them.


Call example: {"id":17,"method":"get_current_median_history_price","params":[]}
Usage: Grabs the current median conversion price of SBD / STEEM.


Call example: {"id":18,"method":"get_chain_properties","params":[]}
Usage: Fetches the conversion history of SBD / STEEM.





Call example: {"id":19,"method":"get_content","params":["username","permalink"]}
Usage: Grabs information about the post given in second parameter.


Call example: {"id":20,"method":"get_content_replies","params":["username","permalink"]}
Usage: Lists all replies on the post given in second parameter.


Call example: {"id":21,"method":"get_content_replies","params":[["username", "startpermalink", "beforedate", "limit"]]}
Usage: Grabs discussions from the username given from a starting permalink or start date.


Call example: {"id":22,"method":"get_content_replies","params":[["username", "startpermalink", "limit"]]}
Usage: Grabs replies from the username given from a starting permalink.


Block Info



Call example: {"id":23,"method":"get_block","params":["blocknumber"]}
Usage: Displays various information about the particular block number given.


Call example: {"id":24,"method":"get_block_header","params":["blocknumber"]}
Usage: Shows the header and other brief info about the given block number.


Call example: {"id":25,"method":"get_block_header","params":["path"]}
Usage: Gets the current state of the STEEM network. Leave path blank for current info.


Call example: {"id":26,"method":"get_trending_categories","params":[["searchafter","limit"]]}
Usage: Allows for the searching of trending categories both current and past.


Call example: {"id":27,"method":"get_best_categories","params":[["after","limit"]]}
Usage: To be 100% honest I wasn't able to figure this call out yet.


Call example: {"id":28,"method":"get_active_categories","params":[["after","limit"]]}
Usage: To be 100% honest I wasn't able to figure this call out yet.


Call example: Unknown. I couldn't get it to work.
Usage: To be 100% honest I wasn't able to figure this call out yet.


Call example: Unknown. I couldn't get it to work.
Usage: To be 100% honest I wasn't able to figure this call out yet.


Call example: Unknown. I couldn't get it to work.
Usage: To be 100% honest I wasn't able to figure this call out yet.


Transactions / Authority / Validation



Call example: {"id":32,"method":"get_transaction_hex","params":["trx"]}
Usage: Fetches the transaction hex digits from the given transaction.


Call example: {"id":33,"method":"get_transaction","params":["txid"]}
Usage: Grabs the details a transaction from a given transactionID.


Call example: {"id":34,"method":"get_potential_signatures","params":["trx"]}
Usage: To be 100% honest I haven't attempted to figure out call out yet.


Call example: {"id":35,"method":"get_required_signatures","params":[["trx", "availablekeys"]]}
Usage: To be 100% honest I haven't attempted to figure out call out yet.


Call example: {"id":36,"method":"verify_authority","params":["trx"]}
Usage: To be 100% honest I haven't attempted to figure out call out yet.


Call example: {"id":37,"method":"verify_account_authority","params":[["userid/username", "signer"]]}
Usage: To be 100% honest I haven't attempted to figure out call out yet.





Call example: {"id":38,"method":"get_config","params":[]}
Usage: Displays the current configuration of the steemd node.


Call example: {"id":39,"method":"get_dynamic_global_properties","params":[]}
Usage: Shows an overview of various information regarding the current state of the STEEM network.


Call example: {"id":40,"method":"get_chain_properties","params":[]}
Usage: Returns current account creation fee, maximum block size and SBD(Steem Dollar) interest rate.


Call example: {"id":40,"method":"get_hardfork_version","params":[]}
Usage: The current version of STEEM hardfork will be displayed.


Call example: {"id":42,"method":"get_hardfork_version","params":[]}
Usage: Gives a date and version as to when the next version of STEEM is expected.





Call example: {"id":43,"method":"get_witnesses","params":["witnessid"]}
Usage: I've not looked into what this call does yet, will shortly.


Call example: {"id":44,"method":"get_witness_by_account","params":["username"]}
Usage: When invoked answers true if the username given is a witness or "result": null if not.


Call example: {"id":45,"method":"get_witnesses_by_vote","params":[["username/blank", "limit"]]}
Usage: Displays a list of the top witnesses by order of witness votes.


Call example: {"id":46,"method":"lookup_witness_accounts","params":[["searchusername", "limit"]]}
Usage: Returns a list of every user that has declared their intent to run as witness.


Call example: {"id":47,"method":"get_witness_count","params":[]}
Usage: Calculates and displays the total number of accounts that have shown intent to run for witness.


Call example: {"id":48,"method":"get_active_witnesses","params":[]}
Usage: Shows the current active witnesses (Top 21 last I checked, might be wrong).


Call example: {"id":49,"method":"get_miner_queue","params":[]}
Usage: Creates a list of miners waiting to get into the DPOW line to create a block.





Call example: {"id":50,"method":"set_subscribe_callback","params":[["cb", "clearfilter"]]}
Usage: I've not yet looked into how this function works, sorry. Will update soon.


Call example: {"id":51,"method":"set_pending_transaction_callback","params":["cb"]}
Usage: I've not yet looked into how this function works, sorry. Will update soon.


Call example: {"id":52,"method":"set_block_applied_callback","params":["cb"]}
Usage: I've not yet looked into how this function works, sorry. Will update soon.


Call example: {"id":53,"method":"cancel_all_subscriptions","params":["cb"]}
Usage: I've not yet looked into how this function works, but it seemingly appears to cancel subscriptions.





Call example: {"id":54,"method":"get_trending_tags","params":[["aftertag", "limit"]]}
Usage: Displays a list of tags containing the first parameter (almost as if parent and "spin-off" tags).


Call example: {"id":55,"method":"get_discussions_by_trending","params":[{"tag":"tagnamehere", "limit":"10"}]}
Usage: Displays a list of tags containing the first parameter (almost as if parent and "spin-off" tags).


Call example: {"id":56,"method":"get_discussions_by_created","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Displays a list of post from the start of the tags containing the first parameter.


Call example: {"id":57,"method":"get_discussions_by_active","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Displays a list of active posts from tag contained the first parameter.


Call example: {"id":58,"method":"get_discussions_by_cashout","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Displays a list of posts with outstanding payouts from the tag contained the first parameter.


Call example: {"id":59,"method":"get_discussions_by_payout","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Couldn't seem to get this one to work properly, will look at it more closely soon.


Call example: {"id":60,"method":"get_discussions_by_votes","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Returns a list of posts sorted by votes from the tag contained the first parameter.


Call example: {"id":61,"method":"get_discussions_by_children","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Calls forth a list of child posts from the tag contained the first parameter.


Call example: {"id":62,"method":"get_discussions_by_hot","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: Conjures up a list of the hottest posts from the tag contained the first parameter.


Call example: {"id":63,"method":"get_discussions_by_total_pending_payout","params":[{"tag":"tagnamehere","limit":"10"}]}
Usage: I haven't checked out this one yet but I imagine it does something similar to its siblings above.





Call example: {"id":64,"method":"get_key_references","params":["key"]}
Usage: Not had the chance to look into this yet.

This is a work in progress

I'd like to ask the community in aide in helping me explain the calls and functions I was unable to figure out in the comments section below. This information is being mirrored on my site STEEM Network News & Node and hopefully once I'm done filling in the gaps here and making a more comprehensive write-up as well as start the cli_wallet write up it will allow for enough documentation for to want to have a whack at integrating our currency and token into their payment gateway platform allowing for EASY woocommerce integrations of SBD/ STEEM.

Thanks for reading. I hope you find this info useful!


Thanks for a nice summary.
Sadly, I have a feeling it is a bit outdated by now - which may be why the Python steemd interface seems to only partially work.

Do you know if there is a newer description of it?

Damn that's some comprehensive work you are doing man!!

This is just the groundwork sir. I'll go into greater detail when I have the time. The goal now is to get the basics down in a readable format so people can start experimenting themselves while I shift over to starting to document the cli_wallet before coming back to this information to finish it off.

I've got things I need to accomplish and this is how to do it.

This is excellent information. I can't wait to get in front of a computer running a node and start playing with it.

I had to set one up in order to get this document done up!

You may be able to pass curl commands and steemd JSON calls to my Full Steem Node located at global.steem:8090

This is going to help many users for sure. This is part of your mission to get documented for aswell correct?..from what I have read in your other post it is. I know many merchants are hoping for a simple payment solution and you are making this possible. ..Great stuff mate.

Yes this is all part of the bigger mission of getting coinpayments to accept SBD / STEEM on their platform.

Sometimes it takes one guy to do the work. If I happen to be the guy I'm ok with that because I know it will help plenty of others be successful with their lives.

Yeah, very generous of you to take it on. Mate, I wish I could help out, my coding skills etc is nonexsistent, but if there is anything else you need help with let me know in and i will.

No worries. I admit I'm not the strongest coder either but I do possess enough understanding to be able to parse some of it and spit it out in easily digestible formats for others.

Is there any way to check for total amount of votes per account?

Or is this not possible because many only vote a certain % so they don't count the amount.

I'll look into it for you.

Thanks. This will be very useful for reference.

This is only the start of reference documentation. I'll get a better version done here in the near future.

Really nice job writing all this out @klye

It did in fact take me hours to write this.. as well as it took me setting up a full node to check some of the calls myself. Labour intensive. :P

Really cool info man! Thanks!

No worries! I'll do a more comprehensive write up when time allows.

Thank you because I was looking for informarion on the API.

Tons of people have been. It wasn't really documented at all before this other than a few examples here or there.

This isn't the final version by any means either. I'll be going into more detail later when I have time. :)

It's worth mentioning that some calls return different data for the same parameters depending on the age of the data.

For example, get_content returns the votes in the active_votes field, but this is cleared after each payout. After the last payout, this will be empty so you cannot see (via this call) the votes for that post.

The API has a lot of idiosyncrasies like this and I hope they get included in the documentation, too.

Awesome! thank you for sharing your info. I did notice a few naunces like this but will have to go back and include them in the final version. Today I'm working on getting some cli_wallet instructions written for the accessing the API.

Hello @klye Good job! Do you have any news about adding Steem and SBD to Thank you!

I'm currently working on a cli_wallet instruction manual and once that is complete I should be able to present the information and fee to them to get them started on implementing it. Hopefully I can get it done here soon.

Awesome - this is exactly the kind of post I've been looking for! I have steemd running and am looking forward to doing a bit of coding.

i'm trying to figure out what format i should use in "searchafter" in get_trending_categories... is it a date?


params: tag(string), limit(integer)

unfortuately i already tried using a "tag" like nature, funny etc.. ain't working

Thanks, @klye. Terse. Can you help me figure out how to post content programmatically, please?

What language you using.

Personally a JavaScript kinda guy. SteemJS is what I use. pm install steem

Thanks, @klye. In the end, I made it. I'm a Javascript guy, too. It took a bit of trial and error due to the lack of documentation.

I trial and error a fair amount too!

Glad to hear you got it figured. Thanks for keeping me updated

Hi @klye,

Thank you for sharing this info!

I'm looking for an API that allows me to create content (POSTs). I have been reading the documentation and it seems that we can only retrieve information or just create a comments or up-vote.

I wonder if you could point me to some API that allows creating POST in



Okay, all this work made me want to get my hands on a friendly shell, where I could experiment. Not in a position to have a server, since I don't even have a real computer with me. :-D
But such is disadvantage of nomadic lifestyle. :-> This time around I was sure that even a notebook would hinder me too much, so only a mobile for me for now. 8)

You should be able to pass curl commands onto my server at global.steem:8090 I believe if you want to try er out.

Let me know if it works. I haven't tried it from an external connection yet. :)

I am on iPad, so I'll have to find a shell where to run curl from. I'll keep that in mind. Will have to bother some of my friends with servers. :-D

Coin Marketplace

STEEM 0.16
TRX 0.03
JST 0.027
BTC 11641.54
ETH 379.53
USDT 1.00
SBD 1.00