BitShares Forum

Main => General Discussion => Topic started by: Riverhead on September 19, 2014, 02:56:21 am

Title: Base vs Quote Currency
Post 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:
From market_maker.py in 15-RC1:
Code: [Select]
        usd_balance = self.client.get_balance(self.name, quote)
        btsx_balance = self.client.get_balance(self.name, base)

From help files:
Code: [Select]
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
Title: Re: Base vs Quote Currency
Post by: oco101 on September 19, 2014, 03:38:50 am
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

Quote
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

Quote
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