API(v1) Usage

Please note that API documentation is only valid for MVS FULL NODE.
You can refer to Metaverse wiki instead as well.

NOTICE

Strongly recommends referring to <a href=/api_v2/>API v2 to replace api v1.

API v1 has some non-standard JSON-RPC reponse, will confused developers.

We found a boost library issue ptree write_json does not conform to JSON standard on json parser.The Boost write_json method puts quotes around all values, not just strings. So We strongly recommend developers to refer to API-v2:JSON-RPC 2.0.

API(v1) Usage

API URI: /rpc
HTTP Request to local default URL: http://127.0.0.1:8820/rpc

please replace ‘$parameter’ with your own parameter as below.

if we use

./mvs-cli $command $param1 $param2 ...

that should be equal as below in RPC-CALL case:

Build Json, then POST to ‘http://127.0.0.1:8820/rpc'

{
"method":"$command",
"params":["$param1", "$param2", ...]
}

Obviously, you should use help command for all commands.

# see all commands
./mvs-cli help
# see help message of this command
./mvs-cli help $command

Check here for the instance of source codes: https://github.com/ViewBTC/mvs-exchange-tools (keep updating).

Some Documentation For Server Setup in Chinese.

API(v1) Call List

Compatibility after v0.7.3(API v2):

  • ○ : keep same name, compatible in result if convert to json string.
  • × : incompatible in result.
  • ×× : obliterate.
  • newname : rename/alias in API v2, and compatible in result if convert to json string.
Commands => New Name
changepasswd =>
deleteaccount =>
importaccount =>
deposit =>
exportaccountasfile => dumpkeyfile
importaccountfromfile => importkeyfile
getaccount =>
getbalance =>
getnewaccount =>
getnewaddress =>
listaddresses =>
listbalances =>
send =>
sendfrom =>
sendmore =>
getwork =>
setminingaccount =>
start => startmining
stop => stopmining
stopall => shutdown
submitwork =>
fetch-header => getblockheader
getbestblockhash => getblockheader
getbestblockheader => getblockheader
getblock =>
getmemorypool =>
getpeerinfo =>
getpublickey =>
gettransaction => gettx
fetch-tx => gettx
listtxs =>
createasset =>
deleteasset => deletelocalasset
getaccountasset =>
getaddressasset =>
listassets =>
issue =>
issuefrom =>
sendasset =>
sendassetfrom =>
createmultisigtx =>
deletemultisig =>
getnewmultisig =>
listmultisig =>
signmultisigtx =>
fetch-balance => getaddressetp
fetch-height => getheight
stopall => shutdown
stop => stopmining
start => startmining
getasset => ×
validateaddress => ×
getmininginfo => ×
fetch-public-key => ××
fetch-history => ××
xfetchbalance => ××
xfetchutxo => ××
fetchheaderext => ××