Skip to main content

Gheymat

A simple Python package for getting live prices of currencies, cryptocurrencies, gold, coins, and precious metals.

If this package is useful for you, you can support me with a coffee ☕😁

https://www.coffeebede.com/mrrobat

Downloads


Installation

pip install gheymat

Supported Prices

Currencies

Currency Symbol
US Dollar USD
British Pound GBP
Euro EUR
Turkish Lira TRY
UAE Dirham AED
Chinese Yuan CNY
Indian Rupee INR
Swedish Krona SEK
Omani Rial OMR

Cryptocurrencies

Cryptocurrency Symbol
Bitcoin BTC
Ethereum ETH
Dogecoin DOGE
Solana SOL
Tron TRON
Ripple RIPP
Dash DASH
Litecoin LITE
Stellar STELL
Toncoin TON

Gold, Coins, and Metals

Item Symbol
18K Gold GOLD18
24K Gold GOLD24
Used Gold USED_GOLD
Emami Coin SEKE_EMAM
Bahar Azadi Coin SEKE_BAHAR
999 Silver SILVER

Usage

Get Currency Prices

You can use the new get_price() function to get the price of any supported currency.

from gheymat.currency import get_price

Get US Dollar Price in Toman

dollar_price = get_price("usd", toman=True)
print(dollar_price)

Get Euro Price in Rial

euro_price = get_price("eur", toman=False)
print(euro_price)

Get Pound Price With Commas

pound_price = get_price("gbp", toman=True, beauty=True)
print(pound_price)

# Example output:
# 1,520,000

The currency name is not case-sensitive:

get_price("usd")
get_price("USD")
get_price("Usd")

All of them work the same.

get_price() Parameters

Parameter Default Description
currency "usd" Currency symbol. Example: "usd", "eur", "gbp", or "aed".
toman True If True, returns the price in Toman. If False, returns the price in Rial.
beauty False If True, returns the price as a formatted string with commas.

Supported currency values:

usd, gbp, eur, try, aed, cny, inr, sek, omr

Old Currency Functions

The old functions are still available and will continue to work.

from gheymat.currency import USD, EUR

dollar_price = USD(toman=True, beauty=False)
euro_price = EUR(toman=False, beauty=True)

print(dollar_price)
print(euro_price)

For new projects, using get_price() is recommended.


Cryptocurrency Prices

You can get cryptocurrency prices with their own functions.

from gheymat.crypto import BTC, ETH, DOGE

bitcoin_price = BTC(toman=True, beauty=True)
ethereum_price = ETH(toman=False)
dogecoin_price = DOGE(toman=True)

print(bitcoin_price)
print(ethereum_price)
print(dogecoin_price)

Cryptocurrency Function Parameters

Parameter Default Description
toman True If True, returns the price in Toman. If False, returns the price in USD.
beauty False If True, returns a formatted string with commas.

Gold and Metal Prices

from gheymat.metal import GOLD18, GOLD24, SEKE_EMAM, SILVER

gold_18_price = GOLD18(toman=True, beauty=True)
gold_24_price = GOLD24(toman=True)
emami_coin_price = SEKE_EMAM(toman=True, beauty=True)
silver_price = SILVER(toman=False)

print(gold_18_price)
print(gold_24_price)
print(emami_coin_price)
print(silver_price)

Gold and Metal Function Parameters

Parameter Default Description
toman True If True, returns the price in Toman. If False, returns the price in Rial.
beauty False If True, returns a formatted string with commas.

Notes

  • Prices are collected from online sources and may change at any time.
  • This package depends on the structure of source websites. If a source website changes its HTML structure, some functions may need an update.
  • Use the returned prices for informational purposes only.
  • When beauty=True, the returned value is a str.
  • When beauty=False, the returned value is usually an int or float.

Support

If you like this package and want to support its development, you can buy me a coffee ☕😁 https://www.coffeebede.com/mrrobat


License

This project is available under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gheymat-0.3.9.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gheymat-0.3.9-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file gheymat-0.3.9.tar.gz.

File metadata

  • Download URL: gheymat-0.3.9.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for gheymat-0.3.9.tar.gz
Algorithm Hash digest
SHA256 65bc516a3386282ba098ac7c46da14feb162b25982a32f0d33277ca1dcad321c
MD5 3d49be2b4e6704b2a796712b17ed94d0
BLAKE2b-256 8734b4eee9927120a0659c603bea4061622a3820da28e568ae94b1a1052c3de8

See more details on using hashes here.

File details

Details for the file gheymat-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: gheymat-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for gheymat-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c785cf6f745accaaae9b3c84fab581f10990bcd7a93457e32a503a4657b1a0da
MD5 cd3527fa02e80d881bc47f6f3272ad7e
BLAKE2b-256 956aaf6e58c388863615e26370f509073d299c6bec9431ad8e08ca3eacd1732b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.9 This release

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page