Main Menu

BitUSD Market Maker Live

Started by bytemaster, September 11, 2014, 08:32:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tonyk

Thanks Riverhead and maqifrnswa.
Still can not make it work, though..
now I guess it is too general of an issue but:

Traceback (most recent call last):
  File "C:\Users\Toni\bitshares_toolkit\programs\market_maker\main.py", line 27,
in <module>
    conf["client"]["rpc_user"],
KeyError: 'client'




Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

maqifrnswa

#63
Quote from: tonyk on September 16, 2014, 09:23:32 PM
Trying to run this baby on windows

got this
C:\Users\Toni\bitshares_toolkit\programs\market_maker>main.py C:\Users\Toni\AppD
ata\Roaming\BitShares
Traceback (most recent call last):
  File "C:\Users\Toni\bitshares_toolkit\programs\market_maker\main.py", line 10,
in <module>
    from btsx import BTSX
  File "C:\Users\Toni\bitshares_toolkit\programs\market_maker\btsx.py", line 3,
in <module>
    import requests
ImportError: No module named requests


- Changed all 'account' occurrences to 'account_name' in btsx.py.
- Also I open the wallet before starting the bot - should I do that? (ie the wallet is in 'wbot1 (unlocked) >>>' state..)
- Also should I actually use port 8000 or the ones provided by the BTSX client?

the requests module is not installed, see:
http://stackoverflow.com/questions/17309288/importerror-no-module-named-requests

yes, unlock the wallet (partly why people suggest having a separate trader wallet)
yes, use the rpc http port provided by/to the BTSX client
maintains an Ubuntu PPA: [url="https://launchpad.net/~showard314/+archive/ubuntu/bitshares"]https://launchpad.net/~showard314/+archive/ubuntu/bitshares[/url] [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

tonyk

#62
Trying to run this baby on windows

got this
C:\Users\Toni\bitshares_toolkit\programs\market_maker>main.py C:\Users\Toni\AppD
ata\Roaming\BitShares
Traceback (most recent call last):
  File "C:\Users\Toni\bitshares_toolkit\programs\market_maker\main.py", line 10,
in <module>
    from btsx import BTSX
  File "C:\Users\Toni\bitshares_toolkit\programs\market_maker\btsx.py", line 3,
in <module>
    import requests
ImportError: No module named requests


- Changed all 'account' occurrences to 'account_name' in btsx.py.
- Also I open the wallet before starting the bot - should I do that? (ie the wallet is in 'wbot1 (unlocked) >>>' state..)
- Also should I actually use port 8000 or the ones provided by the BTSX client?

Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

abit

Anyone has any profit generated?
I saw no transaction done with the default config..
BitShares committee member: abit
BitShares witness: in.abit

xeroc

... and less buggy than the GUI :)

Riverhead

I think my for-profit bot is working. Just time consuming to test. I'll post it up once it's done a few successful trades.


One nice thing about working on this is I'm getting more comfortable with the CLI. It's very fast and nicely formatted output.


xeroc

you just need a python interpreter:
windows:  http://www.activestate.com/activepython/downloads

but don't expect a fancy GUI .. yet (toast?) ;-)

Gentso1

any progress on the windows version of the bot?
[url="http://cryptosmith.info/index.php"]http://cryptosmith.info/index.php[/url] Gentso and Thom
[url="https://bitsharestalk.org/index.php?topic=13837.0"]https://bitsharestalk.org/index.php?topic=13837.0[/url]

Riverhead


abit

Should this line
response = self.request("wallet_market_order_list", [base, quote, -1, account])
change to
response = self.request("wallet_market_order_list", [base, quote, -1, account_name])
?
Quote from: Riverhead on September 15, 2014, 12:58:45 PM
Check your bots!


Recent price changes have caused the 15RC1 release market_maker to cancel some orders. The btsx.py cancel_bids_less_than and cancel_bids_out_of_range references account instead of account_name which causes a crash. Have a look and make sure your bot is still running.


Fix is to change the def to account_name like the other functions.


    def cancel_bids_less_than(self, account_name, base, quote, price):
        response = self.request("wallet_market_order_list", [base, quote, -1, account])
        order_ids = []
        for pair in response.json()["result"]:
            order_id = pair[0]
            item = pair[1]
            if item["type"] == "bid_order":
                if float(item["market_index"]["order_price"]["ratio"])* (self.BTSX_PRECISION / self.USD_PRECISION) < price:
                    order_ids.append(order_id)
                    log("%s canceled an order: %s" % (account_name, str(item)))
        cancel_args = [[item] for item in order_ids]
        response = self.request("batch", ["wallet_market_cancel_order", cancel_args])
        return cancel_args

BitShares committee member: abit
BitShares witness: in.abit

Riverhead

#54
Check your bots!


Recent price changes have caused the 15RC1 release market_maker to cancel some orders. The btsx.py cancel_bids_less_than and cancel_bids_out_of_range references account instead of account_name which causes a crash. Have a look and make sure your bot is still running.


Fix is to change the def to account_name like the other functions.


    def cancel_bids_less_than(self, account_name, base, quote, price):
        response = self.request("wallet_market_order_list", [base, quote, -1, account])
        order_ids = []
        for pair in response.json()["result"]:
            order_id = pair[0]
            item = pair[1]
            if item["type"] == "bid_order":
                if float(item["market_index"]["order_price"]["ratio"])* (self.BTSX_PRECISION / self.USD_PRECISION) < price:
                    order_ids.append(order_id)
                    log("%s canceled an order: %s" % (account_name, str(item)))
        cancel_args = [[item] for item in order_ids]
        response = self.request("batch", ["wallet_market_cancel_order", cancel_args])
        return cancel_args

G1ng3rBr34dM4n

Working on getting a market maker bot set up as well.

Big thanks to robrigo for the help so far!

38PTSWarrior

OK, I will go there, but I meant the chat from the website


robrigo

Quote from: 38PTSWarrior on September 14, 2014, 12:22:19 PM
Quote from: robrigo on September 14, 2014, 11:57:47 AM
Quote from: 38PTSWarrior on September 14, 2014, 11:56:37 AM
How do I git clone the develop branch? I am almost sure it's not this one: git clone https://github.com/dacsunlimited/bitsharesx

I tried git clone https://github.com/BitShares/bitshares_toolkit/tree/develop/programs/market_maker   but that didn't work.

You had it right initially. git clone will clone the entire git repo; then you can switch to the develop branch by doing:


git checkout develop

Do you have 5 minutes to meet in the chat?

Just logged into #bitshares freenode IRC if you mean that.

38PTSWarrior

Quote from: robrigo on September 14, 2014, 11:57:47 AM
Quote from: 38PTSWarrior on September 14, 2014, 11:56:37 AM
How do I git clone the develop branch? I am almost sure it's not this one: git clone https://github.com/dacsunlimited/bitsharesx

I tried git clone https://github.com/BitShares/bitshares_toolkit/tree/develop/programs/market_maker   but that didn't work.

You had it right initially. git clone will clone the entire git repo; then you can switch to the develop branch by doing:


git checkout develop

Do you have 5 minutes to meet in the chat?