BitShares Forum
Main => General Discussion => Topic started by: Riverhead on September 19, 2014, 02:56:21 am
-
Can someone tell me what base and quote currencies mean? While writing my bots I spent a lot of time debugging method calls because there was an inconsistent use of these two words. For example the bitUSD:BTSX market. Is the base currency USD and the quote currency BTSX?
Example:
- In the Market Maker the quote is USD and the base BTSX.
- In the method wallet_market_order_list base is USD and quote is BTSX.
From market_maker.py in 15-RC1:
usd_balance = self.client.get_balance(self.name, quote)
btsx_balance = self.client.get_balance(self.name, base)
From help files:
wallet_market_order_list <base_symbol> <quote_symbol> [limit] [account_name] List an order list of a specific market
List an order list of a specific market
Parameters:
base_symbol (asset_symbol, required): the base symbol of the market
quote_symbol (asset_symbol, required): the quote symbol of the market
limit (int64_t, optional, defaults to -1): the maximum number of items to return
account_name (account_name, optional, defaults to "ALL"): the account for which to get the orders, or 'ALL' to get them all
-
ex :
Btsx/Btc= 0.0000729
in this example Btsx is the base and BTC is the quote. Basically it means how much you have to pay in units of the quote currency to buy one unit of the base currency
For example the bitUSD:BTSX market. Is the base currency USD and the quote currency BTSX?
bitUSD/Btsx the base is bitUsd and the quote BTSX
usd_balance = self.client.get_balance(self.name, quote)
btsx_balance = self.client.get_balance(self.name, base)
same as btsx/usd how many USD unit you pay to get one BTSX