Removing SIM: from Deribit security desc
This commit is contained in:
1 parent
fdc4e59d09
commit
be3daae175
3 files changed
+12
-5
No files matched your search
@@ -28,8 +28,9 @@ std::string descriptor(api::Security const &sec) {
|
||||
return sec.glbx().security_desc();
|
||||
else if (sec.has_ice())
|
||||
return sec.ice().security_desc();
|
||||
else
|
||||
return "No descriptor for non glbx / ice exchange";
|
||||
else if (sec.has_deribit())
|
||||
return sec.deribit().security_desc();
|
||||
return "No descriptor for non glbx / ice exchange";
|
||||
}
|
||||
|
||||
api::SecurityType security_type(api::Security const &sec) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "lib/utils/bts_assert.h"
|
||||
#ifndef NO_CPP0X
|
||||
|
||||
#include "FixedSecurity.h"
|
||||
#include "../PriceSize.h"
|
||||
#include "FixedSecurity.h"
|
||||
#include <iomanip>
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -185,6 +186,10 @@ void convert_security(const FixedSecurity &source, Security *presult) {
|
||||
dest.mutable_ice()->set_mic_code(source.mic_code());
|
||||
dest.mutable_ice()->set_is_strip(source.is_ice_strip);
|
||||
break;
|
||||
// TODO: Deribit
|
||||
case Venue::VENUE_DERIBIT:
|
||||
bts_assert(false);
|
||||
break;
|
||||
case Venue::VENUE_BTS:
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "server/sparkd/md/platforms/emumba/EmumbaSecurityIndex.h"
|
||||
#include <array>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <emumba-deribit-connector/deribit_exception.h>
|
||||
#include <emumba-deribit-connector/deribit_utils.h>
|
||||
@@ -52,7 +53,7 @@ IntPrice convert_price(const emumba::market_data::price &pr) {
|
||||
return IntPrice_from_double<9>(pr.to_double());
|
||||
}
|
||||
|
||||
md::Size convert_qty(double qty) { return static_cast<Size>(qty); }
|
||||
md::Size convert_qty(double qty) { return static_cast<Size>(std::round(qty)); }
|
||||
|
||||
inline bts::utils::TimeStamp convert_timestamp(
|
||||
emumba::market_data::exchange_timestamp ts) {
|
||||
@@ -511,7 +512,7 @@ void EmMDListener::_copy_security_common(
|
||||
// TODO
|
||||
std::string symbol = "BTC";
|
||||
to.symbol(symbol);
|
||||
const auto desc = "SIM:" + extract_security_desc(from);
|
||||
const auto desc = extract_security_desc(from);
|
||||
to.security_desc(desc);
|
||||
to.exchange = Venue::VENUE_SIM; // TODO: hc'ing to SIM
|
||||
to.display_factor = 0.0;
|
||||
|
||||
Reference in new issue
Block a user