Blockchain Commons Spotbit
Christian Murray and Christopher Allen with Joby
Price feeds for Bitcoin can be a privacy hole when wallets, users, or automated tools access them without using Tor or a secure proxy. If a user's wallets or tools access a preconfigured price feed, the user is potentially vulnerable to Sybil attacks. Spotbit's purpose is to allow users to access price feeds in a customisable way that preserves privacy and mitigate the reliance on a single source of data.
Spotbit is a portable API for Bitcoin price data and candles. It can aggregate data from over 100 exchanges and serve them from a single URL or using Tor as an onion hidden service. It is configurable so that the user can decide which base currencies to use (USDT, USD, EUR etc), and which exchanges to use for price data.
Users may choose to run their own local Spotbit server, or to connect to a hosted Spotbit service.
Why Use Spotbit?
- Privacy. Spotbit can work as a Tor hidden service.
- Reliability. Spotbit aggregrates information using the exchanges/sources you configure, making your pricing data more trustworthy.
- Self-sovereignty. Spotbit can run from your server.
- Fetch Bitcoin prices from a set of exchanges.(See the API documentation here)
- Produce a beancount report of the transactions associated with a Bitcoin descriptor.
- Web front-end with price data visualisation.
- Spotbit depends on the CCXT which provides an abstraction for API access to cryptocurrency exchanges.
A spotbit instance is currently running at
h6zwwkcivy2hjys6xpinlnz2f74dsmvltzsd4xb42vinhlcaoe7fdeqd.onion. This instance is on a dedicated Blockchain Commons server.
Spotbit is a microservice intended to help realise the Gordian Principles underpinning Blockchain Commons' Gordian technology stack and the Gordian Architecture. These principles are:
- Independence. Users can choose which applications to use within an open ecosystem.
- Privacy. Airgaps provide data with strong protection, while torgaps do the same for networked interactions.
- Resilience. The paritioned design minimizes Single Points of Compromise.
- Openness. Airgaps and torgaps are connected via standard specifications such as URs, which allow anyone to add apps to the ecosystem.
Blockchain Commons apps do not phone home and do not run ads. Some are available through various app stores; all are available in our code repositories for your usage.
Status - Late Alpha
Spotbit is currently under active development and in the late alpha testing phase. It should not be used for production tasks until it has had further testing and auditing.
Ongoing maintenance and features are listed in the repository's "issues" page.
- June 2020: Completion of research and planning.
- August 2020: Completed first working setup, began alpha testing.
- September 2020: Released alpha versions 2 and 3, continued testing, improved install scripts, deployed to a linode server.
- Late 2020: Support custom rules for price construction, alpha version 4, deploy spotbit to more remote servers, complete spotbit website.
- 2021 - : Ongoing maintenance and features are listed in the repository's "issues" page.
Create a virtual environment
python -m venv env/
Activate virtual environment
python -m pip install -r requirements.txt
Spotbit includes a script called
installSpotbit.sh which installs Spotbit and configures Tor on a Debian-based linux system.
$ git clone https://github.com/BlockchainCommons/spotbit.git $ cd spotbit $ chmod +x installSpotbit.sh $ sudo -s source ./installSpotbit.sh
The installer will:
- Install and setup tor on your system,
- Create a user named
spotbitgroup that controls the hidden service directory location at
- Copy Spotbit sourcecode to
- The user should update the default
spotbit.configwith their desired configuration.
- The user should update the default
- Create a
systemdservice unit file in
- Set up a Tor hidden service for Spotbit.
To run the server, run
sudo systemctl start spotbit.
You can check on a spotbit's status at any time by running
sudo systemctl status spotbit, or take a look at the log file in
The Spotbit API schema can be found by browsing to: http://localhost:5000/docs
Origin, Authors, Copyright & Licenses
Unless otherwise noted (either in this /README.md or in the file's header comments) the contents of this repository are Copyright © 2020 by Blockchain Commons, LLC, and are licensed under the spdx:BSD-2-Clause Plus Patent License.
In most cases, the authors, copyright, and license for each file reside in header comments in the source code. When it does not, we have attempted to attribute it accurately in the table below.
This table below also establishes provenance (repository of origin, permalink, and commit id) for files included from repositories that are outside of this repo. Contributors to these files are listed in the commit history for each repository, first with changes found in the commit history of this repo, then in changes in the commit history of their repo of their origin.
|File||From||Commit||Authors & Copyright (c)||License|
|exception-to-the-rule.c or exception-folder||https://github.com/community/repo-name/PERMALINK||https://github.com/community/repo-name/commit/COMMITHASH||2020 Exception Author||MIT|
To use Spotbit you'll need to use the following tools:
- Python3.8 or higher (some libraries don't work as needed on older versions of Python)
- CCXT -
All of these Python libraries can be installed via pip and Python3.8 can be installed for you in the install script.
Spotbit aims to provide an easy option for aggregating exchange data that does not require the use of a third party data website like Coinmarketcap. These data can be used inside of other apps or for personal use / analysis. Acquiring data across many exchanges can be a pain because normally one would need write slightly different code in order to interact with each API.
This Spotbit project is either derived from or was inspired by the need of Fully Noded 2 to display realtime price info in-app:
Spotbit is a project of Blockchain Commons. We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.
To financially support further development of Spotbit and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a GitHub Sponsor. You can also support Blockchain Commons with bitcoins at our BTCPay Server.
We encourage public contributions through issues and pull requests! Please review CONTRIBUTING.md for details on our development process. All contributions to this repository require a GPG signed Contributor License Agreement.
The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas.
Blockchain Commons Discussions. For developers, interns, and patrons of Blockchain Commons, please use the discussions area of the Community repo to talk about general Blockchain Commons issues, the intern program, or topics other than the Gordian System or the wallet standards, each of which have their own discussion areas.
Other Questions & Problems
As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a locale where you might get answers to questions. Alternatively, please use this repository's issues feature. Unfortunately, we can not make any promises on response time.
If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need.
The following people directly contributed to this repository. You can add your name here by getting involved. The first step is learning how to contribute from our CONTRIBUTING.md documentation.
|Christopher Allen||Principal Architect||@ChristopherA||<ChristopherA@LifeWithAlacrity.com>||FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED|
|Christian Murray||Lead Developer||@watersnake1||<Christian.B.Murray.21@Dartmouth.edu>||9A44 D707 5580 A022 8A99 8CEC 0178 C17E 95C7 BA35|
|Jo||Install Script Developer||@jodobear||<>||EE06 0B4A 9AED 976B 7CBD B3A0 3A9C 7E87 3028 4351|
|Gautham Ganesh Elango||Developer, Integration with Gordian Wallet, Testing||@gg2001||<email@example.com>||AB93 8223 226D 9511 4499 A6E5 420E 32E3 5B3F DBA2|
We want to keep all of our software safe for everyone. If you have discovered a security vulnerability, we appreciate your help in disclosing it to us in a responsible manner. We are unfortunately not able to offer bug bounties at this time.
We do ask that you offer us good faith and use best efforts not to leak information or harm any user, their data, or our developer community. Please give us a reasonable amount of time to fix the issue before you publish it. Do not defraud our users or us in the process of discovery. We promise not to bring legal action against researchers who point out a problem provided they do their best to follow the these guidelines.
Reporting a Vulnerability
Please report suspected security vulnerabilities in private via email to ChristopherA@BlockchainCommons.com (do not use this email for support). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
The following keys may be used to communicate sensitive information to developers:
|Christopher Allen||FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED|
|Christian Murray||9A44 D707 5580 A022 8A99 8CEC 0178 C17E 95C7 BA35|
You can import a key by running the following command with that individual’s fingerprint:
gpg --recv-keys "<fingerprint>" Ensure that you put quotes around fingerprints that contain spaces.