Creates an order with the specified parameters
CLI Example
Command syntax:
net_srv order create
-net <net_name>
-direction {sell | buy}
-srv_uid <Service UID>
-price <Price>
-price_unit <Price Unit>
-price_token <token_ticker>
-units <units>
[-node_addr <Node Address>]
[-tx_cond <TX Cond Hash>]
[-expires <Unix time when expires>]
[-cert <cert name to sign order>]
[-region <Region name>]
[-continent <Continent name>]
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 (optional)
-direction {sell | buy} - direction of token exchange: sell - from, buy - to
-srv_uid - UID of the service
-price - price for the number of units specified in the parameter `-units`, for example, 100 datoshi for 3600 seconds of the service
-price_unit - preferable unit of service (seconds\bytes)
-price_token - ticker of the token
-units - number of units in one portion of the service
-node_addr - address of the node in the service network (optional)
-tx_cond - hash of the conditional transaction (optional)
-expires - time of order expiring (optional)
-cert - name of the master node certificate which is used to sign order (optional)
-region - the region in which the node is located (optional)
-continent - the continent in which the node is located (optional)
Example:
Command:
cellframe-node-cli net_srv order create
-direction sell
-srv_uid 0x0000000000000001
-price 0.000007
-price_unit SEC
-price_token tKEL
-units 500
-net riemann
-cert mastercert
Response:
Created order 0xC4D4A5B737466AE975D66E63B0DEE35EDA53493B1A9BBC58280445158E863734
JSON-RPC Example
Command:
curl --unix-socket /opt/cellframe-node/var/run/node_cli
-X POST http://localhost/connect
-d '{"method":"net_srv", "params":["net_srv;order;create;-direction;sell;-srv_uid;0x0000000000000001;-price;0.000007;-price_unit;SEC;-price_token;tKEL;-units;500;-net;riemann;-cert;mastercert"], "id":"1"}'
Response:
{
"type": 0,
"result": "Created order 0x89C49CC794D67CE0C24E87F0F984E092EF4CDFE446F56D7CB8AC2CBD2FBF9A76\n",
"errors": null,
"id": 1
}