Prints token pairs history (or only filtrated by time)

All times are in RFC822. For example, “7 Dec 2023 21:18:04

CLI Example

Command syntax:

srv_xchange token_pair rate history 
-net <net_name>  
-token_from <token_ticker> 
-token_to <token_ticker> 
[-time_from <From time>] [-time_to <To time>]

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_from - kind of token is being sold 
-token_to - kind of token is being bought 
-time_from - filtration by time since specified value (optional)
-time_to - filtration by time until specified value (optional)

Example:

Command:

cellframe-node-cli srv_xchange token_pair rate history
-net riemann  
-token_from mtKEL 
-token_to tKEL

Response:

Hash: 0xE1BB55E0B8EBCFD2F654F0825EE64AE299AC661FB7BBE8377E1E5FFC508FC28C
  ts_created: Thu Feb 29 05:30:42 2024
  proposed 1.0 (1000000000000000000) mtKEL for exchange to tKEL,  rate (tKEL/mtKEL): 2.0, net: riemann

Hash: 0x5A8BEE67D15A10480DAA18FE797F5435CDB16435B9235F9DFF3015E7AA5CA700
  ts_created: Tue Mar  5 11:59:50 2024
  proposed 2.0 (2000000000000000000) mtKEL for exchange to tKEL,  rate (tKEL/mtKEL): 0.001, net: riemann

...


Hash: 0x31FC67FBF72AD7251F229D017B6B03E6E8D9E6ABB0178D6587E7BDFC6452C216

  ts_created: Fri Mar  8 09:22:54 2024

  changed 1.0 (1000000000000000000) mtKEL for 2000.0 (2000000000000000000000) tKEL,  rate (tKEL/mtKEL): 2000.0,  remain amount 0.0 (0) mtKEL, net: riemann

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"srv_xchange", "params":["srv_xchange;token_pair;-net;riemann;rate;history;-token_from;mtKEL;-token_to;tKEL"], "id":"1"}'

Response:


"type": 0,
"result": "same as cli response",
"errors": null,
"id": 1
}