Closed rogerthomas84 closed 3 years ago
Thank you for your contribution!
full list of supported crypto from coinbase in USD. "1INCH-USD", "AAVE-USD", "ADA-USD", "ALGO-USD", "AMP-USD", "ANKR-USD", "ATOM-USD", "BAL-USD", "BAND-USD", "BAT-USD", "BCH-USD", "BNT-USD", "BON-USD", "BTC-USD", "CGLD-USD", "CHZ-USD", "COMP-USD", "CRV-USD", "CTSI-USD", "DAI-USD", "DASH-USD", "DOGE-USD", "DOT-USD", "ENJ-USD", "EOS-USD", "ETC-USD", "ETH-USD", "FIL-USD", "FORTH-USD", "GRT-USD", "GTC-USD", "ICP-USD", "KEEP-USD", "KNC-USD", "LOOM-USD", "LPT-USD", "LRC-USD", "LTC-USD", "MATIC-USD", "MIR-USD", "MLN-USD", "NKN-USD", "NMR-USD", "NU-USD", "OGN-USD", "OMG-USD", "OXT-USD", "QNT-USD", "REN-USD", "RLC-USD", "SKL-USD", "SNX-USD", "SOL-USD", "STORJ-USD", "SUSHI-USD", "TRB-USD", "UMA-USD", "UNI-USD", "USDC-USD", "USDT-USD", "WTBC-USD", "XLM-USD", "XTZ-USD", "YFI-USD", "ZE-USD", "ZRX-USD"
i changed your currencies function to reflect a change you would like you mentioned liking to make.
@staticmethod
def get_currencies_list():
PATH = './portfolio.json'
if os.path.isfile(PATH) and os.access(PATH, os.R_OK):
f = open('portfolio.json',)
data = json.load(f)
map = []
for i in data["portfolio_details"]:
map.append({
"full": i["pair"],
"coin": i["crypto"],
"fiat": i["fiat"],
"amount": i["amount"],
"purchase_date": i["purchase_date"],
"purchase_price": i["purchase_price"],
})
return map
else:
pairs = GDAXCurrencies.get_all_pairs()
map = []
for pair in pairs:
pieces = pair.split('-')
map.append({
"full": pair,
"coin": pieces[0],
"fiat": pieces[1]
})
return map
I have it set up to save/accept data not yet written so that we can effectively start/stop the bot and still be able to continue a SELL off when wanted by saving amount bought, date/time bought, and price paid for said amount. I also fixed your pieces[0] and [1] . in settings they were driving me crazy labeling the fiat as the crypto.
portfolio.json { "portfolio_details":[ { "pair":"ETH-USD", "crypto": "ETH", "fiat": "USD", "amount":500, "purchase_date":"3/19/2020", "purchase_price": 0.053 } ] }
Great little project!
I made a few changes. Mainly that you can define just the pairs you wish to trade with in a new
GDAXCurrencies
file.Just thought it might be helpful.