This new structure provides several benefits:
* Allows us to install multiple CMake projects in the same destination
dir (without include path conflicts).
- This makes shipping the trading algo sdk a trivial excercise. Simply
copy the lib and include dirs from the install dest. That's it!
* Puts us in a position to break up the monolithic libspark into smaller
modules, which are easier to manage.
33 lines
958 B
C++
33 lines
958 B
C++
#include "DeribitDemo.h"
|
|
#include "spark/logging/logging.h"
|
|
#include "sparkd/cmds/crypto/DeribitDemoListener.h"
|
|
|
|
#include <csignal>
|
|
#include <emumba-deribit-connector/deribit_exception.h>
|
|
#include <emumba-deribit-connector/deribit_handler.h>
|
|
#include <emumba-deribit-connector/deribit_listener.h>
|
|
#include <emumba-deribit-connector/trading_session_interface.h>
|
|
|
|
namespace bts::cmds {
|
|
|
|
static void signal_handler(int signal_number) {
|
|
switch (signal_number) {
|
|
case SIGUSR1: {
|
|
std::cout << "SIGUSR1 Received\n";
|
|
emumba::deribit_connector::dump_books();
|
|
} break;
|
|
}
|
|
}
|
|
|
|
DeribitDemo::DeribitDemo(const std::string &config_path) {
|
|
LOG(OrderMan, Info, "DeribitDemo::DeribitDemo config_path: {}", config_path);
|
|
std::signal(SIGUSR1, signal_handler);
|
|
// DeribitDemoListener deribit_listener;
|
|
// deribit_listener.configure(config_path);
|
|
// deribit_listener.run();
|
|
}
|
|
|
|
DeribitDemo::~DeribitDemo() = default;
|
|
|
|
} // namespace bts::cmds
|