kilimchoi / coingenius

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import transactions from Bittrex

kilimchoi opened this issue · comments

Goal: We should allow users to import their csv file of all their past transactions, and update any new transactions that are created under their account so that users do not have to worry about updating the transaction data manually.

You can use this csv, https://docs.google.com/spreadsheets/d/1-O0X4sVZqBrEyHdXsdVoxnEmbiKO31QJcB6a7ukkFro/edit?usp=sharing, to test parsing the csv file.

Bittrex only pulls the transactions from the last 30 days if you use their api.
So, to make an implementation for monitoring new transactions, you have to do the following:

  1. Assuming that you have an account on bittrex.
  2. Visit (https://bittrex.com/Manage#sectionApi)
  3. Create a new key
  4. Enable only READ INFO
  5. Save the key

We should provide a user interface that lists the instructions above and then allow users to provide their key and secret key.
Once they provide that, we should run a sidekiq job that runs daily and looks for any new transactions that were created. If there is any, we should create those transactions in the user's record and update it accordingly.

CSV field Object field

Closed Date -> TimeStamp
Opened Date -> (we do not care about this)
Market -> Exchange
Type -> Type
Bid/Ask -> Price/Unit
Units Filled -> If Sell, Quantity + QuantityRemaining else Quantity - QuantityRemaining
Units Total -> Quantity
Cost/proceeds -> PricePerUnit * Quantity - 0.25% fee
Actual Rate -> PricePerUnit