Code Monkey home page Code Monkey logo

perfi's People

Contributors

lhl avatar peloriante 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

Watchers

 avatar  avatar  avatar  avatar

perfi's Issues

OpenSSL issue

When I run poetry run python bin/import_chain_txs.py 0x379, I get the following error:

AttributeError: module 'OpenSSL.SSL' has no attribute 'SSLv2_METHOD'

Everything up to then was working np.

ZEUR fiat currency throwing exception

Importing...
Traceback (most recent call last):
  File "/Users/nick/Documents/perfi/bin/import_from_exchange.py", line 107, in <module>
    main()
  File "/Users/nick/Documents/perfi/bin/import_from_exchange.py", line 97, in main
    importer.do_import(
  File "/Users/nick/Documents/perfi/perfi/ingest/exchange.py", line 345, in do_import
    txns = self.ledgers_csv_to_chain_txns(
  File "/Users/nick/Documents/perfi/perfi/ingest/exchange.py", line 207, in ledgers_csv_to_chain_txns
    asset_tx_id = self.get_symbol(asset).lower()
  File "/Users/nick/Documents/perfi/perfi/ingest/exchange.py", line 179, in get_symbol
    raise Exception(
Exception: This asset code in Kraken represents a fiat currency that we don't know how to convert prices for yet. Don't know what to do so throwing exception. Asset: ZEUR

Gemini xlsx importer fails on long digits

The GeminiImporter uses openpyxl to convert an xlsx into csv. Unfortunately that module seems to have a problem with long numbers.
In a gemini spreadsheet with a long number like -0.0000030335 becomes "Fee (USD) Fee" = "-3.0335e-06"
The decimal_from_str method then ignores the scientific notation and you end up with results like buying hundreds of eth for fractions of a cent. In excel itself, the true number is fully present, so it doesn't seem to be an issue with the actual Excel file, just how openpyxl handles it.

Options:

  • (Best) Figure out how to get openpyxl to handle this so we don't lose precision.
  • Write a gemini API client that can export the needed data as CSV given a reporting API key. I already have something pretty close to this.
  • Sacrifice the precision and add support for scientific notation to decimal_from_str().

Screenshot:
https://imgur.com/a/OSP2Wja

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.