stellar-deprecated / kelp

Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges
https://kelpbot.io
Other
1.1k stars 263 forks source link

[3] Per order max size on both assets - implement as new filter #612

Open antb123 opened 3 years ago

antb123 commented 3 years ago

Desired Behavior

Many trading system support a "max order size" feature that protects users from over trading a position or an account.

For example you might say I don't want any orders over 10,000 XLM in value so if a market goes strange or your bot doesn't react the way you expect you are protected.

This max order size would need probably to be in both selling (base asset/ASSET_CODE_A) and buying asset (ASSET_CODE_b). Using prices may not make sense.

For example trading XLMBTC my max might be ASSET_CODE_A_MAX_ORDER="1000" # XLM ASSET_CODE_B_MAX_ORDER="0.001" # BTC

This protects from "oversell" algo misconfiguration over selling either one of the assets.

nikhilsaraf commented 3 years ago

@antb123 this is a great idea. I will include it in the next release (after the one scheduled for February).