Files
spark/src/server/sparkd/md/MarketDataRegistrationError.h
T
John Colvin 154775bc70 refactor: Move misplaced code from libspark to sparkd
This will reduce the dependency load on libspark and the c++ algo sdk.
This has been on the backburner for a while; we're doing it now so we
can deliver a clean sdk to Laguna.

Migrating the following code:
  * general server-side md utils (MarketDataGateway, etc.)
  * emumba dependent code, including md impl for:
    - deribit
  * ccapi dependent code, including md impl for
    - binance
    - binance_us
    - binance_usds_futures
    - ftx
    - coinbase
    - okx
    - deribit
  * md recording

Note: I first began this migration to eliminate the c++ algo sdk's
wependency on emumba. There seemed to be a conflict related to ssl
versions (the build in the sdk docker would fail with unresolved
external symbols for OPENSSL macros)
2024-04-01 10:09:34 -04:00

27 lines
727 B
C++

#pragma once
#include <optional>
#include <string>
namespace bts::md {
struct MarketDataRegistrationError {
enum class Type {
NO_ERROR = 0,
NETWORK_ERROR = 1,
// We may add bones for future exchanges (venues) before they are actually
// implemented. Attempts to register listeners to such exchanges should
// result in a NOT_IMPLEMENTED error.
NOT_IMPLEMENTED = 2,
// Any error that occurred on our end. As this error type is vague, the
// accompanying error message should provide adequate information and
// context
INTERNAL_ERROR = 3,
CONFIG_ERROR = 4
};
Type error_type{Type::NO_ERROR};
std::string error_text{};
};
} // namespace bts::md