Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c4daa0f4b | ||
|
|
5ea2a8d6b6 | ||
|
|
6e64f7c6df | ||
|
|
8a210f39b6 | ||
|
|
2aacd141ad | ||
|
|
2688281a10 | ||
|
|
b62d9751cf |
No files matched your search
@@ -192,9 +192,17 @@ void ICEExecutionGateway::on_trader_login_timeout_expired()
|
||||
{
|
||||
if(u.has_user_data() && u.user_data().has_exchange_user_data() && u.user_data().exchange_user_data().has_ice_data())
|
||||
{
|
||||
if(!u.is_present())
|
||||
continue;
|
||||
if(!u.is_active())
|
||||
continue;
|
||||
const auto& ice = u.user_data().exchange_user_data().ice_data();
|
||||
if(auth_traders.find(ice.authorized_trader()) == auth_traders.end())
|
||||
{
|
||||
if(ice.authorized_trader() == "")
|
||||
continue;
|
||||
if(ice.company_id() <= 0)
|
||||
continue;
|
||||
if(me->nusers == -1)
|
||||
me->nusers = 0;
|
||||
me->nusers++;
|
||||
|
||||
+10
-7
@@ -12,19 +12,22 @@ env SDK_ROOT=/sdk \
|
||||
SDK_VERSION=$SDK_VERSION \
|
||||
SDK_BUILD_DATE=$SDK_BUILD_DATE
|
||||
|
||||
# copy sdk
|
||||
COPY include/ /sdk/include/
|
||||
COPY lib/ /sparkbin/
|
||||
COPY externals /sdk/externals/
|
||||
COPY spark.conf /sparkdata/conf/
|
||||
COPY futures.coconut /sparkdata/data/replay/futures.coconut
|
||||
|
||||
# add user bts
|
||||
RUN groupadd --gid 1000 $USERNAME && \
|
||||
useradd -s /bin/bash --uid 1000 --gid 1000 -m $USERNAME && \
|
||||
mkdir -p /sparkbin/plugins && \
|
||||
mkdir /sparkdata && \
|
||||
ln -s /sparkbin/ sdk/lib && \
|
||||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
|
||||
chmod 0440 /etc/sudoers.d/$USERNAME && \
|
||||
chown -R bts.bts /sparkbin/plugins && \
|
||||
chown -R bts.bts /sparkdata
|
||||
|
||||
# copy sdk
|
||||
COPY include/ /sdk/include/
|
||||
COPY lib/ /sparkbin/
|
||||
COPY externals /sdk/externals/
|
||||
COPY spark.conf /sparkdata/conf/
|
||||
COPY --chown=$USERNAME futures.coconut /sparkdata/data/replay/futures.coconut
|
||||
|
||||
|
||||
@@ -212,30 +212,32 @@ void ICEListener::on_uds_future_spread(const Definition& def, bool& is_intereste
|
||||
fsec.alt_symbol(def.strategySymbol);
|
||||
|
||||
const auto& legs = def.legs;
|
||||
fsec.set_leg_count(legs.size());
|
||||
for(size_t x = 0; x < fsec.leg_count(); ++x)
|
||||
{
|
||||
const auto& leg = legs[x];
|
||||
if(leg.ratioPriceNumerator && leg.ratioPriceDenominator)
|
||||
if (legs.size() > 0) {
|
||||
fsec.set_leg_count(legs.size());
|
||||
for(size_t x = 0; x < fsec.leg_count(); ++x)
|
||||
{
|
||||
auto num = *leg.ratioPriceNumerator;
|
||||
auto denom = *leg.ratioPriceDenominator;
|
||||
fsec.legs[x].leg_price = num / (double) denom;
|
||||
const auto& leg = legs[x];
|
||||
if(leg.ratioPriceNumerator && leg.ratioPriceDenominator)
|
||||
{
|
||||
auto num = *leg.ratioPriceNumerator;
|
||||
auto denom = *leg.ratioPriceDenominator;
|
||||
fsec.legs[x].leg_price = num / (double) denom;
|
||||
}
|
||||
if(leg.ratioQtyNumerator && leg.ratioQtyDenominator)
|
||||
{
|
||||
auto num = *leg.ratioQtyNumerator;
|
||||
auto denom = *leg.ratioQtyDenominator;
|
||||
fsec.legs[x].leg_delta = num / (double) denom;
|
||||
}
|
||||
|
||||
fsec.legs[x].leg_quantity = leg.ratio;
|
||||
fsec.legs[x].leg_side = leg.side == onixs_ice::Side::Bid ? api::SIDE_BUY : api::SIDE_SELL;
|
||||
fsec.legs[x].exchange_key = ExchangeKey(leg.marketId);
|
||||
fsec.legs[x].key = invalid_security_key;
|
||||
}
|
||||
if(leg.ratioQtyNumerator && leg.ratioQtyDenominator)
|
||||
{
|
||||
auto num = *leg.ratioQtyNumerator;
|
||||
auto denom = *leg.ratioQtyDenominator;
|
||||
fsec.legs[x].leg_delta = num / (double) denom;
|
||||
}
|
||||
|
||||
fsec.legs[x].leg_quantity = leg.ratio;
|
||||
fsec.legs[x].leg_side = leg.side == onixs_ice::Side::Bid ? api::SIDE_BUY : api::SIDE_SELL;
|
||||
fsec.legs[x].exchange_key = ExchangeKey(leg.marketId);
|
||||
fsec.legs[x].key = invalid_security_key;
|
||||
add_security(fsec);
|
||||
is_interested = true;
|
||||
}
|
||||
add_security(fsec);
|
||||
is_interested = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user