I am proud to now publicly announce the first release of StakeMachine.
What is it?
It is a Python tool that offers:
- a unified framework for writing bots for the DEX
- a simple market making strategy
- the liquidity-providing strategy developed by @mauritso
- more strategies to come soon.
Simple Market Making
A simple market making strategy (i.e. providing liquidity) works as follows:
- Get the
last price
for your market - Place a buy order at
last price * 95%
- Place a sell order at
last price * 105%
- Wait for any of the two orders to get filled
- Cancel the other order
- Go to 1.
This strategy is very simple and tries to makes a profit from the spread. The more volatile a market is, the more profit it will (probably) make you.
Usage
Requirements
- python 3
Installation
git clone https://github.com/xeroc/stakemachine
cd stakemachine
python3 setup.py install --user -r requirements.txt
Configuration
There is an example YAML formatted configuration file called config-example.yml
.
The general configuration looks like this
witness_url: "wss://bitshares.openledger.info/ws"
prefix: "BTS"
safe_mode: True
account: "<accountname>"
wif: "<active-private-key-for-account>"
market_separator: ":"
bots:
MakerWall:
module: "stakemachine.strategies.maker"
bot: "MakerSellBuyWalls"
markets:
- "USD:BTS"
target_price: "last"
target_price_offset_percentage: 1
spread_percentage: 5
volume_percentage: 50
symmetric_sides: True
only_buy: False
only_sell: False
Advanced Settings
As you can see, the idea is to
- Allow different strategies to be added easily
- Different parameters for different bots
- Multiple bots in parallel
bots:
MakerWallBitAssets:
module: "stakemachine.strategies.maker"
bot: "MakerSellBuyWalls"
markets:
- "USD:BTS"
- "GOLD:BTS"
target_price: "last"
target_price_offset_percentage: 1
spread_percentage: 5
volume_percentage: 50
symmetric_sides: True
only_buy: False
only_sell: False
MakerWallBTCBridge5:
module: "stakemachine.strategies.maker"
bot: "MakerSellBuyWalls"
markets:
- "OPEN.BTC:BTC"
- "OPEN.BTC:TRADE.BTC"
- "TRADE.BTC:BTC"
target_price: 1.0
target_price_offset_percentage: 0
spread_percentage: 5
volume_percentage: 50
symmetric_sides: True
only_buy: False
only_sell: False
MakerWallBTCBridge10:
module: "stakemachine.strategies.maker"
bot: "MakerSellBuyWalls"
markets:
- "OPEN.BTC:BTC"
- "OPEN.BTC:TRADE.BTC"
- "TRADE.BTC:BTC"
target_price: 1.0
target_price_offset_percentage: 0
spread_percentage: 10
volume_percentage: 50
symmetric_sides: True
only_buy: False
only_sell: False
Running the bot
Once the configuration is done, you can run your bot (with safe_mode
on) using
stakemachine -c config.yml once
or
stakemachine -c config.yml run
Roadmap
Extend the python-graphene library to allow
- Core Exchange Rate tracking
- Refilling of Fee Pools
- More trading strategies (heuristic, EMA-crossings, etc.)
How can i check it on the testnet?
change:
So, the liquidity-providing strategy is other software that base on your library?
As i understand it need cli_wallet and your not !?
It's a strategy that uses @xeroc 's bot infrastructure combined with deployment/automatic registration scripts.
In StakeMachine the strategy is updated to work without cli_wallet, those changes (and more) will be implemented in the next release of LiqBot.
This is great!! Everybody can now use their idling funds to add some liqudity in the markets and earn a profit!! Great work Xeroc!
I wouldn't claim this makes a profit for sure .. but the strategy is easy enough for people to understand it makes sense and may make a profit
Hello! Prompt as it is possible to use a boat for trade at the internal exchange steemit!? What changes need to be entered into a code? Yours faithfully Irina =)
https://steemit.com/gridcoin/@cm-steem/brainstorming-new-boinc-projects-anyone-can-create-a-project-and-reward-their-users-with-gridcoin#@cm-steem/re-cm-steem-brainstorming-new-boinc-projects-anyone-can-create-a-project-and-reward-their-users-with-gridcoin-20160812t153824382z
Thoughts, @Xeroc?
Sorry that this question may not directly related to stakemachine. Can python-graphene be run on Windows with python3 installed?
Technically it should also work on Windows, however, I don't have a windows machine around so I cannot check it.
Hey @xeroc,
Are you planning on continuing development of the stakemachine?
Thanks,
CM.
I have already started working on migrating it over to pybitshares .. just notfinished yet ..
might take quite some time until this can be released .. much stuff going on right now
Cool, looking forwards to future releases :)
Perhaps consider a worker proposal? I'd vote for it! :D
https://github.com/xeroc/stakemachine/issues @mauritso
Hey @xeroc ! I’ve recently been trying to get stakemachine working but am having some difficulty. I know you mentioned you were making some changes with it... are these changes still in progress? I’ve used your stakemachine pdf you posted a couple months ago to copy the walls config but still can’t get the walls to work. I posted on GitHub. Anyway, if you have any additional guidance or documentation that could help I would greatly appreciate it. I’m new to both Ubuntu and python but willing to put in some work. Thanks