anfederico/cryptoview

Example database

nickvdw opened this issue · 1 comments

Hey there, would you be as kind as to provide us an example of what your database looks like? In the current app.py it seems like you're creating a list of what needs to be a dictionary, I think. The projects looks very good so far. Thank you very much for your hard work!

Certainly. Here is an example of what the document in your mongo database would look like:

{
    "_id": {
        "$oid": "5a0ede73292e643e5ec4c5f5"
    },
    "account": "anfederico",
    "positions": "[{\"Token\": \"XRP\", \"Balance\": 4900.55, \"Value\": 0.13315, \"Allocation\": 12.34465, \"Daily\": \"12.5\", \"Weekly\": \"20.95\", \"Exchanges\": \"bittrex\"}, {\"Token\": \"GAME\", \"Balance\": 433.97, \"Value\": 0.09235, \"Allocation\": 8.56194, \"Daily\": \"-1.24\", \"Weekly\": \"8.87\", \"Exchanges\": \"poloniex\"}]",
    "equity": "{\"btc\": {\"2017-11-20\": 1.526}, \"usd\": {\"2017-11-20\": 12544.64}}"
}