Basic market maker bot for bter BTC/bitUSD available

Started by toast, January 16, 2015, 07:03:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Riverhead


Please, arbitrage away. Exploiting arbitrage when it's available makes you money and pushes the two markets towards parity. I'm not sure if it was my bot or not. Could have been as I'm playing with the code constantly and it may sometimes put up some unpleasant orders lol. I've been running it for a week or so now and am up about 25%. That is most likely due to the recent BTC recovery than any exceptional bot logic though.

biophil

Quote from: Riverhead on January 26, 2015, 03:11:35 PM

I run the market maker bot on bter to make money. It provides liquidity but it trades on a spread against bitstamp's BTC price. It has the side effect of also supporting the peg. This isn't false volume in IMHO as even non Bitshares supporters would do this to make money.

Changes I just submitted:

1) config.json now supports new parameters MinBal_Quote, MinOrder, and Base.

2) Logic changed to use all funds in your account up to the MaxOrder parameter with an order no smaller than MinOrder that also does not put the account below MinBal_Quote.

For example if you set MinBal_Quote to 1 and MinOrder to 0.5 and MaxOrder to 5 it would use all the funds in both bitUSD and BTC to submit orders of value 0.5 BTC or greater up to 5 BTC that still leaves 1 BTC of value in both BTC and bitUSD.

Questions for you:
1. do you actually make money? I'm running a market maker bot of my own design on the same trading pair and it's actually been a surprisingly good volatility-hedging machine, but I'm certainly not netting any profits in USD.

2. Are you aware that your bot (I assume it was yours; could be wrong) was offering almost $1000 of a 4% arbitrage opportunity yesterday? If I had had the funds in the right places, I could have sold bitUSD on the BTS exchange, sold BTS for BTC on bter, and then bought your cheap bitUSD with the BTC, earning 4% net of fees. This is a PSA more than anything; I just wanted to let you know that you're frequently offering the world significant portions of your surplus. And, if I keep seeing these juicy arbitrage opportunities, I don't think I'll be able to keep myself from writing an arbitrage bot. :)
Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

Riverhead


I run the market maker bot on bter to make money. It provides liquidity but it trades on a spread against bitstamp's BTC price. It has the side effect of also supporting the peg. This isn't false volume in IMHO as even non Bitshares supporters would do this to make money.

Changes I just submitted:

1) config.json now supports new parameters MinBal_Quote, MinOrder, and Base.

2) Logic changed to use all funds in your account up to the MaxOrder parameter with an order no smaller than MinOrder that also does not put the account below MinBal_Quote.

For example if you set MinBal_Quote to 1 and MinOrder to 0.5 and MaxOrder to 5 it would use all the funds in both bitUSD and BTC to submit orders of value 0.5 BTC or greater up to 5 BTC that still leaves 1 BTC of value in both BTC and bitUSD.



fluxer555

Quote from: arhag on January 25, 2015, 04:59:18 AM
Quote from: biophil on January 25, 2015, 03:48:39 AM
Sure, except that toast is VASTLY overestimating how much money there is to be made net of exposure to BTC volatility.

Market makers should just go short on BitBTC to hedge against BTC volatility. Of course they are still exposed to BTS volatility but my guess is that the market makers would have likely been holding BTS anyway if they weren't putting their funds to use for market making.

For those who want to be protected against BTS volatility as well but still do market making (so they only want exposure to BitUSD or other BitFiat), they would have to wait until it is possible to short BitAssets using other BitAssets as collateral, e.g. short BitBTC using BitUSD as collateral.

I really dislike the idea of subsidizing market makers through BTS dilution to make it appear like we have better liquidity than we really do. I think this will all come in time naturally as the client gets better and becomes more usable and user adoption grows.

+5%

Please, let's not open this pandora's box
Bitshares Wallet Recovery Service:
[url="https://bitsharestalk.org/index.php/topic,24436.0.html"]https://bitsharestalk.org/index.php/topic,24436.0.html[/url]

arhag

Quote from: biophil on January 25, 2015, 03:48:39 AM
Sure, except that toast is VASTLY overestimating how much money there is to be made net of exposure to BTC volatility.

Market makers should just go short on BitBTC to hedge against BTC volatility. Of course they are still exposed to BTS volatility but my guess is that the market makers would have likely been holding BTS anyway if they weren't putting their funds to use for market making.

For those who want to be protected against BTS volatility as well but still do market making (so they only want exposure to BitUSD or other BitFiat), they would have to wait until it is possible to short BitAssets using other BitAssets as collateral, e.g. short BitBTC using BitUSD as collateral.

I really dislike the idea of subsidizing market makers through BTS dilution to make it appear like we have better liquidity than we really do. I think this will all come in time naturally as the client gets better and becomes more usable and user adoption grows.

biophil

Quote from: arhag on January 24, 2015, 09:49:43 PM
Quote from: Helikopterben on January 24, 2015, 09:34:02 PM
Maybe someone could create a 100% delegate and fund a bot with a portion of the proceeds.  That way we could more directly compete with nubits.  You wouldn't have to risk your own money and you could help bootstrap these assets on the exchanges and get paid at the same time.  Perhaps you could even optimise this bot to be profitable over time.  As you get more and more capital, you could bootstrap other bitassets on the exchanges.  Maybe 50% of the pay could go to fund the bot and 50% pay kept by the delegate for her work in maintaining the bots.

Rather than repeat what has already been discussed, I will just point to https://bitsharestalk.org/index.php?topic=13334.msg174476#msg174476:
Quote from: toast on January 15, 2015, 04:02:12 PM
Quote from: clayop on January 15, 2015, 04:00:20 PM
We need market makers who run bots on centralized exchanges. Maybe another opportunity for paid delegate?

Sounds like an opportunity for *anyone who wants to make money*. We don't need to PAY people to make money, and we don't need to support artificial walls which will disappear when we pull the plug but prevent real market makers in the meantime.

Sure, except that toast is VASTLY overestimating how much money there is to be made net of exposure to BTC volatility. I quite like the idea of a delegate acting as a market-maker loss-leader.

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."


arhag

Quote from: Helikopterben on January 24, 2015, 09:34:02 PM
Maybe someone could create a 100% delegate and fund a bot with a portion of the proceeds.  That way we could more directly compete with nubits.  You wouldn't have to risk your own money and you could help bootstrap these assets on the exchanges and get paid at the same time.  Perhaps you could even optimise this bot to be profitable over time.  As you get more and more capital, you could bootstrap other bitassets on the exchanges.  Maybe 50% of the pay could go to fund the bot and 50% pay kept by the delegate for her work in maintaining the bots.

Rather than repeat what has already been discussed, I will just point to https://bitsharestalk.org/index.php?topic=13334.msg174476#msg174476:
Quote from: toast on January 15, 2015, 04:02:12 PM
Quote from: clayop on January 15, 2015, 04:00:20 PM
We need market makers who run bots on centralized exchanges. Maybe another opportunity for paid delegate?

Sounds like an opportunity for *anyone who wants to make money*. We don't need to PAY people to make money, and we don't need to support artificial walls which will disappear when we pull the plug but prevent real market makers in the meantime.

Helikopterben

Maybe someone could create a 100% delegate and fund a bot with a portion of the proceeds.  That way we could more directly compete with nubits.  You wouldn't have to risk your own money and you could help bootstrap these assets on the exchanges and get paid at the same time.  Perhaps you could even optimise this bot to be profitable over time.  As you get more and more capital, you could bootstrap other bitassets on the exchanges.  Maybe 50% of the pay could go to fund the bot and 50% pay kept by the delegate for her work in maintaining the bots.

xeroc

Quote from: clout on January 24, 2015, 03:36:06 PM
are there any open source market maker bots for trading in bitUSD/bitAsset?
Take a look at my fork of btsx_bots in my github ... though be warned that except the balancing bot none have been tested yet ..

clout

are there any open source market maker bots for trading in bitUSD/bitAsset?

biophil

Quote from: iHashFury on January 24, 2015, 11:34:00 AM
Yes

I have reduced the MaxOrder so it doesn't run out of BitUSD over night.

Over the last week the bot bought back most of the bitcoin I invested in bitshares  :P

Just want to point out the for something like 2 or 3 days straight,  toast's bot was offering the world triangular arbitrage because it was offering very high bitusd prices for BTC. I'm guessing that's why there aren't any more bitUSD on the order books...

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

iHashFury

Yes

I have reduced the MaxOrder so it doesn't run out of BitUSD over night.

Over the last week the bot bought back most of the bitcoin I invested in bitshares  :P


arhag

Is anyone still running the bots? There are barely any BitUSD sell orders available on https://bter.com/trade/btc_bitusd.


biophil

Toast, have you talked to any other exchanges yet about adding bitAssets? It seems like it would be a huge plus for an exchange to know ahead of time that there will be market-maker bots running.

Sent from my SCH-S720C using Tapatalk 2

Support our research efforts to improve BitAsset price-pegging! Vote for worker 1.14.204 "201907-uccs-research-project."

abelljefrry

Quote from: toast on January 16, 2015, 10:34:43 PM

the config.example had a missing comma after the BterConfig value.

Spread and tolerance are both percent. MaxOrder is BTC.

Fixed. Thanks Toast.

Will pump in some fund to see it in action. :D
Need a designer for your project? Hire me! I accept BTS as payment :)

View my BitShares design portfolio here : [url="//bit.ly/BitSharesPortfolio"]bit.ly/BitSharesPortfolio[/url]


toast

Quote from: abelljefrry on January 16, 2015, 10:22:21 PM
Getting the same error as Xeldal

panic: invalid character '"' after object key:value pair

I recheck my config and everything seems fine. 

Oh btw, can you explain a little bit about the parameters? Are those numbers in percentage or BTC? Pardon my noobness.

the config.example had a missing comma after the BterConfig value.

Spread and tolerance are both percent. MaxOrder is BTC.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

abelljefrry

Getting the same error as Xeldal

panic: invalid character '"' after object key:value pair

I recheck my config and everything seems fine. 

Oh btw, can you explain a little bit about the parameters? Are those numbers in percentage or BTC? Pardon my noobness.
Need a designer for your project? Hire me! I accept BTS as payment :)

View my BitShares design portfolio here : [url="//bit.ly/BitSharesPortfolio"]bit.ly/BitSharesPortfolio[/url]

toast

I think the readme is wrong. You need to cd into where main.go lives.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Xeldal

#6
config looks good.

Also in the readme:
Quotecd $GOPATH/src/github.com/freetradebots/market_maker

My GOPATH and GOROOT are set with
export GOROOT=/usr/local/go
export GOPATH=$PATH:$GOROOT/bin

after go get ...
../market_maker/ ends up in
usr/local/sbin/src/github.com/freetradebots/market_maker/

so the command quoted above doesn't take you anywhere.  directory doesn't exist.

Is this my error in setting GOPATH?  remnants from an earlier version?  or is the readme cd wrong?

I had much trouble getting go to get market_maker in the first place several days ago. the directions on https://golang.org/doc/install were not very helpful for my inexperience.

export PATH=$PATH:/usr/local/go/bin   seemed to do nothing, had to set a custom location with above mentioned GOROOT etc. 

Not sure if this maybe relates to the issues I'm having.

Thanks for any assistance.

xeroc

Seems like a syntax error in your config file ... please check

Xeldal

It was working 4 me before I updated.
I git pull'd market_maker , updated config and now get this error.

# go run main.go
panic: invalid character '"' after object key:value pair

goroutine 1 [running]:
main.check(0x7fe592d0bd90, 0xc20801e080)
        /usr/local/sbin/src/github.com/freetradebots/market_maker/main.go:17 +0x50
main.main()
        /usr/local/sbin/src/github.com/freetradebots/market_maker/main.go:27 +0x190

goroutine 2 [runnable]:
runtime.forcegchelper()
        /usr/local/go/src/runtime/proc.go:90
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
        /usr/local/go/src/runtime/mgc0.go:82
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
        /usr/local/go/src/runtime/malloc.go:712
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1
exit status 2


I looked through your commits and don't see anything that would cause the error.  IDK

clayop

Bitshares Korea - [url="http://www.bitshares.kr"]http://www.bitshares.kr[/url]
Vote for me and see Korean Bitshares community grows
delegate-clayop

xeroc


toast

It's still very primitive. You will have to rebalance manually via BTS and I'm sure there are a million edge cases it can't handle.

But hey with just a few BTC we brought the bitUSD/BTC volume up from 2 BTC to 70 BTC.

If traders look at vanity numbers, let's give them vanity numbers!

https://github.com/freetradebots/market_maker
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.