ForX - get forex quotes from the terminal

Overview

ForX - get forex quotes from the terminal

forx is a command line tool for checking exchange rates between currencies, both crypto and fiat.

forx-gif-demo

Features

  • Conversions between all major world currencies.
  • Supports major cryptocurrencies, exchange rates
  • Formatted output and raw output
  • Convert different quantities of currency

Dependencies

Python 3.6 or above.

Installation

AUR

For archlinux based systems, forx is available on the AUR. Install it with your favorite AUR helper. Example using yay:

yay -S forx

PyPI

forx is also available as a python package. Simply install using pip:

pip install forx

Usage

Here are some examples of using forx:

forx btc usd # Price of 1 BTC in USD
forx btc usd -q 2 # Price of 2 BTC in USD
forx cny usd -f # Price of 1 CNY in USD, with no formatting

Donate

I develop forx for free in my spare time. If you like it, and want to buy me a coffee, I'd really appreciate it.

Bitcoin: (QR) bc1qusuztegpfuh7jk25l2dx5xyjvasgryrqg42d5n

Monero: (QR) 87wuCKbbchKV8Dz3JRoSN3jaqWBSiEShFXkFrYUaKT8Bew4P7dFvUJWVVR6RLr84J44QCdtNVyR6QC7aCSKYUWfnGK9y4K2

Comments
  • Add more data about the currencies

    Add more data about the currencies

    • Make a separate file for the currencies data
    • Add names, flags and decimal degits count for the currencies
    • Improve the currencies' list
    • Verbose mode now displays more data about the currencies
    • Clean code by formating it and deleting unnecessary steps
    opened by zer0-x 2
  • Various cryptocurrency return

    Various cryptocurrency return "Invalid currency"

    Attempting to convert coins such as XMR, BNB, SAND, NEAR, KLAY, etc return "Invalid currency ." error, I have confirmed these are the names used for these coins on the Coinbase website.

    Steps To Reproduce:

    1. Attempt to convert failing coin - forx XMR USD

    2022-01-24_15-24 2022-01-24_15-26

    It's possible this isn't an issue with your application and is instead an issue with the coinbase API. Further testing indicates that lower ranked coins past the 2nd page seem to all fail.

    opened by BrodieRobertson 1
  • Switch amount data type from int to float?

    Switch amount data type from int to float?

    Currently, forx does't support amounts that aren't whole integers. For instance, forx btc usd -q .12 returns forx: error: argument -q: invalid int value: '.12'. Changing the type from int to float on line 72 in convert.py seems to resolve the issue, but I'm unsure of repercussions. I'm more than happy to submit a PR for this as well.

    opened by joshskidmore 1
  • KeyError is thrown if currency's symbol doesn't exist in currency_symbols

    KeyError is thrown if currency's symbol doesn't exist in currency_symbols

    ❯ forx -q 10 usd sol
    Traceback (most recent call last):
      File "/usr/bin/forx", line 33, in <module>
        sys.exit(load_entry_point('forx==1.0.1', 'console_scripts', 'forx')())
      File "/usr/lib/python3.10/site-packages/forx/convert.py", line 117, in main
        if currency_symbols[to.upper()]:
    KeyError: 'SOL'
    
    opened by joshskidmore 0
  • Bypass cloudflare when using proxy

    Bypass cloudflare when using proxy

    I tried to use an environmental proxy to connect via the Tor network, but it seems that python-requests doesn't bypass cloudflare since I got an error. I tried with the tor browser and it works.

    I think that this should be solvable by modifing the http headers.

    opened by zer0-x 0
  • Some currencies need special rounding

    Some currencies need special rounding

    Most currencies uses two decimal places, but some of them use more or less. For example: BHD uses three.

    The decimal places needed for every fiat currency are available in the currencies data provided by #8. For crypto currencies I think that we shouldn't round the price, we should display the price as it is. It there any other idea?

    opened by zer0-x 0
  • Add an option to use an alternate API to support cryptocurrencies beyond those supported by Coinbase

    Add an option to use an alternate API to support cryptocurrencies beyond those supported by Coinbase

    As per this issue, some popular cryptocurrencies (XMR, BNB, SAND, NEAR, KLAY, etc.) are not supported by the Coinbase API.

    The only fix for this I see is adding an option to use an alternate API to pull data for these additional cryptocurrencies. Maybe alphavantage?

    opened by Gbox4 0
Owner
Gabe Banks
Gabe Banks
👻 Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal.

?? Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal. It c

Billy 11 Nov 10, 2021
Interactive Redis: A Terminal Client for Redis with AutoCompletion and Syntax Highlighting.

Interactive Redis: A Cli for Redis with AutoCompletion and Syntax Highlighting. IRedis is a terminal client for redis with auto-completion and syntax

null 2.2k Dec 29, 2022
A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.

mycli A command line client for MySQL that can do auto-completion and syntax highlighting. HomePage: http://mycli.net Documentation: http://mycli.net/

dbcli 10.7k Jan 7, 2023
Python commandline tool for remembering linux/terminal commands

ehh Remember linux commands Commandline tool for remembering linux/terminal commands. It stores your favorite commands in ~/ehh.json in your homedir a

null 56 Nov 10, 2022
Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections.

code-connect Open a file in your locally running Visual Studio Code instance from arbitrary terminal connections. Motivation VS Code supports opening

Christian Volkmann 56 Nov 19, 2022
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022
Random scripts and other bits for interacting with the SpaceX Starlink user terminal hardware

starlink-grpc-tools This repository has a handful of tools for interacting with the gRPC service implemented on the Starlink user terminal (AKA "the d

null 270 Dec 29, 2022
asciinema - Terminal session recorder 📹

asciinema - Terminal session recorder ??

asciinema 11.1k Dec 27, 2022
Rich is a Python library for rich text and beautiful formatting in the terminal.

The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.

Will McGugan 41.4k Jan 3, 2023
Lets you view, edit and execute Jupyter Notebooks in the terminal.

Lets you view, edit and execute Jupyter Notebooks in the terminal.

David Brochart 684 Dec 28, 2022
The project help you to quickly build layouts in terminal,cross-platform

The project help you to quickly build layouts in terminal,cross-platform

gojuukaze 133 Nov 30, 2022
GanTTY - Project planning from the terminal

GanTTY - Project planning from the terminal

Timeo Sam Pochin 161 Dec 26, 2022
Module for converting 2D Python lists to fancy ASCII tables. Table2Ascii lets you display pretty tables in the terminal and on Discord.

table2ascii Module for converting 2D Python lists to a fancy ASCII/Unicode tables table2ascii ?? Installation ??‍?? Usage Convert lists to ASCII table

Jonah Lawrence 40 Jan 3, 2023
Modern line-oriented terminal emulator without support for TUIs.

Modern line-oriented terminal emulator without support for TUIs.

null 10 Jun 12, 2022
A super simple wallet application for the NANO cryptocurrency that runs in the terminal

Nano Terminal Wallet A super simple wallet application for the NANO cryptocurrency that runs in the terminal Written in 2021 by NinjaSnail1080 (Discor

null 9 Jul 22, 2022
uploadgram uses your Telegram account to upload files up to 2GiB, from the Terminal.

uploadgram uploadgram uses your Telegram account to upload files up to 2GiB, from the Terminal. Heavily inspired by the telegram-upload Installing: pi

Shrimadhav U K 97 Jan 6, 2023
ddgr is a cmdline utility to search DuckDuckGo (html version) from the terminal

ddgr is a cmdline utility to search DuckDuckGo (html version) from the terminal. While googler is extremely popular among cmdline users, in many forums the need of a similar utility for privacy-aware DuckDuckGo came up. DuckDuckGo Bangs are super-cool too! So here's ddgr for you!

Piña Colada 2.5k Dec 25, 2022
This a simple tool to query the awesome ippsec.rocks website from your terminal

ippsec-cli This a simple tool to query the awesome ippsec.rocks website from your terminal Installation and usage cd /opt git clone https://github.com

stark0de 5 Nov 26, 2022
💥 Share files easily over your local network from the terminal!

Fileshare ?? Share files easily over your local network from the terminal! ?? Installation # clone the repo $ git clone https://github.com/dopevog/fil

Dopevog 11 Sep 10, 2021