0 Members and 1 Guest are viewing this topic.
@tonyk: that is where the content of the GuI is located .. the gui itself is written in QT any basically just a browser for a website .. the website (that shows your balances, markets etc...) is written in angularJS and can also be (with some extra effort) used in firefox (or any other browser)that line just points to the website/angularjs files for the content of the gui
Quote from: tonyk on September 17, 2014, 12:48:47 amThanks 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'make sure you followed the instructions: clone the whole directory and edit config.py with your information
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'
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'
"htdocs": "./htdocs"
Fixed a bug in btsx.py (cancel_all_orders). Can I push the fix up to freetradebots/btsx_bots?
def get_last_fill (self, asset1, asset2): last_fill = -1 response = self.request("blockchain_market_order_history", [asset1, asset2, 0, 1]) for order in response.json()["result"]: last_fill = float(order["ask_price"]["ratio"]) * 10 return last_fill
This is a very simple bot based on the Market Maker botfor BitSharesX. This takes logic started by "toast" andmassaged by Riverhead.IT IS HIGHLY RECOMMENDED YOU SETUP A BOT WALLET/ACCOUNT WITHLIMITED FUNDS. IF YOU RUN THIS AGAINST YOUR PRIMARY WALLETREALLY "BAD THINGS" COULD HAPPEN.The purpose of this bot is:1) Create a simple bot as a base to create more complex bots2) Generate traffic in the bitUSD:BTSX marketSETUP:- Modify the config.json to reference your own RPC configutarion.- Fund your bot account with at least 501 BTSX
bitstamp_data = json.load(urllib2.urlopen(req, timeout=5))...btsx_data = json.load(urllib2.urlopen(req, timeout=5))
response = requests.get(url=url, headers=self.headers, params=params, timeout=5)
Trying to run this baby on windowsgot thisCode: [Select]C:\Users\Toni\bitshares_toolkit\programs\market_maker>main.py C:\Users\Toni\AppData\Roaming\BitSharesTraceback (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 requestsImportError: 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?
C:\Users\Toni\bitshares_toolkit\programs\market_maker>main.py C:\Users\Toni\AppData\Roaming\BitSharesTraceback (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 requestsImportError: No module named requests
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
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
Quote from: robrigo on September 14, 2014, 11:57:47 amQuote from: 38PTSWarrior on September 14, 2014, 11:56:37 amHow do I git clone the develop branch? I am almost sure it's not this one: git clone https://github.com/dacsunlimited/bitsharesxI 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 developDo you have 5 minutes to meet in the chat?
Quote from: 38PTSWarrior on September 14, 2014, 11:56:37 amHow do I git clone the develop branch? I am almost sure it's not this one: git clone https://github.com/dacsunlimited/bitsharesxI 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
How do I git clone the develop branch? I am almost sure it's not this one: git clone https://github.com/dacsunlimited/bitsharesxI tried git clone https://github.com/BitShares/bitshares_toolkit/tree/develop/programs/market_maker but that didn't work.
2014-0914-08:02:28 413.743444392 3.8038 99.5 406.2317994372014-0914-08:03:32 413.754224567 3.8038 99.5 406.231799437
def get_my_costs(self): orders_total_cost = 0 response = self.request("wallet_market_order_list", ["USD", "BTSX", -1, "spikel"]) for pair in response.json()["result"]: item = pair[1] order_balance = float(item["state"]["balance"]) order_ratio = float(item["market_index"]["order_price"]["ratio"]) if (item["market_index"]["order_price"]["quote_asset_id"] == 22): order_amount = (order_balance * order_ratio) / 10000 else: order_amount = order_balance / 10000 orders_total_cost = (orders_total_cost + order_amount) return orders_total_cost
I'm in with some little stake .. let's see how to works out ...can we have a modified version for btiGLD and bitCNY too?I'm gonna check through the code .. maybe I can figure it out myself
Quote from: toast on September 12, 2014, 02:41:08 pmI will be making it significantly easier to user todayNow I am expecting a GUI for the bot :-)
I will be making it significantly easier to user today
The latest develop branch has a revamped market maker bot architecture. I'm designing it in a way where it should be easy for people to write and share trading bots with configurable parameters.New usage:python main.py path_to_bot_config.jsonIt will create a new config with one default bot configured.Edit this file with rpc client info and your bot settings.You can look at the top of config.py to read more about the parameters.Watch this space...
Mine is running:Code: [Select]TYPE QUANTITY PRICE BALANCE COST COLLATERAL ID ================================================================================================================================bid_order 5,005.18188 BTSX 0.03917587898743254 USD / BTSX196.0824 USD 196.0823 USD N/A 7a160369d1c67da0ecf6d9ca719219933f03d39eask_order 4,899.80000 BTSX 0.04113467293680417 USD / BTSX4,899.80000 BTSX 201.5516 USD N/A 7bd0600b46d2b5f0b1ad5b824335a0b5c96d4c54Steps I took:1) git clone the develop branch2) Do the two submodule commands and then cmake .3) make bitshares_client4) ./bitshares_client --data-dir ~/.usd_market_maker5) create_wallet <whatever>6) import_private_key <some key from a trading account you created>7) quit client and update the config.json with your desired user/pass. Add /rpc to the end of the https bit after the port8 ) download the bot files from BM's link9) edit main.py with your account name (make sure the account has at least 1001 BTSX and 100 USD (I went 4000/200)10) python main.py user pass port true
TYPE QUANTITY PRICE BALANCE COST COLLATERAL ID ================================================================================================================================bid_order 5,005.18188 BTSX 0.03917587898743254 USD / BTSX196.0824 USD 196.0823 USD N/A 7a160369d1c67da0ecf6d9ca719219933f03d39eask_order 4,899.80000 BTSX 0.04113467293680417 USD / BTSX4,899.80000 BTSX 201.5516 USD N/A 7bd0600b46d2b5f0b1ad5b824335a0b5c96d4c54
# OSX users only!export CMAKE_PREFIX_PATH=/usr/local/sslcmake -DCMAKE_BUILD_TYPE=Release .make
wallet_open <NAME>
Initializing with URL: http://<USER>:<PASSWORD>@localhost:<PORT>/rpcInit price: 0.038721Init price: 25.825624{u'id': 0, u'result': [[u'<LOCAL_ACCOUNT>', [[0, 10000000000]]]]}[u'<LOCAL_ACCOUNT>', [[0, 10000000000]]][[0, 10000000000]][0, 10000000000]0.0{u'id': 0, u'result': [[u'<LOCAL_ACCOUNT>', [[0, 10000000000]]]]}[u'<LOCAL_ACCOUNT>', [[0, 10000000000]]][[0, 10000000000]][0, 10000000000]100000.00.0Price moved - old: 0.038721 new: 0.038721{ u'id':0, u'result':{ u'blockchain_head_block_timestamp':u'20140912T170240', u'blockchain_average_delegate_participation':85.59322033898304, u'wallet_unlocked':False, u'wallet_next_block_production_time':None, u'blockchain_share_supply':199988581761744, u'network_num_connections':0, u'blockchain_delegate_pay_rate':155505, u'blockchain_next_round_timestamp':u'20140912T171950', u'ntp_time_error':-4.27297, u'blockchain_random_seed':u'ff8666c7c8c734f737d1005e5862b050aaf0f62a', u'blockchain_next_round_time':854, u'wallet_block_production_enabled':None, u'network_num_connections_max':200, u'wallet_last_scanned_block_timestamp':None, u'wallet_next_block_production_timestamp':None, u'wallet_unlocked_until_timestamp':None, u'wallet_open':True, u'blockchain_accumulated_fees':18809928977, u'blockchain_head_block_num':467948, u'blockchain_confirmation_requirement':1, u'client_data_dir':u'/Users/rob/Library/Application Support/BitShares X', u'blockchain_head_block_age':176, u'blockchain_blocks_left_in_round':86, u'wallet_unlocked_until':None, u'ntp_time':u'20140912T170536', u'wallet_scan_progress':None, u'client_version':u'0.4.14' }}
Are you on the develop branch of bitshares_toolkit?
Getting below. Ideas?Code: [Select]Init price: 0.038557Init price: 25.935917{u'id': 0, u'result': [[u'test.riverhead', [[0, 500000000], [22, 2000000]]]]}Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/home/james/github/bitshares_toolkit/programs/market_maker/btsx.py", line 62, in get_balance if item[0] == asset:TypeError: 'int' object has no attribute '__getitem__'
Init price: 0.038557Init price: 25.935917{u'id': 0, u'result': [[u'test.riverhead', [[0, 500000000], [22, 2000000]]]]}Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/home/james/github/bitshares_toolkit/programs/market_maker/btsx.py", line 62, in get_balance if item[0] == asset:TypeError: 'int' object has no attribute '__getitem__'
Quote from: robrigo on September 12, 2014, 03:04:55 pm2) I modified main.py in the market_maker script to replace the account_name with my market maker. So that specifies the account to pull funds from. What is USER / PASS corresponding to then? Perhaps a registered account in my wallet as well as the wallet password?The rpc connection specified in the client's config.json
2) I modified main.py in the market_maker script to replace the account_name with my market maker. So that specifies the account to pull funds from. What is USER / PASS corresponding to then? Perhaps a registered account in my wallet as well as the wallet password?
I will be making it significantly easier to user todayrobrigo: make an account, fund it, and replace "arbiteur" with your bot's account name
# OSX users only!export CMAKE_PREFIX_PATH=~/Qt/5.3/cmake -DCMAKE_BUILD_TYPE=Release .make
Quote from: robrigo on September 11, 2014, 09:39:02 pmQuote from: luckybit on September 11, 2014, 09:36:33 pmQuote from: robrigo on September 11, 2014, 09:23:24 pmI haven't run the CLI version yet but I assume this requires the CLI version? Just wondering I tried to get it to work but keep getting connection refused:Code: [Select]Initializing with URL: http://robrigo-market-maker:************@localhost:8000/rpcInit price: 0.039835Init price: 25.103530Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 57, in get_balance response = self.request("wallet_account_balance", [self.account_name, asset]) File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 29, in request response = requests.post(self.url, data=json.dumps(payload), headers=headers) File "/Library/Python/2.7/site-packages/requests/api.py", line 92, in post return request('post', url, data=data, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 48, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 451, in request resp = self.send(prep, **send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 557, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 407, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))So I assume I would need to build / run the bitshares_toolikit? If so, is there any danger of building the client when I already have the GUI installed (i.e. will it modify my current data directory?).Edit: just remember reading somewhere I can pass an argument to make a 2nd data directory. So that should do the trick!Thanks! I have been meaning to dig into running a delegate but my less interesting full time job comes first.Can we have an instruction manual for how you got it to work?I will certainly publish anything useful I can find... hoping to look into this more tonight after I finish up some more work for my employer.You probably have the wrong port number.... make sure the port matches the port you passed to the bitshares_client via --httpport
Quote from: luckybit on September 11, 2014, 09:36:33 pmQuote from: robrigo on September 11, 2014, 09:23:24 pmI haven't run the CLI version yet but I assume this requires the CLI version? Just wondering I tried to get it to work but keep getting connection refused:Code: [Select]Initializing with URL: http://robrigo-market-maker:************@localhost:8000/rpcInit price: 0.039835Init price: 25.103530Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 57, in get_balance response = self.request("wallet_account_balance", [self.account_name, asset]) File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 29, in request response = requests.post(self.url, data=json.dumps(payload), headers=headers) File "/Library/Python/2.7/site-packages/requests/api.py", line 92, in post return request('post', url, data=data, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 48, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 451, in request resp = self.send(prep, **send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 557, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 407, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))So I assume I would need to build / run the bitshares_toolikit? If so, is there any danger of building the client when I already have the GUI installed (i.e. will it modify my current data directory?).Edit: just remember reading somewhere I can pass an argument to make a 2nd data directory. So that should do the trick!Thanks! I have been meaning to dig into running a delegate but my less interesting full time job comes first.Can we have an instruction manual for how you got it to work?I will certainly publish anything useful I can find... hoping to look into this more tonight after I finish up some more work for my employer.
Quote from: robrigo on September 11, 2014, 09:23:24 pmI haven't run the CLI version yet but I assume this requires the CLI version? Just wondering I tried to get it to work but keep getting connection refused:Code: [Select]Initializing with URL: http://robrigo-market-maker:************@localhost:8000/rpcInit price: 0.039835Init price: 25.103530Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 57, in get_balance response = self.request("wallet_account_balance", [self.account_name, asset]) File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 29, in request response = requests.post(self.url, data=json.dumps(payload), headers=headers) File "/Library/Python/2.7/site-packages/requests/api.py", line 92, in post return request('post', url, data=data, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 48, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 451, in request resp = self.send(prep, **send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 557, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 407, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))So I assume I would need to build / run the bitshares_toolikit? If so, is there any danger of building the client when I already have the GUI installed (i.e. will it modify my current data directory?).Edit: just remember reading somewhere I can pass an argument to make a 2nd data directory. So that should do the trick!Thanks! I have been meaning to dig into running a delegate but my less interesting full time job comes first.Can we have an instruction manual for how you got it to work?
I haven't run the CLI version yet but I assume this requires the CLI version? Just wondering I tried to get it to work but keep getting connection refused:Code: [Select]Initializing with URL: http://robrigo-market-maker:************@localhost:8000/rpcInit price: 0.039835Init price: 25.103530Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 57, in get_balance response = self.request("wallet_account_balance", [self.account_name, asset]) File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 29, in request response = requests.post(self.url, data=json.dumps(payload), headers=headers) File "/Library/Python/2.7/site-packages/requests/api.py", line 92, in post return request('post', url, data=data, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 48, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 451, in request resp = self.send(prep, **send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 557, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 407, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))So I assume I would need to build / run the bitshares_toolikit? If so, is there any danger of building the client when I already have the GUI installed (i.e. will it modify my current data directory?).Edit: just remember reading somewhere I can pass an argument to make a 2nd data directory. So that should do the trick!Thanks! I have been meaning to dig into running a delegate but my less interesting full time job comes first.
Initializing with URL: http://robrigo-market-maker:************@localhost:8000/rpcInit price: 0.039835Init price: 25.103530Traceback (most recent call last): File "main.py", line 107, in <module> init_usd_balance = client.get_balance("USD") File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 57, in get_balance response = self.request("wallet_account_balance", [self.account_name, asset]) File "/Users/rob/Documents/repos/bitshares_toolkit/programs/market_maker/btsx.py", line 29, in request response = requests.post(self.url, data=json.dumps(payload), headers=headers) File "/Library/Python/2.7/site-packages/requests/api.py", line 92, in post return request('post', url, data=data, **kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 48, in request return session.request(method=method, url=url, **kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 451, in request resp = self.send(prep, **send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 557, in send r = adapter.send(request, **kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 407, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', error(61, 'Connection refused'))
(lldb) run --server --data-dir=/Users/rob/Library/Application\ Support/BitShares\ X/Process 34216 launched: './bitshares_client' (x86_64)Loading blockchain from: /Users/rob/Library/Application Support/BitShares X/chainLoading config from file: /Users/rob/Library/Application Support/BitShares X/config.json------------ error --------------30012 new_database_version: new database version {"database_version":136,"133":133} th_a chain_database.cpp:258 open_database {"data_dir":"/Users/rob/Library/Application Support/BitShares X/chain"} th_a chain_database.cpp:302 open_database {"data_dir":"/Users/rob/Library/Application Support/BitShares X/chain"} th_a chain_database.cpp:1094 open {"data_dir":"/Users/rob/Library/Application Support/BitShares X/"} th_a client.cpp:1689 openProcess 34216 exited with status = 0 (0x00000000)
File "main.py", line 5 <!DOCTYPE html> ^SyntaxError: invalid syntaxwhat is this?I'm using Ubuntu 14
Quote from: bytemaster on September 11, 2014, 08:32:08 pmWe have produced a python script that can be used by anyone who wants to help make the BitUSD market and are looking for developers to help make it better!https://github.com/BitShares/bitshares_toolkit/tree/develop/programs/market_makerIt is a tad crude right now, but we have plans to make this kind of script configurable for anyone who wants to perform this function. The rules are simple:1) Buy BitUSD cheap (a few percent discount)2) Sell BitUSD at the median price feed (or the latest feed from BTER) which ever is higher (in dollars per BTSX)3) Adjust orders anytime they deviate from what the new orders would be by more than some tolerance.Under this plan no *NEW* bitUSD will be created until the peg is hit *AND* everyone buying BitUSD can expect liquidity within just a few percent. Meanwhile profits can be made every time someone switches sides of the market. We are providing the script for others so that we can increase liquidity and decrease the spread (as our bots compete against each other )Users can now purchase BitUSD with confidence that they can sell it when they need to. Usage:Code: [Select] python main.py USER PASS PORT REAL_NETWORKExample:Code: [Select] python main.py user pass 8000 true You can tweak the parameters by editing: main.pyCode: [Select]SPREAD_PERCENT = 0.05 # 5% TOLERANCE = 0.01 # should be less than SPREAD_PERCENT / 2, the closer the tolerance the more often orders are canceled/updatedMIN_USD_BALANCE = 10 #make sure you retain enough USD to pay fees to update your ordersMIN_BTSX_BALANCE = 100 # make sure you retain enough BTSX to pay fees to update your ordersMIN_USD_ORDER_SIZE = 2 # prevent dust orders MIN_BTSX_ORDER_SIZE = 100 # minimum order size to prevent dustMEDIAN_EDGE_MULTIPLE = 1.001 # how far in front of the median price feed do you want to sell. Excellent. I think I will use this.Do you have a list of features which need to be developed to extend this? What sort of improvements are possible?
We have produced a python script that can be used by anyone who wants to help make the BitUSD market and are looking for developers to help make it better!https://github.com/BitShares/bitshares_toolkit/tree/develop/programs/market_makerIt is a tad crude right now, but we have plans to make this kind of script configurable for anyone who wants to perform this function. The rules are simple:1) Buy BitUSD cheap (a few percent discount)2) Sell BitUSD at the median price feed (or the latest feed from BTER) which ever is higher (in dollars per BTSX)3) Adjust orders anytime they deviate from what the new orders would be by more than some tolerance.Under this plan no *NEW* bitUSD will be created until the peg is hit *AND* everyone buying BitUSD can expect liquidity within just a few percent. Meanwhile profits can be made every time someone switches sides of the market. We are providing the script for others so that we can increase liquidity and decrease the spread (as our bots compete against each other )Users can now purchase BitUSD with confidence that they can sell it when they need to. Usage:Code: [Select] python main.py USER PASS PORT REAL_NETWORKExample:Code: [Select] python main.py user pass 8000 true You can tweak the parameters by editing: main.pyCode: [Select]SPREAD_PERCENT = 0.05 # 5% TOLERANCE = 0.01 # should be less than SPREAD_PERCENT / 2, the closer the tolerance the more often orders are canceled/updatedMIN_USD_BALANCE = 10 #make sure you retain enough USD to pay fees to update your ordersMIN_BTSX_BALANCE = 100 # make sure you retain enough BTSX to pay fees to update your ordersMIN_USD_ORDER_SIZE = 2 # prevent dust orders MIN_BTSX_ORDER_SIZE = 100 # minimum order size to prevent dustMEDIAN_EDGE_MULTIPLE = 1.001 # how far in front of the median price feed do you want to sell.
python main.py USER PASS PORT REAL_NETWORK
python main.py user pass 8000 true
SPREAD_PERCENT = 0.05 # 5% TOLERANCE = 0.01 # should be less than SPREAD_PERCENT / 2, the closer the tolerance the more often orders are canceled/updatedMIN_USD_BALANCE = 10 #make sure you retain enough USD to pay fees to update your ordersMIN_BTSX_BALANCE = 100 # make sure you retain enough BTSX to pay fees to update your ordersMIN_USD_ORDER_SIZE = 2 # prevent dust orders MIN_BTSX_ORDER_SIZE = 100 # minimum order size to prevent dustMEDIAN_EDGE_MULTIPLE = 1.001 # how far in front of the median price feed do you want to sell.
Wow... You guys must not sleep?
Quote from: OldMan on September 11, 2014, 08:50:01 pmWould be great if these types of tools could be implemented in the GUI as wizards/robots.I am not nearly sophisticated enough to compile/run/interface with a script.However, I can:- Open the "AutoTrade" tab- Agree with a disclaimer- Select the 'bitUSD Market Maker' bot- Enter the amount of BTSX/bitUSD I want to trade- Hit the 'Go' buttonMy suggestion would be for the devs to add a basic algo toolkit to the GUI that automates basic market operations and can be used on any asset class.Such a feature set would bring a flood of liquidity *and* further the Bitshares competitive advantage over other platforms.Already on the drawing board... this script is just a proof-of-concept while we work to make it easier for small players.
Would be great if these types of tools could be implemented in the GUI as wizards/robots.I am not nearly sophisticated enough to compile/run/interface with a script.However, I can:- Open the "AutoTrade" tab- Agree with a disclaimer- Select the 'bitUSD Market Maker' bot- Enter the amount of BTSX/bitUSD I want to trade- Hit the 'Go' buttonMy suggestion would be for the devs to add a basic algo toolkit to the GUI that automates basic market operations and can be used on any asset class.Such a feature set would bring a flood of liquidity *and* further the Bitshares competitive advantage over other platforms.
MIN_USD_ORDER_SIZE = 2 # prevent dust orders
Cool!!
from my understanding you just run it like this python main.py rpcuser rpcpass rpcport 1 gonna try this out tomorrow ..