golosscripts.functions
¶
Module Contents¶
-
price_troyounce_to_price_1mg
(price_troyounce: float) → float[source]¶ Convert price per troy ounce to price per milligramm.
-
async
get_price_rub_gold_cbr
(timeout: Union[int, float] = 12, session: Optional[aiohttp.ClientSession] = None) → float[source]¶ Get price of 1 mg Gold from Russian Central Bank; return value is RUB.
-
async
get_price_usd_rub_cbr
(timeout: Union[int, float] = 12, session: Optional[aiohttp.ClientSession] = None) → float[source]¶ Get USD/RUB price from Russian Central Bank API mirror.
-
async
get_price_usd_gold_cbr
() → float[source]¶ Calculate price of 1 mg GOLD in USD based on cbr.ru rates.
-
async
fetch_ticker
(exchange: str, market: str) → Dict[str, Any][source]¶ Fetch ticker data from exchange.
- Parameters
exchange – exchnage name, see Supported exchanges
market – market like ‘BTC/USD’
- Returns
ticker
- Return type