Codaone / DEXBot

Trading Bot for the BitShares Decentralized Exchange
Other
250 stars 129 forks source link

SO: Investigate how strategy behave at 1 sat markets #555

Open bitphage opened 5 years ago

bitphage commented 5 years ago

A user on telegram channel asked for help in setting dexbot for a market with center price arount 1 sat. This should work in general, though I want to perform tests for SO strategy to check how this actually handled, also unittest for such case also needed.

Need to check the GUI too, it may not allow to enter correct lower/upper bounds as input field precision is limited.

Example market ticker data:

{'core_exchange_rate': 0.000100000 BTS/BRIDGE.SCP,
 'baseVolume': 0.01983310 BRIDGE.BTC,
 'quoteVolume': 1,887,093.0702 BRIDGE.SCP,
 'lowestAsk': 0.000000010989 BRIDGE.BTC/BRIDGE.SCP,
 'highestBid': 0.000000010000 BRIDGE.BTC/BRIDGE.SCP,
 'latest': 0.000000010000 BRIDGE.BTC/BRIDGE.SCP,
 'percentChange': -5.41}
PermieBTS commented 5 years ago

I'm asking @joelvai for his input/advice on this

joelvai commented 5 years ago

Most of the assets have maximum precision of 8, but if 12 is really needed it can be changed. This would require some testing on the market since the precision goes that big there is higher chance for float errors, which is already a problem on some edge cases.

bitphage commented 5 years ago

I added the test for this condition, the strategy is working in general, though the user must have sufficient balance of QUOTE asset to be able to put sell orders at desired increments.

bitphage commented 5 years ago

To wrap up: the strategy works, but GUI precision limited to 8, so user can't input bounds lower than 1 sat. Solutions:

thehapax commented 5 years ago

Reverse Market is always cleaner solution as basing it directly off what the exchange offer. My 2 cents.