Open AlecMcCutcheon opened 3 years ago
also I have a suggestion, why not just pull all of the trading pairs from the API, could create like a foreach loop or something similar to that in python, that just pulls the pairs in from the API, that way you never have to add new pairs they just automatically get added every time it looks for trading pairs
so getting order failures then trying to add a new trading pair.
I'll add the actual errors and things that look off as I find them :
Connection is already closed. - data: None GDAX - WebSocket connexion closed (callback) GDAX - Unexpected close of websocket. Trying to restart. GDAX - Restarting Websocket in 10 seconds... GDAX - WebSocket connexion opened (callback) on ANKR-USD GDAX - End of on_close() Error: messages missing (140891726 - 140893878). Re-initializing book at sequence.
TRNM - computeBuyCapabilityInCrypto: capability is 173.32004731653888 (current balance is 27.69221056 + 0.0 (hold)) TRNM - Buy Now, capability is: 173.32004731653888 Crypto (fiat balance is 27.69221056, crypto balance is 364.0) TRNM - Buy Now, amount is: 164.65404495071195 Crypto TRNM - Amount to buy is above minimum possible ? True GDAX - Actual buy sent with MARKET order. Amount is 164.65404495 BTC GDAX - Buy Request return is : {'message': 'size is too accurate. Smallest unit is 1.00000000'} GDAX - End of Request Return GDAX - Buy order has been interpreted as failed TRNM - === BUY 164.65404495071195 Crypto at 0.159775 Fiat
Were it says 164 BTC I think is just mislabled cuz it says BUY 164.65404495071195 Crypto at 0.159775 Fiat
I think the problem is here:
Buy Request return is :
{'message': 'size is too accurate. Smallest unit is 1.00000000'}
these are the different areas where I have added the new trading pair:
Astibot-master\src\UISettings.py:
line 103: elif (self.strTradingPair == "ANKR-USD"):
line 104: self.comboTradingPair.setCurrentIndex(12)
line 249: elif (self.comboTradingPair.currentIndex() == 12):
line 250: self.strTradingPair = "ANKR-USD"
line 251: self.strFiatType = "USD"
line 252: self.strCryptoType = "ANKR"
line 471: self.comboTradingPair.addItem("ANKR-USD")
Astibot-master\src\GDAXControler.py
line 704: if (self.theSettings.SETT_GetSettings()["strCryptoType"] == "ANKR"):
line 705: if (amountOfCryptoToBuy > 20):
line 706: return True
line 707: else:
line 708: return False
Everything with the bot is working as you would expect, but when it came time to actually place an order to buy the ANKR it failed. the simulation works, USD balance works, ANKR balance works, and I thought that live trading was working also but then I ran into this problem. 22 USD and I even have a little bit of ANKR in my ANKR balance. ANKR is worth like 15 cents atm so I definitely had enough in my balance to buy some. Before I tried adding a new trading pair I tested it with LTC-USD and that was working great. what am I missing?? not very fluent in python but I have worked with other coding languages and that's how I was able to find these places to add the trading pairs. I've messed around with the coinbase pro API using powershell so I know that you can trade ANKR-USD.
@AlecMcCutcheon - If you look at my fork of this project (master branch) you'll notice I've added support to add your own currencies in a src/GDAXCurrencies.py
file. Give it a go and let me know if you have any issues over on that repo 👍
How do I add more trading pairs?