michaelgrosner / tribeca

A high frequency, market making cryptocurrency trading platform in node.js
Other
4k stars 949 forks source link

Saving market data in MongoDB #199

Open vrevuelta opened 6 years ago

vrevuelta commented 6 years ago

Hello,

I am running tribeca from from Windows with Docker and it runs good. It is showing me the order book and trade history in real time of all the exchanges available. However, I thought Tribeca would create files automatically in C:/data/db* with the inforamtion showed in the UI, but is not doing it. In MongoDbUrl I have changed "tribeca-mongo" to my host machine IP, but still is not creating any file.

I would like to know if there is a way to store all this information printed in the UI in a MongoDB file.

Many thanks!

dcu-sharepoint commented 6 years ago

I'm also interested in learning how to forward the Tribeca data to a mongoDB database. thanks

vrevuelta commented 6 years ago

Hey, I finally managed to do so. Working from Windows you should go to env and modify MongoDbUrl "tribeca-mongo" to the output of boot2docker ip or docker-machine ip. To see the db from MongoDb shell you should configure Mongo to bind to your docker IP. So for example, in my case my docker-machine IP is 192.168.99.100.

In MongoDBUrl I have: MongoDbUrl=mongodb://192.168.99.100:27017/tribeca. In the config file of mongo I have: bind_ip = [127.0.0.1, 192.168.99.100]