Creates exchange transaction filling order fully or partially

CLI Example

Command syntax:

srv_xchange purchase 
-order <order hash> 
-net <net_name> 
-w <wallet_name> 
-value <value> 
-fee <value>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-w - name of the wallet
-value - amount of datoshi user wants to sell corresponding to rate specified in order
-fee - comission in datoshi

Example:

Command:

cellframe-node-cli srv_xchange purchase 
-order 0x72FBB3ED3708074B229D7D8D46404E26347AEEFB3EC2F3B56A0CD4BE4AD1BBFB 
-net riemann 
-w testwallet 
-value 1.0e+18 
-fee 0.01e+18

Response:

Exchange transaction has done. tx hash: 0xA66DEC0DF85EAFA9D7C1284DF1D5A5DA83195BB1EC734A6B9A0FF10DF7AC20BD

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_xchange", "params":["srv_xchange;purchase;-order;0x72FBB3ED3708074B229D7D8D46404E26347AEEFB3EC2F3B56A0CD4BE4AD1BBFB;-net;riemann;-w;testwallet;-value;1.0e+18;-fee;0.1e+18"], "id":"1"}'

Response:


"type": 0,
"result": "Exchange transaction has done. tx hash: 0xE9332879DD8402BC29E49483A26994F1ED9E85106DC723256BBAA592D6A80E37",
"errors": null,
"id": 1
}