Comments (12)
Awesome!!! 💯
Very stoked to give this a try. Thanks @nikhilsaraf !
from kelp.
The behavior you describe of not matching any existing orders is already accomplished to the extent possible by the staticSpreadLevelProvider; the bot's order levels are offset from the center price based on the config settings, up and down for sell and buy respectively. By definition, there are no buy offers higher than the center price and no sell offers lower than the center price, hence checking the individual offers is not necessary.
What it does not do is prevent your order from filling another order that arrives between when the bot checks the center price and when the bot's orders are placed. Another check of the orderbook would not help; another trader's order could still arrive between your book check and your order's arrival. Which is the main purpose of a maker-only order on a centralized exchange. This feature is not supported by the Stellar protocol itself, see the market guide.
from kelp.
@jimdanz this is a good feature request. We can do this at the framework level to support all strategies and take this input as a command line param to the bot's trade
command.
Before placing any orders (submitting to the DEX) we can "delete" any orders (manageOffer operations, really) that will cross the existing orderbook. This can be done by querying the orderbook to find the intersection between the existing orders and the orders you intend on placing.
Is the proposed approach a viable solution for you?
@Reidmcc I think the center price in the staticSpreadLevelProvider would be taken from a priceFeed, not from the DEX itself, so it is likely to differ from the current state of the DEX's orderbook.
from kelp.
@nikhilsaraf Right, and priceFeed calculates center price off of two GetPrice()
calls in GetCenterPrice()
. Are the GetPrice()
calls not pulling fresh data from the DEX during GetCenterPrice()
? Or is the priceFeed generated long enough before staticSpreadLevelProvider runs that it's out of date?
from kelp.
@Reidmcc GetPrice()
does not pull from the DEX :)
it pulls from data sources outside the DEX (such as coinmarketcap, kraken, binance, etc.)
from kelp.
@nikhilsaraf Ah, misunderstanding on my part. Thanks.
from kelp.
@nikhilsaraf thanks for taking a look here. Your proposed approach sounds great, and I'm very bullish on it being at the framework level.
As a small matter of personal preference, I think it'd be easier to manage if the flag was set in strategy.cfg rather than as a command-line argument. One concrete reason I say that is that down the line, "maker only" may want to evolve into a parameter that you can tune rather than something you have to be absolute about (eg you might have a tolerance where you're willing to place orders that are up to 10% taker, rather than pure maker only). And also because for me ergonomically it's easier to keep track of changes in the version-controlled cfg file.
from kelp.
@jimdanz yes, I think we can make it work by keeping it at the strategy config level -- will have to augment the interface for the strategy a little but I think it should be possible. Updated your original comment to include this in the specification section.
this is something that I'll try to include in the December release (possibly November if things go quick) since I have a couple of pressing changes I'm actively working on. Is that something that would work for you?
from kelp.
@nikhilsaraf sounds great -- thanks! I'll be eager to try it out once it's available.
from kelp.
@nikhilsaraf With the orderbook checking code I added for my new strategy in hand, I think I could put this request together pretty easily (especially at a config file level). I don't want to get in the way of your plan if you already have the details in mind though.
from kelp.
blocked on #97 which introduces the GetOrderBook
API method on sdex.go
from kelp.
@jimdanz fyi, you can use this feature now once you check out the master branch.
just add SUBMIT_MODE="maker_only"
in the trader.cfg file.
See the sample_trader.cfg file as an example. let me know if you run into any issues.
from kelp.
Related Issues (20)
- Fill Tracker cannot unmarshal string into Go struct field Price._embedded.records.price.n of type int32 HOT 16
- newest GUI only support one tradetype "buysell"? how to convert to others tradetype?
- command-line run sample_pendulum.cfg prompt error
- GUI problem with checked the "Fill Tracter" on,the bot can not be start
- KELP is crashing after network upgrade HOT 1
- Critical BUG ⚠️ HOT 2
- kelp crashes after protocol update 18 HOT 2
- Not working after the P18 upgrade?
- Provide option to not build the GUI HOT 2
- no such file or directory libsodium.so.23
- linux-ia32-83_binding.node HTTP error 404 Not Found
- Private Stellar Network
- Add arm64 architecture to darwin platform
- Is there a guide on how to start the program? A video would be ideal!
- Coinmarketcap isn't working anymore for Kelp HOT 1
- OKX (OkeX): Integrate via API, Commissions up tp 60%?
- adjusting order size
- Infinite loop when encounters a trade that is different from base/quote asset HOT 5
- Add a bias to the weighting of buysell orders
- How to run on iPad⁉️
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kelp.