Giter Club home page Giter Club logo

forx's Introduction

Gbox4

  • I'm currently working on tstock, a command line tool for generating graphs in the terminal
  • I'm also trying to learn Rust ๐Ÿฆ€
  • I'm going to try and build a TUI interface for paper trading next.
  • Feel free to check out my website for more info! https://gabebanks.net
  • Buy me a coffee: https://www.buymeacoffee.com/Gbox4

Most used languages

forx's People

Contributors

gbox4 avatar joshskidmore avatar zefr0x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

forx's Issues

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.

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.

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'

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.

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.