Fix inconsistent naming#272
Conversation
…d ExchangeMarket.MarketCurrency to ExchangeMarket.BaseCurrency. Update each implementation of OnGetSymbolsMetadataAsync to ensure they are all settings the correct properties.
…OrderDetails" and "symbols" methods to Console project.
…l, ConvertVolume to QuoteCurrency, QuoteVolume, BaseCurrency, and BaseVolume respectively. Update all usages. Add "tickers" method to Console project.
…rrencyVolume and QuoteCurrencyVolume respectively. Update all usages. Add "candles" method to Console project.
|
so across these tabs, are those the base currencies or the quote currencies? Somehow these names still aren't obvious to me. I thought the BTC/ETH/USDT were the bases since everything jumps off of there but from your description it seems like I have it backwards? Are there names that would be so obvious no one could confuse it? Just to pull something from left field, BaseCurrency/AltCurrency? The shitcoins would always be the alts, and from the perspective of fiat to big crypto, fiat is the base and crypto is the alt. |
|
@bichuga you have it backwards ... another way of thinking about it when you're placing an order is that the price is always denominated in the quote currency, and the quantity is always of the base currency. I know it can be confusing, especially because a couple of the exchanges even get it wrong (Bittrex 🤦♂️), but these are the standard terms used when trading currency pairs. Trying to come up with new names will confuse people even more I'm afraid |
|
We can update the readme to be clear about naming conventions with whatever we decide is right. |
|
Are there any other names for this that would be so clear as to not
necessitate docs? Altcoin or altcurrency on one side seems pretty strong to
me. Anything else?
…On Fri, Oct 19, 2018, 07:58 Jeff Johnson ***@***.***> wrote:
We can update the readme to be clear about naming conventions with
whatever we decide is right.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8DifNl8MCGVDxx4rCVwvCr0l_3-MaRks5umeiwgaJpZM4XviCK>
.
|
|
@bichuga I see a couple problems with using BaseCurrency/AltCurrency...
I don't think we need to reinvent the wheel here. Base Currency / Quote Currency are the most widely used terms out there. The majority of exchanges use those terms. |
|
I get your point about not wanting to imply a quality or connotation with
the name. Yet your point that other folks use these terms doesn't mean they
are good choices. The fact that multiple major exchanges with all the API
reviews involved could have gotten these names exactly backwards
demonstrates the quality of the naming scheme.
On exchanges the tickers are organized as a few central currencies
branching to many. What about HubCurrency/SpokeCurrency?
…On Fri, Oct 19, 2018, 10:46 superhappychris ***@***.***> wrote:
@bichuga <https://github.com/bichuga> I see a couple problems with using
BaseCurrency/AltCurrency...
- For the vast majority of exchanges (I think Bittrex is the only
exception), the term BaseCurrency means the opposite of how you want to use
it. Obviously the path of least confusion would be to go with what the
majority of exchanges do.
- AltCurrency or AltCoin already has a pretty specific meaning to most
people and it doesn't have anything to do with trading currency pairs, it
has to do with the subjective quality of the coin or token in question.
What you consider a shitcoin may not be considered a shitcoin by everyone
else, and those definitions may change over time.
- Honestly, the only reason we'd need to be clear about the terms
BaseCurrency / QuoteCurrency is to clarify to contributors that a couple
rogue exchanges use them incorrectly. Other than that, those terms would
only be confusing to a person that is new to the idea of trading currency
pairs in general, or that got some bad info from somewhere. Those people
are going to be confused no matter what terms we use. Nothing wrong with
that, I was confused at first too, everyone has to learn at some point.
I don't think we need to reinvent the wheel here. Base Currency / Quote
Currency are the most widely used terms out there. The majority of
exchanges use those terms.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8DiaaOaTp0yvjAdcw9-39FBY7QglvGks5umg_3gaJpZM4XviCK>
.
|
|
@bichuga well there's only one major exchange I know of that actually got the meaning of the terms backwards, and that's Bittrex. Given the fact that Bittrex was created by a couple of developers with a background in security and not finance, it's understandable how they could have gotten it wrong, and fixing a mistake like that would be very costly. I'm trying to help us avoid making the same mistake 😄 I guess we'll just have to agree to disagree that BaseCurrency / QuoteCurrency are good names. Not only do they provide users the information they need to place an order for that trading pair (price in quote currency, quantity in base currency), but they are also the industry standard terms which means using them will lead to less confusion overall. |
|
I like BaseCurrency / QuoteCurrency because this will also align with other APIs as well as when viewing the currencies on the websites of the exchanges. Inventing new terms would just make it more difficult for the users to have to learn new concepts. |
|
If everyone likes it but me, just make the documentation clear 😃
Also super double check the ones that got flipped are actually correct now
…On Sat, Oct 20, 2018, 16:18 vslee ***@***.***> wrote:
I like BaseCurrency / QuoteCurrency because this will also align with
other APIs as well as when viewing the currencies on the websites of the
exchanges. Inventing new terms would just make it more difficult for the
users to have to learn new concepts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8DiSOHE7IP8nHeYhjdTxme9BVBkSsTks5um69cgaJpZM4XviCK>
.
|
|
Casting my vote for base / quote currency |
|
So I see everywhere that symbol is called currency, but to me that means a single asset, like BTC. I think we should consider renaming all the places where symbol was used to market or currencyPair. Thoughts? |
3 similar comments
|
So I see everywhere that symbol is called currency, but to me that means a single asset, like BTC. I think we should consider renaming all the places where symbol was used to market or currencyPair. Thoughts? |
|
So I see everywhere that symbol is called currency, but to me that means a single asset, like BTC. I think we should consider renaming all the places where symbol was used to market or currencyPair. Thoughts? |
|
So I see everywhere that symbol is called currency, but to me that means a single asset, like BTC. I think we should consider renaming all the places where symbol was used to market or currencyPair. Thoughts? |
|
@jjxtra if you take a look at how the exchanges use "symbol" in their apis, they all use it in the currency pair sense, not the single asset sense, which is why I went with the former when refactoring. To me, this is another case of why come up with a new term when one already exists that is used by the exchanges? |
|
Right. Maybe we should rename the new "currency" parameters to "currencyPair" parameters where they used to be "symbol" parameters. |
|
@jjxtra I think maybe I'm misunderstanding what you're looking to change.. Can you point to an example in the code so I can get on the same page as you? |
|
Nevermind, it looks like the methods that take currency/market pairs are still using the "symbol" parameter name, such as GetTickerAsync. |
|
I'm with @jjxtra. "Symbol" is used promiscuously in code and in English.
What do you think of when someone asks you to name a stock market symbol?
Is a stock market symbol equivalent in your mind to an asset or a market?
If you can't answer that instantly, others won't be able to either, so
don't allow people to make a bad connection by using symbol to mean either.
Coin/Currency/Asset (single) and CurrencyPair/Market (multi) are all super
clear options. Many exchanges don't use "symbol" at all. Given these better
options I think I think it would be a mistake to choose symbol for use in
our code.
If you're interested in a quick read, this blog post has fundamentally
changed the way I look at code:
http://arlobelshee.com/good-naming-is-a-process-not-a-single-step/
…On Mon, Oct 22, 2018 at 11:30 AM Jeff Johnson ***@***.***> wrote:
Nevermind, it looks like the methods that take currency/market pairs are
still using the "symbol" parameter name, such as GetTickerAsync.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AI8DifvRFUEOnW69CbKh-Ei45vx8-k-Bks5ung7WgaJpZM4XviCK>
.
|
|
I vote for market. |
|
Market or CurrencyPair are good. Symbol is vague but is used in some exchanges, but doesn't seem like it would hurt to avoid it. Perhaps Symbol can be placed in the doc comments so that it does appear if ppl mouse over Market/CurrencyPair. |
|
I think market is too vague, especially since we already have a class called ExchangeMarket. If we go with market, then the ExchangeMarket class will have a property called Market that is of type string, but there will be other places in the code base that refer to a "market" as an ExchangeMarket type... What if we go with "MarketSymbol"? It's unambiguous, more in line with what the many of the exchanges use terminology wise, and lends itself to future changes if/when we decide to create a MarketSymbol type to encapsulate the metadata that can't be captured in a string (individual currency names, separator character, order, etc.). Thoughts? |
|
Sounds reasonable. How do you feel about renaming all the symbol params in the pull request? Hopefully just a case sensitive search and replace of entire word. |
|
@jjxtra I can take care of it 👍 |
|
If we do use a MarketSymbol class in the future it's easy enough to make an implicit string operator conversion, so people can still pass string parameter for this. |
|
I did some code edits on my iPad, but obviously wasn't able to ensure they compile, let me know if you see any issues. |
|
Ok it builds again |
|
Anyone have any objection to merging this? |
|
Go for it |

This is a pretty large refactor attempting to bring some more consistent naming to several of the model class properties. More specifically, every time a symbol is referred to in code it should be in reference to a currency pair, consisting of the following elements (order matters): a base currency, an optional separator, and a quote currency. For example, consider the symbol "BTC-USD".. If BTC-USD==20,000.00; then 1 BTC is exchanged for 20000 USD. See issue #267 for more info.