Compare commits

...
22 Commits
Author SHA1 Message Date
Pedro Pinto 6d7290db63 Updated release notes. 2019-09-17 16:56:28 -04:00
Pedro Pinto 0d0cf11157 Fixed matching error in sim 2019-09-17 16:55:24 -04:00
Eric Harding 7b833087e5 Merged in SP-233-wilson (pull request #342)
RTM: SP-233 wilson
2019-09-16 13:05:41 +00:00
Eric Harding 12f1e026d0 Update release notes 2019-09-16 09:05:10 -04:00
Eric Harding 762ce06f7c Merge branch 'prod' of bitbucket.org:bluetradesys/spark into SP-233-wilson 2019-09-16 09:00:14 -04:00
Eric Harding 9052051872 Increase initial logging queue size. 128 is too small 2019-09-13 15:44:26 -04:00
Eric Harding ab5b4e17ad SP-233 SDK sample should avoid async due to hidden complexity 2019-09-13 15:44:12 -04:00
Pedro Pinto 4295165427 Updated release notes. 2019-09-12 09:46:26 -04:00
Taha Afzal 9a1199a058 Better comments 2019-09-11 16:07:15 -04:00
Pedro Pinto 62f1911f35 Merge branch 'SP-220-raw-day-pos' into prod 2019-09-11 13:56:33 -04:00
Pedro Pinto d75c8af729 Updated release notes. 2019-09-11 13:53:03 -04:00
Pedro Pinto da95ece9fc Merge branch 'SP-221-sound-alerts' into prod 2019-09-11 13:28:42 -04:00
Pedro Pinto deca2bedb5 Made GMI sftp settings empty for prod use. 2019-09-11 09:55:24 -04:00
John Colvin de64bd843c was adding account name twice to position tool tip in ladder 2019-09-09 10:40:21 -05:00
John Colvin 79a8a29bac LadderView.PositionToolTipConverter - restructure impl a bit, change comments 2019-09-05 19:07:00 -05:00
John Colvin 6aaed0e76e simplify LadderView.PositionToolTipConverter impl 2019-09-05 18:57:41 -05:00
John Colvin 8072eece66 SP-220 pr edit: added comment explaining confusing position display formatting 2019-09-05 18:37:33 -05:00
John Colvin 043d826442 GreaterThanTrigger IEquatable impl 2019-09-05 17:36:51 -05:00
John Colvin 3bf9fa08e5 SP-221 Deleting an alert with 'Not Between' causes the shell to crash 2019-09-05 17:32:19 -05:00
John Colvin 79a7b8504e SP-220 mview row raises invalidated event view when raw day pos changes 2019-09-05 17:01:50 -05:00
John Colvin ffd2dd22c2 SP-220 fix raw day pos tooltip in ladder 2019-09-05 16:58:46 -05:00
John Colvin 469e4636e3 overload ValueConverter.create for 4 generic input args 2019-09-05 16:53:22 -05:00
16 changed files with 185 additions and 94 deletions

No files matched your search

+14
View File
@@ -4,6 +4,20 @@ weight = 3
sort_by = "weight"
insert_anchor_links = "right"
+++
## 2.9.2
### Bug Fixes
- Fixed an issue with the exchange simulator that could lead to crossed markets
## 2.9.1
### Bug Fixes
- Fixed an issue with trade sound alerts, where in some cases the use of a "In Between" condition could lead to a UI failure.
- Fixed an issue with the display of the new raw position column in the market view window.
- Fixed the popup label that describes the raw position information in the ladder
### Internal Changes
- Avoided shipping production configuration defaults that lead to trying to download a position file for the development sftp server.
### Api
- C# API sample now uses synchronous calls.
## 2.9.0
### User Visible Changes
- Improved Workspace management User Interface
@@ -90,7 +90,10 @@ namespace mbts.spark {
_dispose = Disposable.Create(
_orders_model.on_security_root_orders(security.Id).OnDispatcher().Subscribe(_on_orders),
_position.OnDispatcher().Subscribe(v => _animation.animate_position(v.newval > v.oldval)),
_orders_model.on_security_positions(security.Id).OnDispatcher().Subscribe(t => Set(ref _raw_day_position, t.state.Values.Sum(p => p.Item2.raw_day_pos()), nameof(raw_day_position))),
_orders_model.on_security_positions(security.Id).OnDispatcher().Subscribe(t => {
if (Set(ref _raw_day_position, t.state.Values.Sum(p => p.Item2.raw_day_pos()), nameof(raw_day_position)))
raise_invalidated();
}),
_inside_bids.OnDispatcher().Subscribe(v => _animation.animate_working_bids_inside(v.newval)),
_inside_asks.OnDispatcher().Subscribe(v => _animation.animate_working_asks_inside(v.newval)),
_day_change.OnDispatcher().Subscribe(v => _animation.animate_day_change(v.newval > v.oldval)),
@@ -138,7 +138,7 @@ namespace mbts.spark {
//
//_window_height = backing(nameof(window_height), settings_manager.subscribe_current().OnDispatcher().Select(s => s.zoom_factor), (scale) => scale * 600);
//_window_width = backing(nameof(window_width), settings_manager.subscribe_current().OnDispatcher().Select(s => s.zoom_factor), (scale) => scale * 420);
position_click_command = new DelegateCommand(() => size_calculator.value = DoubleHelper.safe_convert_to_uint(Math.Abs(_show_day_position ? day_position : position)));
position_click_command = new DelegateCommand(() => size_calculator.value = DoubleHelper.safe_convert_to_uint(Math.Abs(_show_day_position ? day_position : (_show_raw_day_position ? _raw_day_position : position))));
send_order_command = new AsyncCommand<(double price, Side? side, MouseButton button)>(send_order_async);
cancel_command = new AsyncCommand<LadderModel.CancelType>(_model.cancel_orders, true);
show_book_command = new DelegateCommand(_show_book);
@@ -487,6 +487,7 @@
<MultiBinding Converter="{x:Static spark:LadderView.PositionToolTipConverter}">
<Binding Path="order_properties_vm.selected_account"/>
<Binding Path="show_day_position"/>
<Binding Path="show_raw_day_position"/>
<Binding Path="show_account_position"/>
</MultiBinding>
</TextBlock.Text>
@@ -18,32 +18,60 @@ namespace mbts.spark {
MaxZoomFactor = 1.5;
public static IMultiValueConverter PositionToolTipConverter =
ValueConverter.create<AccountTuple?, bool, bool, string>((account, show_day_pos, show_total_pos) => {
const string day_pos_text = "day", total_pos_text = "total";
ValueConverter.create<AccountTuple?, bool, bool, bool, string>((account, show_day_pos, show_raw_day_pos, show_total_pos) => {
const string day_pos_text = "day", raw_day_pos_text = "raw day", total_pos_text = "total";
if (!account.HasValue)
return string.Empty;
var sb = new StringBuilderEx(account.Value.name);
string primary_pos;
if (show_day_pos) {
primary_pos = day_pos_text;
if (show_total_pos) {
sb.Add(" '", primary_pos, " ");
sb.Add("(", total_pos_text, ")' ");
} else {
sb.Add(" ", primary_pos, " ");
}
} else if (show_total_pos) {
primary_pos = total_pos_text;
sb.Add(" ", primary_pos, " ");
/// Note: 'day,' and 'raw day,' are interchangeable wrt the string format, 'total' however is treated differently.
/// Different Formats:
// No parts are visible:
// null
//
// 1 part 'foo' is visible:
// "<account> foo position
// click to copy to size"
//
// 2 parts 'day' and 'raw day' are visible:
// "<account> 'day / raw day' position
// click to copy day to size"
//
// 2 parts 'day' and 'total' are visible:
// "<account> 'day (total)' position
// click to copy day to size"
//
string primary_pos = null;
// part count is incremented in the 'add_part' method
int part_count = 0;
var sb = new StringBuilderEx();
if (show_day_pos) add_part(day_pos_text, " / ");
if (show_raw_day_pos) add_part(raw_day_pos_text, " / ");
if (show_total_pos) add_part(total_pos_text, " (", ")");
//
if (part_count > 1) {
// This is a complex expression (showing more than 1 value) - wrap it in single quotes.
// Explicitly state which value will be copied to the size input.
sb.Insert(0, "'");
sb.Add("'");
sb.Add(" position\n(click to copy ", primary_pos, " to size)");
} else {
// unexpected code path (the button for which this tooltip is destined should be invisible in this case), but no need to throw an exception.
return string.Empty;
// Only showing 1 value, no need for single quotes,
// nor an explicit statement that indicates which value will be copied to the size input.
sb.Add(" position\n(click to copy to size)");
}
sb.Add("position\n(click to copy ");
if (show_day_pos && show_total_pos)
sb.Add(primary_pos, " position ");
sb.Add("to size)");
return sb.ToString();
void add_part(string part_name, string separator = null, string separator_suffix = null) {
if (part_count++ > 0) {
sb.Add(separator);
sb.Add(part_name);
sb.Add(separator_suffix);
} else {
primary_pos = part_name;
sb.Add($"{account.Value.name} {part_name}");
}
}
});
internal LadderView(LadderVM vm) {
+13 -2
View File
@@ -215,7 +215,7 @@ namespace mbts {
_second.Equals(other._second);
public override bool Equals(object obj) =>
Equals(obj is OrTrigger<T>);
Equals(obj as OrTrigger<T>);
public override int GetHashCode() =>
EqualityComparer.aggregate_hash(
@@ -256,7 +256,7 @@ namespace mbts {
$"OrTrigger ({_first}, {_second})";
}
class GreaterThanTrigger<T> : IPredicate<T> {
class GreaterThanTrigger<T> : IPredicate<T>, IEquatable<GreaterThanTrigger<T>> {
readonly T _value;
readonly IComparer<T> _comparer;
@@ -268,6 +268,17 @@ namespace mbts {
public bool trigger(T value) =>
_comparer.Compare(value, _value) > 0;
public bool Equals(GreaterThanTrigger<T> other) =>
other != null &&
_comparer.Equals(other._comparer) &&
_comparer.Compare(_value, other._value) == 0;
public override bool Equals(object obj) =>
Equals(obj as GreaterThanTrigger<T>);
public override int GetHashCode() =>
_value.GetHashCode();
public override string ToString() =>
$"GreaterThanTrigger ({_value})";
}
@@ -16,6 +16,9 @@ namespace mbts.ui.converters {
public static IMultiValueConverter create<TIn1, TIn2, TIn3, TOut>(Func<TIn1, TIn2, TIn3, TOut> convert) =>
new AnonymousMultiValueConverter<TIn1, TIn2, TIn3, TOut>(convert);
public static IMultiValueConverter create<TIn1, TIn2, TIn3, TIn4, TOut>(Func<TIn1, TIn2, TIn3, TIn4, TOut> convert) =>
new AnonymousMultiValueConverter<TIn1, TIn2, TIn3, TIn4, TOut>(convert);
}
static class ValueConverters {
@@ -92,4 +95,17 @@ namespace mbts.ui.converters {
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException();
}
class AnonymousMultiValueConverter<TIn1, TIn2, TIn3, TIn4, TOut> : IMultiValueConverter {
readonly Func<TIn1, TIn2, TIn3, TIn4, TOut> _convert;
public AnonymousMultiValueConverter(Func<TIn1, TIn2, TIn3, TIn4, TOut> convert) => _convert = convert;
public TOut ErrorValue { get; set; }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) =>
ConvertUtils.try_convert_args(values, out TIn1 a, out TIn2 b, out TIn3 c, out TIn4 d) ? _convert(a, b, c, d) : ErrorValue;
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) => throw new NotImplementedException();
}
}
+11 -3
View File
@@ -213,10 +213,18 @@ namespace bts.md
return _data.Values.Where(filt);
}
public SecurityImmutable? find_security(Func<SecurityImmutable, bool> filter)
public SecurityImmutable? find_security(Func<SecurityImmutable, bool> filter, TimeSpan? timeout = null)
{
var fnd = find(filter).TryFirst();
return fnd?.security;
var deadline = DateTime.UtcNow;
if (timeout.HasValue) deadline += timeout.Value;
do {
var fnd = find(filter).TryFirst();
if (fnd.HasValue) {
return fnd?.security;
}
Thread.Sleep(100);
} while (DateTime.UtcNow < deadline);
return null;
}
public async Task<SecurityImmutable?> find_security_async(Func<SecurityImmutable, bool> filter, TimeSpan? timeout = null)
+14 -15
View File
@@ -36,7 +36,7 @@ namespace bts.sdk
Console.WriteLine();
}
public async Task<Result<Response>> send_order(string user, string account ,
public Response send_order(string user, string account ,
string exch, string sectype, string symbol, string security_desc, string qty, string price = null)
{
Venue ven = MarketDataSample.parse_venue(exch);
@@ -49,7 +49,7 @@ namespace bts.sdk
int quan = int.Parse(qty);
Create cr = new Create();
await order_setup(cr, user, account);
order_setup(cr, user, account);
cr.Price = px;
cr.Quantity = Convert.ToUInt32(Math.Abs(quan));
cr.NewOrder.Side = quan < 0 ? Side.Sell : Side.Buy;
@@ -57,12 +57,15 @@ namespace bts.sdk
cr.NewOrder.CustomDef = new CustomOrderDefinition() { Limit = new LimitOrderDefinition() };
else
cr.NewOrder.CustomDef = new CustomOrderDefinition() { Market = new MarketOrderDefinition() };
var sec = await _md.find_security_async(x => x.Glbx.SecurityDesc == security_desc.ToUpper());
Console.WriteLine("Fetching security details...");
var sec = _md.find_security(x => x.Glbx.SecurityDesc == security_desc.ToUpper(), TimeSpan.FromSeconds(30));
if (!sec.HasValue) {
Console.WriteLine($"Failed to find security {security_desc}.");
return null;
}
cr.NewOrder.SecurityKey = sec.Value.Id;
Result<Response> resp = await _orders.Value.create_order_async(cr);
Response resp = _orders.Value.create_order(cr);
print_update(resp);
if(resp.value != null)
print_update(resp.value);
//subscribei_ subscribes to a stream of Immutable (in this case FillImmutable) which is nice if you know you don't want to change the fills, which you dont'
_disps.Add(_orders.Value.subscribei_fills().Subscribe(x =>
{
@@ -80,7 +83,7 @@ namespace bts.sdk
return resp;
}
static async Task order_setup(Create cr, string username, string accountname)
static void order_setup(Create cr, string username, string accountname)
{
cr.NewOrder = new OrderDefinition();
cr.NewOrder.ManualOrderIndicator = ManualOrderIndicator.Yes;
@@ -88,12 +91,8 @@ namespace bts.sdk
cr.NewOrder.CustomerOrFirm = CustomerOrFirm.Firm;
cr.NewOrder.SubType = OrderSubType.None;
cr.NewOrder.TimeInForce = TimeInForce.Day;
var admin = await _admin.Value.get_admin_data_async(new VoidMessage());
if (!admin.success) {
Console.Error.WriteLine(admin.error_message);
return;
}
BTSUser user = admin.value.Users.FirstOrDefault( x=> username != null ? x.Name.ToLowerInvariant() == username.ToLowerInvariant() : true );
var admin = _admin.Value.get_admin_data(new VoidMessage());
BTSUser user = admin.Users.FirstOrDefault( x=> username != null ? x.Name.ToLowerInvariant() == username.ToLowerInvariant() : true );
if (user != null)
{
cr.NewOrder.UserId = (uint)user.Id;
@@ -102,11 +101,11 @@ namespace bts.sdk
{
var accid = user.UserData.AccountPermissions.AccountPermissions.FirstOrDefault();
cr.NewOrder.AccountId = (uint)accid.Key;
cr.NewOrder.Account = admin.value.Accounts.First(x => x.Id == accid.Key).Name;
cr.NewOrder.Account = admin.Accounts.First(x => x.Id == accid.Key).Name;
}
else
{
var acc = admin.value.Accounts.FirstOrDefault(x => x.Name.ToLowerInvariant() == accountname.ToLowerInvariant());
var acc = admin.Accounts.FirstOrDefault(x => x.Name.ToLowerInvariant() == accountname.ToLowerInvariant());
if (acc != null)
{
cr.NewOrder.Account = acc.Name;
+34 -37
View File
@@ -13,28 +13,25 @@ namespace bts.sdk
public class SDKMain
{
static async Task<LoginResult> login(string user, string pass)
{
return await Locator.login(user, pass);
}
private static void user_test()
private static void user_test(ServiceContext ctx)
{
var s = Locator.locate<api.user.AuthService>();
var s = ctx.locate<api.user.AuthService>();
var r = new api.user.GetUsersRequest();
var resp = s.get_users(r);
Console.WriteLine("{0}", resp);
}
public async static Task Main(string[] args)
public static void Main(string[] args)
{
BTS.init();
Log.ClientSdk.info("Welcome to the BTS Client Side SDK example");
var ctx = new ServiceContext();
string u = args.FirstOrDefault(x => x.Contains("--user="));
string p = args.FirstOrDefault(x => x.Contains("--pass="));
u = u?.Replace("--user=", string.Empty) ?? string.Empty;
p = p?.Replace("--pass=", string.Empty) ?? string.Empty;
var lr = await login(u, p);
var lr = ctx.login(u,p).Result;
if (!lr.success)
{
Console.WriteLine("Login failure: " + lr.reason);
@@ -43,7 +40,7 @@ namespace bts.sdk
if (args.FirstOrDefault() == "users")
{
user_test();
user_test(ctx);
}
else
{
@@ -52,55 +49,56 @@ namespace bts.sdk
if (pu != null)
ms = uint.Parse(p.Replace("--pump=", string.Empty));
MarketDataClient client = new MarketDataClient(ms, Locator.token);
CompositeDisposable disp = new CompositeDisposable(client);
if (args.Length > 0 && args.FirstOrDefault().Contains("md"))
{
var s = new MarketDataSample(client);
if (args.FirstOrDefault() == "md")
MarketDataClient client = new MarketDataClient(ms, ctx.token);
using(var disp = new CompositeDisposable(client)) {
if (args.Length > 0 && args.FirstOrDefault().Contains("md"))
{
if (args.Length >= 5)
var s = new MarketDataSample(client);
if (args.FirstOrDefault() == "md")
{
s.print_security(args[1], args[2], args[3], args[4]);
}
else if (args.Length >= 4)
{
s.print_product(args[1], args[2], args[3]);
if (args.Length >= 5)
{
s.print_security(args[1], args[2], args[3], args[4]);
}
else if (args.Length >= 4)
{
s.print_product(args[1], args[2], args[3]);
}
else
md_help();
}
else
md_help();
}
else if (args.FirstOrDefault() == "order")
{
OrderSample os = new OrderSample(client);
disp.Add(os);
order_sample(os, u, args);
}
else
md_help();
}
else if (args.FirstOrDefault() == "order")
{
OrderSample os = new OrderSample(client);
disp.Add(os);
order_sample(os, u, args);
}
else
help();
help();
wait_for_stop(disp);
wait_for_stop();
}
}
}
static async void order_sample(OrderSample os, string user, string[] args)
static void order_sample(OrderSample os, string user, string[] args)
{
if (args.Length >= 10) //--user and --pass are in args[]
{
await os.send_order(user, args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
os.send_order(user, args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
}
else if (args.Length >= 9)
{
await os.send_order(user, args[1], args[2], args[3], args[4], args[5], args[6]);
os.send_order(user, args[1], args[2], args[3], args[4], args[5], args[6]);
}
else
order_help();
}
static void wait_for_stop(IDisposable disp)
static void wait_for_stop()
{
Console.WriteLine("Hit q to stop");
ConsoleKeyInfo c;
@@ -109,7 +107,6 @@ namespace bts.sdk
c = Console.ReadKey();
Console.WriteLine();
} while (c.KeyChar != 'q');
disp.Dispose();
}
static void help()
+1 -1
View File
@@ -1 +1 @@
set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/ExchangeSimCfg.proto;config/protos/MarketData.proto;config/protos/Ports.proto;config/protos/Symbols.proto;config/protos/UI.proto;config/protos/cme_reference_data.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spreader.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityOracle.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;os/os.cpp;os/tests/os_tests.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogon.cpp;utils/SharedMemory.cpp;utils/Sqlite_utils.cpp;utils/Uuid.cpp;utils/crypto/CipherType.cpp;utils/crypto/CryptoInit.cpp;utils/crypto/Digest.cpp;utils/crypto/KeyCodeHelper.cpp;utils/crypto/PasswordCallbaLine truncated
set(sources api/apicore.proto;api/apigateway.proto;api/apioptions.proto;api/core/ApiClientInterop.cpp;api/core/ApiServerInterop.cpp;api/public/ApiServer.cpp;api/public/ClientChannel.cpp;api/public/QuickbusClientChannel.cpp;api/public/ServerChannel.cpp;api/public/ServiceContext.cpp;api/service_helpers/AdminServiceUtils.cpp;api/service_helpers/AlgoServiceUtils.cpp;api/service_helpers/PositionUtilities.cpp;api/services/AdminService.proto;api/services/AlgoDefinitionService.proto;api/services/AlgoService.proto;api/services/ApiUnitTestService.proto;api/services/AuthService.proto;api/services/BasePositionService.proto;api/services/ErrorReportService.proto;api/services/HelloService.proto;api/services/MBOService.proto;api/services/MarginService.proto;api/services/MarketDataAuxiliaryService.proto;api/services/MarketDataRelay.proto;api/services/MoneyFileService.proto;api/services/OrderService.proto;api/services/OutOfProcessURLListener.proto;api/services/PersistenceService.proto;api/services/PositionService.proto;api/services/ShellDiagnosticService.proto;api/services/ShellLatencyService.proto;api/services/SyntheticSecurityService.proto;api/test/ApiTests.cpp;api/test/HelloServiceServer.cpp;config/ConfigCheck.cpp;config/ConfigDownloader.cpp;config/ConfigErrorCollector.cpp;config/ConfigLog.cpp;config/ConfigPropertyEvaluator.cpp;config/ConfigValueQueue.cpp;config/ConfigurationException.cpp;config/ConfigurationState.cpp;config/PreprocessInputStream.cpp;config/config.cpp;config/defaults/MarketData.conf;config/defaults/Ports.conf;config/defaults/Symbols.conf;config/defaults/cme_reference_data.conf;config/defaults/edge.conf;config/defaults/jetfix.conf;config/defaults/keycode.conf;config/defaults/logging.conf;config/defaults/orderman_cfg.conf;config/defaults/orders_fills_cleanup.conf;config/defaults/position_cfg.conf;config/defaults/span.conf;config/defaults/spreader.conf;config/defaults/testkeys.conf;config/defaults/threads.conf;config/defaults/toggles.conf;config/extensions/extensions.proto;config/invalid/invalid.proto;config/protos/ExchangeSimCfg.proto;config/protos/MarketData.proto;config/protos/Ports.proto;config/protos/Symbols.proto;config/protos/UI.proto;config/protos/cme_reference_data.proto;config/protos/jetfix.proto;config/protos/keycode.proto;config/protos/logging.proto;config/protos/mercury_cfg.proto;config/protos/orderman_cfg.proto;config/protos/orders_fills_cleanup.proto;config/protos/perflog_cfg.proto;config/protos/position_cfg.proto;config/protos/quickbus_cfg.proto;config/protos/span.proto;config/protos/spreader.proto;config/protos/system.proto;config/protos/testkeys.proto;config/protos/threads.proto;config/protos/toggles.proto;config/tests/HTTPServer.cpp;config/tests/config_ref_tests.cpp;config/tests/config_tests.cpp;config/text_format/text_format.cpp;domain_model/Security.cpp;domain_model/Security.proto;domain_model/SecurityTests.cpp;domain_model/sod.cpp;domain_model/tests/domain_tests.cpp;expression/BooleanGrammar.cpp;expression/ExpressionEvaluator.cpp;expression/ParserExceptions.cpp;expression/Value.cpp;expression/tests/expression_parser_tests.cpp;logging/LoggerHub.cpp;logging/Sink.cpp;logging/logging.cpp;logging/tests/logging_tests.cpp;md/Diag/MDPeriodicDumper.cpp;md/Diag/ShmDumper.cpp;md/MBOProcessor.cpp;md/MBOServiceServer.cpp;md/MDClient.cpp;md/MDConsumer.cpp;md/MDConsumerHandle.cpp;md/MDConsumerInterop.cpp;md/MDProducer.cpp;md/MDProducerHandle.cpp;md/MemorySegmentUtils.cpp;md/PlatformLoader.cpp;md/PriceSize.cpp;md/SecurityCache.cpp;md/SecurityDB.cpp;md/SecurityIDRecorder.cpp;md/SecurityMapper.cpp;md/SecurityOracle.cpp;md/SettlementRecorder.cpp;md/Shm/FixedSecurity.cpp;md/SyntheticSecurityService.cpp;md/cme/MDP3Utils.cpp;md/common.cpp;md/ice/ICEUtils.cpp;md/protos/co2.proto;md/relay/QueryServer.cpp;md/relay/RelayClient.cpp;md/relay/RelayRecorder.cpp;md/test/Co2ManagedTestHelper.cpp;md/test/Co2TestInstrument.cpp;md/test/mbo_tests.cpp;md/test/md2_tests.cpp;md/test/md_test_utils.cpp;md/test/synthetic_book_merge_tests.cpp;md/vendor/OnixsUtils.cpp;os/os.cpp;os/tests/os_tests.cpp;quickbus/core/LocalNode.cpp;quickbus/core/Quickbus.cpp;quickbus/core/SubscriptionID.cpp;quickbus/core/TableID.cpp;quickbus/message_model/Update.cpp;quickbus/message_model/merge_updates.cpp;quickbus/network/QBConnection.cpp;quickbus/network/QBConnectionManager.cpp;quickbus/network/endpoint_description.cpp;quickbus/network/quickbus_msgs.proto;quickbus/pubsub/TablePublisher.cpp;quickbus/pubsub/TableSubscriber.cpp;quickbus/pubsub/tests/qb_pubsub_tests.cpp;quickbus/routing/INode.cpp;quickbus/routing/NodeID.cpp;quickbus/routing/Router.cpp;quickbus/rpc/RPCClient.cpp;quickbus/rpc/RPCServer.cpp;quickbus/rpc/RPCSessionID.cpp;quickbus/rpc/rpc_utils.cpp;quickbus/rpc/tests/qb_rpc_tests.cpp;quickbus/tests/quickbus_tests.cpp;sparkproto/SparkProtos.proto;testing/catch_test_runner.cpp;utils/AuthSessionManager.cpp;utils/AuthToken.cpp;utils/Dispatcher.cpp;utils/GrowableSPSCQueue.cpp;utils/HTTPStream.cpp;utils/PBUtils.cpp;utils/Puid.cpp;utils/SecureLogoLine truncated
+1 -1
View File
@@ -4,7 +4,7 @@ Logging {
console { default_level: "Error" }
syslog { default_level: "Info" }
file { default_level: "Info" }
initial_queue_size: 128
initial_queue_size: 1024
max_queue_growth: 100
}
}
+12 -1
View File
@@ -6,4 +6,15 @@ GMI_SymbolMap {
sym { gmi: "05" spark: "ZS" venue: VENUE_GLBX price_multiplier: 100.0}
sym { gmi: "KW" spark: "KE" venue: VENUE_GLBX price_multiplier: 100.0}
}
}
}
GMI_Import {
rule: "DeploymentType.type == 'DEV'"
value {
sftp_host: "10.96.18.41"
sftp_port: 22222
sftp_user: "PaTeACYB"
sftp_password: "DLXKuVK8"
}
}
+5 -4
View File
@@ -4,10 +4,11 @@ package bts.config;
message GMI_Import
{
required string sftp_host = 10 [default = "10.96.18.41"];
optional uint32 sftp_port = 11 [default = 22222];
required string sftp_user = 12 [default = "sftp"];
required string sftp_password = 2 [default = "sftp"];
required string sftp_host = 10 ;
optional uint32 sftp_port = 11 ;
required string sftp_user = 12 ;
required string sftp_password = 2 ;
required int32 pause_between_downloads_seconds = 4 [default = 30];
required int32 download_timeout_seconds = 5 [default = 35];
optional string download_window_begin = 6 [default = "22:00"];
+6 -6
View File
@@ -24,14 +24,14 @@ _sod_time(sod_time){
LOG(persist, Info, "SODPosition::cons sod_time:{}", sod_time.tv_sec);
}
// returns the timeval for today's hh,mm,ss (in local machine terms)
// (timeval is the microseconds from epoch)
// returns the timeval (secs/usecs from epoch) for today's hh,mm,ss
// (in local machine time zone)
timeval SODPosition::to_timeval(uint16_t hh, uint16_t mm, uint16_t ss) {
// function does the conversion the following way:
// 1. gets the now secs from epoch using time
// 2. converts it into local time (so we have now local time)
// 3. overrides the hh, mm, ss passed
// 4. converts it back into secs from epoch using mktime
// 1. gets the secs from epoch (time_t)
// 2. converts it into local time
// 3. overrides the hh, mm, ss for local time with the func args
// 4. converts it back into timeval
bts_assert(hh < 24);
bts_assert(mm < 60);
bts_assert(ss < 60);
@@ -178,7 +178,9 @@ void OrderMatcher::match(std::vector<Order> *out) {
auto iBid = me->bids.begin();
auto iAsk = me->asks.begin();
if (iBid->price() >= iAsk->price()) {
if (iBid->price() > iAsk->price() ||
price_equals(iBid->price(), iAsk->price()))
{
Order bid = *iBid;
Order ask = *iAsk;