Nodeos Chain API
API provides access to the blockchain information and interaction with the blockchain. For API request, it needs to perform an POST line with required parameters. The manual presents examples of requests using curl. Return code 200 indicates successful operation.
API requests supported:
get_account
The request returns an object containing various details about a specific account on the blockchain.
Params:
(name) account_name— An account that data is being requested for.(symbol) expected_core_symbol— A token name, consisting of a set of capital letters. This field is optional.
Request examples:
Responses
Code: 200 OK
Value:
get_block
The request returns an object containing various details about a specific block on the blockchain.
Params:
(string) block_num_or_id— A block number or a block id.
Request example:
Responses
Code: 200 OK
Value:
get_code
The request returns an object containing rows from the table for a specified account.
Params:
(name) account_name— Account name on which the contract is based.(bool) code_as_wasm— Binary code. Default isfalse.
Request example:
Responses
Code: 200 OK
Value:
get_info
The request returns an object containing various details about the blockchain.
Params: No params required.
Request example:
Responses
Code: 200 OK
Value:
get_code_hash
The request returns hash code of an object containing rows from the table for a specified account.
Params:
(name) account_name— An account for which information in form of hash code is requested.
Request example:
Responses
Code: 200 OK
Value:
get_block_header_state
The request retrieves the block header state. This query can only be applied to a block that is not irreversible.
Params:
string block_num_or_id— A block_number or a block_id.
Request example:
Responses
Code: 200 OK
Value:
get_abi
The request retrieves the ABI for a contract based on its account name.
Params:
(name) account_name— Account on which the contract is based.
Request example:
Responses
Code: 200 OK
Value:
get_raw_code_and_abi
The request retrieves raw code and ABI for a contract based on account name.
Params:
(name) account_name— Account on which the contract is based.
Request example:
Responses
Code: 200 OK
Value:
get_raw_abi
The request returns an object containing rows from the specified table.
Params:
(name) account_name— Account on which the contract is based.(sha256) abi_hash— ABI hash. This field is optional.
Request example:
Responses
Code: 200 OK
Value:
get_table_rows
The request returns an object containing rows from the specified table as well as containing values of the table fields specified in the parameters.
Params:
(bool) json— Whether the object is converted to JSON. Default isfalse.(name) code— The name of the smart contract that controls the provided table.(string) scope— The account to which this data belongs.(name) table— The name of the table to query.(string) table_key— Type of key specified by index_position.(variant) lower_bound— Lower bound of search.(variant) upper_bound— Upper bound of search.(uint32_t) limit— Total number of table rows to retrieve. Default is10.(name) index— Position of the index used.(string) encode_type{"dec"}— The field takes the valuesdec,hex. Default isdec.(optional<bool>) reverse—trueif the search is in the reverse order. Default isfalse.(optional<bool>) show_payer— Display a RAM payer. Default isfalse.
Request example:
Responses
Code: 200 OK
Value:
get_currency_balance
The request retrieves the current balance.
Params:
(name) code— Token code.(name) account— Account for which balance is requested.(optional<string>) symbol— A string representation of a token symbol, composed of a float with a precision of 4, and a symbol composed of capital letters, for example1.0000 SYS.
Request example:
Responses
Code: 200 OK
Value:
get_currency_stats
The request retrieves currency stats of a certain type of tokens in the system.
Params:
(name) code— Token code.(string) symbol— A string representation of a token symbol, composed of a float with a precision of 4, and a symbol composed of capital letters between 1-7 letters separated by a space, example1.0000 SYS.
Request example:
Responses
Code: 200 OK
Value:
get_producers
The request retrieves producers (validators) list.
Params:
(bool) json— Whether the producers list is converted to JSON. Default isfalse.(string) lower_bound— In conjunction with limit can be used to paginate through the results. For example,limit=10andlower_bound=10would be page2.(uint32_t) limit— Total number of producers to retrieve. Default is50.
Request example:
Responses
Code: 200 OK
Value:
get_producer_schedule
The request retrieves producers (validators) list.
Params: No params required.
Request example:
Responses
Code: 200 OK
Value:
get_scheduled_transactions
The request retrieves deferred transactions.
Params:
(bool) json— Whether the packed transaction is converted to JSON. Default isfalse.(string) lower_bound— Date/time string in the formatYYYY-MM-DDTHH:MM:SS.sssOR transaction ID.(uint32_t) limit— Total number of transactions to retrieve. Default is50.
Request example:
Responses
Code: 200 OK
Value:
abi_json_to_bin
The request returns an object containing rows from the specified table.
Params:
(name) code— A name of row.(name) action— Action name.(variant) args— Arguments in JSON form.
Request example:
Responses
Code: 200 OK
Value:
abi_bin_to_json
The request returns an object containing rows from the specified table.
Params:
(name) code— A name of row.(name) action— Action name.(vector<char>) binargs— String containing binary arguments.
Request example:
Responses
Code: 200 OK
Value:
get_required_keys
The request returns the required keys needed to sign a transaction.
Params:
(object) transaction:
(string) expiration— Time in format ofYYYY-MM-DDTHH:MM:SS.sssthat transaction must be confirmed by.(integer) ref_block_num— Block number containing the transaction.(integer) ref_block_prefix— Prefix of block containing the transaction.(string/integer) max_net_usage_words— Network resource allocated for the transaction.(string/integer) max_cpu_usage_ms— CPU resource allocated for the transaction.(integer) max_ram_kbytes— RAM resource allocated for the transaction.(integer) max_storage_kbytes— Storage resource allocated for the transaction.(integer) delay_sec— Delay time (in seconds).(array of objects) actions— Actions composed of transaction.(array of integers/strings) transaction_extensions— Objects included in the transaction.
(string) available_keys— Provide the available keys.
Request example:
Responses
Code: 200 OK
Value:
get_transaction_id
The request returns ID of a transaction using specified parameters if such transaction is in chain DB, otherwise returns a message like this one "Unknown Transaction ID: ...".
Params: Optional set params is used.
Request examples:
Responses
Code: 200 OK
Value:
get_agent_public_key
The request returns a key needed to sign a transaction if such key is in chain DB, otherwise returns an empty string.
Params:
(account_name) account— An agent for which the key is requested. An agent is a potentially active account who has the staked tokens.(symbol) symbol— Identifier of a staked token, that is a token cost accuracy in the form of decimal places number and a token name, consisting of a set of capital letters.
Request example:
Responses
Code: 200 OK
Value:
resolve_names
The request returns the resolved domain and user names retrieved from the JSON format array. The request does not successfully complete if at least one name from the array is invalid.
Params:
Kinds of supported names:
(string) domain— A domain name.(string) @domain— A domain name.(string) username@domain— A username is in a domain scope.(string) username@@domain— A username is directly in a domain scope.
Request example:
Responses
Code: 200 OK
Value:
get_proxy_status
The request retrieves an information for specified proxy account.
Params:
(account_name) account— A proxy account name.(symbol) symbol— Identifier of a token (provided by grantors), that is a token cost accuracy in the form of decimal places number and a token name, consisting of a set of capital letters.
Request example:
Responses
Code: 200 OK
Value:
Last updated