Open adamhyman opened 6 years ago
I will finish mapping things out as we discussed on the phone. I'm using paper but will put it all into Excel.
The above sample code is perfect. Please update the code and commit it.
FYI, the above code is more of a C style (which is fine). One way of doing the same thing in fewer lines would be from this:
self.currency_map["USD"] = "ZUSD"
self.currency_map["ETH"] = "XETH"
self.currency_map["BTC"] = "XXBT"
self.currency_map["LTC"] = "XLTC"
self.currency_map["USDT"] = "USDT"
self.currency_map["GNT"] = ""
self.currency_map[""] = ""
to something like this:
self.currency_map = {"USD": "ZUSD", "ETH": "XETH", "BTC": "XXBT", "LTC": "XLTC", "USDT": "USDT", "GNT": ""}
Some people actually prefer the first method because it looks better. Hackers prefer the latter because it's quicker to write.
I will use a CSV for Excel file to load in the mapping.
We need a way to map currencies and trade pairs in both directions.
We already made some progress mapping trade pairs in Exchange_Session:
I propose we do something like this:
What do you think?
We could include a dash or underscore between the different currencies in the pairs.
As new currencies and trade pairs are listed, we can add them.
We should also add the assets and trade pairs as objects in the class when we update the balances and prices.
Eventually we need to be able to do something like.