Closed
Description
Ok,
So typically a currency pair is expressed as BASE-QUOTE (note ordering)
E.g.
- EUR-USD is 1.2
- XLM-BTC is 0.0000077
Some exchanges list these reverse, e.g. Bittrex. For these exchanges that list the symbols in reverse, there is a property called MarketSymbolIsReversed which will translate symbols for the exchange properly. However, it does not function as designed.
When translating between global market symbols <->exchange symbols, there is some unexpected behavior based on our assumptions above. See the following evaluations (this is using the Bittrex API where MarketSymbolIsReversed = true):
- gms (global market symbol) above should be "XLM-BTC" because Bittrex symbols are reversed, and XLM is the base currency, so using global standards of BASE-QUOTE, it should be "XLM-BTC" but it does not evaluate as such
- ems (exchange market symbol) should be "BTC-XLM" because again, using global standards of BASE-QUOTE, and Bittrex is reversed, converting "XLM-BTC" global ticker to market ticker should evaluate to "BTC-XLM", which is the Bittrex market ticker
- ems2 is correctly evaluated to the exchange market symbol for Bittrex composed using the base/quote currency strings as separate inputs
- gms2, which is the global market symbol of the "BTC-XLM" market on the Bittrex exchange should be "XLM-BTC", again because XLM is the base currency
The comments in the code are confusing/ambiguous at best and contradictory at worst:
Can someone shed some light on this?
Metadata
Metadata
Assignees
Labels
No labels