YnExchangePY


NameYnExchangePY JSON
Version 3.2.5 PyPI version JSON
download
home_pageNone
SummaryNone
upload_time2024-04-24 13:37:04
maintainerNone
docs_urlNone
authorYasha Najafi(YN)
requires_pythonNone
licenseNone
keywords python crypto prices crypto calculations api calculations
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<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><br/><br/>



# Documentation



### Description:

This Python library provides functionalities to get cryptocurrency prices and perform conversions between Iranian Toman (IRT) and USD, for 15 supported cryptocurrencies.



### Key Features:

* Get the current price of various cryptocurrencies in IRT or USD.

* Convert between IRT and USD for any of the supported cryptocurrencies.

* Donate to the library developer (optional).



### Supported Cryptocurrencies:<br />

TON<br />

BTC<br />

ETH<br />

USDT<br />

SHIB<br />

BNB<br />

DOGE<br />

ADA<br />

SOL<br />

XRP<br />

USDC<br />

ETC<br />

PEPE<br />

ATM<br />

BISO



# Installation

```bash

pip install YnExchangePY

```

# Functionality

The library provides functions for retrieving the price of 15 cryptocurrencies. Each function takes two arguments:<br/>

* currency (str): This argument specifies the desired currency (either "IRT" or "USD").

* grouping (bool, optional): This argument is optional (defaults to False). If set to True, the function will format the price with comma separators for readability.<br/><br/>

**Here's a list of all the available functions:**

* ```yn_exchange.TON_PRICE(currency, grouping=False)```

* ```yn_exchange.BTC_PRICE(currency, grouping=False)```

* ```yn_exchange.ETH_PRICE(currency, grouping=False)```

* ```yn_exchange.USDT_PRICE(currency, grouping=False)```

* ```yn_exchange.SHIB_PRICE(currency, grouping=False)```

* ```yn_exchange.BNB_PRICE(currency, grouping=False)```

* ```yn_exchange.DOGE_PRICE(currency, grouping=False)```

* ```yn_exchange.ADA_PRICE(currency, grouping=False)```

* ```yn_exchange.SOL_PRICE(currency, grouping=False)```

* ```yn_exchange.XRP_PRICE(currency, grouping=False)```

* ```yn_exchange.USDC_PRICE(currency, grouping=False)```

* ```yn_exchange.ETC_PRICE(currency, grouping=False)```

* ```yn_exchange.PEPE_PRICE(currency, grouping=False)```

* ```yn_exchange.ATM_PRICE(currency, grouping=False)```

# Example Usage

```python

from YN_Exchange import yn_exchange



# Get Bitcoin price in USD with comma separators

bitcoin_usd_price = yn_exchange.BTC_PRICE("USD", grouping=True)

print(f"Bitcoin price in USD: ${bitcoin_usd_price}")



# Get Ethereum price in IRT

ethereum_irt_price = yn_exchange.ETH_PRICE("IRT")

print(f"Ethereum price in IRT: {ethereum_irt_price}")

```

# Error Handling

If the function encounters an error, such as an invalid currency or a network issue, it will raise a ```ValueError``` exception. You can handle this exception using a try-except block.

# Limitations

* The library relies on scraping data from a website, which may be subject to changes or become unavailable.

* The library only supports a limited number of cryptocurrencies (currently 15).

# Additional notes

### Here are some ways you can contribute to the YN_Exchange project:

* **Donate:** If you've found my library to be useful, I would greatly appreciate it if you would consider making a donation. Your donation will help me to continue to develop and maintain the library, and to add new features in the future.

**Donate function**

```python

yn_exchange.donate()

```


            

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",
    "author": "Yasha Najafi(YN)",
    "author_email": "<najafiyasha@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/85/cb/14e81714e690aba19e66f7636c22c4fea0daada8bda90669db7b0b0f33f6/YnExchangePY-3.2.5.tar.gz",
    "platform": null,
    "description": "\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><br/><br/>\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 15 supported cryptocurrencies.\r\n\r\n\r\n\r\n### Key Features:\r\n\r\n* Get the current price of various cryptocurrencies in IRT or USD.\r\n\r\n* Convert between IRT and USD for any of the supported cryptocurrencies.\r\n\r\n* Donate to the library developer (optional).\r\n\r\n\r\n\r\n### Supported Cryptocurrencies:<br />\r\n\r\nTON<br />\r\n\r\nBTC<br />\r\n\r\nETH<br />\r\n\r\nUSDT<br />\r\n\r\nSHIB<br />\r\n\r\nBNB<br />\r\n\r\nDOGE<br />\r\n\r\nADA<br />\r\n\r\nSOL<br />\r\n\r\nXRP<br />\r\n\r\nUSDC<br />\r\n\r\nETC<br />\r\n\r\nPEPE<br />\r\n\r\nATM<br />\r\n\r\nBISO\r\n\r\n\r\n\r\n# Installation\r\n\r\n```bash\r\n\r\npip install YnExchangePY\r\n\r\n```\r\n\r\n# Functionality\r\n\r\nThe library provides functions for retrieving the price of 15 cryptocurrencies. Each function takes two arguments:<br/>\r\n\r\n* currency (str): This argument specifies the desired currency (either \"IRT\" or \"USD\").\r\n\r\n* grouping (bool, optional): This argument is optional (defaults to False). If set to True, the function will format the price with comma separators for readability.<br/><br/>\r\n\r\n**Here's a list of all the available functions:**\r\n\r\n* ```yn_exchange.TON_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.BTC_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.ETH_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.USDT_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.SHIB_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.BNB_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.DOGE_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.ADA_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.SOL_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.XRP_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.USDC_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.ETC_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.PEPE_PRICE(currency, grouping=False)```\r\n\r\n* ```yn_exchange.ATM_PRICE(currency, grouping=False)```\r\n\r\n# Example Usage\r\n\r\n```python\r\n\r\nfrom YN_Exchange import yn_exchange\r\n\r\n\r\n\r\n# Get Bitcoin price in USD with comma separators\r\n\r\nbitcoin_usd_price = yn_exchange.BTC_PRICE(\"USD\", grouping=True)\r\n\r\nprint(f\"Bitcoin price in USD: ${bitcoin_usd_price}\")\r\n\r\n\r\n\r\n# Get Ethereum price in IRT\r\n\r\nethereum_irt_price = yn_exchange.ETH_PRICE(\"IRT\")\r\n\r\nprint(f\"Ethereum price in IRT: {ethereum_irt_price}\")\r\n\r\n```\r\n\r\n# Error Handling\r\n\r\nIf the function encounters an error, such as an invalid currency or a network issue, it will raise a ```ValueError``` exception. You can handle this exception using a try-except block.\r\n\r\n# Limitations\r\n\r\n* The library relies on scraping data from a website, which may be subject to changes or become unavailable.\r\n\r\n* The library only supports a limited number of cryptocurrencies (currently 15).\r\n\r\n# Additional notes\r\n\r\n### Here are some ways you can contribute to the YN_Exchange project:\r\n\r\n* **Donate:** If you've found my library to be useful, I would greatly appreciate it if you would consider making a donation. Your donation will help me to continue to develop and maintain the library, and to add new features in the future.\r\n\r\n**Donate function**\r\n\r\n```python\r\n\r\nyn_exchange.donate()\r\n\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "3.2.5",
    "project_urls": null,
    "split_keywords": [
        "python",
        " crypto",
        " prices",
        " crypto calculations",
        " api",
        " calculations"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e72a3bf3e8ee29e280b7ee09bb45fbcbe9c29902e08e582e46bfaa9453538d4",
                "md5": "e92ff1bf82c54e6edabc81a7d801e4a9",
                "sha256": "cfacd3171bd378ba68a33449485b127a0f2dc9833c53d0cb20258c6236219a50"
            },
            "downloads": -1,
            "filename": "YnExchangePY-3.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e92ff1bf82c54e6edabc81a7d801e4a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5971,
            "upload_time": "2024-04-24T13:37:01",
            "upload_time_iso_8601": "2024-04-24T13:37:01.798550Z",
            "url": "https://files.pythonhosted.org/packages/4e/72/a3bf3e8ee29e280b7ee09bb45fbcbe9c29902e08e582e46bfaa9453538d4/YnExchangePY-3.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85cb14e81714e690aba19e66f7636c22c4fea0daada8bda90669db7b0b0f33f6",
                "md5": "4f46a426064717cbd9397d3b911a83ea",
                "sha256": "90fecf5a8cfd2fa337a6b7c1fe48cc2c5140bb891fc1efb1fafd3afe1ac3fbc9"
            },
            "downloads": -1,
            "filename": "YnExchangePY-3.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "4f46a426064717cbd9397d3b911a83ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7413,
            "upload_time": "2024-04-24T13:37:04",
            "upload_time_iso_8601": "2024-04-24T13:37:04.080302Z",
            "url": "https://files.pythonhosted.org/packages/85/cb/14e81714e690aba19e66f7636c22c4fea0daada8bda90669db7b0b0f33f6/YnExchangePY-3.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 13:37:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ynexchangepy"
}
        
Elapsed time: 0.23760s