./echo_node --data-dir=datadir --rpc-endpoint=127.0.0.1:8090
--data-dirset a working directory containing databases, configuration file, etc.
--rpc-endpointspecifies JSON-RPC endpoint to listen on(accepting WebSocket and HTTP). You can use
./echo_node --helpto see all possible arguments to pass. We should pick out options for history plugin that could also be specified as process arguments and described in config.ini e.g.
track-account = "1.2.8". The following two parameters will greatly reduce the memory required for the operation, the principle is not to save the historical data index which is not related to the exchange account. To make this options work correctly you should also specify
partial-operations = trueoption.
max-ops-per-contractparameters indicate how many history records are kept for each account or contract. The default value is 1000. For exchanges, if you have more deposit and withdrawal records, consider setting a larger value. Earlier data is deleted from memory and cannot be queried quickly (but still recorded on the chain).
max-transaction-ids-to-storeparameter may to be specified to indicate how many transaction info records. No limit by default. Earlier data is deleted from memory and cannot be queried quickly (but still recorded on the chain).
NOTE: after changing this arguments you should restart node with
log_config.inifile. We recommend to disable all but
logger.defaultto reduce disk usage. To disable specific logs set level in config to
off. For example to disable p2p logs you should edit
--server-rpc-endpointargument with rpc-endpoint address of the node.
--rpc-endpointspecified to interact with wallet with JSON-RPC.
./echo_wallet --mainnet --server-rpc-endpoint=ws://127.0.0.1:8090 --rpc-endpoint=127.0.0.1:8091
infocommand to view the current node info(block height, last block time, etc.)
generate_account_addressmethod specifying name of account and public label. To do that you should enter command in wallet:
get_account_address_by_labelmethod. It will return address if it will be registered and null if not.
get_account_address_historymethod to get transfers of specified address.
get_account_history_operationsmethod to get account history of specified operation.
echo_walletto get the block number that cannot be rolled back:
head_block_numberis the latest block number, and
last_irreversible_block_numis the block number that cannot be rollback.
last_irreversible_block_numshould be processed. You can store last processed block number and process transactions only from higher blocks. If result didn't reach previous stored block number then you need to chain one more request to get all needed data to process.
list_account_balancescommand to check whether the withdrawal account balance is sufficient (pay attention to the asset type and calculate the fee):
Note: Pay attention to asset type
get_account_idcommand to check whether the customer’s withdrawal account is valid:
transfercommand to send a withdrawal transaction. Such as:
transfer_to_addresscommand could be used to send a withdrawal transaction to address.
signed_transactionand second is a string view of
transaction_id_type(this is hash of the transaction).
Note: If the currency is ECHO, the number of decimal places is up to 8 digits. If it is other assets, you can view the decimal places of the asset with the precision field with the
get_relative_account_historycommand to obtain withdrawal history of withdrawal-account.
Note: When the maximum number of cli_wallets returned in a certain version exceeds 100, resulting in inaccurate results. Please avoid using the limit to exceed 100.
last_irreversible_block_num, indicating that the transaction has entered the block and cannot be rolled back;
Note: Use the
get_blockcommand to query details based on the
block_numfield of the record:
get_relative_account_historyfor future reference.