Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ea2a8d6b6 | ||
|
|
6e64f7c6df | ||
|
|
8a210f39b6 | ||
|
|
2aacd141ad | ||
|
|
2688281a10 |
No files matched your search
@@ -195,6 +195,10 @@ void ICEExecutionGateway::on_trader_login_timeout_expired()
|
||||
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++;
|
||||
|
||||
@@ -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