This is a simple websocket scraper for Coinbase Market Data. It will scrape the websocket for all orders (Full channel) and save them to a MongoDB.
- Clone the repository
git clone https://github.com/kkuette/coinbasewebsocket-scraper.git
- Install the requirements
pip3 install -r requirements.txt
- Create a conf.json file with the following variables:
- database: you can also use a mongodb uri
- host: "localhost"
- port: 27017
- database_name: "coinbase" (Optionnal)
- products: ["BTC-USD", "ETH-USD"]
- database: you can also use a mongodb uri
You can also directly use the docker image: kkuette/coinbasewebsocketscraper It need a conf.json file to be mounted in the container.
docker run --rm -v /path/to/conf.json:/secrets kkuette/coinbasewebsocketscraper:latest
python3 coinbasewebsocket-scraper/scraper.py path/to/conf.json
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.