Creates a new order with specified amount of Datoshi to exchange with specified rate (buy / sell)

CLI Example

Command syntax:

srv_xchange order create 
-net <net_name> 
-token_sell <token_ticker> 
-token_buy <token_ticker> 
-w <wallet_name> 
-value <value> 
-rate <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
-token_sell - kind of token being sold
-token_buy - kind of token being bought
-w - name of the wallet
-value - amount of datoshi user wants to exchange
-rate - exchange rate (buy/sell)
-fee - comission in datoshi
 

Example:

Command:

cellframe-node-cli srv_xchange order create 
-net riemann 
-token_sell tKEL 
-token_buy mtKEL 
-w testwallet 
-value 2.0e+18 
-rate 1.0 
-fee 0.1e+18

Response:

Successfully created order 0x72FBB3ED3708074B229D7D8D46404E26347AEEFB3EC2F3B56A0CD4BE4AD1BBFB

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_xchange", "params":["srv_xchange;order;create;-net;riemann;-token_sell;tKEL;-token_buy;mtKEL;-w;testwallet;-value;2.0e+18;-rate;1.0;-fee;0.1e+18"], "id":"1"}'

Response:


"type": 0,
"result": "\nSuccessfully created order 0x7669D6ED5189F3E5E58F84B932CD18603B49048F0EBEC0ED02809C5C50AA6AF8",
"errors": null,
"id": 1
}