# YN Exchange
<br>
<div align="center">
<img src="https://static.pepy.tech/badge/YnExchangePY"><img/>
<img src="https://static.pepy.tech/badge/YnExchangePY/month"><img/>
<img src="https://static.pepy.tech/badge/YnExchangePY/week"><img/>
</div>
# Documentation
### Description:
This Python library provides functionalities to get cryptoCurrency prices and perform conversions between Iranian Toman (IRT) and USD, for all supported cryptocurrencies.
### Key Features:
* Real-time cryptoCurrency price data retrieval .
* Support for multiple exchanges .
* Perform conversions between USD, IRT, and supported cryptocurrencies.
* Get the current price of metals ( Gold , Copper , Silver and ... ) .
* Get the current price of natural resources ( oil , gas and ... ) .
* Generate cryptoCurrency tables (requires `kaleido` library for table rendering).
* Asynchronous data fetching .
* Customizable data formats .
* Save data to cache .
* Smart calculator
<hr>
### Installation:
- Install the library using pip:
```bash
pip install YnExchangePY
```
### Dependencies
- Required: `kaleido` library for generating crypto tables ( Images )
```bash
pip install kaleido
```
<hr>
# Usage ( Normal Version )
## Crypto Section :
- <b> Get Crypto Price : </b>
```python
# Import to your project :
from YN_Exchange import Exchange
# "Cache" Argument It is set to "False" by default
# "Cache_Duration" it is set to per second
ExchangeOBJ = Exchange.CryptoManager(Cache = True , Cache_Duration = 300) # Make object of CryptoManager
# "Currency" Argument supported Currency is : USD , IRT ( Default : USD )
# "Grouping" It is set to "False" by default
# Grouping ( False ) Output : 96000
# Grouping ( True ) Output : 96,000
BTC_Price = ExchangeOBJ.GetCryptoPrice(CryptoName = "BTC",Currency = "USD",Grouping = True) # Get crypto price
```
<b> If the Cache is active, the information is received and displayed from the Cache until the Cache_Duration expires, and after the Cache expires, the information is received from the server again and stored in the Cache. </b>
<hr>
- <b>Generate Crypto Charts :</b>
### Examples :
<img src="https://s8.uupload.ir/files/ton-usdt_chart_f0oo.jpg" width="300px"> <img src="https://s8.uupload.ir/files/ton-usdt_chart_7aod.jpg" width="500px">
<hr>
### Example usage :
```python
# Import to your project :
from YN_Exchange import Exchange
# "Cache" Argument It is set to "False" by default
# "Cache_Duration" it is set to per second
# Cache not active for charts
ExchangeOBJ = Exchange.CryptoManager(Cache = True , Cache_Duration = 300) # Make object of CryptoManager
# Generate chart
# For save chart as image definitely install kaleido
# You can edit argument for edit your chart for example, if you set the histogram argument to "False", the histograms will be removed from the chart.
ExchangeOBJ.GenerateCryptoChart(CryptoSymbol = "TON/USDT)
```
<b>You can edit argument for edit your chart for example, if you set the histogram argument to "False", the histograms will be removed from the chart.<b>
<br>
<b> For save chart as image definitely install kaleido ( [Click](#installation) ) </b>
### Charts Argument :
- ```ImageSave : bool = True```
- ```HTML_Save : bool = False```
- ```Json_Save : bool = False```
- ```ChartTemplate : str = "Professional"```
- ```Exchange : str = "binance"```
- ```CryptoSymbol : str = "BTC/USDT"```
- ```Limit : int = 100```
- ```Timeframe = '1d'```
- ```IchimokuLine : bool = True```
- ```IchimokuCloud : bool = True```
- ```Candlesticks : bool = True```
- ```Chikou : bool = True```
- ```Tenkan : bool = True```
- ```Kijun : bool = True```
- ```MACD_Line : bool = True```
- ```SignalLine : bool = True```
- ```Histogram : bool = True```
<b>You can customize your charts with arguments</b>
<hr>
## Metal Section :
- <b> Get Price : </b>
```python
# Import to your project :
from YN_Exchange import Exchange
# "Cache" Argument It is set to "False" by default
# "Cache_Duration" it is set to per second
MetalsOBJ = Exchange.MetalManager(Cache = True , Cache_Duration = 300) # Make object of MetalManager
GoldPrice = MetalsOBJ.GetGoldPrice(Carat=24,Grouping=True)
```
<b>You will see the rest of the functions of this class</b>
<br>
### Functionality :
- ```GetPlatinumPrice(Grouping : bool = "False")``` Ounce per USD
- ```GetSilverPrice(Grouping : bool = "False")``` Ounce per USD
- ```GetPalladiumPrice(Grouping : bool = "False")``` Ounce per USD
- ```GetTinPrice(Grouping : bool = "False")``` Tonne per USD
- ```GetZincPrice(Grouping : bool = "False")``` Tonne per USD
- ```GetNickelPrice(Grouping : bool = "False")``` Tonne per USD
- ```GetLeadPrice(Grouping : bool = "False")``` Tonne per USD
- ```GetCopperPrice(Grouping : bool = "False")``` Pound per USD
- ```GetAluminiumPrice(Grouping : bool = "False")``` Tonne per USD
- ```GetGoldPrice(Grouping : bool = "False",carat : int = 18,weight : str = "gram")``` Weight : [kilo,gram,ounce] and Only IRT Price
<hr>
## Natural Resources Section :
- <b> Get Price : </b>
```python
# Import to your project :
from YN_Exchange import Exchange
# "Cache" Argument It is set to "False" by default
# "Cache_Duration" it is set to per second
NaturalOBJ = Exchange.NaturalResourcesManager(Cache = True , Cache_Duration = 300) # Make object of NaturalResourcesManager
BrentOil = NaturalOBJ.GetBrentOil(Grouping = True)
OilWTI = NaturalOBJ.GetCrudeOilWTI(Grouping = True)
NaturalGas = NaturalOBJ.GetNaturalGas(Grouping = True)
```
### Functionality :
- ```GetCrudeOilWTI``` Barrel per USD
- ```GetBrentOil``` Barrel per USD
- ```GetNaturalGas``` Mmbtu per USD
<hr>
## Calculator Section :
<b>You can use this functions in ```Calculator()``` class<b>
<br>
- <b>Example usage code : </b>
```python
# Import to your project :
from YN_Exchange import Exchange
CalculatorOBJ = Exchange.Calculator() # Make object of Calculator
Result = CalculatorOBJ.CryptoValue2Currency(CryptoName="BTC",Currency="USD",Grouping = True)
```
### Functionality :
- ```CryptoValue2Currency(Value: int, CryptoName: str = "BTC", Currency: str = "USD", Grouping: bool = False)```
- ```Currency2CryptoValue(Value: int, CryptoName: str = "BTC", Currency: str = "USD", Grouping: bool = False)```
- ```CryptoValue2CryptoValue(CryptoValue: int, CryptoName1: str = "BTC", CryptoName2: str = "ETH", Grouping: bool = False)```
- ```CryptoValue2GoldWeight(GoldCarat: int = 18, GoldWeight: str = "gram", CryptoName: str = "BTC")```
- ```GoldWeight2CryptoValue(GoldCarat: int = 18, GoldWeight: str = "gram", GoldValue: int = 1, CryptoName: str = "BTC")```
- ```GoldWeight2Currency(GoldCarat: int = 18, GoldWeight: str = "gram", GoldValue: int = 1, Currency: str = "USD")```
- ```Currency2GoldWeight(GoldCarat: int = 18, GoldWeight: str = "gram", CurrencyValue : int = 5000000)```
<hr>
## Exchanges API Section :
<b>A class to receive digital currency information from APIs of world's most prestigious exchanges</b>
<br>
- <b> Example usage code : </b>
```python
# Import to your project :
from YN_Exchange import Exchange
ExchangeOBJ = Exchange.ExchangeAPI(Exchange = "binance") # Make object of ExchangeAPI
BTC = ExchangeOBJ.GetCryptoData(CryptoSymbol = "BTC/USDT")
```
- <b>Output</b>
```json
{'symbol': 'BTC/USDT', 'timestamp': 1736598300337, 'datetime': '2025-01-11T12:25:00.337Z', 'high': 95836.0, 'low': 92206.02, 'bid': 94613.99, 'bidVolume': 5.67459, 'ask': 94614.0, 'askVolume': 0.35323, 'vwap': 94125.84165815, 'open': 94805.6, 'close': 94614.0, 'last': 94614.0, 'previousClose': 94805.6, 'change': -191.6, 'percentage': -0.202, 'average': 94709.8, 'baseVolume': 25125.20063, 'quoteVolume': 2364930656.128506, 'markPrice': None, 'indexPrice': None, 'info': {'symbol': 'BTCUSDT', 'priceChange': '-191.60000000', 'priceChangePercent': '-0.202', 'weightedAvgPrice': '94125.84165815', 'prevClosePrice': '94805.60000000', 'lastPrice': '94614.00000000', 'lastQty': '0.03192000', 'bidPrice': '94613.99000000', 'bidQty': '5.67459000', 'askPrice': '94614.00000000', 'askQty': '0.35323000', 'openPrice': '94805.60000000', 'highPrice': '95836.00000000', 'lowPrice': '92206.02000000', 'volume': '25125.20063000', 'quoteVolume': '2364930656.12850630', 'openTime': '1736511900337', 'closeTime': '1736598300337', 'firstId': '4392795366', 'lastId': '4396948127', 'count': '4152762'}}
```
<hr>
## Cache Section :
<b>All the classes in the library have the "clear_cache" function, which you can use to clear the cache of that class.</b>
<br>
<b>Caches are saved as json files on your computer</b>
<hr>
# Usage ( Async Version ) :
<b>For usage Async version you must import</b> ```AsyncExchange``` <b>module</b>
<br>
<b>And for usage you can use</b> ```asyncio.run()``` <b>function</b>
<br>
- <b>Example Usage :</b>
```python
# Import to your project :
from YN_Exchange import AsyncExchange
import asyncio
# The use of all async functions is the same as the main functions :
ExchangeOBJ = AsyncExchange.AsyncCryptoManager(Cache = True , Cache_Duration = 300)
CryptoPrice = asyncio.run(ExchangeOBJ.GetCryptoPrice(CryptoName = "BTC",Currency = "USD",Grouping = True))
```
<br>
<b>To use functions, you can easily use them by adding the word "async" to the first of the main functions.</b>
<hr>
# Donation
- <b>TON , USDT Wallet ( Tonkeeper ) : </b> <br>
``` UQCZgyJ4XB7c1GMnLgefqcc-zOA98hyOlMLZpO0EsCNxBq-e ```
- <b>BTC Wallet : </b> <br>
``` bc1qpgzy8hpklpp0zwan5ha4lfzavvtjf286w0tlzc ```
- <b>ETH Wallet : </b> <br>
```0xE95FAEc8B847F18B3bC5dc1bB8256fb376d2e459```
- <b>TRX Wallet : </b> <br>
```TG8MpYtysGngjK7tPdCATLqLJKwm5vbfYi```
Raw data
{
"_id": null,
"home_page": null,
"name": "YnExchangePY",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, crypto, prices, crypto calculations, api, calculations, metal",
"author": "Yasha Najafi(YN)",
"author_email": "<najafiyasha@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4b/56/ae9fa8dd4e20a6982bb71059933174de0bf96e612ee7cc9897c889c0ae4c/YnExchangePY-6.0.1.tar.gz",
"platform": null,
"description": "\r\n# YN Exchange\r\n\r\n<br>\r\n\r\n<div align=\"center\">\r\n\r\n <img src=\"https://static.pepy.tech/badge/YnExchangePY\"><img/>\r\n\r\n <img src=\"https://static.pepy.tech/badge/YnExchangePY/month\"><img/>\r\n\r\n <img src=\"https://static.pepy.tech/badge/YnExchangePY/week\"><img/>\r\n\r\n</div>\r\n\r\n\r\n\r\n# Documentation\r\n\r\n\r\n\r\n### Description:\r\n\r\nThis Python library provides functionalities to get cryptoCurrency prices and perform conversions between Iranian Toman (IRT) and USD, for all supported cryptocurrencies.\r\n\r\n\r\n\r\n### Key Features:\r\n\r\n* Real-time cryptoCurrency price data retrieval .\r\n\r\n* Support for multiple exchanges .\r\n\r\n* Perform conversions between USD, IRT, and supported cryptocurrencies.\r\n\r\n* Get the current price of metals ( Gold , Copper , Silver and ... ) .\r\n\r\n* Get the current price of natural resources ( oil , gas and ... ) .\r\n\r\n* Generate cryptoCurrency tables (requires `kaleido` library for table rendering).\r\n\r\n* Asynchronous data fetching .\r\n\r\n* Customizable data formats .\r\n\r\n* Save data to cache .\r\n\r\n* Smart calculator\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n### Installation:\r\n\r\n- Install the library using pip:\r\n\r\n```bash\r\n\r\npip install YnExchangePY\r\n\r\n```\r\n\r\n\r\n\r\n### Dependencies\r\n\r\n- Required: `kaleido` library for generating crypto tables ( Images )\r\n\r\n```bash\r\n\r\npip install kaleido\r\n\r\n```\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n# Usage ( Normal Version )\r\n\r\n\r\n\r\n## Crypto Section :\r\n\r\n\r\n\r\n- <b> Get Crypto Price : </b>\r\n\r\n\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\n# \"Cache\" Argument It is set to \"False\" by default\r\n\r\n# \"Cache_Duration\" it is set to per second\r\n\r\nExchangeOBJ = Exchange.CryptoManager(Cache = True , Cache_Duration = 300) # Make object of CryptoManager\r\n\r\n\r\n\r\n# \"Currency\" Argument supported Currency is : USD , IRT ( Default : USD )\r\n\r\n# \"Grouping\" It is set to \"False\" by default\r\n\r\n# Grouping ( False ) Output : 96000\r\n\r\n# Grouping ( True ) Output : 96,000\r\n\r\nBTC_Price = ExchangeOBJ.GetCryptoPrice(CryptoName = \"BTC\",Currency = \"USD\",Grouping = True) # Get crypto price\r\n\r\n```\r\n\r\n\r\n\r\n<b> If the Cache is active, the information is received and displayed from the Cache until the Cache_Duration expires, and after the Cache expires, the information is received from the server again and stored in the Cache. </b>\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n- <b>Generate Crypto Charts :</b>\r\n\r\n\r\n\r\n### Examples :\r\n\r\n\r\n\r\n<img src=\"https://s8.uupload.ir/files/ton-usdt_chart_f0oo.jpg\" width=\"300px\"> <img src=\"https://s8.uupload.ir/files/ton-usdt_chart_7aod.jpg\" width=\"500px\">\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n### Example usage :\r\n\r\n\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\n# \"Cache\" Argument It is set to \"False\" by default\r\n\r\n# \"Cache_Duration\" it is set to per second\r\n\r\n# Cache not active for charts\r\n\r\nExchangeOBJ = Exchange.CryptoManager(Cache = True , Cache_Duration = 300) # Make object of CryptoManager\r\n\r\n\r\n\r\n# Generate chart\r\n\r\n# For save chart as image definitely install kaleido\r\n\r\n# You can edit argument for edit your chart for example, if you set the histogram argument to \"False\", the histograms will be removed from the chart.\r\n\r\nExchangeOBJ.GenerateCryptoChart(CryptoSymbol = \"TON/USDT)\r\n\r\n```\r\n\r\n\r\n\r\n<b>You can edit argument for edit your chart for example, if you set the histogram argument to \"False\", the histograms will be removed from the chart.<b>\r\n\r\n<br>\r\n\r\n<b> For save chart as image definitely install kaleido ( [Click](#installation) ) </b>\r\n\r\n\r\n\r\n### Charts Argument :\r\n\r\n- ```ImageSave : bool = True```\r\n\r\n- ```HTML_Save : bool = False```\r\n\r\n- ```Json_Save : bool = False```\r\n\r\n- ```ChartTemplate : str = \"Professional\"```\r\n\r\n- ```Exchange : str = \"binance\"```\r\n\r\n- ```CryptoSymbol : str = \"BTC/USDT\"```\r\n\r\n- ```Limit : int = 100```\r\n\r\n- ```Timeframe = '1d'```\r\n\r\n- ```IchimokuLine : bool = True```\r\n\r\n- ```IchimokuCloud : bool = True```\r\n\r\n- ```Candlesticks : bool = True```\r\n\r\n- ```Chikou : bool = True```\r\n\r\n- ```Tenkan : bool = True```\r\n\r\n- ```Kijun : bool = True```\r\n\r\n- ```MACD_Line : bool = True```\r\n\r\n- ```SignalLine : bool = True```\r\n\r\n- ```Histogram : bool = True```\r\n\r\n\r\n\r\n<b>You can customize your charts with arguments</b>\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n## Metal Section :\r\n\r\n- <b> Get Price : </b>\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\n# \"Cache\" Argument It is set to \"False\" by default\r\n\r\n# \"Cache_Duration\" it is set to per second\r\n\r\nMetalsOBJ = Exchange.MetalManager(Cache = True , Cache_Duration = 300) # Make object of MetalManager\r\n\r\n\r\n\r\nGoldPrice = MetalsOBJ.GetGoldPrice(Carat=24,Grouping=True)\r\n\r\n```\r\n\r\n<b>You will see the rest of the functions of this class</b>\r\n\r\n<br>\r\n\r\n\r\n\r\n### Functionality :\r\n\r\n- ```GetPlatinumPrice(Grouping : bool = \"False\")``` Ounce per USD\r\n\r\n- ```GetSilverPrice(Grouping : bool = \"False\")``` Ounce per USD\r\n\r\n- ```GetPalladiumPrice(Grouping : bool = \"False\")``` Ounce per USD\r\n\r\n- ```GetTinPrice(Grouping : bool = \"False\")``` Tonne per USD\r\n\r\n- ```GetZincPrice(Grouping : bool = \"False\")``` Tonne per USD\r\n\r\n- ```GetNickelPrice(Grouping : bool = \"False\")``` Tonne per USD\r\n\r\n- ```GetLeadPrice(Grouping : bool = \"False\")``` Tonne per USD\r\n\r\n- ```GetCopperPrice(Grouping : bool = \"False\")``` Pound per USD\r\n\r\n- ```GetAluminiumPrice(Grouping : bool = \"False\")``` Tonne per USD\r\n\r\n- ```GetGoldPrice(Grouping : bool = \"False\",carat : int = 18,weight : str = \"gram\")``` Weight : [kilo,gram,ounce] and Only IRT Price\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n## Natural Resources Section :\r\n\r\n- <b> Get Price : </b>\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\n# \"Cache\" Argument It is set to \"False\" by default\r\n\r\n# \"Cache_Duration\" it is set to per second\r\n\r\nNaturalOBJ = Exchange.NaturalResourcesManager(Cache = True , Cache_Duration = 300) # Make object of NaturalResourcesManager\r\n\r\n\r\n\r\nBrentOil = NaturalOBJ.GetBrentOil(Grouping = True)\r\n\r\nOilWTI = NaturalOBJ.GetCrudeOilWTI(Grouping = True)\r\n\r\nNaturalGas = NaturalOBJ.GetNaturalGas(Grouping = True)\r\n\r\n```\r\n\r\n\r\n\r\n### Functionality :\r\n\r\n- ```GetCrudeOilWTI``` Barrel per USD\r\n\r\n- ```GetBrentOil``` Barrel per USD\r\n\r\n- ```GetNaturalGas``` Mmbtu per USD\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n## Calculator Section :\r\n\r\n<b>You can use this functions in ```Calculator()``` class<b>\r\n\r\n<br>\r\n\r\n- <b>Example usage code : </b>\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\nCalculatorOBJ = Exchange.Calculator() # Make object of Calculator\r\n\r\n\r\n\r\nResult = CalculatorOBJ.CryptoValue2Currency(CryptoName=\"BTC\",Currency=\"USD\",Grouping = True)\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n### Functionality :\r\n\r\n- ```CryptoValue2Currency(Value: int, CryptoName: str = \"BTC\", Currency: str = \"USD\", Grouping: bool = False)```\r\n\r\n- ```Currency2CryptoValue(Value: int, CryptoName: str = \"BTC\", Currency: str = \"USD\", Grouping: bool = False)```\r\n\r\n- ```CryptoValue2CryptoValue(CryptoValue: int, CryptoName1: str = \"BTC\", CryptoName2: str = \"ETH\", Grouping: bool = False)```\r\n\r\n- ```CryptoValue2GoldWeight(GoldCarat: int = 18, GoldWeight: str = \"gram\", CryptoName: str = \"BTC\")```\r\n\r\n- ```GoldWeight2CryptoValue(GoldCarat: int = 18, GoldWeight: str = \"gram\", GoldValue: int = 1, CryptoName: str = \"BTC\")```\r\n\r\n- ```GoldWeight2Currency(GoldCarat: int = 18, GoldWeight: str = \"gram\", GoldValue: int = 1, Currency: str = \"USD\")```\r\n\r\n- ```Currency2GoldWeight(GoldCarat: int = 18, GoldWeight: str = \"gram\", CurrencyValue : int = 5000000)```\r\n\r\n\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n## Exchanges API Section :\r\n\r\n\r\n\r\n<b>A class to receive digital currency information from APIs of world's most prestigious exchanges</b>\r\n\r\n<br>\r\n\r\n- <b> Example usage code : </b>\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import Exchange\r\n\r\n\r\n\r\nExchangeOBJ = Exchange.ExchangeAPI(Exchange = \"binance\") # Make object of ExchangeAPI\r\n\r\n\r\n\r\nBTC = ExchangeOBJ.GetCryptoData(CryptoSymbol = \"BTC/USDT\")\r\n\r\n```\r\n\r\n- <b>Output</b>\r\n\r\n```json\r\n\r\n{'symbol': 'BTC/USDT', 'timestamp': 1736598300337, 'datetime': '2025-01-11T12:25:00.337Z', 'high': 95836.0, 'low': 92206.02, 'bid': 94613.99, 'bidVolume': 5.67459, 'ask': 94614.0, 'askVolume': 0.35323, 'vwap': 94125.84165815, 'open': 94805.6, 'close': 94614.0, 'last': 94614.0, 'previousClose': 94805.6, 'change': -191.6, 'percentage': -0.202, 'average': 94709.8, 'baseVolume': 25125.20063, 'quoteVolume': 2364930656.128506, 'markPrice': None, 'indexPrice': None, 'info': {'symbol': 'BTCUSDT', 'priceChange': '-191.60000000', 'priceChangePercent': '-0.202', 'weightedAvgPrice': '94125.84165815', 'prevClosePrice': '94805.60000000', 'lastPrice': '94614.00000000', 'lastQty': '0.03192000', 'bidPrice': '94613.99000000', 'bidQty': '5.67459000', 'askPrice': '94614.00000000', 'askQty': '0.35323000', 'openPrice': '94805.60000000', 'highPrice': '95836.00000000', 'lowPrice': '92206.02000000', 'volume': '25125.20063000', 'quoteVolume': '2364930656.12850630', 'openTime': '1736511900337', 'closeTime': '1736598300337', 'firstId': '4392795366', 'lastId': '4396948127', 'count': '4152762'}}\r\n\r\n```\r\n\r\n<hr>\r\n\r\n\r\n\r\n## Cache Section :\r\n\r\n<b>All the classes in the library have the \"clear_cache\" function, which you can use to clear the cache of that class.</b>\r\n\r\n<br>\r\n\r\n<b>Caches are saved as json files on your computer</b>\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n# Usage ( Async Version ) :\r\n\r\n<b>For usage Async version you must import</b> ```AsyncExchange``` <b>module</b>\r\n\r\n<br>\r\n\r\n<b>And for usage you can use</b> ```asyncio.run()``` <b>function</b>\r\n\r\n<br>\r\n\r\n\r\n\r\n- <b>Example Usage :</b>\r\n\r\n```python\r\n\r\n# Import to your project :\r\n\r\nfrom YN_Exchange import AsyncExchange\r\n\r\nimport asyncio\r\n\r\n\r\n\r\n# The use of all async functions is the same as the main functions :\r\n\r\nExchangeOBJ = AsyncExchange.AsyncCryptoManager(Cache = True , Cache_Duration = 300)\r\n\r\n\r\n\r\nCryptoPrice = asyncio.run(ExchangeOBJ.GetCryptoPrice(CryptoName = \"BTC\",Currency = \"USD\",Grouping = True))\r\n\r\n```\r\n\r\n<br>\r\n\r\n\r\n\r\n<b>To use functions, you can easily use them by adding the word \"async\" to the first of the main functions.</b>\r\n\r\n\r\n\r\n<hr>\r\n\r\n\r\n\r\n# Donation\r\n\r\n- <b>TON , USDT Wallet ( Tonkeeper ) : </b> <br>\r\n\r\n``` UQCZgyJ4XB7c1GMnLgefqcc-zOA98hyOlMLZpO0EsCNxBq-e ```\r\n\r\n- <b>BTC Wallet : </b> <br>\r\n\r\n``` bc1qpgzy8hpklpp0zwan5ha4lfzavvtjf286w0tlzc ```\r\n\r\n- <b>ETH Wallet : </b> <br>\r\n\r\n```0xE95FAEc8B847F18B3bC5dc1bB8256fb376d2e459```\r\n\r\n- <b>TRX Wallet : </b> <br>\r\n\r\n```TG8MpYtysGngjK7tPdCATLqLJKwm5vbfYi```\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "6.0.1",
"project_urls": null,
"split_keywords": [
"python",
" crypto",
" prices",
" crypto calculations",
" api",
" calculations",
" metal"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "31c78f150328be0e0047520c2ca443072ab0585f0658e09812ad1d5fa1f0eb79",
"md5": "4f6108bb9bb2b2532ccc6a466d37c612",
"sha256": "03728f27e3f9c8eecfbd29865e2dff927002c851a4d5ba46abae5ccbfeeb2d02"
},
"downloads": -1,
"filename": "YnExchangePY-6.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4f6108bb9bb2b2532ccc6a466d37c612",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16408,
"upload_time": "2025-01-11T13:13:14",
"upload_time_iso_8601": "2025-01-11T13:13:14.137805Z",
"url": "https://files.pythonhosted.org/packages/31/c7/8f150328be0e0047520c2ca443072ab0585f0658e09812ad1d5fa1f0eb79/YnExchangePY-6.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b56ae9fa8dd4e20a6982bb71059933174de0bf96e612ee7cc9897c889c0ae4c",
"md5": "5696e93a85fdc1289cf329d317bf4525",
"sha256": "cedda1af3f19855faed6c50a6fb911db47147c5f011303bf46b6720f9ce33a1e"
},
"downloads": -1,
"filename": "YnExchangePY-6.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5696e93a85fdc1289cf329d317bf4525",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18143,
"upload_time": "2025-01-11T13:13:19",
"upload_time_iso_8601": "2025-01-11T13:13:19.110518Z",
"url": "https://files.pythonhosted.org/packages/4b/56/ae9fa8dd4e20a6982bb71059933174de0bf96e612ee7cc9897c889c0ae4c/YnExchangePY-6.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-11 13:13:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ynexchangepy"
}