Author Topic: BitUSD Market Maker Live  (Read 18152 times)

0 Members and 1 Guest are viewing this topic.

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Thanks Riverhead and maqifrnswa.
Still can not make it work, though..
 now I guess it is too general of an issue but:

Code: [Select]
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.

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
Trying to run this baby on windows

got this
Code: [Select]
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
« Last Edit: September 16, 2014, 09:40:47 pm by maqifrnswa »
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

Offline tonyk

  • Hero Member
  • *****
  • Posts: 3308
    • View Profile
Trying to run this baby on windows

got this
Code: [Select]
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?

« Last Edit: September 16, 2014, 09:31:53 pm by tonyk »
Lack of arbitrage is the problem, isn't it. And this 'should' solves it.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
Anyone has any profit generated?
I saw no transaction done with the default config..
BitShares committee member: abit
BitShares witness: in.abit

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
... and less buggy than the GUI :)

Offline 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.


Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
you just need a python interpreter:
windows:  http://www.activestate.com/activepython/downloads

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

Offline Gentso1

  • Hero Member
  • *****
  • Posts: 931
    • View Profile
  • BitShares: gentso
any progress on the windows version of the bot?

Offline Riverhead

It should match the def line

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4664
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
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])
?
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.

Code: [Select]
    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

Offline Riverhead

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.

Code: [Select]
    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
« Last Edit: September 15, 2014, 01:06:08 pm by Riverhead »

Offline G1ng3rBr34dM4n

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

Big thanks to robrigo for the help so far!

38PTSWarrior

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


Offline robrigo

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

  • Guest
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?