Welcome to your guide on using OpenTick, a robust tick database engineered for financial time series data powered by FoundationDB. This blog will walk you through installation, features, usage, and troubleshooting for a seamless experience.
What is OpenTick?
OpenTick stands tall as a fast tick database designed to record and retrieve financial time series data swiftly. What’s intriguing is its backing by FoundationDB, which enhances reliability through a simplified SQL layer.
Features of OpenTick
- Built-in price adjustment support
- Nanosecond precision
- SDK available in Python, C++, and Go
- Supports both synchronous and asynchronous queries
- Implicit SQL statement preparation
- Permission Control (check the Python API for related functions, turned off by default)
- Cache support for efficiency
Installation on Ubuntu
Getting OpenTick up and running is straightforward. Follow the steps below:
sudo apt install -y python
wget https://www.foundationdb.org/downloads/6.2.22/ubuntu/installers/foundationdb-server_6.2.22-1_amd64.deb
wget https://www.foundationdb.org/downloads/6.2.22/ubuntu/installers/foundationdb-clients_6.2.22-1_amd64.deb
sudo dpkg -i foundationdb-clients_6.2.22-1_amd64.deb foundationdb-server_6.2.22-1_amd64.deb
git clone https://github.com/opentradesolutions/opentick
make build
sudo apt install nodejs
sudo npm install -g pm2
pm2 start .opentick
Note: By default, FoundationDB runs in memory storage mode with a single process. To switch to disk storage, use the following command:
fdbcli
fdb configure ssd
For more configuration options, check out FoundationDB Configuration.
Usage
After installation, you can utilize OpenTick with Python, C++, or Go. Below are the commands to get you started:
Performance
OpenTick is optimized for speed, allowing for 100,000 OHLCV bars (Open, High, Low, Close, Volume) to be inserted in approximately one second. Here are some performance metrics:
go run test.go
# Output:
# All insert futures get done in 4.500s
# Batch insert futures done in 861ms
# Retrieval using asynchronous calls were efficient as well.
Sample Code (C++)
To get you started with C++, here’s a simple analogy to understand the code structure:
Think of OpenTick like a library, where different books (data entries) are stored in sections (tables). Here’s how you can create a database and manipulate data within it:
auto conn = Connection::Create(127.0.0.1, 1116); // Open a connection to the library
conn->Start(); // Start the visit
conn->Execute(create database if not exists test); // Create a new section (database)
conn->Use(test); // Use the section (database)
conn->Execute(R(create table if not exists test(sec int, interval int, tm timestamp, open double, high double, low double, close double, v double, vwap double, primary key(sec, interval, tm))); // Create a new shelf (table)
Troubleshooting
If you encounter issues during installation or while using OpenTick, here are a few troubleshooting tips:
- Make sure your system meets the dependency requirements for FoundationDB.
- Ensure the ports are configured correctly if you face connectivity issues.
- Refer to the GitHub repository for bug reports and community solutions.
- If necessary, clean and rebuild your environment.
- For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

