kelp icon indicating copy to clipboard operation
kelp copied to clipboard

[?] Confirm Orders flag

Open antb123 opened this issue 5 years ago • 1 comments

Currently Kelp has simulation mode and live mode but does not have order confirm functionality.

I want to ... have the console prompt for confirmation before submitting xdr files to horizon.

Impact

The desired behavior will allow me to ... More easily pilot different strategies in Pubnet and reduce risk of financial loss as you switch strategies.

Feature Suggestion

We can achieve the desired behavior by ... Have a flag in the trader.cfg that allows for confirms of orders.

Once set the console might look like this: 2020/12/01 14:44:26 orderConstraintsFilter: selling, baseAmount=1.00000000, quoteAmount=581.57538560, keep = true 2020/12/01 14:44:26 orderConstraintsFilter: selling, baseAmount=1.20000000, quoteAmount=697.99514628, keep = true 2020/12/01 14:44:26 orderConstraintsFilter: dropped 0, kept 2 ops from original 2 ops, len(filteredOps) = 2 .. tx XDR: AAAAINejrJYEAttA3t6LrgSOQYHm08iBrV6h7/3VyYRMCk9AAAAyAEHvKsAAAh5AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAADAAAAAUVVUlQAAAAAH9WSbq+wgntYAzvpTGBr4jd/JRhNJp0wRgxlSY7IDucAAAABTkdOVAAAAAAs4YIuYne69wMuNtfiZ64gb7E3qnTR7A4yD4jZDSS8AQAAAAAAmJaAArVKuQABMS0AAAAAAAAAAAAAAAAAAAADAAAAAUVVUlQAAAAAH9WSbq+wgntYAzvpTGBr4jd/JRhNJp0wRgxlSY7IDucAAAABTkdOVAAAAAAs4YIuYne69wMuNtfiZ64gb7E3qnTR7A4yD4jZDSS8AQAAAAAAtxsAMhsyswAWDXoAAAAAAAAAAAAAAAAAAAABETApPQAAAEDsJ/Y/qgMB04XAuPCfw1O1Hx5fNHMpBONrU5qm1vQ5jUcU6xSP2K6peH1EH/6YS0ieuJx+OPF87OWtSxIrhdgK

Do you want to submit this XDR? strategy=sell selling Base = EURT Base Amount = 1.00 quote asset=NGNT quoteAmount=581.57538560 strategy=sell selling Base = EURT Base Amount = 1.20 quote asset=NGNT quoteAmount=697.99514628 y/N: N Y 2020/12/01 14:44:26 submitting tx XDR to network (async)

  • I believe the default should be N but it could be Y. The main thing is to have it confirm the basket of orders before sending them to the market.

antb123 avatar Dec 01 '20 19:12 antb123

if the goal is to see what prices and amounts will be sent to the exchange (SDEX / centralized exchange) then we get that with simulation mode.

what is the main benefit of this over the current simulation mode (via the --sim flag) ?

nikhilsaraf avatar Dec 01 '20 21:12 nikhilsaraf