Compare commits

...
98 Commits
ls ... cqg
Author SHA1 Message Date
Kevin Darby 8687ef64f9 added spaces to labels per John 2020-01-27 11:13:56 -05:00
Kevin Darby a307a09cb7 glbxice 2020-01-24 16:42:16 -05:00
Kevin Darby 634563863d added initVals to the atdl 2020-01-24 16:30:05 -05:00
Kevin Darby d7f9d18838 atdl's exported and verified 2020-01-24 15:12:47 -05:00
Kevin Darby c52b2c769f Revert "moved the concept of tag base out of attributes and into CustomOrderDef"
This reverts commit 2356d20888.
2020-01-24 14:23:56 -05:00
Kevin Darby 2356d20888 moved the concept of tag base out of attributes and into CustomOrderDef 2020-01-23 23:31:56 -05:00
Kevin Darby 46909d76e9 xsd validation 2020-01-23 22:36:17 -05:00
Kevin Darby 09404ff9a6 move xsd's 2020-01-23 17:07:46 -05:00
Kevin Darby ce1ae16419 added fixatdl schema and validator, going to try to move the tag base out of an attribute and into custom 2020-01-23 17:04:13 -05:00
Kevin Darby b0a24324ca we can produce and parse fixatdl 2020-01-22 18:26:57 -05:00
Kevin Darby 5f5e4c2400 made adtl file generator 2020-01-21 17:58:41 -05:00
Kevin Darby a798455e7f Merge branch 'dotnet' of bitbucket.org:bluetradesys/spark into cqg 2020-01-21 11:00:44 -05:00
Kevin Darby 7119e18436 Merge branch 'master' of bitbucket.org:bluetradesys/spark into dotnet 2020-01-21 10:24:48 -05:00
Kevin Darby d505591e11 Merge branch 'master' of bitbucket.org:bluetradesys/spark into cqg 2020-01-14 13:57:06 -05:00
Kevin Darby 83005d7439 algos over fix 2020-01-14 13:28:53 -05:00
Kevin Darby 4872e8ad7f create, update, delete limit orders works 2020-01-13 14:57:11 -05:00
Kevin Darby 065f92937c added note about node 2020-01-11 16:39:01 -05:00
Kevin Darby cdfb60f5d9 native orders going through 2020-01-10 18:14:28 -05:00
Kevin Darby f2b407fdac json file for algos 2020-01-10 13:51:12 -05:00
Kevin Darby 4c4fa77d3a algo structure in a file 2020-01-09 22:47:00 -05:00
Kevin Darby 2aa5a02ce2 putting composites in a file 2020-01-09 18:13:20 -05:00
Kevin Darby 5e1f642076 algo types 2020-01-09 17:18:56 -05:00
Kevin Darby 90b4c7e26f starting cqg integration 2020-01-09 15:50:59 -05:00
Kevin Darby eccc3f5f38 fix merge error 2020-01-09 10:48:34 -05:00
Kevin Darby de20957ae7 change comment 2020-01-09 09:53:58 -05:00
Kevin Darby f7dec1161a build 2020-01-08 18:09:53 -05:00
Kevin Darby f5e826b095 Merge branch 'dotnet' of bitbucket.org:bluetradesys/spark into cqg 2020-01-08 18:05:25 -05:00
Kevin Darby 4cd3bc40d9 note about not sharing externals 2020-01-08 18:02:00 -05:00
Kevin Darby 3800f3344b netcore 3.1 2020-01-08 17:35:19 -05:00
Kevin Darby 6ad139804f Merge branch 'windows_docker' of bitbucket.org:bluetradesys/spark into dotnet 2020-01-08 17:33:28 -05:00
Kevin Darby 45d5c2d7cd docker / externals 2020-01-08 17:32:19 -05:00
Kevin Darby 0d24062f03 Merge branch 'dotnet' of bitbucket.org:bluetradesys/spark into windows_docker 2020-01-08 17:25:30 -05:00
Kevin Darby 44e0eae281 Merge branch 'master' of bitbucket.org:bluetradesys/spark into dotnet 2020-01-08 17:24:55 -05:00
Kevin Darby 25805cf675 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2020-01-08 17:22:14 -05:00
Kevin Darby 152ab05b4e remove externals sharing 2020-01-08 17:08:49 -05:00
Kevin Darby 4257a172c1 fixed shared obj dir on linux build 2019-12-31 12:39:54 -05:00
Kevin Darby 721a08c4b4 remove these CMakeDeps so gitignore can ignore 2019-12-31 10:44:32 -05:00
Kevin Darby 41a3535e84 made some minor changes to support running a dev environment in our api docker on windows 2019-12-31 10:07:55 -05:00
Kevin Darby 626629bf06 added spark_vm_shell for windows 2019-12-31 10:06:54 -05:00
Eric Harding 487aaef02f update cmake 2019-12-16 13:12:50 -05:00
Eric Harding f22fc03e56 merge master 2019-12-16 12:54:19 -05:00
Kevin Darby 5f45ddf210 wack vs backwack 2019-11-28 02:46:27 +00:00
Kevin Darby d6a533ca5c PR feedback 2019-11-27 17:21:24 -05:00
Kevin Darby 20e58dc80b address PR concerns 2019-11-13 16:46:36 -05:00
Kevin Darby 5773945791 add data dir for .net in linux
make sparkcmd build in the right place on windows again
2019-11-11 17:12:55 -05:00
Kevin Darby 721c889235 release mode uses published sparkcmd 2019-11-06 18:22:06 -05:00
Kevin Darby 9957af655f hooked sparkcmd linux build to the main server build stuff 2019-11-06 17:47:21 -05:00
Kevin Darby eab92fb486 damn windows casing 2019-11-06 13:55:29 -05:00
Kevin Darby 9f1cd47cfa hooking build to cmake 2019-11-06 13:55:07 -05:00
Kevin Darby 90c3edbbe7 adding core 2 back to docker per eric 2019-11-06 13:24:57 -05:00
Kevin Darby adee8b584c capitalized first letter of proto to work around a protoc bug 2019-11-06 12:43:27 -05:00
Kevin Darby 329ad323e0 delete protos to change case on windows 2019-11-06 12:41:37 -05:00
Kevin Darby c713b97441 cleanup csproj 2019-11-05 18:23:09 -05:00
Kevin Darby eb79264b9b netcore builds on linux through dotnet build 2019-11-05 18:19:17 -05:00
Kevin Darby 1621ad03bf Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-10-13 14:09:45 -04:00
Kevin Darby 193f248f06 merge deleted some of my files 2019-10-07 17:40:01 -04:00
Kevin Darby 5212fb272e Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-10-07 17:27:12 -04:00
Kevin Darby 6772c77e01 rudimentary fix orders seem to work 2019-10-07 17:18:20 -04:00
Kevin Darby 95c589f594 hooking up to run this fix server 2019-09-30 15:00:30 -04:00
Kevin Darby 699c7c5bfe Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-09-30 12:02:13 -04:00
Kevin Darby 7de82b5685 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-09-30 11:45:44 -04:00
Kevin Darby a8e9d0d7d8 ordersession and dropcopy session code complete for native orders, time to debug 2019-09-27 18:21:35 -04:00
Kevin Darby d078e73179 order session 2019-09-27 17:58:36 -04:00
Kevin Darby 4351d6e66a drop copy session code complete 2019-09-27 17:04:42 -04:00
Kevin Darby 9850d6bde0 rx-cpp requires concurrent use with prescription medicine 2019-09-27 14:29:22 -04:00
Kevin Darby d23a072ad6 rx 2019-09-26 18:27:41 -04:00
Kevin Darby 6ef0808f49 never thought I'd use rxcpp...it's truly terrible; I feel physical pain 2019-09-26 18:16:48 -04:00
Kevin Darby e1c2d8aaaf it builds, ship it 2019-09-26 12:33:42 -04:00
Kevin Darby 719fd03063 nothing builds 2019-09-26 11:45:08 -04:00
Kevin Darby d436dae7cd more fix 2019-09-24 18:22:09 -04:00
Kevin Darby f66004b465 fix port 2019-09-24 14:37:30 -04:00
Kevin Darby aa8a56787b fix fix fix 2019-09-23 18:16:05 -04:00
Kevin Darby 35a69396f1 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-09-23 17:08:56 -04:00
Kevin Darby ddfb6d1105 update externals 2019-09-23 17:03:49 -04:00
Kevin Darby 005c0f9a5d c++ fix 2019-09-23 16:59:39 -04:00
Kevin Darby 57af89b628 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-08-28 16:47:20 -04:00
Kevin Darby feab3cbb89 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2019-01-22 16:10:16 -05:00
Kevin Darby 1f7c1be194 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2018-12-28 13:51:59 -05:00
Kevin Darby f78f18b3b4 Merge branch 'master' of bitbucket.org:bluetradesys/spark into fix 2018-12-20 16:20:19 -05:00
Kevin Darby 6e7fa91718 ready for testing 2018-12-14 10:39:34 -05:00
Kevin Darby 8cac406547 fix error handling 2018-12-12 17:33:25 -05:00
Kevin Darby 0d83f28cbc fix lives 2018-12-12 14:26:03 -05:00
Kevin Darby 941f4bf837 Merge branch 'cleanup_mdclient' of bitbucket.org:bluetradesys/spark into fix 2018-12-11 23:05:35 -05:00
Kevin Darby 8bbe9cfd98 Merge branch 'master' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-12-06 12:56:02 -05:00
Kevin Darby ba633532eb hit a wall here with MDClient, going to refactor 2018-12-06 12:55:21 -05:00
Kevin Darby 7bf50415ca nearly ready for testing 2018-12-05 17:55:06 -05:00
Kevin Darby edbaa9c435 looks like we have dropcopy 2018-12-05 15:35:49 -05:00
Kevin Darby 7789f39c9d handle some messages 2018-12-04 18:20:23 -05:00
Kevin Darby 6e188b4f73 shaping up 2018-12-04 16:37:41 -05:00
Kevin Darby 33e8ff58c5 Merge branch 'master' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-12-04 09:42:30 -05:00
Kevin Darby 24ae03a9f8 access permissions api so fix session can report fills and orders 2018-12-03 18:19:20 -05:00
Kevin Darby 5fe0335e1a Merge branch 'master' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-12-03 17:02:34 -05:00
Kevin Darby 6cbf707094 Merge branch 'sdk_doc' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-12-03 16:06:58 -05:00
Kevin Darby 7e4ad55d9d established a session 2018-12-03 15:32:45 -05:00
Kevin Darby 35a0074014 bts fix44 adapter 2018-12-03 14:49:35 -05:00
Kevin Darby b8dd5c119d Merge branch 'sdk_doc' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-12-03 10:41:34 -05:00
Kevin Darby 8ada73aa64 Merge branch 'sdk_doc' of bitbucket.org:bluetradesys/spark into sdk_doc2 2018-11-30 18:37:39 -05:00
Kevin Darby a16ff30873 lets see how hard this is 2018-11-30 18:32:51 -05:00
158 changed files with 97523 additions and 231 deletions

No files matched your search

+1
View File
@@ -34,3 +34,4 @@ trace_data/
/doc/user/public/*
.ionide/*
/.ignore
CMakeDeps.cmake
+36 -6
View File
@@ -46,7 +46,7 @@
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
}
},
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
@@ -111,6 +111,37 @@
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Fix Launch",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
"args": [
"fix",
"--export_atdl_path",
"./atdl/",
"--export_single_file",
],
"cwd": "${workspaceRoot}/build/Debug/bin/net471/",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Fix Launch2",
"type": "clr",
"request": "launch",
"program": "${workspaceRoot}/build/Debug/bin/net471/sparkcmd.exe",
"args": [
"fix",
"--validate_atdl_path",
"./atdl/"
],
"cwd": "${workspaceRoot}/build/Debug/bin/net471/",
"stopAtEntry": false,
"externalConsole": true,
"requireExactSource": false
},
{
"name": "Client Tests",
"type": "clr",
@@ -345,12 +376,11 @@
"name": ".NET Core Remote Launch",
"type": "coreclr",
"request": "launch",
"program": "/usr/bin/dotnet",
"program": "sparkcmd",
"args": [
"sparkcmd.dll",
"test",
"test_join_create_and_takeout_market"
],
"env": {"LD_LIBRARY_PATH" : "."},
"stopAtEntry": false,
"cwd": "/home/bts/spark/build/ninja_debug/server",
"pipeTransport": {
@@ -361,11 +391,11 @@
"debuggerPath": "/home/bts/vsdbg/vsdbg",
"pipeCwd": "${workspaceRoot}",
"quoteArgs": true
},
},
"sourceFileMap": {
"/home/bts/spark/": "${workspaceRoot}"
},
"justMyCode": false
},
},
]
}
+11
View File
@@ -48,6 +48,7 @@ else ()
add_subdirectory(doc/user)
add_subdirectory(src/sdk)
add_subdirectory(src/data_files)
add_subdirectory(src/client)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/server
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/server
@@ -59,7 +60,17 @@ else ()
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libACE-5.7.5.so ${CMAKE_BINARY_DIR}/server
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins
COMMENT "Creating server runtime layout"
DEPENDS sparkd data_files_dir spark_client_dir
DEPENDS sparkd data_files_dir)
add_custom_target(server_layout ALL DEPENDS ${CMAKE_BINARY_DIR}/server)
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_custom_command(TARGET server_layout POST_BUILD
COMMAND ln -fs ${CMAKE_BINARY_DIR}/../${CMAKE_BUILD_TYPE}/bin/netcoreapp3.1/linux-x64/sparkcmd ${CMAKE_BINARY_DIR}/server/ )
else()
add_custom_command(TARGET server_layout POST_BUILD
COMMAND ln -fs ${CMAKE_BINARY_DIR}/../${CMAKE_BUILD_TYPE}/bin/netcoreapp3.1/linux-x64/publish/sparkcmd ${CMAKE_BINARY_DIR}/server/ )
endif()
endif()
+1 -1
View File
@@ -1 +1 @@
set(sources /home/ppinto/Dropbox/bts/spark/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
set(sources /home/bts/spark/doc/user/build.sh;content/_index.md;content/bts_spark/Glossary/_index.md;content/bts_spark/Help/_index.md;content/bts_spark/Help/about_spark.png;content/bts_spark/Help/image39.png;content/bts_spark/Help/image58.png;content/bts_spark/Launcher/_index.md;content/bts_spark/Launcher/image38.png;content/bts_spark/Launcher/image68.png;content/bts_spark/Logging-In-to-the-System/_index.md;content/bts_spark/Logging-In-to-the-System/image3.png;content/bts_spark/Logging-In-to-the-System/image64.png;content/bts_spark/Market/_index.md;content/bts_spark/Market/change_securities.png;content/bts_spark/Market/image11.png;content/bts_spark/Market/image14.png;content/bts_spark/Market/image20.png;content/bts_spark/Market/image21.png;content/bts_spark/Market/image23.png;content/bts_spark/Market/image24.png;content/bts_spark/Market/image34.png;content/bts_spark/Market/image49.png;content/bts_spark/Market/image53.png;content/bts_spark/Market/image66.png;content/bts_spark/Market/image69.png;content/bts_spark/Market/market_view.png;content/bts_spark/Market/settings_icon.png;content/bts_spark/Market/time_and_sales.png;content/bts_spark/My-Windows/_index.md;content/bts_spark/My-Windows/image15.png;content/bts_spark/My-Windows/image16.png;content/bts_spark/My-Windows/image37.png;content/bts_spark/Settings/_index.md;content/bts_spark/Settings/image51.png;content/bts_spark/Settings/image9.png;content/bts_spark/Spreader/_index.md;content/bts_spark/Spreader/image10.png;content/bts_spark/Spreader/image13.png;content/bts_spark/Spreader/image18.png;content/bts_spark/Spreader/image19.png;content/bts_spark/Spreader/image28.png;content/bts_spark/Spreader/image29.png;content/bts_spark/Spreader/image31.png;content/bts_spark/Spreader/image35.png;content/bts_spark/Spreader/image40.png;content/bts_spark/Spreader/image43.png;content/bts_spark/Spreader/image54.png;content/bts_spark/Spreader/image55.png;content/bts_spark/Spreader/image56.png;content/bts_spark/Spreader/image6.png;content/bts_spark/Spreader/image7.png;content/bts_spark/Spreader/image70.png;content/bts_spark/Spreader/image72.png;content/bts_spark/Spreader/image8.png;content/bts_spark/Trading/OrderTypes/index.md;content/bts_spark/Trading/_index.md;content/bts_spark/Trading/algo_studio.png;content/bts_spark/Trading/collapse_all_icon.png;content/bts_spark/Trading/cover_algo_control.png;content/bts_spark/Trading/expand_all_icon.png;content/bts_spark/Trading/image1.png;content/bts_spark/Trading/image17.png;content/bts_spark/Trading/image2.png;content/bts_spark/Trading/image25.png;content/bts_spark/Trading/image27.png;content/bts_spark/Trading/image33.png;content/bts_spark/Trading/image42.png;content/bts_spark/Trading/image44.png;content/bts_spark/Trading/image47.png;content/bts_spark/Trading/image48.png;content/bts_spark/Trading/image5.png;content/bts_spark/Trading/image50.png;content/bts_spark/Trading/image52.png;content/bts_spark/Trading/image57.png;content/bts_spark/Trading/image59.png;content/bts_spark/Trading/image60.png;content/bts_spark/Trading/image61.png;content/bts_spark/Trading/image62.png;content/bts_spark/Trading/image73.png;content/bts_spark/Trading/image74.png;content/bts_spark/Trading/join_algo_control.png;content/bts_spark/Trading/ladder.png;content/bts_spark/Trading/ladder_badges.png;content/bts_spark/Trading/ladder_main_part.png;content/bts_spark/Trading/lean_algo_control.png;content/bts_spark/Trading/mini_orderbook.png;content/bts_spark/Trading/oco_algo_control.png;content/bts_spark/Trading/offset_algo_control.png;content/bts_spark/Trading/pnl_calculation.png;content/bts_spark/Trading/pnl_window.png;content/bts_spark/Trading/recreate_icon.png;content/bts_spark/Trading/settings_icon.png;content/bts_spark/Trading/spark_menu_order_book.png;content/bts_spark/Trading/top_algo_control.png;content/bts_spark/Trading/trigger_algo_control.png;content/bts_spark/_index.md;content/release_notes/_index.md;content/system_requirements/_index.md;static/book.js;static/favicon.ico;static/image.js;templates/index.html;templates/page.html;templates/section.html;templates/shortcodes/back_button.html)
+22
View File
@@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_test", "src\client\sp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_excel", "src\client\spark_excel\spark_excel.csproj", "{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "spark_fix", "src\client\spark_fix\spark_fix.csproj", "{D8031C13-7BEA-430A-BB60-40927D15CFC3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -219,6 +221,26 @@ Global
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x64.Build.0 = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{BE9F27C3-B583-47DF-95FA-1F8BBC89DCCB}.RelWithDebInfo|x86.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Debug|Any CPU.ActiveCfg = Debug|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Debug|x64.ActiveCfg = Debug|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Debug|x64.Build.0 = Debug|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Debug|x86.ActiveCfg = Debug|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|Any CPU.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|Any CPU.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|x64.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|x64.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|x86.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.MinSizeRel|x86.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Release|Any CPU.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Release|x64.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Release|x64.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.Release|x86.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|x64.Build.0 = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|x86.ActiveCfg = Release|x64
{D8031C13-7BEA-430A-BB60-40927D15CFC3}.RelWithDebInfo|x86.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+19
View File
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.5)
project(spark_client)
include(${CMAKE_SOURCE_DIR}/tools/safe_dep_glob.cmake)
file(GLOB_RECURSE spark_client_sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cs)
file(GLOB_RECURSE spark_client_csproj RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.csproj)
file(GLOB_RECURSE spark_ui_sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} spark/*.cs)
file(GLOB_RECURSE spark_ui_csproj RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} spark/*.csproj)
list(REMOVE_ITEM spark_ui_sources ${spark_client_sources} )
list(REMOVE_ITEM spark_ui_csproj ${spark_client_csproj} )
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/../
COMMAND /bin/bash ${CMAKE_CURRENT_SOURCE_DIR}/build_spark_dotnetcore.sh
ARGS ${CMAKE_BUILD_TYPE} ${CMAKE_BINARY_DIR}
COMMENT "Building sparkcmd in netcore3"
DEPENDS libspark ${spark_client_sources} ${spark_client_csproj} ${CMAKE_CURRENT_SOURCE_DIR}/build_spark_dotnetcore.sh)
add_custom_target(spark_client_dir ALL DEPENDS ${CMAKE_BINARY_DIR}/../)
@@ -5,6 +5,7 @@
<SparkRoot>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\..))</SparkRoot>
<SourceRoot>$([System.IO.Path]::GetFullPath($(SparkRoot)\src))</SourceRoot>
<Externals>$(SparkRoot)\externals\windows</Externals>
<Externals Condition=" '$(OS)' != 'Windows_NT' ">$(SparkRoot)/externals/linux</Externals>
<DepotName>$([System.IO.Path]::GetFileName($([System.IO.Path]::GetFullPath($(SparkRoot)))))</DepotName>
<ErrorReport>None</ErrorReport>
<Prefer32Bit>False</Prefer32Bit>
@@ -19,20 +20,25 @@
<OutputPath>$(BaseOutputPath)\bin</OutputPath>
<BaseIntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseOutputPath)\obj\$(MSBuildProjectName)</IntermediateOutputPath>
<BaseIntermediateOutputPath Condition=" '$(OS)' != 'Windows_NT' ">$(BaseOutputPath)\linuxobj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(OS)' != 'Windows_NT' ">$(BaseOutputPath)\linuxobj\$(MSBuildProjectName)</IntermediateOutputPath>
<GenDir>$(BaseOutputPath)\gen\$(MSBuildProjectName)</GenDir>
</PropertyGroup>
<Import Project="$(ComputerSpecificConfig)" Condition="Exists($(ComputerSpecificConfig))" />
<ItemGroup>
<AvailableItemName Include="Proto2">
<Targets>CompileProto3</Targets>
<Targets Condition=" '$(OS)' == 'Windows_NT' " >CompileProto2</Targets>
<Targets Condition=" '$(OS)' != 'Windows_NT' " >CompileProto2Linux</Targets>
</AvailableItemName>
<AvailableItemName Include="Proto3">
<Targets>CompileProto3</Targets>
<Targets Condition=" '$(OS)' == 'Windows_NT' " >CompileProto3</Targets>
<Targets Condition=" '$(OS)' != 'Windows_NT' " >CompileProto3Linux</Targets>
</AvailableItemName>
<AvailableItemName Include="Proto3Excel">
<Targets>CompileProto3Excel</Targets>
<Targets Condition=" '$(OS)' == 'Windows_NT' ">CompileProto3Excel</Targets>
</AvailableItemName>
</ItemGroup>
@@ -43,6 +49,14 @@
<protogen>$(Externals)\bin\protogen.exe</protogen>
</PropertyGroup>
<PropertyGroup Label="ProtoBuf" Condition=" '$(OS)' != 'Windows_NT' ">
<ProtocPluginBase>$(SparkRoot)/src/lib/api/service_compiler</ProtocPluginBase>
<ProtoInclude>$(Externals)/include</ProtoInclude>
<protoc>$(Externals)/bin/protoc</protoc>
<protoc_rename>$(Externals)/bin/lowercase_files.sh</protoc_rename>
<protogen>$(Externals)/bin/protogen</protogen>
</PropertyGroup>
<ItemDefinitionGroup>
<Proto2>
</Proto2>
@@ -3,7 +3,7 @@
<Target Name="CompileProto2"
Condition="'@(Proto2)'!=''"
Condition="'@(Proto2)'!='' AND '$(OS)' == 'Windows_NT' "
Inputs="$(MSBuildProjectFile);$(protogen);%(Proto2.FullPath)"
Outputs="$(GenDir)\proto2\%(Proto2.filename).cs"
AfterTargets="PreBuildEvent">
@@ -28,7 +28,7 @@
passes wipes out the additional compile includes that we add.
-->
<Target Name="CompileProto3" AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3)'!=''"
Condition="'@(Proto3)'!='' AND '$(OS)' == 'Windows_NT' "
Inputs="$(protoc);
%(Proto3.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\c#\client.pb.cs;
@@ -58,7 +58,7 @@
</Target>
<Target Name="CompileProto3Excel" AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3Excel)'!=''"
Condition="'@(Proto3Excel)'!='' AND '$(OS)' == 'Windows_NT' "
Inputs="$(protoc);
%(Proto3Excel.Identity);$(ProtocPluginBase)\plugin.py;
$(ProtocPluginBase)\templates\excel\excel.pb.cs;"
@@ -82,12 +82,74 @@
</ItemGroup>
</Target>
<Target Name="CompileProto2Linux"
Condition="'@(Proto2)'!='' AND '$(OS)' != 'Windows_NT' "
Inputs="$(MSBuildProjectFile);$(protogen);%(Proto2.FullPath)"
Outputs="$(GenDir)/proto2/%(Proto2.filename).cs"
AfterTargets="PreBuildEvent">
<PropertyGroup>
<SourceRelativeFile>$([System.String]::Copy('%(proto2.fullpath)').Replace($(SourceRoot), ''))</SourceRelativeFile>
<SourceRelativeDir>$([System.IO.Path]::GetDirectoryName($(SourceRelativeFile)))</SourceRelativeDir>
<WorkingDirectory>$(GenDir)/proto2</WorkingDirectory>
</PropertyGroup>
<MakeDir Directories="$(WorkingDirectory)" />
<Copy SourceFiles="%(Proto2.FullPath)" DestinationFolder="$(WorkingDirectory)" SkipUnchangedFiles="True" UseHardLinksIfPossible="True" />
<Error Text="protogen.exe does not exist. If you forgot to clone with externals try: git submodule update --init --recursive" Condition="!Exists($(protogen))" />
<Message Importance="High" Text="Doing Proto2 %(proto2.filename)" />
<Exec Command="$(Protogen) %(Proto2.filename)%(proto2.extension) --csharp_out=. -I. -I$(SourceRoot) -I$(Externals)/include"
WorkingDirectory="$(WorkingDirectory)" />
<ItemGroup>
<Compile Include="$(WorkingDirectory)/%(Proto2.filename).cs" />
</ItemGroup>
</Target>
<Target Name="CompileProto3Linux" AfterTargets="GetAssemblyVersion"
Condition="'@(Proto3)'!='' AND '$(OS)' != 'Windows_NT' "
Inputs="$(protoc);
%(Proto3.Identity);$(ProtocPluginBase)/plugin.py;
$(ProtocPluginBase)/templates/c#/client.pb.cs;
$(ProtocPluginBase)/templates/c#/server.pb.cs;
$(ProtocPluginBase)/templates/c#/immutable.pb.cs;"
Outputs="%(Proto3.OutCS);%(Proto3.OutCSServer);%(Proto3.OutCSClient);%(Proto3.OutCSImmutable)">
<MakeDir Directories="%(Proto3.OutBase)" />
<MakeDir Directories="$(IntermediateOutputPath)/gen" />
<Message Importance="High" Text="Generating service %(Proto3.FileName)" />
<Exec Command="
PYTHONPATH=$(Externals)/python $(protoc) \
%(Proto3.FullPath) \
--error_format=gcc \
--proto_path=$(protoinc):$(SourceRoot) \
--plugin=&apos;protoc-gen-service=$(ProtocPluginBase)/plugin.py&apos; \
--service_out=lang=c#,strip_out_path=1:%(Proto3.OutBase) \
--csharp_out=%(CompileOptions)%(Proto3.OutBase)"
WorkingDirectory="%(relativedir)" />
<!-- <Exec Command="$(protoc_rename) %(Proto3.OutBase)" /> -->
<ItemGroup>
<Compile Include="%(Proto3.OutCS)" />
<Compile Include="%(Proto3.OutCSClient)" />
<Compile Include="%(Proto3.OutCSServer)" />
<Compile Include="%(Proto3.OutCSImmutable)" />
</ItemGroup>
</Target>
<!-- <Target Name="RenameProto3Linux" AfterTargets="CompileProto3Linux"
Condition="'@(Proto3)'!='' AND '$(OS)' != 'Windows_NT' ">
<Move SourceFiles="$(OutBase)\Apicore.cs" DestinationFiles="$(OutBase)\apicore.cs" />
<Move SourceFiles="$(OutBase)\Apioptions.cs" DestinationFiles="$(OutBase)\apioptions.cs" />
<Move SourceFiles="$(OutBase)\Co2.cs" DestinationFiles="$(OutBase)\co2.cs" />
</Target> -->
<Target Name="AfterClean" AfterTargets="Clean">
<Delete Files="%(Proto3.OutCS)" />
<Delete Files="%(Proto3.OutCSClient)" />
<Delete Files="%(Proto3.OutCSServer)" />
<Delete Files="%(Proto3.OutCSImmutable)" />
<Delete Files="$(GenDir)\proto2\*" />
<Delete Files="$(GenDir)/proto2/*" />
<Delete Files="%(Proto3Excel.OutCSExcel)" />
</Target>
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
#$1 = Debug / Release (CMAKE_BUILD_TYPE), $2 = CMAKE_BINARY_DIR
cd "$(dirname "$0")"
echo $PWD dotnet build -c $1 ./sparkcmd/
dotnet build -c $1 -o $2/../$1/bin/netcoreapp3.1/linux-x64 ./sparkcmd/
if [ "$1" == "Release" ]
then
dotnet publish -c $1 -o $2/../$1/bin/netcoreapp3.1/linux-x64 ./sparkcmd/
ln -fs $2/src/lib/libspark.so $2/../$1/bin/netcoreapp3.1/linux-x64/publish
fi
ln -fs $2/src/lib/libspark.so $2/../$1/bin/netcoreapp3.1/linux-x64
-1
View File
@@ -9,7 +9,6 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Configurations>Debug;Release</Configurations>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
<PlatformTarget>AnyCPU</PlatformTarget>
<LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets>
<ApplicationIcon>logo.ico</ApplicationIcon>
@@ -3,4 +3,5 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("spark_core")]
[assembly: InternalsVisibleTo("sparkcmd")]
[assembly: InternalsVisibleTo("spark_test")]
[assembly: InternalsVisibleTo("spark_fix")]
+21
View File
@@ -0,0 +1,21 @@
namespace bts.api
{
//keep in sync with apioptions.proto
public static partial class ApioptionsReflection
{
public enum MessageOptions
{
fix_algostrategy_tagbase = 8506,
}
public enum FieldOptions
{
fix_tag = 8507,
fix_tag_is_header = 8509,
skip_fix_tag = 8510,
}
public enum EnumValueOptions
{
fix_value = 8508,
}
}
}
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using static bts.api.Security;
namespace bts.api {
struct FutureLeg {
public struct FutureLeg {
public readonly Venue exchange;
public readonly string symbol, exchange_desc;
public readonly FutureContractImmutable future;
@@ -4,7 +4,7 @@ using System.Linq;
using static bts.api.Security;
namespace bts.api {
internal static class SecurityHelper {
public static class SecurityHelper {
public static IEnumerable<FutureLeg> get_flat_future_legs(SecurityImmutable sec) {
switch (sec.ContractCase) {
case ContractOneofCase.Spread: return _get_flat_future_legs(sec.Spread.Legs, 1);
@@ -63,6 +63,8 @@ namespace bts.api {
return security.Glbx.SecurityDesc;
else if(security.HasIce)
return security.Ice.SecurityDesc;
else if(security.HasSynthetic)
return security.Synthetic.Name;
else
{
Log.assert(false, "security_desc not implemented for exchange");
+1 -1
View File
@@ -25,7 +25,7 @@
<Proto3 Include="../../lib/api/*.proto" />
<Proto3 Include="../../lib/api/services/*.proto" />
<!--Proto3 Remove="../../lib/api/services/MarketDataRelay.proto" /-->
<Proto3 Include="../../lib/md/protos/co2.proto" />
<Proto3 Include="../../lib/md/protos/Co2.proto" />
<Proto3 Include="../../lib/domain_model/Security.proto" />
<Proto3 Include="../../lib/sparkproto/SparkProtos.proto" />
<Proto3 Update="../../lib/api/services/OutOfProcessURLListener.proto">
@@ -28,5 +28,8 @@ namespace bts.utils
[DllImport("libspark")]
public static extern bool initialize_nothrow(StringBuilder buffer, int length);
//public static string bts_data_path()
//use mbts.config.Configuration.get<bts.config.System>().data_path;
}
}
+3 -1
View File
@@ -36,6 +36,7 @@ namespace bts {
Plugin,
Sdk,
Http,
Fix
// Please keep this list in sync with logging.h/logging.cpp
}
@@ -102,9 +103,10 @@ namespace bts {
internal static Logger Assert => new Logger(Subsystem.Assert);
internal static Logger Ui => new Logger(Subsystem.Ui);
internal static Logger Testing => new Logger(Subsystem.Testing);
internal static Logger DataFlow => new Logger(Subsystem.DataFlow);
internal static Logger DataFlow => new Logger(Subsystem.DataFlow);
public static Logger Sdk => new Logger(Subsystem.Sdk);
public static Logger Http => new Logger(Subsystem.Http);
internal static Logger FIX => new Logger(Subsystem.Fix);
internal static void log_at(this Logger logger, Level level, string message) {
switch (level) {
@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using Google.Protobuf.WellKnownTypes;
namespace bts.api
{
public static class TimestampExtensions
{
public static Timestamp add_nanos(this Timestamp lhs, int nanos)
{
var c = new Timestamp(lhs);
c.Nanos += nanos;
return c;
}
public static bool less(this Timestamp lhs, Timestamp rhs)
{
return lhs.compare(rhs) < 0;
}
public static bool less_or_equal(this Timestamp lhs, Timestamp rhs)
{
return lhs.compare(rhs) <= 0;
}
public static bool greater(this Timestamp lhs, Timestamp rhs)
{
return lhs.compare(rhs) > 0;
}
public static bool greater_or_equal(this Timestamp lhs, Timestamp rhs)
{
return lhs.compare(rhs) >= 0;
}
public static int compare(this Timestamp lhs, Timestamp rhs)
{
int secdiff = lhs.Seconds.CompareTo(rhs.Seconds);
return (secdiff != 0) ? secdiff : (lhs.Nanos.CompareTo(rhs.Nanos));
}
public static Comparer<Timestamp> timestamp_comparer => Comparer<Timestamp>.Create((x, y) => x.compare(y));
public static Timestamp parse_timestamp(string data)
{
DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
try
{
if (data.Length <= 8)
{
dt = DateTime.ParseExact(data, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture);
}
else
{
int sep = 14;
var yyMMddhhmmss = data.Substring(0, sep);
dt = DateTime.ParseExact(yyMMddhhmmss, "yyyyMMddHHmmss", System.Globalization.CultureInfo.InvariantCulture);
var nnanos = data.Substring(sep, data.Length - sep);
long nano = long.Parse(nnanos);
dt = dt.AddTicks(nano / 100);
}
}
catch (Exception _)
{
System.Diagnostics.Debug.Assert(_ != null); //UNUSED(_)
}
dt = DateTime.SpecifyKind(dt, DateTimeKind.Utc);
var ts = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(dt);
return ts;
}
public static string to_fix_string(this Timestamp ts)
{
return ts.ToDateTime().ToString("yyyyMMdd-HH:mm:ss.fff");
}
}
}
+28
View File
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
namespace bts.api
{
public class TypeUtils
{
static public List<Type> find_all_types_in_all_assemblies(string type, string assembly_regex = null)
{
List<Type> res = new List<Type>();
var asses = AppDomain.CurrentDomain.GetAssemblies();
foreach (Assembly a in asses)
{
if (!string.IsNullOrEmpty(assembly_regex))
{
if (!Regex.Match(a.GetName().Name, assembly_regex).Success)
continue;
}
Type t = a.GetType(type, false, true);
if (t != null)
res.Add(t);
}
return res;
}
}
}
@@ -70,10 +70,13 @@ namespace bts.test {
psi.RedirectStandardOutput = true;
psi.RedirectStandardError = true;
psi.UseShellExecute = false;
try{
var p = Process.Start(psi);
p.WaitForExit((int)time_out.TotalMilliseconds);
var errorlevel = p.ExitCode;
string stdout = p.StandardOutput.ReadToEnd();
string stderr = p.StandardError.ReadToEnd();
if (p.HasExited) {
return 0;
}
@@ -0,0 +1,64 @@
using bts;
using bts.api.admin;
using System;
using System.Collections.Generic;
using System.Linq;
namespace bts.api.core
{
public class AdminModelWrapper
{
readonly AdminDataImmutable? _admin_data;
public AdminDataImmutable? admin_data => _admin_data;
readonly string _user_name;
readonly List<BTSAccountImmutable> _allowed_accounts;
readonly Dictionary<string, string> _allowed_account_dict = new Dictionary<string, string>();
public AdminModelWrapper(AdminDataImmutable? admin_data = null, string user_name = null)
{
_admin_data = admin_data;
_user_name = user_name ?? string.Empty;
_allowed_accounts = search_admin(u => u.Name == _user_name).Where(x =>
{
return (x.Item2 != null && x.Item2.HasPermissions) || (x.Item3 != null && x.Item3.HasPermissions);
}).Select(xx => xx.Item1).ToList();
foreach (var val in _allowed_accounts)
_allowed_account_dict[val.Name] = val.Name;
}
public IEnumerable<BTSAccountImmutable> viewable_accounts()
{
return _allowed_accounts;
}
public bool can_view_account(string account)
{
return _allowed_account_dict.ContainsKey(account) || _user_name.ToLower().Equals("bts");
}
IEnumerable<Tuple<BTSAccountImmutable, TradingPermissionUnit, AdminPermissionUnit>>
search_admin(Func<BTSUserImmutable, bool> predicate)
{
var rv = new List<Tuple<BTSAccountImmutable, TradingPermissionUnit, AdminPermissionUnit>>();
if (_admin_data.HasValue)
{
var users = _admin_data.Value.Users.Where(predicate);
if (users != null && users.Count() == 1)
{
var user = users.ElementAt(0);
if (user.HasUserData && user.UserData.HasAccountPermissions)
{
foreach (var kv in user.UserData.AccountPermissions.AccountPermissions)
{
var account_id = kv.Key;
var accounts = _admin_data.Value.Accounts.Where(a => a.Id == account_id);
if (accounts != null && accounts.Count() == 1)
{
var account = accounts.ElementAt(0);
rv.Add(Tuple.Create(account, kv.Value.TradingPermission, kv.Value.AdminPermission));
}
}
}
}
}
return rv;
}
}
}
@@ -0,0 +1,64 @@
using bts;
using bts.api;
using bts.api.core;
using bts.api.orderman;
using bts.api.position;
using bts.spark;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Collections.Specialized;
using System.Linq;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
namespace bts.api.core
{
public static class PermissionFilters
{
public static IObservable<Update<PositionUnitImmutable, int>>
PermissionFilter(this IObservable<Update<PositionUnitImmutable, int>> source, IObservable<AdminModelWrapper> am)
{
var pred = Observable.Create<Func<PositionUnitImmutable, bool>>(observer =>
{
return am.Subscribe(x =>
{
Func<PositionUnitImmutable, bool> filter = (z => x.can_view_account(z.Account));
observer.OnNext(filter);
});
});
return source.Filter(pred);
}
public static IObservable<Update<OrderRecordImmutable, uint>>
PermissionFilter(this IObservable<Update<OrderRecordImmutable, uint>> source, IObservable<AdminModelWrapper> am)
{
var pred = Observable.Create<Func<OrderRecordImmutable, bool>>(observer =>
{
return am.Subscribe(x =>
{
Func<OrderRecordImmutable, bool> filter = (z => x.can_view_account(z.Def.Account ?? string.Empty));
observer.OnNext(filter);
});
});
return source.Filter(pred);
}
public static IObservable<Update<FillImmutable, string>>
PermissionFilter(this IObservable<Update<FillImmutable, string>> source, IObservable<AdminModelWrapper> am)
{
var pred = Observable.Create<Func<FillImmutable, bool>>(observer =>
{
return am.Subscribe(x =>
{
Func<FillImmutable, bool> filter = (z => x.can_view_account(z.Account));
observer.OnNext(filter);
});
});
return source.Filter(pred);
}
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -66,7 +66,6 @@ namespace mbts {
}
}
}
public static void sync_with_models<T, TModel>(this IList<T> target, IEnumerable<TModel> models, Func<TModel, T> add_factory, Func<T, TModel, T> update_factory) {
var model_list = models as IList<TModel> ?? models.ToList();
if (model_list.Count == 0) {
+61
View File
@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuickFix;
using QuickFix.Fields;
namespace bts.fix
{
public class FixInit
{
static FixInit()
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
var exception = e.ExceptionObject as Exception;
Log.FIX.error($"Unhandled Exception: {e.ExceptionObject} {exception?.StackTrace}");
if (e.IsTerminating)
{
Log.system_is_crashing("Unhandled exception", e.ExceptionObject);
}
}
public static int start_acceptor(string settings_file, bool orders_allowed, string http_address = null)
{
SessionSettings settings = new SessionSettings(settings_file);
IApplication app = new FixRouter( (th, sess) =>
{
if(orders_allowed)
return new OrderSession(th, sess);
else
return new DropCopySession(th, sess);
});
IMessageStoreFactory storeFactory = new FileStoreFactory(settings);
ILogFactory logFactory = new FileLogFactory(settings);
IAcceptor acceptor = new ThreadedSocketAcceptor(app, storeFactory, settings, logFactory);
acceptor.Start();
HttpServer srv = null;
if (!string.IsNullOrEmpty(http_address))
{
if(!http_address.StartsWith("http"))
http_address = "http://127.0.0.1:5080/";
srv = new HttpServer(http_address, settings);
srv.Start();
}
Console.WriteLine("press <q> to quit");
while (Console.Read() != 'q') { }
acceptor.Stop();
if(srv != null)
srv.Stop();
return 0;
}
}
}
+233
View File
@@ -0,0 +1,233 @@
using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Concurrency;
using System.Text;
using QuickFix;
using QuickFix.Fields;
using bts.api;
using bts.api.core;
using bts.api.orderman;
using bts.api.user;
using bts.md;
using bts.api.admin;
using security_key = System.UInt32;
using QuickFix.FIX42;
using Message = QuickFix.Message;
namespace bts.fix
{
interface IFixRouter
{
IEnumerable<SecurityImmutable> get_securities();
SecurityImmutable? lookup(security_key key);
SecurityImmutable? lookup(string desc);
void send(Message mess, SessionID sess);
void send_session_reject(SessionID sess, string text, Message refmessage = null);
void send_biz_reject(SessionID sess, string text, Message refmessage, int reason_code = 0);
}
class FixRouter : QuickFix.MessageCracker, IFIXSession, IFixRouter
{
readonly ConcurrentDictionary<SessionID, QuickFix.IApplication> _sessions = new ConcurrentDictionary<SessionID, IApplication>();
readonly Func<IFixRouter, SessionID, IApplication> _factory;
readonly MarketDataClient _md = new MarketDataClient();
readonly object _lock = new object();
public FixRouter(Func<IFixRouter, SessionID, IApplication> factory)
{
_factory = factory;
}
IApplication session(SessionID sessionID)
{
IApplication app;
if (!_sessions.TryGetValue(sessionID, out app))
{
app = _factory(this, sessionID);
_sessions[sessionID] = app;
}
return app;
}
public void send(Message mess, SessionID sess)
{
lock (_lock)
{
try
{
Session.SendToTarget(mess, sess);
}
catch (SessionNotFound)
{
Log.assert(false, "session not found " + sess);
}
catch (Exception ex)
{
Log.FIX.error(sess.ToString() + " " + ex.Message + " " + sess);
}
}
}
public void send_session_reject(SessionID sess, string text, Message refmessage = null)
{
Reject rej = null;
if (refmessage != null && refmessage.Header.IsSetField(Tags.MsgSeqNum))
rej = new Reject(new QuickFix.Fields.RefSeqNum(refmessage.Header.GetInt(Tags.MsgSeqNum)));
else
rej = new Reject();
rej.Text = new Text(text);
send(rej, sess);
}
public void send_biz_reject(SessionID sess, string text, Message refmessage, int reason_code = 0)
{
BusinessMessageReject rej = new BusinessMessageReject();
rej.RefMsgType = new QuickFix.Fields.RefMsgType(refmessage.Header.GetString(Tags.MsgType));
rej.RefSeqNum = new QuickFix.Fields.RefSeqNum(refmessage.Header.GetInt(Tags.MsgSeqNum));
rej.BusinessRejectReason = new QuickFix.Fields.BusinessRejectReason(reason_code);
rej.Text = new Text(text);
send(rej, sess);
}
void handle_session_exception(Exception ex, SessionID sessionID, Message message = null)
{
string msg = "==ERROR in session " + sessionID.ToString() + "== ";
msg += message?.GetType().Name ?? string.Empty;
msg += ex?.ToString() ?? string.Empty;
if(!string.IsNullOrEmpty(ex.StackTrace))
msg += Environment.NewLine + ex.StackTrace;
bts.Log.FIX.error(msg);
Console.WriteLine(msg);
//now shut this fucker down
try
{
var sess = Session.LookupSession(sessionID);
if(sess != null)
sess.Disconnect(msg);
}
catch { }
}
void handle_field_not_found(FieldNotFoundException ex, SessionID sess, Message message)
{
if(ex.Field > 0)
send_biz_reject(sess, $"Field {ex.Field} was expected but not found", message, 5 );
//QF does not include the tag number....
//throw new FieldNotFoundException($"Field {ex.Field} was expected but not found", ex);
else
throw ex;
}
public void FromAdmin(Message message, SessionID sessionID)
{
try
{
session(sessionID).FromAdmin(message, sessionID);
}
catch (FieldNotFoundException ex) { handle_field_not_found(ex, sessionID, message); }
catch (UnsupportedMessageType) { throw; }
catch (IncorrectTagValue) { throw; }
catch (Exception ex) { handle_session_exception(ex, sessionID, message); }
}
public void FromApp(Message message, SessionID sessionID)
{
try
{
session(sessionID).FromApp(message, sessionID);
}
catch (FieldNotFoundException ex) { handle_field_not_found(ex, sessionID, message); }
catch (UnsupportedMessageType) { throw; }
catch (IncorrectTagValue) { throw; }
catch (Exception ex) { handle_session_exception(ex, sessionID, message); }
}
public void OnCreate(SessionID sessionID)
{
try
{
session(sessionID).OnCreate(sessionID);
}
catch (Exception ex)
{
handle_session_exception(ex, sessionID);
}
}
public void OnLogon(SessionID sessionID)
{
try
{
session(sessionID).OnLogon(sessionID);
}
catch (Exception ex)
{
handle_session_exception(ex, sessionID);
}
}
public void OnLogout(SessionID sessionID)
{
try
{
//TODO stackoverflow?
session(sessionID).OnLogout(sessionID);
}
catch (Exception ex)
{
handle_session_exception(ex, sessionID);
}
}
public void ToAdmin(Message message, SessionID sessionID)
{
try
{
session(sessionID).ToAdmin(message, sessionID);
}
catch (FieldNotFoundException ex) { handle_field_not_found(ex, sessionID, message); }
catch (UnsupportedMessageType) { throw; }
catch (IncorrectTagValue) { throw; }
catch (Exception ex) { handle_session_exception(ex, sessionID, message); }
}
public void ToApp(Message message, SessionID sessionID)
{
try
{
session(sessionID).ToApp(message, sessionID);
}
catch (FieldNotFoundException ex) { handle_field_not_found(ex, sessionID, message); }
catch (UnsupportedMessageType) { throw; }
catch (IncorrectTagValue) { throw; }
catch (Exception ex) { handle_session_exception(ex, sessionID, message); }
}
IEnumerable<SecurityImmutable> IFixRouter.get_securities()
{
return _md.securities;
}
SecurityImmutable? IFixRouter.lookup(uint key)
{
return _md.lookup(key);
}
SecurityImmutable? IFixRouter.lookup(string desc)
{
if (_md.lookup_security_key_from_desc(desc, out uint key))
return _md.lookup(key);
else
return null;
}
}
}
+585
View File
@@ -0,0 +1,585 @@
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using System.Web;
using QuickFix;
namespace bts.fix
{
public class HttpServer : IDisposable
{
private readonly HttpListener _httpListener;
private Thread _connectionThread;
private Boolean _running, _disposed;
private readonly SessionSettings _sessionSettings;
private StringBuilder _sbHtmlHeader;
public HttpServer(string prefix, SessionSettings settings)
{
if (!HttpListener.IsSupported)
{
// Requires at least a Windows XP with Service Pack 2
throw new NotSupportedException(
"The Http Server cannot run on this operating system.");
}
_httpListener = new HttpListener();
_httpListener.Prefixes.Add(prefix);
_sessionSettings = settings;
}
public void Start()
{
if (!_httpListener.IsListening)
{
_httpListener.Start();
_running = true;
// Use a thread to listen to the Http requests
_connectionThread = new Thread(ConnectionThreadStart);
_connectionThread.Start();
}
}
public void Stop()
{
if (_httpListener.IsListening)
{
_running = false;
_httpListener.Stop();
}
}
private void ConnectionThreadStart()
{
try
{
while (_running)
{
// Grab the context and pass it to the processor methods to handle it
HttpListenerContext context = _httpListener.GetContext();
HttpListenerRequest request = context.Request;
HttpListenerResponse response = context.Response;
string responseString;
_sbHtmlHeader = new StringBuilder(@"<HEAD><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>");
_sbHtmlHeader.AppendFormat(@"<CENTER>[<A HREF='/'>HOME</A>]&nbsp;[<A HREF='{0}'>RELOAD</A>]</CENTER><HR/></HEADER><BODY>", request.Url.OriginalString);
switch (request.Url.AbsolutePath)
{
case "/":
responseString = ProcessRoot(request);
break;
case "/session":
responseString = SessionDetails(request);
break;
case "/resetSession":
responseString = ResetSession(request);
break;
case "/resetSessions":
responseString = ResetSessions(request);
break;
// case "/refreshSession":
// responseString = RefreshSession(request);
// break;
// case "/refreshSessions":
// responseString = RefreshSessions(request);
// break;
case "/enableSessions":
responseString = EnableSessions(request);
break;
case "/disableSessions":
responseString = DisableSessions(request);
break;
default:
responseString = ProcessRoot(request);
break;
}
byte[] buffer = Encoding.UTF8.GetBytes(responseString);
response.ContentLength64 = buffer.Length;
Stream output = response.OutputStream;
output.Write(buffer, 0, buffer.Length);
output.Close();
}
}
catch (HttpListenerException)
{
Console.WriteLine("HTTP server was shut down.");
}
}
private string DisableSessions(HttpListenerRequest request)
{
bool confirm = false;
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
foreach (SessionID session in _sessionSettings.GetSessions())
{
Session sessionDetails = Session.LookupSession(session);
sessionDetails.Logout();
}
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL={0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", "/");
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='{0}'>Sessions</A> have been disabled</h2></CENTER>", "/");
}
else
{
sbHtmlPageBody.Append("<CENTER><h2>Are you sure you want to disable all sessions ?</h2></CENTER>");
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}?confirm=1'>YES, disable sessions</A>]&nbsp;[<A HREF='/'>NO, do not disable sessions</A>]</CENTER>", request.Url.OriginalString);
}
return sbHtmlPageBody.ToString();
}
private string EnableSessions(HttpListenerRequest request)
{
bool confirm = false;
string urlOriginalString = request.Url.OriginalString;
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
foreach (SessionID session in _sessionSettings.GetSessions())
{
Session sessionDetails = Session.LookupSession(session);
sessionDetails.Logon();
}
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL={0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", "/");
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='{0}'>Sessions</A> have been enabled</h2></CENTER>", "/");
}
else
{
sbHtmlPageBody.Append("<CENTER><h2>Are you sure you want to enable all sessions ?</h2></CENTER>");
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}?confirm=1'>YES, enable sessions</A>]&nbsp;[<A HREF='/'>NO, do not enable sessions</A>]</CENTER>", urlOriginalString);
}
return sbHtmlPageBody.ToString();
}
private string RefreshSession(HttpListenerRequest request)
{
SessionID sessionId = new SessionID(request.QueryString["beginstring"], request.QueryString["sendercompid"], request.QueryString["targetcompid"]);
Session sessionDetails = Session.LookupSession(sessionId);
if (sessionDetails == null) throw new Exception("Session not found");
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
bool confirm = false;
string urlOriginalString = request.Url.OriginalString;
string url = "/session?" + GetParameterList(urlOriginalString);
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
sessionDetails.Refresh();
url = RemoveQueryStringByKey(urlOriginalString, "confirm");
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL=/session?{0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", GetParameterList(urlOriginalString));
sbHtmlPageBody.AppendFormat(@"<CENTER>[<A HREF='/'>HOME</A>]&nbsp;[<A HREF='{0}'>RELOAD</A>]</CENTER><HR/></HEAD><BODY>", urlOriginalString);
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='/session?{0}'>{1}</A> has been refreshed</h2></CENTER>", GetParameterList(url), sessionId);
}
else
{
sbHtmlPageBody.AppendFormat("<CENTER><h2>Are you sure you want to refresh session <A HREF='{0}'>{1}</A>?</h2></CENTER>", url, sessionId);
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}&confirm=1'>YES, refresh session</A>]&nbsp;[<A HREF='{0}'>NO, do not refresh session</A>]</CENTER>", url);
}
return sbHtmlPageBody.ToString();
}
private string RefreshSessions(HttpListenerRequest request)
{
bool confirm = false;
string urlOriginalString = request.Url.OriginalString;
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
foreach (SessionID session in _sessionSettings.GetSessions())
{
Session sessionDetails = Session.LookupSession(session);
sessionDetails.Refresh();
}
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL={0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", "/");
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='{0}'>Sessions</A> have been refreshed</h2></CENTER>", "/");
}
else
{
sbHtmlPageBody.Append("<CENTER><h2>Are you sure you want to refresh all sessions ?</h2></CENTER>");
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}?confirm=1'>YES, refresh sessions</A>]&nbsp;[<A HREF='/'>NO, do not refresh sessions</A>]</CENTER>", urlOriginalString);
}
return sbHtmlPageBody.ToString();
}
private string ResetSessions(HttpListenerRequest request)
{
bool confirm = false;
string urlOriginalString = request.Url.OriginalString;
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
foreach (SessionID session in _sessionSettings.GetSessions())
{
Session sessionDetails = Session.LookupSession(session);
sessionDetails.Reset("Reset from WebInterface");
}
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL={0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", "/");
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='{0}'>Sessions</A> have been reset</h2></CENTER>", "/");
}
else
{
sbHtmlPageBody.Append("<CENTER><h2>Are you sure you want to reset all sessions ?</h2></CENTER>");
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}?confirm=1'>YES, reset sessions</A>]&nbsp;[<A HREF='/'>NO, do not reset sessions</A>]</CENTER>", urlOriginalString);
}
return sbHtmlPageBody.ToString();
}
private string ResetSession(HttpListenerRequest request)
{
SessionID sessionId = new SessionID(request.QueryString["beginstring"], request.QueryString["sendercompid"], request.QueryString["targetcompid"]);
Session sessionDetails = Session.LookupSession(sessionId);
if (sessionDetails == null) throw new Exception("Session not found");
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
bool confirm = false;
string urlOriginalString = request.Url.OriginalString;
string url = "/session?" + GetParameterList(urlOriginalString);
if (request.QueryString["confirm"] != null)
{
if (Convert.ToInt16(request.QueryString["confirm"]) != 0)
{
confirm = true;
sessionDetails.Reset("Reset from WebInterface");
url = RemoveQueryStringByKey(urlOriginalString, "confirm");
}
}
if (confirm)
{
sbHtmlPageBody = new StringBuilder();
sbHtmlPageBody.AppendFormat(@"<HEAD><META http-equiv='refresh' content=2;URL=/session?{0} /><CENTER><TITLE>QuickFIX Engine Web Interface</TITLE><H1>QuickFIX Engine Web Interface</H1></CENTER>", GetParameterList(urlOriginalString));
sbHtmlPageBody.AppendFormat(@"<CENTER>[<A HREF='/'>HOME</A>]&nbsp;[<A HREF='{0}'>RELOAD</A>]</CENTER><HR/></HEAD><BODY>", urlOriginalString);
sbHtmlPageBody.AppendFormat("<CENTER><h2><A HREF='/session?{0}'>{1}</A> has been reset</h2></CENTER>", GetParameterList(url), sessionId);
}
else
{
sbHtmlPageBody.AppendFormat("<CENTER><h2>Are you sure you want to reset session <A HREF='{0}'>{1}</A>?</h2></CENTER>", url, sessionId);
sbHtmlPageBody.AppendFormat("<CENTER>[<A HREF='{0}&confirm=1'>YES, reset session</A>]&nbsp;[<A HREF='{0}'>NO, do not reset session</A>]</CENTER>", url);
}
return sbHtmlPageBody.ToString();
}
private string ProcessRoot(HttpListenerRequest request)
{
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
//Session count
sbHtmlPageBody.AppendFormat("<CENTER><b><i>{0} Sessions managed by QuickFIX</b></i></CENTER><HR/>", _sessionSettings.GetSessions().Count);
//session management links
sbHtmlPageBody.AppendFormat(@"<CENTER><A HREF='/resetSessions{0}'>RESET</A>&nbsp;<A HREF='/refreshSessions'>REFRESH</A>&nbsp;<A HREF='/enableSessions'>ENABLE</A>&nbsp;<A HREF='/disableSessions'>DISABLE</A></CENTER><HR/></HEADER><BODY>", GetParameterList(request.Url.OriginalString));
//Start the table generation
sbHtmlPageBody.Append("<table id=\"sessionlist\" style=\"border-width:1; padding:2; width:100%\">");
sbHtmlPageBody.Append("<tr>");
sbHtmlPageBody.Append(AddCell("Session", true));
sbHtmlPageBody.Append(AddCell("Type", true));
sbHtmlPageBody.Append(AddCell("Enabled", true));
sbHtmlPageBody.Append(AddCell("Session Time", true));
sbHtmlPageBody.Append(AddCell("Logged On", true));
sbHtmlPageBody.Append(AddCell("Next Incoming", true));
sbHtmlPageBody.Append(AddCell("Next Outgoing", true));
sbHtmlPageBody.Append("</tr>");
foreach (SessionID session in _sessionSettings.GetSessions())
{
Session sessionDetails = Session.LookupSession(session);
sbHtmlPageBody.Append("<tr>");
sbHtmlPageBody.Append(AddCell(String.Format(
"<a href=\"session?BeginString={0}&SenderCompID={1}&TargetCompID={2}\">{0}:{1}->{2}</a>",
session.BeginString, session.SenderCompID, session.TargetCompID)));
sbHtmlPageBody.Append(AddCell(sessionDetails.IsInitiator ? "initiator" : "acceptor"));
sbHtmlPageBody.Append(AddCell(sessionDetails.IsEnabled ? "yes" : "no"));
sbHtmlPageBody.Append(AddCell(sessionDetails.IsSessionTime ? "yes" : "no"));
sbHtmlPageBody.Append(AddCell(sessionDetails.IsLoggedOn ? "yes" : "no"));
sbHtmlPageBody.Append(AddCell(sessionDetails.NextTargetMsgSeqNum.ToString()));
sbHtmlPageBody.Append(AddCell(sessionDetails.NextSenderMsgSeqNum.ToString()));
sbHtmlPageBody.Append("</tr>");
}
sbHtmlPageBody.Append("</table>");
return sbHtmlPageBody.ToString();
}
public string SessionDetails(HttpListenerRequest request)
{
SessionID sessionId = new SessionID(request.QueryString["beginstring"], request.QueryString["sendercompid"], request.QueryString["targetcompid"]);
Session sessionDetails = Session.LookupSession(sessionId);
if (sessionDetails == null) throw new Exception("Session not found");
StringBuilder sbHtmlPageBody = _sbHtmlHeader;
string url = request.Url.OriginalString;
string urlOriginalString = request.Url.OriginalString;
if (request.QueryString["enabled"] != null)
{
if (!Convert.ToBoolean(request.QueryString["enabled"]))
sessionDetails.Logout();
else
sessionDetails.Logon();
url = RemoveQueryStringByKey(urlOriginalString, "Enabled");
}
if (request.QueryString["next incoming"] != null)
{
int value = Convert.ToInt16(request.QueryString["next incoming"]);
sessionDetails.NextTargetMsgSeqNum = value <= 0 ? 1 : value;
url = RemoveQueryStringByKey(urlOriginalString, "next incoming");
}
if (request.QueryString["Next Outgoing"] != null)
{
int value = Convert.ToInt16(request.QueryString["Next Outgoing"]);
sessionDetails.NextSenderMsgSeqNum = value <= 0 ? 1 : value;
url = RemoveQueryStringByKey(urlOriginalString, "Next Outgoing");
}
if (request.QueryString["SendRedundantResendRequests"] != null)
{
sessionDetails.SendRedundantResendRequests = Convert.ToBoolean(request.QueryString["SendRedundantResendRequests"]);
url = RemoveQueryStringByKey(urlOriginalString, "SendRedundantResendRequests");
}
if (request.QueryString["CheckCompId"] != null)
{
sessionDetails.CheckCompID = Convert.ToBoolean(request.QueryString["CheckCompId"]);
url = RemoveQueryStringByKey(urlOriginalString, "CheckCompId");
}
if (request.QueryString["CheckLatency"] != null)
{
sessionDetails.CheckLatency = Convert.ToBoolean(request.QueryString["CheckLatency"]);
url = RemoveQueryStringByKey(urlOriginalString, "CheckLatency");
}
if (request.QueryString["MaxLatency"] != null)
{
int value = Convert.ToInt16(request.QueryString["MaxLatency"]);
sessionDetails.MaxLatency = value <= 0 ? 1 : value;
url = RemoveQueryStringByKey(urlOriginalString, "MaxLatency");
}
if (request.QueryString["LogonTimeout"] != null)
{
int value = Convert.ToInt16(request.QueryString["LogonTimeout"]);
sessionDetails.LogonTimeout = value <= 0 ? 1 : value;
url = RemoveQueryStringByKey(urlOriginalString, "LogonTimeout");
}
if (request.QueryString["LogoutTimeout"] != null)
{
int value = Convert.ToInt16(request.QueryString["LogoutTimeout"]);
sessionDetails.LogoutTimeout = value <= 0 ? 1 : value;
url = RemoveQueryStringByKey(urlOriginalString, "LogoutTimeout");
}
if (request.QueryString["ResetOnLogon"] != null)
{
sessionDetails.ResetOnLogon = Convert.ToBoolean(request.QueryString["ResetOnLogon"]);
url = RemoveQueryStringByKey(urlOriginalString, "ResetOnLogon");
}
if (request.QueryString["ResetOnLogout"] != null)
{
sessionDetails.ResetOnLogout = Convert.ToBoolean(request.QueryString["ResetOnLogout"]);
url = RemoveQueryStringByKey(urlOriginalString, "ResetOnLogout");
}
if (request.QueryString["ResetOnDisconnect"] != null)
{
sessionDetails.ResetOnDisconnect = Convert.ToBoolean(request.QueryString["ResetOnDisconnect"]);
url = RemoveQueryStringByKey(urlOriginalString, "ResetOnDisconnect");
}
if (request.QueryString["RefreshOnLogon"] != null)
{
sessionDetails.RefreshOnLogon = Convert.ToBoolean(request.QueryString["RefreshOnLogon"]);
url = RemoveQueryStringByKey(urlOriginalString, "RefreshOnLogon");
}
if (request.QueryString["MillisecondsInTimestamp"] != null)
{
sessionDetails.MillisecondsInTimeStamp = Convert.ToBoolean(request.QueryString["MillisecondsInTimestamp"]);
url = RemoveQueryStringByKey(urlOriginalString, "MillisecondsInTimestamp");
}
if (request.QueryString["PersistMessages"] != null)
{
sessionDetails.PersistMessages = Convert.ToBoolean(request.QueryString["PersistMessages"]);
url = RemoveQueryStringByKey(urlOriginalString, "PersistMessages");
}
sbHtmlPageBody.AppendFormat(@"<CENTER>{0}</CENTER><HR/>", sessionId);
sbHtmlPageBody.AppendFormat(@"<CENTER>[<A HREF='/resetSession?{0}'>RESET</A>]&nbsp;[<A HREF='/refreshSession?{0}'>REFRESH</A>]</CENTER><HR/></HEADER><BODY>", GetParameterList(urlOriginalString));
sbHtmlPageBody.Append("<table id=\"session_details\" style=\"border-width:1; padding:2; width:100%\">");
sbHtmlPageBody.Append(AddRow("Enabled", sessionDetails.IsEnabled, url));
sbHtmlPageBody.Append(AddRow("ConnectionType", sessionDetails.IsInitiator ? "initiator" : "acceptor"));
sbHtmlPageBody.Append(AddRow("SessionTime", sessionDetails.IsSessionTime));
sbHtmlPageBody.Append(AddRow("LoggedOn", sessionDetails.IsLoggedOn));
sbHtmlPageBody.Append(AddRow("Next Incoming", sessionDetails.NextTargetMsgSeqNum, url));
sbHtmlPageBody.Append(AddRow("Next Outgoing", sessionDetails.NextSenderMsgSeqNum, url));
sbHtmlPageBody.Append(AddRow("SendRedundantResendRequests", sessionDetails.SendRedundantResendRequests, url));
sbHtmlPageBody.Append(AddRow("CheckCompId", sessionDetails.CheckCompID, url));
sbHtmlPageBody.Append(AddRow("CheckLatency", sessionDetails.CheckLatency, url));
sbHtmlPageBody.Append(AddRow("MaxLatency", sessionDetails.MaxLatency, url));
sbHtmlPageBody.Append(AddRow("LogonTimeout", sessionDetails.LogonTimeout, url));
sbHtmlPageBody.Append(AddRow("LogoutTimeout", sessionDetails.LogoutTimeout, url));
sbHtmlPageBody.Append(AddRow("ResetOnLogon", sessionDetails.ResetOnLogon, url));
sbHtmlPageBody.Append(AddRow("ResetOnLogout", sessionDetails.ResetOnLogout, url));
sbHtmlPageBody.Append(AddRow("ResetOnDisconnect", sessionDetails.ResetOnDisconnect, url));
sbHtmlPageBody.Append(AddRow("RefreshOnLogon", sessionDetails.RefreshOnLogon, url));
sbHtmlPageBody.Append(AddRow("MillisecondsInTimestamp", sessionDetails.MillisecondsInTimeStamp, url));
sbHtmlPageBody.Append(AddRow("PersistMessages", sessionDetails.PersistMessages, url));
sbHtmlPageBody.Append("</table>");
return sbHtmlPageBody.ToString();
}
public static string RemoveQueryStringByKey(string url, string key)
{
var uri = new Uri(url);
// this gets all the query string key value pairs as a collection
var newQueryString = HttpUtility.ParseQueryString(uri.Query);
// this removes the key if exists
newQueryString.Remove(key);
// this gets the page path from root without QueryString
string pagePathWithoutQueryString = uri.GetLeftPart(UriPartial.Path);
return newQueryString.Count > 0
? $"{pagePathWithoutQueryString}?{newQueryString}"
: pagePathWithoutQueryString;
}
public static string GetParameterList(string url)
{
return HttpUtility.ParseQueryString((new Uri(url).Query)).ToString();
}
private static string AddRow(string colName, bool value, string url = "")
{
string valueAsStr = value ? "yes" : "no";
string innerHtml = url.Length > 0
? $"<a href=\" {url}&{colName}={!value} \">toggle</a>"
: "";
return AddRow(colName, valueAsStr, innerHtml);
}
private static string AddRow(string colName, int value, string url = "")
{
string innerHtml = $"<a href=\" {url}&{colName}={value - 10} \"> << </a>" +
$"<a href=\" {url}&{colName}={value - 1} \"> < </a>" +
" | " +
$"<a href=\" {url}&{colName}={value + 1} \"> > </a>" +
$"<a href=\" {url}&{colName}={value + 10} \"> >> </a>";
return AddRow(colName, value.ToString(), innerHtml);
}
private static string AddRow(string colName, string value, string innerHtml = "")
{
StringBuilder row = new StringBuilder();
row.Append("<tr>");
row.Append(AddCell(colName));
row.Append(AddCell(value));
row.Append(AddCell(innerHtml));
row.Append("</tr>");
return row.ToString();
}
private static string AddCell(string cellContent, bool header = false)
{
string entryType = header ? "th" : "td";
return "<" + entryType + " align=\"left\">" + cellContent + "</" + entryType + ">";
}
public virtual void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
{
if (_running)
{
Stop();
}
if (_connectionThread != null)
{
_connectionThread.Abort();
_connectionThread = null;
}
}
_disposed = true;
}
}
}
@@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
+298
View File
@@ -0,0 +1,298 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Google.Protobuf;
using Google.Protobuf.Reflection;
using System.Linq;
using Google.Protobuf.WellKnownTypes;
using bts.api;
namespace bts.fix
{
public static class ProtoFix
{
static readonly QuickFix.IMessageFactory _factory = new QuickFix.DefaultMessageFactory();
public static T parse_fix<T>(string fixstring) where T : IMessage, new()
{
return (T) parse_fix(new T().Descriptor, fixstring);
}
public static IMessage parse_fix(MessageDescriptor desc, string fixstring)
{
QuickFix.Message fix = new QuickFix.Message(fixstring, false);
var msg = create_message(desc, fix);
return msg;
}
static string get_between(string source, string start, string end)
{
int spos = source.IndexOf(start, 0);
if(spos < 0)
return string.Empty;
spos += start.Length;
int epos = source.IndexOf(end, spos);
if(epos < 0)
return string.Empty;
return source.Substring(spos, epos - spos);
}
public static Timestamp peek_timestamp(string fixstring, int field = 60)
{
string ts = get_between(fixstring, field.ToString() + "=", "\u0001");
if(!string.IsNullOrEmpty(ts))
{
var stamp = TimestampExtensions.parse_timestamp(ts);
return stamp;
}
return null;
}
public static string peek_field(string fixstring, int field)
{
string ts = get_between(fixstring, field.ToString() + "=", "\u0001");
return ts;
}
public static string peek_symbol(string fixstring)
{
return peek_field(fixstring, 55);
}
public static IMessage create_message(MessageDescriptor desc, QuickFix.FieldMap fix)
{
object obj = Activator.CreateInstance(desc.ClrType);
IMessage msg = (IMessage)obj;
return fix_to_imsg(msg, fix);
}
public static IMessage fix_to_imsg(IMessage msg, QuickFix.FieldMap fix)
{
foreach (var fd in msg.Descriptor.Fields.InDeclarationOrder())
{
try
{
set_field(msg, fd, fix);
}
catch(QuickFix.FieldNotFoundException) {}
}
return msg;
}
public static int get_tag(IMessage msg, FieldDescriptor fd, out bool is_header)
{
is_header = false;
int fieldnum = 0;
if(fd.CustomOptions?.TryGetInt32((int)ApioptionsReflection.FieldOptions.fix_tag, out fieldnum) ?? false)
{
fd.CustomOptions.TryGetBool((int)ApioptionsReflection.FieldOptions.fix_tag_is_header, out is_header);
return fieldnum;
}
else
{
int tagbase = 0;
if(msg.Descriptor.CustomOptions?.TryGetInt32((int)ApioptionsReflection.MessageOptions.fix_algostrategy_tagbase, out tagbase) ?? false)
{
bool skip = false;
fd.CustomOptions?.TryGetBool((int)ApioptionsReflection.FieldOptions.skip_fix_tag, out skip);
if(!skip)
return fd.FieldNumber + tagbase;
}
}
throw new QuickFix.FieldNotFoundException(fd.FieldNumber);
}
static void set_field(IMessage msg, FieldDescriptor fd, QuickFix.FieldMap fix)
{
switch (fd.FieldType)
{
case FieldType.Bool:
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetBoolean(tag) : fix.GetBoolean(tag);
fd.Accessor.SetValue(msg, data);
}
break;
case FieldType.Float:
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetDecimal(tag) : fix.GetDecimal(tag);
object conv = Convert.ChangeType(data, fd.Accessor.GetValue(msg).GetType());
fd.Accessor.SetValue(msg, conv);
}
break;
case FieldType.Double:
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetDecimal(tag) : fix.GetDecimal(tag);
double d = decimal.ToDouble(data);
fd.Accessor.SetValue(msg, d);
}
break;
case FieldType.Int32:
case FieldType.SInt32:
case FieldType.UInt32:
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetInt(tag) : fix.GetInt(tag);
object conv = Convert.ChangeType(data, fd.Accessor.GetValue(msg).GetType());
fd.Accessor.SetValue(msg, conv);
}
break;
case FieldType.Int64:
case FieldType.SInt64:
case FieldType.UInt64:
{
int tag = get_tag(msg, fd, out bool is_header);
try
{
var data = is_header ? ((QuickFix.Message)fix).Header.GetDecimal(tag) : fix.GetDecimal(tag);
object conv = Convert.ChangeType(data, fd.Accessor.GetValue(msg).GetType());
fd.Accessor.SetValue(msg, conv);
}
catch(Exception ex) when (ex is QuickFix.FieldConvertError || ex is FormatException)
{
try
{
var snot = fix.GetString(tag); //scientific notation apparently appears in the files
var data = Double.Parse(snot, System.Globalization.NumberStyles.Float);
object conv = Convert.ChangeType(data, fd.Accessor.GetValue(msg).GetType());
fd.Accessor.SetValue(msg, conv);
}
catch {}
}
}
break;
case FieldType.Enum:
{
EnumValueDescriptor val = find_enum_by_attribute(msg, fd, fix);
if(val == null)
{
int tag = get_tag(msg, fd, out bool is_header);
char data = is_header ? ((QuickFix.Message)fix).Header.GetChar(tag) : fix.GetChar(tag);
val = fd.EnumType.FindValueByNumber((int)data);
val = val ?? fd.EnumType.FindValueByNumber(0);
}
fd.Accessor.SetValue(msg, val.Number);
}
break;
case FieldType.String:
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetString(tag) : fix.GetString(tag);
fd.Accessor.SetValue(msg, data);
}
break;
case FieldType.Message:
{
handle_message(msg, fd, fix);
}
break;
default:
throw new NotSupportedException("unsupported field type " + fd.FieldType.ToString());
}
}
private static EnumValueDescriptor find_enum_by_attribute(IMessage msg, FieldDescriptor fd, QuickFix.FieldMap fix)
{
int tag = get_tag(msg, fd, out bool is_header);
var fval = is_header ? ((QuickFix.Message)fix).Header.GetString(tag) : fix.GetString(tag);
foreach(var val in fd.EnumType.Values)
{
string eval = null;
if(val.CustomOptions?.TryGetString((int)ApioptionsReflection.EnumValueOptions.fix_value, out eval) ?? false)
{
if(eval != null && eval == fval)
return val;
}
}
return null;
}
static void handle_timestamp(IMessage msg, FieldDescriptor fd, QuickFix.FieldMap fix)
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetString(tag) : fix.GetString(tag);
Timestamp ts = TimestampExtensions.parse_timestamp(data);
fd.Accessor.SetValue(msg, ts);
}
static void handle_quantitymeasure(IMessage msg, FieldDescriptor fd, QuickFix.FieldMap fix)
{
int tag = get_tag(msg, fd, out bool is_header);
var data = is_header ? ((QuickFix.Message)fix).Header.GetInt(tag) : fix.GetInt(tag);
var qm = new bts.spark.QuantityMeasure { Absolute = (uint) Math.Abs(data) };
fd.Accessor.SetValue(msg, qm);
}
static void handle_message(IMessage msg, FieldDescriptor fd, QuickFix.FieldMap fix)
{
if (fd.MessageType.ClrType == typeof(Google.Protobuf.WellKnownTypes.Timestamp))
{
handle_timestamp(msg, fd, fix);
}
else if(fd.MessageType.ClrType == typeof(bts.spark.QuantityMeasure))
{
handle_quantitymeasure(msg, fd, fix);
}
else if(fd.MessageType.ClrType == typeof(bts.api.orderman.CustomOrderDefinition))
{
return;
}
else
{
if (!fd.IsRepeated)
{
var submsg = create_message(fd.MessageType, fix);
fd.Accessor.SetValue(msg, submsg);
}
else //for repeating groups we assume that the fd.FieldNumber corresponds to the "no" (number) tag in the fix
{
int tag = get_tag(msg, fd, out bool is_header);
int group = tag;//fd.FieldNumber;
int nvals = fix.GetInt(group);
IList list = (IList)fd.Accessor.GetValue(msg);
if (nvals == 1)
{
var submsg = create_message(fd.MessageType, fix);
list.Add(submsg);
}
else
{
var delimproto = fd.MessageType.Fields.InDeclarationOrder()[0];
var delim = delimproto.FieldNumber;
List<QuickFix.Fields.IField> repeated = new List<QuickFix.Fields.IField>();
var forder = fix.RepeatedTags.Select(x => x.Tag).Distinct();
var dict = fix.ToDictionary();
foreach(int fo in forder)
{
if(dict.TryGetValue(fo, out QuickFix.Fields.IField field))
repeated.Add(field);
}
repeated.AddRange(fix.RepeatedTags);
QuickFix.FieldMap fm = null;
foreach (var rep in repeated)
{
if (rep.Tag == delim)
{
if (fm != null)
{
var submsg = create_message(fd.MessageType, fm);
list.Add(submsg);
}
fm = new QuickFix.FieldMap();
}
if (fm != null)
fm.SetField(rep);
} //the last one
if (fm != null && fm.Count() > 0)
{
var submsg = create_message(fd.MessageType, fm);
list.Add(submsg);
}
}
}
}
}
}
}
+2
View File
@@ -0,0 +1,2 @@
# BTS Spark FIX Adapter
+508
View File
@@ -0,0 +1,508 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using bts.api.orderman;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Linq;
using Google.Protobuf;
using Google.Protobuf.Reflection;
using System.Globalization;
namespace bts.fix
{
public class ATDL
{
readonly SortedList<string, FIXAlgoDefinition> _atdl = new SortedList<string, FIXAlgoDefinition>();
public IReadOnlyDictionary<string, FIXAlgoDefinition> algo_definitions => _atdl;
public const string default_algo_import_path = "./spark_algos.json";
public const string default_atdl_export_file_name = "spark_algos.xml";
const string core_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Core";
const string layout_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Layout";
const string val_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Validation";
const string flow_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Flow";
const string tz_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Timezones";
const string region_ns = "http://www.fixprotocol.org/FIXatdl-1-1/Regions";
readonly static Dictionary<Type, int> _algo_types = new Dictionary<Type, int>();
static ATDL()
{
foreach (var fd in CustomOrderDefinition.Descriptor.Fields.InDeclarationOrder())
{
if (fd.FieldType == FieldType.Message)
_algo_types[fd.MessageType.ClrType] = 0;
}
}
public ATDL(string path = default_algo_import_path)
{
path = path ?? default_algo_import_path;
using(var fs = new StreamReader(path))
{
var algos = JsonParser.Default.Parse<FIXAlgoDefinitions>(fs);
foreach(var algo in algos.AlgoStrategy)
{
_atdl[algo.Name] = algo;
}
}
}
static bool is_directory(string path)
{
FileAttributes attr = File.GetAttributes(path);
return attr.HasFlag(FileAttributes.Directory);
}
public static void validate_fix_atdl(string validate_atdl_path)
{
if(is_directory(validate_atdl_path))
{
string[] files = Directory.GetFiles(validate_atdl_path, "*.xml", SearchOption.AllDirectories);
foreach(var f in files)
valididate_single_atdl_file(f);
}
else
valididate_single_atdl_file(validate_atdl_path);
}
static void valididate_single_atdl_file(string path)
{
Log.assert(!is_directory(path));
var reader = new Atdl4net.Xml.StrategiesReader();
var strats = reader.Load(path);
foreach (var strat in strats)
{
Console.WriteLine("Strategy " + strat.Name);
Dictionary<int, string> tagname = new Dictionary<int, string>();
Dictionary<string, int> nametag = new Dictionary<string, int>();
foreach(var par in strat.Parameters)
{
tagname.Add((int)par.FixTag.Value, par.Name);
nametag.Add(par.Name, (int)par.FixTag.Value);
Console.WriteLine(" Parameter " + par.Name);
}
}
XmlSchemaSet schema = new XmlSchemaSet();
const string xsdpath = "./atdl/schema/";
schema.Add(core_ns, xsdpath + "fixatdl-core-1-1.xsd");
schema.Add(flow_ns, xsdpath + "fixatdl-flow-1-1.xsd");
schema.Add(layout_ns, xsdpath + "fixatdl-layout-1-1.xsd");
schema.Add(region_ns, xsdpath + "fixatdl-regions-1-1.xsd");
schema.Add(tz_ns, xsdpath + "fixatdl-timezones-1-1.xsd");
schema.Add(val_ns, xsdpath + "fixatdl-validation-1-1.xsd");
XmlReader rd = XmlReader.Create(path);
XDocument doc = XDocument.Load(rd, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo);
doc.Validate(schema, (object _, ValidationEventArgs e) =>
{
XmlSeverityType type = XmlSeverityType.Warning;
if (Enum.TryParse<XmlSeverityType>("Error", out type))
{
if (type == XmlSeverityType.Error) throw new Exception(e.Exception.ToString() +
"\n line number: " + e.Exception.LineNumber.ToString());
}
});
Console.WriteLine("File " + path + " looks valid ");
}
public void write_fix_atdl(string path, bool single_file)
{
if(single_file && is_directory(path))
{
Directory.CreateDirectory(path);
path = path + "/" + default_atdl_export_file_name;
}
if(single_file)
write_single_fix_atdl(path, _atdl.Values);
else
{
Log.assert(is_directory(path));
Directory.CreateDirectory(path);
foreach(var algo in _atdl.Values)
{
var fname = path + $"/Spark_{algo.Name}.xml";
write_single_fix_atdl(fname, new[]{algo});
}
}
}
static void write_single_fix_atdl(string path, IEnumerable<FIXAlgoDefinition> algos)
{
var s = new XmlWriterSettings();
s.Encoding = System.Text.Encoding.UTF8;
s.OmitXmlDeclaration = false;
s.Indent = true;
s.IndentChars = " ";
using(XmlWriter w = XmlWriter.Create(path, s))
{
w.WriteStartDocument();
w.WriteStartElement("Strategies", core_ns);
w.WriteAttributeString("xmlns", "", null, core_ns);
w.WriteAttributeString("xmlns", "val", null, val_ns);
w.WriteAttributeString("xmlns", "lay", null, layout_ns);
w.WriteAttributeString("xmlns", "flow", null, flow_ns);
w.WriteAttributeString("xmlns", "tz", null, tz_ns);
w.WriteAttributeString("xmlns", "xsi", null, "http://www.w3.org/2001/XMLSchema-instance");
w.WriteAttributeString("xsi", "schemaLocation", null, "http://www.fixprotocol.org/FIXatdl-1-1/Core fixatdl-core-1-1.xsd");
FIXAlgoDefinition.Descriptor.FindFieldByNumber(FIXAlgoDefinition.NameFieldNumber)
.CustomOptions.TryGetInt32((int)api.ApioptionsReflection.FieldOptions.fix_tag, out int nametag);
w.WriteAttributeString("strategyIdentifierTag", nametag.ToString());
FIXAlgoDefinition.Descriptor.FindFieldByNumber(FIXAlgoDefinition.VersionFieldNumber)
.CustomOptions.TryGetInt32((int)api.ApioptionsReflection.FieldOptions.fix_tag, out int vertag);
w.WriteAttributeString("versionIdentifierTag", vertag.ToString());
foreach(var strat in algos)
{
w.WriteStartElement("Strategy");
w.WriteAttributeString("name", strat.Name);
w.WriteAttributeString("uiRep", strat.Name);
w.WriteAttributeString("wireValue", strat.Name);
string ver = strat.Version;
if(string.IsNullOrEmpty(ver))
ver = "1";
w.WriteAttributeString("version", ver);
w.WriteAttributeString("fixMsgType", "D");
w.WriteAttributeString("providerID", "BTS");
{
w.WriteStartElement("Regions");
w.WriteStartElement("Region");
w.WriteAttributeString("name", "TheAmericas");
w.WriteAttributeString("inclusion", "Include");
w.WriteStartElement("Country");
w.WriteAttributeString("CountryCode", "US");
w.WriteAttributeString("inclusion", "Include");
w.WriteEndElement();
w.WriteEndElement();
w.WriteEndElement();
}
{
w.WriteStartElement("Markets");
w.WriteStartElement("Market");
w.WriteAttributeString("MICCode", "XCME");
w.WriteAttributeString("inclusion", "Include");
w.WriteEndElement();
w.WriteEndElement();
}
{
w.WriteStartElement("SecurityTypes");
w.WriteStartElement("SecurityType");
w.WriteAttributeString("name", "FUT");
w.WriteAttributeString("inclusion", "Include");
w.WriteEndElement();
w.WriteEndElement();
}
var imsg = extract_order_from_custom(strat.Definition);
visit_parameters(w, imsg);
visit_layout(w, imsg);
w.WriteEndElement();
}
}
}
static bool get_tag_and_name(IMessage m, FieldDescriptor fd, FieldDescriptor parent_fd,
Dictionary<int, int> tags, Dictionary<string, int> names,
out int tag, out string fieldname)
{
tag = ProtoFix.get_tag(m, fd, out bool is_header);
fieldname = fd.Name;
if (fd.FieldType == FieldType.Message && fd.MessageType.ClrType == typeof(bts.api.orderman.CustomOrderDefinition))
{
return false;
}
//TODO the concept of the collision due to using the same order type in different places in tree isn't great
if (tags.ContainsKey(tag))
return false;
tags[tag] = 0;
if (names.ContainsKey(fieldname))
{
if (parent_fd != null)
{
fieldname = parent_fd.Name + "_" + fieldname;
if (names.ContainsKey(fieldname))
return false;
}
else
return false;
}
names[fieldname] = 0;
//TODO the concept of the collision due to using the same order type in different places in tree isn't great
return true;
}
static void visit_parameters(XmlWriter w, IMessage imsg)
{
Dictionary<int, int> tags = new Dictionary<int, int>();
Dictionary<string, int> names = new Dictionary<string, int>();
message_visitor(imsg, (m, fd, parent_fd) =>
{
try
{
if(!get_tag_and_name(m, fd, parent_fd, tags, names, out int tag, out string fieldname))
return;
w.WriteStartElement("Parameter");
w.WriteAttributeString("name", fieldname);
w.WriteAttributeString("fixTag", tag.ToString());
if (fd.FieldType == FieldType.Message && fd.MessageType.ClrType == typeof(Google.Protobuf.WellKnownTypes.Timestamp))
{
w.WriteAttributeString("xsi", "type", null, "UTCTimestamp_t");
w.WriteAttributeString("localMktTz", "America/New_York");
}
else if (fd.FieldType == FieldType.Message && fd.MessageType.ClrType == typeof(bts.spark.QuantityMeasure))
{
w.WriteAttributeString("xsi", "type", null, "Int_t");
w.WriteAttributeString("minValue", "0");
}
else if (fd.FieldType == FieldType.Enum)
{
w.WriteAttributeString("xsi", "type", null, "Char_t");
foreach (var val in fd.EnumType.Values)
{
string eval = null;
if (val.CustomOptions?.TryGetString((int)bts.api.ApioptionsReflection.EnumValueOptions.fix_value, out eval) ?? false)
{
w.WriteStartElement("EnumPair");
w.WriteAttributeString("enumID", val.Name);
w.WriteAttributeString("wireValue", eval);
w.WriteEndElement();
}
}
}
else if (fd.FieldType == FieldType.Int32)
{
w.WriteAttributeString("xsi", "type", null, "Int_t");
}
else if (fd.FieldType == FieldType.Double || fd.FieldType == FieldType.Float)
{
w.WriteAttributeString("xsi", "type", null, "Float_t");
}
else if (fd.FieldType == FieldType.UInt32)
{
w.WriteAttributeString("xsi", "type", null, "Int_t");
w.WriteAttributeString("minValue", "0");
}
else if( fd.FieldType == FieldType.Bool)
{
w.WriteAttributeString("xsi", "type", null, "Boolean_t");
}
else
{
w.WriteAttributeString("xsi", "type", null, "String_t");
}
w.WriteEndElement();
}
catch (QuickFix.FieldNotFoundException) { }
});
}
static string title_case(string title, bool insert_spaces = true)
{
var s = new CultureInfo("en").TextInfo.ToTitleCase(title.ToLower().Replace("_", " "));
if(!insert_spaces)
return s.Replace(" ", "");
else
return s;
}
static void visit_layout(XmlWriter w, IMessage imsg)
{
w.WriteStartElement("lay", "StrategyLayout", layout_ns);
w.WriteStartElement("lay", "StrategyPanel", layout_ns);
w.WriteAttributeString("orientation", "HORIZONTAL");
int msgcount = 0;
Dictionary<int, int> tags = new Dictionary<int, int>();
Dictionary<string, int> names = new Dictionary<string, int>();
Type mtype = null;
message_visitor(imsg, (m, fd, parent_fd) =>
{
try
{
if (!get_tag_and_name(m, fd, parent_fd, tags, names, out int tag, out string fieldname))
return;
if ( _algo_types.ContainsKey( m.GetType() ) && (mtype == null || m.GetType() != mtype))
{
if(msgcount > 0)
{
w.WriteEndElement();
msgcount--;
}
w.WriteStartElement("lay", "StrategyPanel", layout_ns);
w.WriteAttributeString("orientation", "VERTICAL");
msgcount++;
mtype = m.GetType();
}
w.WriteStartElement("lay", "Control", layout_ns);
w.WriteAttributeString("ID", fieldname + "_ID");
var label = title_case(fieldname);
w.WriteAttributeString("label", label);
w.WriteAttributeString("parameterRef", fieldname);
if (fd.FieldType == FieldType.Message && fd.MessageType.ClrType == typeof(Google.Protobuf.WellKnownTypes.Timestamp))
{
w.WriteAttributeString("xsi", "type", null, "lay:Clock_t");
w.WriteAttributeString("localMktTz", "America/New_York");
}
else if (fd.FieldType == FieldType.Message && fd.MessageType.ClrType == typeof(bts.spark.QuantityMeasure))
{
w.WriteAttributeString("xsi", "type", null, "lay:SingleSpinner_t");
w.WriteAttributeString("initValue", "0");
}
else if (fd.FieldType == FieldType.Enum)
{
w.WriteAttributeString("xsi", "type", null, "lay:DropDownList_t");
w.WriteAttributeString("initValue", fd.EnumType.Values.First().Name);
foreach (var val in fd.EnumType.Values)
{
string eval = null;
if (val.CustomOptions?.TryGetString((int)bts.api.ApioptionsReflection.EnumValueOptions.fix_value, out eval) ?? false)
{
w.WriteStartElement("lay", "ListItem", layout_ns);
w.WriteAttributeString("enumID", val.Name);
w.WriteAttributeString("uiRep", val.Name);
w.WriteEndElement();
}
}
}
else if (fd.FieldType == FieldType.Int32)
{
w.WriteAttributeString("xsi", "type", null, "lay:SingleSpinner_t");
w.WriteAttributeString("initValue", "0");
}
else if (fd.FieldType == FieldType.Double || fd.FieldType == FieldType.Float)
{
if(m.Descriptor.ClrType == typeof(IcebergOrderDefinition))
w.WriteAttributeString("xsi", "type", null, "lay:SingleSpinner_t");
else
w.WriteAttributeString("xsi", "type", null, "lay:DoubleSpinner_t");
w.WriteAttributeString("initValue", "0");
}
else if (fd.FieldType == FieldType.UInt32)
{
w.WriteAttributeString("xsi", "type", null, "lay:SingleSpinner_t");
w.WriteAttributeString("initValue", "0");
}
else if (fd.FieldType == FieldType.Bool)
{
w.WriteAttributeString("xsi", "type", null, "lay:CheckBox_t");
w.WriteAttributeString("initValue", "false");
}
else
{
w.WriteAttributeString("xsi", "type", null, "lay:TextField_t");
}
w.WriteEndElement();
}
catch (QuickFix.FieldNotFoundException) { }
});
for(int i = 0; i < msgcount; i++)
w.WriteEndElement();
w.WriteEndElement();
w.WriteEndElement();
}
public static void write_json(FIXAlgoDefinitions defs, string path)
{
using (var fs = new StreamWriter(path))
{
var s = JsonFormatter.Settings.Default;
var raw = JsonFormatter.Default.Format(defs);
object parsed = Newtonsoft.Json.JsonConvert.DeserializeObject(raw);
string indented = Newtonsoft.Json.JsonConvert.SerializeObject(parsed, Newtonsoft.Json.Formatting.Indented);
fs.Write(indented);
}
}
public static IMessage message_visitor(IMessage msg, Action<IMessage, FieldDescriptor, FieldDescriptor> visitor, FieldDescriptor parent = null)
{
var memb = msg.Descriptor.Fields.InDeclarationOrder().ToList();
memb = memb.OrderBy(x => (int)x.FieldType).ToList();
List<FieldDescriptor> subs = new List<FieldDescriptor>();
foreach (var fd in memb)
{
if (fd.FieldType == FieldType.Message)
subs.Add(fd);
visitor(msg, fd, parent);
}
foreach(var fd in subs)
{
bool custom = msg.Descriptor.ClrType == typeof(bts.api.orderman.CustomOrderDefinition);
var submsg = fd.Accessor.GetValue(msg);
if (submsg != null)
message_visitor((IMessage)submsg, visitor, custom ? parent : fd);
}
return msg;
}
public static IMessage extract_order_from_custom(CustomOrderDefinition custom)
{
foreach (var fd in CustomOrderDefinition.Descriptor.Fields.InDeclarationOrder())
{
var val = fd.Accessor.GetValue(custom);
if (val != null && val is IMessage valmsg)
return valmsg;
}
Log.assert(false, "can't find non-null member of CustomOrderDefintion");
return null;
}
#region write sample file
public static void write_sample_json(string path = "./spark_algos.json")
{
FIXAlgoDefinition tc = new FIXAlgoDefinition()
{
Name = "TickAndCover",
Definition = new CustomOrderDefinition
{
Cover = new CoverOrderDefinition
{
Child = new CustomOrderDefinition
{
Top = new TopOrderDefinition { Child = new CustomOrderDefinition { Limit = new LimitOrderDefinition() } }
},
Hedge = new CustomOrderDefinition
{
Lean = new LeanOrderDefinition { Child = new CustomOrderDefinition { Limit = new LimitOrderDefinition() } }
}
}
}
};
FIXAlgoDefinition sc = new FIXAlgoDefinition()
{
Name = "SmashAndCover",
Definition = new CustomOrderDefinition
{
Cover = new CoverOrderDefinition
{
Child = new CustomOrderDefinition
{
Lean = new LeanOrderDefinition{ Child = new CustomOrderDefinition { Limit = new LimitOrderDefinition() } }
},
Hedge = new CustomOrderDefinition
{
Lean = new LeanOrderDefinition { Child = new CustomOrderDefinition { Limit = new LimitOrderDefinition() } }
}
}
}
};
FIXAlgoDefinitions defs = new FIXAlgoDefinitions();
defs.AlgoStrategy.Add(tc);
defs.AlgoStrategy.Add(sc);
write_json(defs, path);
}
}
#endregion
}
@@ -0,0 +1 @@
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to the disclaimer which is printed on one of the initial pages of the written specification for the FIXatdl Schema and is included in the zip file which you downloaded to obtain the Schema.
@@ -0,0 +1,219 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<Strategies xmlns="http://www.fixprotocol.org/FIXatdl-1-1/Core" xmlns:val="http://www.fixprotocol.org/FIXatdl-1-1/Validation" xmlns:lay="http://www.fixprotocol.org/FIXatdl-1-1/Layout" xmlns:flow="http://www.fixprotocol.org/FIXatdl-1-1/Flow" xmlns:tz="http://www.fixprotocol.org/FIXatdl-1-1/Timezones" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fixprotocol.org/FIXatdl-1-1/Core fixatdl-core-1-1.xsd" strategyIdentifierTag="7620" versionIdentifierTag="7621">
<!-- ************************ -->
<!-- ******* Tazer 1 ******** -->
<!-- ************************ -->
<Strategy name="Tazer1" uiRep="Tazer" wireValue="Tazer" version="1" fixMsgType="D" providerID="ABC">
<!-- US only -->
<Regions>
<Region name="TheAmericas" inclusion="Include">
<Country CountryCode="US" inclusion="Include"/>
</Region>
</Regions>
<!-- Nasdaq only -->
<Markets>
<Market MICCode="XNAS" inclusion="Include"/>
</Markets>
<!-- Equities ("CS") only -->
<SecurityTypes>
<SecurityType name="CS" inclusion="Include"/>
</SecurityTypes>
<!-- Parameter Section -->
<Parameter name="StartTime" xsi:type="UTCTimestamp_t" fixTag="7602" use="required">
<Description>Strategy Start Time</Description>
</Parameter>
<Parameter name="EndTime" xsi:type="UTCTimestamp_t" fixTag="7603" use="required" maxValue="16:00:00" localMktTz="America/New_York">
<Description>Strategy End Time</Description>
</Parameter>
<Parameter name="Text" xsi:type="String_t" fixTag="9999" use="optional"/>
<Parameter name="SweepDistribution" xsi:type="Char_t" fixTag="7640" use="required">
<EnumPair enumID="e_Uniform" wireValue="U">
<Description>The 'Uniform' setting for Sweep Distribution</Description>
</EnumPair>
<EnumPair enumID="e_Gaussian" wireValue="G">
<Description>The 'Gaussian' setting for Sweep Distribution</Description>
</EnumPair>
</Parameter>
<Parameter name="Variance" xsi:type="Float_t" fixTag="7641" use="optional" minValue="0.01" maxValue="0.50"/>
<Parameter name="DisplayQty" xsi:type="Int_t" fixTag="7645" use="optional" minValue="0"/>
<!-- Layout Section -->
<lay:StrategyLayout>
<lay:StrategyPanel orientation="VERTICAL" collapsible="false">
<lay:StrategyPanel orientation="HORIZONTAL" collapsible="false">
<lay:Control xsi:type="lay:Clock_t" ID="StartTimeClock" label="Start Time" parameterRef="StartTime" initValue="09:30:00" initValueMode="1" localMktTz="America/New_York"/>
<lay:Control xsi:type="lay:Clock_t" ID="EndTimeClock" label="End Time" parameterRef="EndTime" initValue="16:00:00" localMktTz="America/New_York"/>
<lay:Control ID="m_dq" xsi:type="lay:DropDownList_t" label="Display Qty Handling">
<lay:ListItem enumID="choice1" uiRep="Send nothing"/>
<lay:ListItem enumID="choice2" uiRep="Send 0"/>
<lay:ListItem enumID="choice3" uiRep="Send what user enters"/>
</lay:Control>
<lay:Control xsi:type="lay:TextField_t" ID="DisplayQuantity" label="Display Quantity" parameterRef="DisplayQty">
<!-- for "choice1" Control is still displayed however it appears disabled and is set to a null value (will not be transmitted over the wire) -->
<!-- for "choice2" Control is set to value "0" and is disabled (read-only) but will be transmitted over the wire -->
<flow:StateRule enabled="false">
<val:Edit logicOperator="OR">
<val:Edit field="m_dq" operator="EQ" value="choice1"/>
<val:Edit field="m_dq" operator="EQ" value="choice2"/>
</val:Edit>
</flow:StateRule>
<flow:StateRule visible="false">
<val:Edit field="m_dq" operator="EQ" value="choice1"/>
</flow:StateRule>
<flow:StateRule value="{NULL}">
<val:Edit field="m_dq" operator="EQ" value="choice1"/>
</flow:StateRule>
<flow:StateRule value="0">
<Description>Display Quantity should be set to 0 if Display Qty Handling is set to 'choice2'</Description>
<val:Edit field="m_dq" operator="EQ" value="choice2"/>
</flow:StateRule>
</lay:Control>
</lay:StrategyPanel>
<lay:StrategyPanel orientation="HORIZONTAL" collapsible="false">
<lay:Control ID="m_sd" xsi:type="lay:DropDownList_t" label="Sweep Distribution" parameterRef="SweepDistribution" initValue="e_Uniform">
<lay:ListItem enumID="e_Uniform" uiRep="Uniform"/>
<lay:ListItem enumID="e_Gaussian" uiRep="Gaussian"/>
</lay:Control>
<lay:Control xsi:type="lay:TextField_t" ID="Variance" label="Variance" parameterRef="Variance">
<!-- Control is still displayed however it appears disabled and is set to a null value (will not be transmitted over the wire) -->
<flow:StateRule enabled="false" value="{NULL}">
<val:Edit field="m_sd" operator="EQ" value="e_Uniform"/>
</flow:StateRule>
</lay:Control>
</lay:StrategyPanel>
</lay:StrategyPanel>
</lay:StrategyLayout>
<!-- Validation Section -->
<val:StrategyEdit errorMessage="End Time should be later than Start Time">
<val:Edit field="EndTime" operator="GT" field2="StartTime"/>
</val:StrategyEdit>
<val:StrategyEdit errorMessage="Variance is required when Sweep Distribution is Gaussian.">
<val:Edit logicOperator="OR">
<val:Edit field="SweepDistribution" operator="NE" value="G"/>
<val:Edit logicOperator="AND">
<val:Edit field="SweepDistribution" operator="EQ" value="G"/>
<val:Edit field="Variance" operator="EX"/>
</val:Edit>
</val:Edit>
</val:StrategyEdit>
<val:StrategyEdit errorMessage="Variance must be between 0 and 2.0">
<val:Edit logicOperator="OR">
<val:Edit field="SweepDistribution" operator="NE" value="G"/>
<val:Edit logicOperator="AND">
<val:Edit field="SweepDistribution" operator="EQ" value="G"/>
<val:Edit field="Variance" operator="EX"/>
<val:Edit field="Variance" operator="GT" value="0.0"/>
<val:Edit field="Variance" operator="LT" value="2.0"/>
</val:Edit>
</val:Edit>
</val:StrategyEdit>
</Strategy>
<Strategy name="OPLX" uiRep="Get Done" wireValue="60" version="2.0" fixMsgType="D">
<!-- Americas region only -->
<Regions>
<Region name="TheAmericas" inclusion="Include"/>
</Regions>
<!-- Security types other than Futures ("FUT") -->
<SecurityTypes>
<SecurityType name="FUT" inclusion="Exclude"/>
</SecurityTypes>
<Parameter name="StartTime" xsi:type="UTCTimestamp_t" fixTag="6168" use="optional"/>
<Parameter name="EndTime" xsi:type="UTCTimestamp_t" fixTag="126" use="optional"/>
<Parameter name="AgencyOnly" xsi:type="Int_t" fixTag="81" use="required">
<EnumPair wireValue="1" enumID="Yes"/>
<EnumPair wireValue="0" enumID="No"/>
</Parameter>
<Parameter name="Aggression" xsi:type="Char_t" fixTag="6408" use="optional">
<EnumPair enumID="e_Low" wireValue="L"/>
<EnumPair enumID="e_Medium" wireValue="S"/>
<EnumPair enumID="e_High" wireValue="H"/>
</Parameter>
<Parameter name="DisplaySize" xsi:type="Qty_t" fixTag="111" use="optional" minValue="0"/>
<lay:StrategyLayout>
<lay:StrategyPanel collapsible="false" orientation="HORIZONTAL">
<lay:StrategyPanel collapsible="false" orientation="VERTICAL">
<lay:Control ID="Aggression" xsi:type="lay:DropDownList_t" label="Aggression" initValue="e_Medium" parameterRef="Aggression">
<lay:ListItem enumID="e_Low" uiRep="Low"/>
<lay:ListItem enumID="e_Medium" uiRep="Medium"/>
<lay:ListItem enumID="e_High" uiRep="High"/>
</lay:Control>
<!-- Posting is a 'helper control' and not associated with a specific Parameter -->
<lay:Control ID="Posting" xsi:type="lay:DropDownList_t" label="Posting/Iceberg" initValue="e_SMART">
<lay:ListItem enumID="e_SMART" uiRep="SMART"/>
<lay:ListItem enumID="e_NOPOST" uiRep="NOPOST"/>
<lay:ListItem enumID="e_Custom" uiRep="Custom"/>
</lay:Control>
<lay:Control ID="DisplaySize" xsi:type="lay:SingleSpinner_t" label="Display Size" incrementPolicy="LotSize" parameterRef="DisplaySize">
<!-- e_SMART will be null (do not transmit over wire) and not visible nor enabled -->
<!-- e_NOPOST will be set to 0, visible, and disabled (read-only) - (non-null thus transmitted over the wire) -->
<!-- e_Custom will be non-null, visible, and enabled -->
<flow:StateRule visible="true">
<val:Edit logicOperator="OR">
<val:Edit field="Posting" operator="EQ" value="e_Custom"/>
<val:Edit field="Posting" operator="EQ" value="e_NOPOST"/>
</val:Edit>
</flow:StateRule>
<flow:StateRule enabled="true">
<val:Edit field="Posting" operator="EQ" value="e_Custom"/>
</flow:StateRule>
<flow:StateRule value="{NULL}">
<val:Edit field="Posting" operator="EQ" value="e_SMART"/>
</flow:StateRule>
<flow:StateRule value="0">
<val:Edit field="Posting" operator="EQ" value="e_NOPOST"/>
</flow:StateRule>
</lay:Control>
</lay:StrategyPanel>
<lay:StrategyPanel collapsible="false" orientation="VERTICAL">
<!-- StartTime and EndTime need a 'helper control' to support the fact that it is optional (also had to warp AgencyOnly with StrategyPanel as a given StrategyPanel can include only Control or StrategyPanel elements, but not both) -->
<lay:StrategyPanel collapsible="false" orientation="HORIZONTAL">
<lay:Control ID="c_EnableStartTime" xsi:type="lay:CheckBox_t" label="Start Time" initValue="false"/>
<lay:Control ID="StartTime" xsi:type="lay:Clock_t" label="" parameterRef="StartTime">
<flow:StateRule enabled="false" value="{NULL}">
<val:Edit field="c_EnableStartTime" operator="EQ" value="false"/>
</flow:StateRule>
</lay:Control>
</lay:StrategyPanel>
<lay:StrategyPanel collapsible="false" orientation="HORIZONTAL">
<lay:Control ID="c_EnableEndTime" xsi:type="lay:CheckBox_t" label="End Time" initValue="false"/>
<lay:Control ID="EndTime" xsi:type="lay:Clock_t" label="" initValue="16:00:00" localMktTz="America/New_York" parameterRef="EndTime">
<flow:StateRule enabled="false" value="{NULL}">
<val:Edit field="c_EnableEndTime" operator="EQ" value="false"/>
</flow:StateRule>
</lay:Control>
</lay:StrategyPanel>
<lay:StrategyPanel collapsible="false" orientation="HORIZONTAL">
<lay:Control ID="AgencyOnly" xsi:type="lay:DropDownList_t" label="Agency Only" initValue="No" parameterRef="AgencyOnly">
<lay:ListItem enumID="Yes" uiRep="Yes"/>
<lay:ListItem enumID="No" uiRep="No"/>
</lay:Control>
</lay:StrategyPanel>
</lay:StrategyPanel>
</lay:StrategyPanel>
</lay:StrategyLayout>
<val:StrategyEdit errorMessage="Start time must be less than end time.">
<!-- Note that "OR" "NX" checks are required as StartTime and EndTime Parameters are marked use="optional" -->
<val:Edit logicOperator="OR">
<val:Edit field="StartTime" operator="NX"/>
<val:Edit field="EndTime" operator="NX"/>
<val:Edit field="EndTime" operator="GT" field2="StartTime"/>
</val:Edit>
</val:StrategyEdit>
<val:StrategyEdit errorMessage="Display Size cannot be greater than Order Qty">
<val:Edit logicOperator="OR">
<val:Edit field="DisplaySize" operator="NX"/>
<val:Edit field="DisplaySize" operator="LE" field2="FIX_OrderQty"/>
</val:Edit>
</val:StrategyEdit>
</Strategy>
</Strategies>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:flow="http://www.fixprotocol.org/FIXatdl-1-1/Flow" xmlns:val="http://www.fixprotocol.org/FIXatdl-1-1/Validation" xmlns:core="http://www.fixprotocol.org/FIXatdl-1-1/Core" targetNamespace="http://www.fixprotocol.org/FIXatdl-1-1/Flow" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
<xs:annotation>
<xs:documentation>
This value is the internal build number of the ATDL Schema
</xs:documentation>
<xs:appinfo>
<BuildInfo buildNumber="2.7.2e20101221"/>
</xs:appinfo>
</xs:annotation>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Validation" schemaLocation="fixatdl-validation-1-1.xsd"/>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Core" schemaLocation="fixatdl-core-1-1.xsd"/>
<!-- Please email any suggestions or revisions to algotech@fixprotocol.org-->
<!-- Please note - Revision history is at the end of this xsd
Flow Sub-Schema
The intent of the flow sub-schema is to provide an easy, platform-neutral way to specify the interaction
of controls defined by the UI sub-schema. StateRules elements define the behavior of the control, while
Edit elements define how the rule should be executed based on how they evaluate.-->
<xs:element name="StateRule" type="flow:StateRule_t"/>
<xs:complexType name="StateRule_t">
<xs:sequence>
<xs:element ref="core:Description" minOccurs="0">
<xs:annotation>
<xs:documentation>Description of the State Rule.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element ref="val:Edit"/>
<xs:element ref="val:EditRef"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="enabled" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>Indicates whether or not to enable the control when the edit expression of the strategyEdit element evaluates to True.
The desired behavior is as follows:
when the StateRule’s edit condition is true and enabled=True then enable the control;
when the edit condition is true and enabled=false then disable the control;
when the edit condition is false and enable=True then disable the control;
when the edit condition is false and enabled=false then enable the control.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="visible" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>Indicates whether or not to show the control when the boolean expression, defined by the Edit element, evaluates to True.
The desired behavior is as follows:
when the StateRule’s edit condition is true and visible=True then display the control;
when the edit condition is true and visible=false then hide the control;
when the edit condition is false and visible=True then hide the control;
when the edit condition is false and enabled=false then display the control.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>GUI control's displayed value should be set to this value when edit condition is true. Although the type of this attribute has been listed as string, ultimately the type of this attribute must be compatible with the type of the control.
For example, if the control is numeric, such as a SingleSpinner, then a string containing a numeric value would an appropriate value (e.g. “15”).
If the control contains ListItem elements then allowable values of StateRule/@value is restricted to the enumIDs of the ListItem elements.
A special token, “{NULL}”, may be used for the value of this attribute to indicate that the control should be set to an uninitialized state. Controls that are un-initialized should have no value.
The effect of an un-initialized control is as follows:
When an order is to be generated, the controls which are linked to parameters will have their values retrieved. If there is no retrieved value because the control was un-initialized then the parameter should have no value and its associated FIX tag should be excluded from the message.
This is relevant only for controls that can be in an un-initialized state such as spinners and text fields. Controls such as check boxes and radio buttons are always initialized. (They are either checked or unchecked.)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
<!-- Please email any revisions to the Steward of the Master Model & Mapping artifacts at algotech@fixprotocol.org -->
<!-- Revision History -->
<!-- Date Version Author Comments
Authors - Greg Malatestinic, Rick Labs, Zoltan Feledy, Jim Arlet, Gideon Kaplan, Martin Naughton, Mike McDermott and other members of FPL Algo Trading WG.
-if there is anyone else then please speak up :-)
30jan08 v2.5 by Robert Golan for uris, revision history, and version stamping.
20May08 - <edit> elements max and min occurs is now 1
27May08 - stateGroup and stateRule can now refer to editRef.
30Aug08 - value attribute has been added.
17Sep08 - stateGroup.filed changed to stateGroup.targetParameter.
21Jan09 v2.5.3 by Greg Malatestinic
- removed stateGroup element
23Jan09 v2.5.6 by Martin Naughton and Mike McDermott
- added a description element to stateRule
- added a reference to the Core schema to support the description element reference
16Feb09 v2.5.9 by Mike McDermott
- added a 'flow' alias to the default namespace for consistency
- created a StateRule_t complex type for consistency
27Mar09 v2.6.3 by Mike McDermott
- updated namespaces to conform with FIX standard for xml namespaces
- updated namespaces to conform with *product* version of 1.1
- updated element and type names to conform with FIX standard of upper camel case
22Feb v2.7.2 by Greg Malatestinic
- All xsd files renamed to fixatdl-{sub-schema}-1-1.xsd. Import/@schemaLocation adjusted accordingly.
- Namespaces changed to http://www.fixprotocol.org/FIXatdl-1-1/{sub-schema}
15Dec2010 v2.7.2e by Greg Malatestinic
- Sync'd documentation with specification document.
-->
@@ -0,0 +1,564 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:lay="http://www.fixprotocol.org/FIXatdl-1-1/Layout" xmlns:flow="http://www.fixprotocol.org/FIXatdl-1-1/Flow" xmlns:core="http://www.fixprotocol.org/FIXatdl-1-1/Core" xmlns:tz="http://www.fixprotocol.org/FIXatdl-1-1/Timezones" targetNamespace="http://www.fixprotocol.org/FIXatdl-1-1/Layout" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
<xs:annotation>
<xs:documentation>
This value is the internal build number of the ATDL Schema
</xs:documentation>
<xs:appinfo>
<BuildInfo buildNumber="2.7.2e20101221"/>
</xs:appinfo>
</xs:annotation>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Flow" schemaLocation="fixatdl-flow-1-1.xsd"/>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Core" schemaLocation="fixatdl-core-1-1.xsd"/>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Timezones" schemaLocation="fixatdl-timezones-1-1.xsd"/>
<!-- Please email any suggestions or revisions to algotech@fixprotocol.org-->
<!-- Please note - Revision history is at the end of this xsd
User Interface Sub-Schema
The intent of the UI sub-schema is to provide an easy, platform-neutral way to specify the layout of components.
This schema should be flexible enough to support multiple-platforms (i.e. Java Swing, SWT, or Web).-->
<xs:element name="StrategyLayout" type="lay:StrategyLayout_t"/>
<xs:complexType name="StrategyLayout_t">
<xs:sequence>
<xs:element name="StrategyPanel" type="lay:StrategyPanel_t" maxOccurs="unbounded">
<xs:key name="controlKey">
<xs:selector xpath=".//lay:control"/>
<xs:field xpath="@ID"/>
</xs:key>
<xs:unique name="controlParameterRefMustBeUnique">
<xs:selector xpath=".//lay:control"/>
<xs:field xpath="@parameterRef"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StrategyPanel_t">
<xs:sequence>
<xs:element name="StrategyPanel" type="lay:StrategyPanel_t" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Control" type="lay:Control_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="title" type="xs:string">
<xs:annotation>
<xs:documentation>Title that appears in the panel border.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="collapsed" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation>Initial visual state of a panel. Indicates whether a panel is initially drawn in a collapsed state.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="collapsible" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation>Indicates whether panel can be collapsed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="color" type="xs:string">
<xs:annotation>
<xs:documentation>Set the background color. The value should appear as the RBG combination separated by commas.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="orientation" type="lay:PanelOrientation_t">
<xs:annotation>
<xs:documentation>Must be HORIZONTAL or VERTICAL. Declares the orientation of the components (parameters or nested strategyPanels) within a strategyPanel.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="border" type="lay:Border_t">
<xs:annotation>
<xs:documentation>Recommended border for the panel. Valid values are NONE and LINE.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Control_t" abstract="true">
<xs:sequence>
<xs:element ref="flow:StateRule" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="HelpText" type="lay:HelpText_t" minOccurs="0">
<xs:annotation>
<xs:documentation> Help text for the parameter </xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="ID" use="required">
<xs:annotation>
<xs:documentation>Unique identifier of this control. No two controls of the same strategy can have the same ID.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z][A-za-z0-9_]{0,255}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="parameterRef" use="optional">
<xs:annotation>
<xs:documentation>The name of the parameter for which this control gives the visual representation. A parameter with this name must be defined within the same strategy as this control.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z][A-za-z0-9_]{0,255}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="label" type="xs:string">
<xs:annotation>
<xs:documentation>A title for this control which may be displayed. If the control is a Label_t then Control/@label or Control/@initValue must be used to define the string which is to be rendered. If both attributes are provided then Control/@initValue takes precedence.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="initFixField" type="xs:string">
<xs:annotation>
<xs:documentation>Indicates the initialization value is to be taken from this standard FIX field. Format: "FIX_" + FIXFieldName. Eg. "FIX_OrderQty". Required when initPolicy=”UseFixField”.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="initPolicy">
<xs:annotation>
<xs:documentation>Describes how to initialize the control. If the value of this attribute is undefined or equal to "UseValue" and initValue is defined then initialize with initValue.
If the value is equal to "UseFixField" then attempt to initialize with the value of the tag specified in initFixField. If the value is equal to "UseFixField" and it is not possible to access the value of the specified fix tag then revert to using initValue. If the value is equal to "UseFixField", the field is not accessible, and initValue is not defined, then do not initialize.
Valid values are: UseValue and UseFixField.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="UseValue"/>
<xs:enumeration value="UseFixField"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="tooltip" type="xs:string">
<xs:annotation>
<xs:documentation>Tool tip text for rendered GUI objects rendered for the parameter.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="disableForTemplate" type="xs:boolean" use="optional">
<xs:annotation>
<xs:documentation>For implementing systems that support saving order templates or pre-populated orders for basket trading/list trading this attribute specifies that the control should be disabled when the order screen is going to be saved as a template and not actually used to place an order.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Clock_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:time">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Expressed in local market time of the order recipient system.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="initValueMode" default="0">
<xs:simpleType>
<xs:annotation>
<xs:documentation>Defines the treatment of initValue time. 0: use initValue; 1: use current time if initValue time has past.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:int">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="localMktTz" type="tz:LocalMktTz_t">
<xs:annotation>
<xs:documentation>The timezone in which initValue is represented in. Required when initValue is supplied.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TextField_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SingleSelectList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to an item in the list. Must be an enumID value from one of the listItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="MultiSelectList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered.
Refers to items in the list. Must be one or more enumID values from the listItems.
For multiple items use a space delimiter.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Slider_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to an item in the list. Must be an enumID value from one of the listItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CheckBox_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:boolean">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. True indicates the checkbox should be checked. False iundicates it should be unchecked. For rule evaluation, checked=true and unchecked=false.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="checkedEnumRef" type="xs:string">
<xs:annotation>
<xs:documentation>Refers to an enumID defined in the definition of the Parameter referred by Control/@parameterRef. This enumID is the output from this control if it is checked/selected.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="uncheckedEnumRef" type="xs:string">
<xs:annotation>
<xs:documentation>Refers to an enumID defined in the definition of the Parameter referred by Control/@parameterRef. This enumID is the output from this control if it is unchecked/unselected.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CheckBoxList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="core:MultipleStringValue">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to enumIDs of child ListItems. If a ListItem's enumID is included then the associated checkbox should be checked when initially rendered. If it is not included then the checkbox should be unchecked when initially rendered.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="orientation" type="lay:PanelOrientation_t">
<xs:annotation>
<xs:documentation>Must be HORIZONTAL or VERTICAL. Declares the orientation of the radio buttons within a RadioButtonList or the checkboxes within a CheckBoxList.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SingleSpinner_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:double">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="increment" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation>Limits the granularity of a spinner control. Useful in spinner objects to enforce odd-lot and sub-penny restrictions.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="incrementPolicy" use="optional">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
Describes how to use increment. If undefined then take value from increment
attribute, if LotSize use value based on symbol lot size. (If lot size is not available use value of
increment attribute.) If Tick use value based on symbol tick size. (If tick size is not available
use value of increment attribute.) If increment is to be used and is not defined then use a system
default value.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Tick"/>
<xs:enumeration value="LotSize"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DoubleSpinner_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:double">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="innerIncrement" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation>Limits the granularity of the inner spinner of a double spinner control. Useful in spinner objects to enforce odd-lot and sub-penny restrictions.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="innerIncrementPolicy" use="optional">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
Describes how to use innerIncrement. If undefined then take value from innerIncrement
attribute, if LotSize use value based on symbol lot size. (If lot size is not available use value of
innerIncrement attribute.) If Tick use value based on symbol tick size. (If tick size is not available
use value of innerIncrement attribute.) If innerIncrement is to be used and is not defined then use a system
default value.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Tick"/>
<xs:enumeration value="LotSize"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="outerIncrement" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation>Limits the granularity of the outer spinner of a double spinner control. Useful in spinner objects to enforce odd-lot and sub-penny restrictions.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="outerIncrementPolicy" use="optional">
<xs:simpleType>
<xs:annotation>
<xs:documentation>
Describes how to use outerIncrement. If undefined then take value from outerIncrement
attribute, if LotSize use value based on symbol lot size. (If lot size is not available use value of
outerIncrement attribute.) If Tick use value based on symbol tick size. (If tick size is not available
use value of outerIncrement attribute.) If outerIncrement is to be used and is not defined then use a system
default value.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="Tick"/>
<xs:enumeration value="LotSize"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DropDownList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to an item in the list. Must be an enumID value from one of the listItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EditableDropDownList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to an item in the list. Must be an enumID value from one of the listItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RadioButton_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="radioGroup" type="xs:string">
<xs:annotation>
<xs:documentation>Indicates a group of radio buttons, among which only one radio button may be selected at a time.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="initValue" type="xs:boolean">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. True indicates the radio button should initially be checked. False indicates it should be unchecked. For rule evaluation, checked=true and unchecked=false.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="checkedEnumRef" type="xs:string">
<xs:annotation>
<xs:documentation>Refers to an enumID defined in the definition of the Parameter referred by Control/@parameterRef. This enumID is the output from this control if it is checked/selected.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="uncheckedEnumRef" type="xs:string">
<xs:annotation>
<xs:documentation>Refers to an enumID defined in the definition of the Parameter referred by Control/@parameterRef. This enumID is the output from this control if it is unchecked/unselected.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="RadioButtonList_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:sequence>
<xs:element name="ListItem" type="lay:ListItem_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>The value used to pre-populate the GUI component when the order entry screen is initially rendered. Refers to an item in the list. Must be an enumID value from one of the listItems.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="orientation" type="lay:PanelOrientation_t">
<xs:annotation>
<xs:documentation>Must be HORIZONTAL or VERTICAL. Declares the orientation of the radio buttons within a RadioButtonList or the checkboxes within a CheckBoxList.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Label_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:string">
<xs:annotation>
<xs:documentation>Use this to set the displayed label. Control/@label or Control/@initValue must be used to define the string which is to be rendered. If both attributes are provided then Control/@initValue takes precedence.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="HiddenField_t">
<xs:complexContent>
<xs:extension base="lay:Control_t">
<xs:attribute name="initValue" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ListItem_t">
<xs:sequence>
<xs:element ref="flow:StateRule" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="enumID" use="optional">
<xs:annotation>
<xs:documentation>A reference to the enum specified in the parameter definition. Use is optional when the control does not refer to a parameter.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z][A-za-z0-9_]{0,255}"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="uiRep" type="xs:string">
<xs:annotation>
<xs:documentation>The value shown in the list. These are the values that go into Java or .Net list controls.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="HelpText_t">
<xs:restriction base="xs:string">
<xs:whiteSpace value="preserve"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PanelOrientation_t">
<xs:restriction base="xs:string">
<xs:enumeration value="HORIZONTAL"/>
<xs:enumeration value="VERTICAL"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Border_t">
<xs:restriction base="xs:string">
<xs:enumeration value="None"/>
<xs:enumeration value="Line"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<!-- Please email any revisions to the Steward of the Master Model & Mapping artifacts at algotech@fixprotocol.org -->
<!-- Revision History -->
<!-- Date Version Author Comments
Authors - Greg Malatestinic, Rick Labs, Zoltan Feledy, Jim Arlet, Gideon Kaplan, Martin Naughton and other members of FPL Algo Trading WG.
-if there is anyone else then please speak up :-)
30jan08 v2.5 by Robert Golan for uris, revision history, and version stamping.
10Mar08 - Reverting to previous version naming. This is now version 2.4.3.
27Aug08 - Control Types have been reviewed and cleaned up.
23Dec08 v2.5.0
- Added Control elements
13Jan09 v2.5.1 by Greg Malatestinic
- Added increment and incrementSource to spinner control
- Added "id" to Control_t - a way to identify a control for use in a stateRule
- Added stateRule to Control_t
- Removed references to core
14Jan09 v2.5.2 by Mike McDermott
- moved 'parameterRef' attribute from each derived control type, to the base control element defintion
- changed 'increment' on Slider type to optional
- added 'tooltip' attribute from core schema to base control type
- changed 'incrementSource' attribute on SingleSpinner_t type to optional
- removed 'Static' as an option for 'incrementSource' on SingleSpinner_t
- added HiddenField_t as a control type
- removed component_t - it was deprecated by the new control type structure
21Jan09 v2.5.3 by Greg Malatestinic
- added increment to NumberSpinner_t and Slider_t and replaced incrementSource with incrementPolicy
- added innerIncrement and outerIncrement to DoubleSpinner_t and also inner/outerIncrementPolicy
- created complex type ListItem
- added ListItem elements to all list-based controls: SingleSelectList_t, MultiSelectList_t, ListBox_t, DropDpwnList_t, EditableDropDownList_t, RadioButtonList_t and MultiSelectListBox_t
- added initFixTag and initPolicy to Control_t
- added initValue (with appropriate type) to all concrete controls.
- added import of cor. Needed for Clock_t.initValue
22Jan09 v2.5.4 by Greg Malatestinic and Mike McDermott
- added helpText to Control_t and moved helpText_t from Core to Layout
28Jan09 v2.5.7 by Greg Malatestinic
- added ListItem element and initValue to HiddenField_t control
- created a new control type, Label_t.
16Feb09 v2.5.9 by Mike McDermott
- set the 'ID' attribute on Control_t to be 'required'
- added a xs:key constaint to the 'ID' attribute on Control_t
- added a 'lay' alias to the default namespace to allow the xs:key constraint to work correctly
- created a StrategyLayout_t complex type for consistency
20Feb09 v2.6.0 by Jim Arlet and Mike McDermott
- readded CheckBoxList_t
26Feb09 v2.6.1 by Mike McDermott
- added abstract="true" to Control_t to enfore the use of xsi:type
- removed ListBox_t and MultiListBox_t because they were determined to be redundant
- renamed RadioButtonList_t to RadioButtonGroup_t
- added a RadioButton_t control
09Mar09 v2.6.2 by Mike McDermott
- added 'disableForTemplate' attribute to the Control_t type
27Mar09 v2.6.3 by Mike McDermott
- updated namespaces to conform with FIX standard for xml namespaces
- updated namespaces to conform with *product* version of 1.1
- updated element and type names to conform with FIX standard of upper camel case
26May09 v2.6.5 by Mike McDermott
- added minOccurs="0" to all listItem references to prevent list items from being
'mandatory' on controls that could have a collection
10Jan10 v2.6.7 by John Shields
- added checkedEnumRef and uncheckedEnumRef attributes to Checkbox_t and RadioButton_t (moved from Boolean_t in Core schema)
- added radioGroup to RadioButton_t
- changed name of RadioButtonGroup_t back to RadioButtonList_t to avoid confusion with radioGroup attribute of RadioButton_t
- added ListItem sequence to Slider_t
- changed type of initValue attribute for Slider_t to xs:string (must be an enumID of one of the ListItems)
- removed increment and incrementPolicy attributes from Slider_t
13Jan10 v2.6.8 by Greg Malatestinic
- changed Clock_t/@initValue from UTCTimestamp to LocalMktTime
- added Clock_t/@localMktTz
- chenged CheckboxList_T/@initVal from type string to type MultipleStringValue
20Jan10 v2.6.9 by Greg Malatestinic
- No Changes
19Feb10 v2.7.1 by Greg Malatestinic
- initFixTag replaced by initFixField
- several border enums were removed. Only None and Line remain.
- added orientation attribute to RadioButtonList_t and CheckBoxList_t
22Feb v2.7.2 by Greg Malatestinic
- All xsd files renamed to fixatdl-{sub-schema}-1-1.xsd. Import/@schemaLocation adjusted accordingly.
- Namespaces changed to http://www.fixprotocol.org/FIXatdl-1-1/{sub-schema}
15Dec2010 v2.7.2e by Greg Malatestinic
- Sync'd documentation with specification document.
-->
@@ -0,0 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rg="http://www.fixprotocol.org/FIXatdl-1-1/Regions" targetNamespace="http://www.fixprotocol.org/FIXatdl-1-1/Regions" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
<xs:annotation>
<xs:documentation>
This value is the internal build number of the ATDL Schema
</xs:documentation>
<xs:appinfo>
<BuildInfo buildNumber="2.7.2e20101221"/>
</xs:appinfo>
</xs:annotation>
<!-- Please email any suggestions or revisions to algotech@fixprotocol.org-->
<!-- Please note - Revision history is at the end of this xsd
Regions Mapping-->
<xs:element name="TheAmericas">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AI"/>
<xs:enumeration value="AG"/>
<xs:enumeration value="AR"/>
<xs:enumeration value="AW"/>
<xs:enumeration value="BS"/>
<xs:enumeration value="BB"/>
<xs:enumeration value="BZ"/>
<xs:enumeration value="BM"/>
<xs:enumeration value="BO"/>
<xs:enumeration value="BR"/>
<xs:enumeration value="CA"/>
<xs:enumeration value="KY"/>
<xs:enumeration value="CL"/>
<xs:enumeration value="CO"/>
<xs:enumeration value="CR"/>
<xs:enumeration value="CU"/>
<xs:enumeration value="DM"/>
<xs:enumeration value="DO"/>
<xs:enumeration value="EC"/>
<xs:enumeration value="SV"/>
<xs:enumeration value="FK"/>
<xs:enumeration value="GD"/>
<xs:enumeration value="GP"/>
<xs:enumeration value="GT"/>
<xs:enumeration value="GY"/>
<xs:enumeration value="HT"/>
<xs:enumeration value="HN"/>
<xs:enumeration value="JM"/>
<xs:enumeration value="MQ"/>
<xs:enumeration value="MX"/>
<xs:enumeration value="MS"/>
<xs:enumeration value="AN"/>
<xs:enumeration value="NI"/>
<xs:enumeration value="PA"/>
<xs:enumeration value="PY"/>
<xs:enumeration value="PE"/>
<xs:enumeration value="PR"/>
<xs:enumeration value="BL"/>
<xs:enumeration value="KN"/>
<xs:enumeration value="LC"/>
<xs:enumeration value="MF"/>
<xs:enumeration value="PM"/>
<xs:enumeration value="VC"/>
<xs:enumeration value="TT"/>
<xs:enumeration value="TC"/>
<xs:enumeration value="US"/>
<xs:enumeration value="UY"/>
<xs:enumeration value="VG"/>
<xs:enumeration value="VI"/>
<xs:enumeration value="VE"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EuropeMiddleEastAfrica">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AX"/>
<xs:enumeration value="AL"/>
<xs:enumeration value="DZ"/>
<xs:enumeration value="AD"/>
<xs:enumeration value="AO"/>
<xs:enumeration value="AM"/>
<xs:enumeration value="AT"/>
<xs:enumeration value="AZ"/>
<xs:enumeration value="BH"/>
<xs:enumeration value="BY"/>
<xs:enumeration value="BE"/>
<xs:enumeration value="BJ"/>
<xs:enumeration value="BA"/>
<xs:enumeration value="BW"/>
<xs:enumeration value="BG"/>
<xs:enumeration value="BF"/>
<xs:enumeration value="BI"/>
<xs:enumeration value="CM"/>
<xs:enumeration value="CV"/>
<xs:enumeration value="CF"/>
<xs:enumeration value="TD"/>
<xs:enumeration value="KM"/>
<xs:enumeration value="CG"/>
<xs:enumeration value="CD"/>
<xs:enumeration value="CI"/>
<xs:enumeration value="HR"/>
<xs:enumeration value="CY"/>
<xs:enumeration value="CZ"/>
<xs:enumeration value="DK"/>
<xs:enumeration value="DJ"/>
<xs:enumeration value="EG"/>
<xs:enumeration value="GQ"/>
<xs:enumeration value="ER"/>
<xs:enumeration value="EE"/>
<xs:enumeration value="ET"/>
<xs:enumeration value="FO"/>
<xs:enumeration value="FI"/>
<xs:enumeration value="FR"/>
<xs:enumeration value="GF"/>
<xs:enumeration value="GA"/>
<xs:enumeration value="GM"/>
<xs:enumeration value="GE"/>
<xs:enumeration value="DE"/>
<xs:enumeration value="GH"/>
<xs:enumeration value="GI"/>
<xs:enumeration value="GR"/>
<xs:enumeration value="GL"/>
<xs:enumeration value="GG"/>
<xs:enumeration value="GN"/>
<xs:enumeration value="GW"/>
<xs:enumeration value="VA"/>
<xs:enumeration value="HU"/>
<xs:enumeration value="IS"/>
<xs:enumeration value="IR"/>
<xs:enumeration value="IQ"/>
<xs:enumeration value="IE"/>
<xs:enumeration value="IM"/>
<xs:enumeration value="IL"/>
<xs:enumeration value="IT"/>
<xs:enumeration value="JE"/>
<xs:enumeration value="JO"/>
<xs:enumeration value="KE"/>
<xs:enumeration value="KW"/>
<xs:enumeration value="LV"/>
<xs:enumeration value="LB"/>
<xs:enumeration value="LS"/>
<xs:enumeration value="LR"/>
<xs:enumeration value="LY"/>
<xs:enumeration value="LI"/>
<xs:enumeration value="LT"/>
<xs:enumeration value="LU"/>
<xs:enumeration value="MK"/>
<xs:enumeration value="MG"/>
<xs:enumeration value="MW"/>
<xs:enumeration value="ML"/>
<xs:enumeration value="MT"/>
<xs:enumeration value="MR"/>
<xs:enumeration value="MU"/>
<xs:enumeration value="YT"/>
<xs:enumeration value="MD"/>
<xs:enumeration value="MC"/>
<xs:enumeration value="ME"/>
<xs:enumeration value="MA"/>
<xs:enumeration value="MZ"/>
<xs:enumeration value="NA"/>
<xs:enumeration value="NL"/>
<xs:enumeration value="NE"/>
<xs:enumeration value="NG"/>
<xs:enumeration value="NO"/>
<xs:enumeration value="OM"/>
<xs:enumeration value="PS"/>
<xs:enumeration value="PN"/>
<xs:enumeration value="PL"/>
<xs:enumeration value="PT"/>
<xs:enumeration value="QA"/>
<xs:enumeration value="RE"/>
<xs:enumeration value="RO"/>
<xs:enumeration value="RU"/>
<xs:enumeration value="RW"/>
<xs:enumeration value="SH"/>
<xs:enumeration value="SM"/>
<xs:enumeration value="ST"/>
<xs:enumeration value="SA"/>
<xs:enumeration value="SN"/>
<xs:enumeration value="RS"/>
<xs:enumeration value="SC"/>
<xs:enumeration value="SL"/>
<xs:enumeration value="SK"/>
<xs:enumeration value="SI"/>
<xs:enumeration value="SO"/>
<xs:enumeration value="ZA"/>
<xs:enumeration value="GS"/>
<xs:enumeration value="ES"/>
<xs:enumeration value="LK"/>
<xs:enumeration value="SD"/>
<xs:enumeration value="SR"/>
<xs:enumeration value="SJ"/>
<xs:enumeration value="SZ"/>
<xs:enumeration value="SE"/>
<xs:enumeration value="CH"/>
<xs:enumeration value="SY"/>
<xs:enumeration value="EH"/>
<xs:enumeration value="TZ"/>
<xs:enumeration value="TG"/>
<xs:enumeration value="TN"/>
<xs:enumeration value="TR"/>
<xs:enumeration value="UG"/>
<xs:enumeration value="UA"/>
<xs:enumeration value="AE"/>
<xs:enumeration value="GB"/>
<xs:enumeration value="YE"/>
<xs:enumeration value="ZM"/>
<xs:enumeration value="ZW"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="AsiaPacificJapan">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AF"/>
<xs:enumeration value="AS"/>
<xs:enumeration value="AU"/>
<xs:enumeration value="BD"/>
<xs:enumeration value="BT"/>
<xs:enumeration value="IO"/>
<xs:enumeration value="BN"/>
<xs:enumeration value="KH"/>
<xs:enumeration value="CN"/>
<xs:enumeration value="CX"/>
<xs:enumeration value="CC"/>
<xs:enumeration value="CK"/>
<xs:enumeration value="FJ"/>
<xs:enumeration value="PF"/>
<xs:enumeration value="GU"/>
<xs:enumeration value="HK"/>
<xs:enumeration value="IN"/>
<xs:enumeration value="ID"/>
<xs:enumeration value="JP"/>
<xs:enumeration value="KZ"/>
<xs:enumeration value="KI"/>
<xs:enumeration value="KP"/>
<xs:enumeration value="KR"/>
<xs:enumeration value="KG"/>
<xs:enumeration value="LA"/>
<xs:enumeration value="MO"/>
<xs:enumeration value="MY"/>
<xs:enumeration value="MV"/>
<xs:enumeration value="MH"/>
<xs:enumeration value="FM"/>
<xs:enumeration value="MN"/>
<xs:enumeration value="MM"/>
<xs:enumeration value="NR"/>
<xs:enumeration value="NP"/>
<xs:enumeration value="NC"/>
<xs:enumeration value="NZ"/>
<xs:enumeration value="NU"/>
<xs:enumeration value="NF"/>
<xs:enumeration value="MP"/>
<xs:enumeration value="PK"/>
<xs:enumeration value="PW"/>
<xs:enumeration value="PG"/>
<xs:enumeration value="PH"/>
<xs:enumeration value="WS"/>
<xs:enumeration value="SG"/>
<xs:enumeration value="SB"/>
<xs:enumeration value="TW"/>
<xs:enumeration value="TJ"/>
<xs:enumeration value="TH"/>
<xs:enumeration value="TL"/>
<xs:enumeration value="TK"/>
<xs:enumeration value="TO"/>
<xs:enumeration value="TM"/>
<xs:enumeration value="TV"/>
<xs:enumeration value="UM"/>
<xs:enumeration value="UZ"/>
<xs:enumeration value="VU"/>
<xs:enumeration value="VN"/>
<xs:enumeration value="WF"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
<!-- Please email any revisions to the Steward of the Master Model & Mapping artifacts at algotech@fixprotocol.org -->
<!-- Revision History -->
<!-- Date Version Author Comments
Authors - Greg Malatestinic, Rick Labs, Zoltan Feledy, Jim Arlet, Gideon Kaplan, Martin Naughton, Mike McDermott and other members of FPL Algo Trading WG.
-if there is anyone else then please speak up :-)
27Mar09 v2.6.3 by Mike McDermott
- updated namespaces to conform with FIX standard for xml namespaces
- updated namespaces to conform with *product* version of 1.1
- updated element and type names to conform with FIX standard of upper camel case
27Jan10 v2.7.1 by Greg Malatestinic
- added namespace declaration, rg, for Regions
22Feb v2.7.2 by Greg Malatestinic
- All xsd files renamed to fixatdl-{sub-schema}-1-1.xsd. Import/@schemaLocation adjusted accordingly.
- Namespaces changed to http://www.fixprotocol.org/FIXatdl-1-1/{sub-schema}
-->
@@ -0,0 +1,444 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tz="http://www.fixprotocol.org/FIXatdl-1-1/Timezones" targetNamespace="http://www.fixprotocol.org/FIXatdl-1-1/Timezones" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
<xs:annotation>
<xs:documentation>
This value is the internal build number of the ATDL Schema
</xs:documentation>
<xs:appinfo>
<BuildInfo buildNumber="2.7.2e20101221"/>
</xs:appinfo>
</xs:annotation>
<!-- Please email any suggestions or revisions to algotech@fixprotocol.org-->
<!-- Please note - Revision history is at the end of this xsd -->
<xs:simpleType name="LocalMktTz_t">
<xs:restriction base="xs:string">
<xs:enumeration value="Africa/Abidjan"/>
<xs:enumeration value="Africa/Accra"/>
<xs:enumeration value="Africa/Addis_Ababa"/>
<xs:enumeration value="Africa/Algiers"/>
<xs:enumeration value="Africa/Asmara"/>
<xs:enumeration value="Africa/Bamako"/>
<xs:enumeration value="Africa/Bangui"/>
<xs:enumeration value="Africa/Banjul"/>
<xs:enumeration value="Africa/Bissau"/>
<xs:enumeration value="Africa/Blantyre"/>
<xs:enumeration value="Africa/Brazzaville"/>
<xs:enumeration value="Africa/Bujumbura"/>
<xs:enumeration value="Africa/Cairo"/>
<xs:enumeration value="Africa/Casablanca"/>
<xs:enumeration value="Africa/Ceuta"/>
<xs:enumeration value="Africa/Conakry"/>
<xs:enumeration value="Africa/Dakar"/>
<xs:enumeration value="Africa/Dar_es_Salaam"/>
<xs:enumeration value="Africa/Djibouti"/>
<xs:enumeration value="Africa/Douala"/>
<xs:enumeration value="Africa/El_Aaiun"/>
<xs:enumeration value="Africa/Freetown"/>
<xs:enumeration value="Africa/Gaborone"/>
<xs:enumeration value="Africa/Harare"/>
<xs:enumeration value="Africa/Johannesburg"/>
<xs:enumeration value="Africa/Kampala"/>
<xs:enumeration value="Africa/Khartoum"/>
<xs:enumeration value="Africa/Kigali"/>
<xs:enumeration value="Africa/Kinshasa"/>
<xs:enumeration value="Africa/Lagos"/>
<xs:enumeration value="Africa/Libreville"/>
<xs:enumeration value="Africa/Lome"/>
<xs:enumeration value="Africa/Luanda"/>
<xs:enumeration value="Africa/Lubumbashi"/>
<xs:enumeration value="Africa/Lusaka"/>
<xs:enumeration value="Africa/Malabo"/>
<xs:enumeration value="Africa/Maputo"/>
<xs:enumeration value="Africa/Maseru"/>
<xs:enumeration value="Africa/Mbabane"/>
<xs:enumeration value="Africa/Mogadishu"/>
<xs:enumeration value="Africa/Monrovia"/>
<xs:enumeration value="Africa/Nairobi"/>
<xs:enumeration value="Africa/Ndjamena"/>
<xs:enumeration value="Africa/Niamey"/>
<xs:enumeration value="Africa/Nouakchott"/>
<xs:enumeration value="Africa/Ouagadougou"/>
<xs:enumeration value="Africa/Porto-Novo"/>
<xs:enumeration value="Africa/Sao_Tome"/>
<xs:enumeration value="Africa/Tripoli"/>
<xs:enumeration value="Africa/Tunis"/>
<xs:enumeration value="Africa/Windhoek"/>
<xs:enumeration value="America/Adak"/>
<xs:enumeration value="America/Anchorage"/>
<xs:enumeration value="America/Anguilla"/>
<xs:enumeration value="America/Antigua"/>
<xs:enumeration value="America/Araguaina"/>
<xs:enumeration value="America/Argentina/Buenos_Aires"/>
<xs:enumeration value="America/Argentina/Catamarca"/>
<xs:enumeration value="America/Argentina/Cordoba"/>
<xs:enumeration value="America/Argentina/Jujuy"/>
<xs:enumeration value="America/Argentina/La_Rioja"/>
<xs:enumeration value="America/Argentina/Mendoza"/>
<xs:enumeration value="America/Argentina/Rio_Gallegos"/>
<xs:enumeration value="America/Argentina/Salta"/>
<xs:enumeration value="America/Argentina/San_Juan"/>
<xs:enumeration value="America/Argentina/San_Luis"/>
<xs:enumeration value="America/Argentina/Tucuman"/>
<xs:enumeration value="America/Argentina/Ushuaia"/>
<xs:enumeration value="America/Aruba"/>
<xs:enumeration value="America/Asuncion"/>
<xs:enumeration value="America/Atikokan"/>
<xs:enumeration value="America/Bahia"/>
<xs:enumeration value="America/Barbados"/>
<xs:enumeration value="America/Belem"/>
<xs:enumeration value="America/Belize"/>
<xs:enumeration value="America/Blanc-Sablon"/>
<xs:enumeration value="America/Boa_Vista"/>
<xs:enumeration value="America/Bogota"/>
<xs:enumeration value="America/Boise"/>
<xs:enumeration value="America/Cambridge_Bay"/>
<xs:enumeration value="America/Campo_Grande"/>
<xs:enumeration value="America/Cancun"/>
<xs:enumeration value="America/Caracas"/>
<xs:enumeration value="America/Cayenne"/>
<xs:enumeration value="America/Cayman"/>
<xs:enumeration value="America/Chicago"/>
<xs:enumeration value="America/Chihuahua"/>
<xs:enumeration value="America/Costa_Rica"/>
<xs:enumeration value="America/Cuiaba"/>
<xs:enumeration value="America/Curacao"/>
<xs:enumeration value="America/Danmarkshavn"/>
<xs:enumeration value="America/Dawson"/>
<xs:enumeration value="America/Dawson_Creek"/>
<xs:enumeration value="America/Denver"/>
<xs:enumeration value="America/Detroit"/>
<xs:enumeration value="America/Dominica"/>
<xs:enumeration value="America/Edmonton"/>
<xs:enumeration value="America/Eirunepe"/>
<xs:enumeration value="America/El_Salvador"/>
<xs:enumeration value="America/Fortaleza"/>
<xs:enumeration value="America/Glace_Bay"/>
<xs:enumeration value="America/Godthab"/>
<xs:enumeration value="America/Goose_Bay"/>
<xs:enumeration value="America/Grand_Turk"/>
<xs:enumeration value="America/Grenada"/>
<xs:enumeration value="America/Guadeloupe"/>
<xs:enumeration value="America/Guatemala"/>
<xs:enumeration value="America/Guayaquil"/>
<xs:enumeration value="America/Guyana"/>
<xs:enumeration value="America/Halifax"/>
<xs:enumeration value="America/Havana"/>
<xs:enumeration value="America/Hermosillo"/>
<xs:enumeration value="America/Indiana/Indianapolis"/>
<xs:enumeration value="America/Indiana/Knox"/>
<xs:enumeration value="America/Indiana/Marengo"/>
<xs:enumeration value="America/Indiana/Petersburg"/>
<xs:enumeration value="America/Indiana/Tell_City"/>
<xs:enumeration value="America/Indiana/Vevay"/>
<xs:enumeration value="America/Indiana/Vincennes"/>
<xs:enumeration value="America/Indiana/Winamac"/>
<xs:enumeration value="America/Inuvik"/>
<xs:enumeration value="America/Iqaluit"/>
<xs:enumeration value="America/Jamaica"/>
<xs:enumeration value="America/Juneau"/>
<xs:enumeration value="America/Kentucky/Louisville"/>
<xs:enumeration value="America/Kentucky/Monticello"/>
<xs:enumeration value="America/La_Paz"/>
<xs:enumeration value="America/Lima"/>
<xs:enumeration value="America/Los_Angeles"/>
<xs:enumeration value="America/Maceio"/>
<xs:enumeration value="America/Managua"/>
<xs:enumeration value="America/Manaus"/>
<xs:enumeration value="America/Marigot"/>
<xs:enumeration value="America/Martinique"/>
<xs:enumeration value="America/Mazatlan"/>
<xs:enumeration value="America/Menominee"/>
<xs:enumeration value="America/Merida"/>
<xs:enumeration value="America/Mexico_City"/>
<xs:enumeration value="America/Miquelon"/>
<xs:enumeration value="America/Moncton"/>
<xs:enumeration value="America/Monterrey"/>
<xs:enumeration value="America/Montevideo"/>
<xs:enumeration value="America/Montreal"/>
<xs:enumeration value="America/Montserrat"/>
<xs:enumeration value="America/Nassau"/>
<xs:enumeration value="America/New_York"/>
<xs:enumeration value="America/Nipigon"/>
<xs:enumeration value="America/Nome"/>
<xs:enumeration value="America/Noronha"/>
<xs:enumeration value="America/North_Dakota/Center"/>
<xs:enumeration value="America/North_Dakota/New_Salem"/>
<xs:enumeration value="America/Panama"/>
<xs:enumeration value="America/Pangnirtung"/>
<xs:enumeration value="America/Paramaribo"/>
<xs:enumeration value="America/Phoenix"/>
<xs:enumeration value="America/Port-au-Prince"/>
<xs:enumeration value="America/Port_of_Spain"/>
<xs:enumeration value="America/Porto_Velho"/>
<xs:enumeration value="America/Puerto_Rico"/>
<xs:enumeration value="America/Rainy_River"/>
<xs:enumeration value="America/Rankin_Inlet"/>
<xs:enumeration value="America/Recife"/>
<xs:enumeration value="America/Regina"/>
<xs:enumeration value="America/Resolute"/>
<xs:enumeration value="America/Rio_Branco"/>
<xs:enumeration value="America/Santarem"/>
<xs:enumeration value="America/Santiago"/>
<xs:enumeration value="America/Santo_Domingo"/>
<xs:enumeration value="America/Sao_Paulo"/>
<xs:enumeration value="America/Scoresbysund"/>
<xs:enumeration value="America/Shiprock"/>
<xs:enumeration value="America/St_Barthelemy"/>
<xs:enumeration value="America/St_Johns"/>
<xs:enumeration value="America/St_Kitts"/>
<xs:enumeration value="America/St_Lucia"/>
<xs:enumeration value="America/St_Thomas"/>
<xs:enumeration value="America/St_Vincent"/>
<xs:enumeration value="America/Swift_Current"/>
<xs:enumeration value="America/Tegucigalpa"/>
<xs:enumeration value="America/Thule"/>
<xs:enumeration value="America/Thunder_Bay"/>
<xs:enumeration value="America/Tijuana"/>
<xs:enumeration value="America/Toronto"/>
<xs:enumeration value="America/Tortola"/>
<xs:enumeration value="America/Vancouver"/>
<xs:enumeration value="America/Whitehorse"/>
<xs:enumeration value="America/Winnipeg"/>
<xs:enumeration value="America/Yakutat"/>
<xs:enumeration value="America/Yellowknife"/>
<xs:enumeration value="Antarctica/Casey"/>
<xs:enumeration value="Antarctica/Davis"/>
<xs:enumeration value="Antarctica/DumontDUrville"/>
<xs:enumeration value="Antarctica/Mawson"/>
<xs:enumeration value="Antarctica/McMurdo"/>
<xs:enumeration value="Antarctica/Palmer"/>
<xs:enumeration value="Antarctica/Rothera"/>
<xs:enumeration value="Antarctica/South_Pole"/>
<xs:enumeration value="Antarctica/Syowa"/>
<xs:enumeration value="Antarctica/Vostok"/>
<xs:enumeration value="Arctic/Longyearbyen"/>
<xs:enumeration value="Asia/Aden"/>
<xs:enumeration value="Asia/Almaty"/>
<xs:enumeration value="Asia/Amman"/>
<xs:enumeration value="Asia/Anadyr"/>
<xs:enumeration value="Asia/Aqtau"/>
<xs:enumeration value="Asia/Aqtobe"/>
<xs:enumeration value="Asia/Ashgabat"/>
<xs:enumeration value="Asia/Baghdad"/>
<xs:enumeration value="Asia/Bahrain"/>
<xs:enumeration value="Asia/Baku"/>
<xs:enumeration value="Asia/Bangkok"/>
<xs:enumeration value="Asia/Beirut"/>
<xs:enumeration value="Asia/Bishkek"/>
<xs:enumeration value="Asia/Brunei"/>
<xs:enumeration value="Asia/Choibalsan"/>
<xs:enumeration value="Asia/Chongqing"/>
<xs:enumeration value="Asia/Colombo"/>
<xs:enumeration value="Asia/Damascus"/>
<xs:enumeration value="Asia/Dhaka"/>
<xs:enumeration value="Asia/Dili"/>
<xs:enumeration value="Asia/Dubai"/>
<xs:enumeration value="Asia/Dushanbe"/>
<xs:enumeration value="Asia/Gaza"/>
<xs:enumeration value="Asia/Harbin"/>
<xs:enumeration value="Asia/Ho_Chi_Minh"/>
<xs:enumeration value="Asia/Hong_Kong"/>
<xs:enumeration value="Asia/Hovd"/>
<xs:enumeration value="Asia/Irkutsk"/>
<xs:enumeration value="Asia/Jakarta"/>
<xs:enumeration value="Asia/Jayapura"/>
<xs:enumeration value="Asia/Jerusalem"/>
<xs:enumeration value="Asia/Kabul"/>
<xs:enumeration value="Asia/Kamchatka"/>
<xs:enumeration value="Asia/Karachi"/>
<xs:enumeration value="Asia/Kashgar"/>
<xs:enumeration value="Asia/Katmandu"/>
<xs:enumeration value="Asia/Kolkata"/>
<xs:enumeration value="Asia/Krasnoyarsk"/>
<xs:enumeration value="Asia/Kuala_Lumpur"/>
<xs:enumeration value="Asia/Kuching"/>
<xs:enumeration value="Asia/Kuwait"/>
<xs:enumeration value="Asia/Macau"/>
<xs:enumeration value="Asia/Magadan"/>
<xs:enumeration value="Asia/Makassar"/>
<xs:enumeration value="Asia/Manila"/>
<xs:enumeration value="Asia/Muscat"/>
<xs:enumeration value="Asia/Nicosia"/>
<xs:enumeration value="Asia/Novosibirsk"/>
<xs:enumeration value="Asia/Omsk"/>
<xs:enumeration value="Asia/Oral"/>
<xs:enumeration value="Asia/Phnom_Penh"/>
<xs:enumeration value="Asia/Pontianak"/>
<xs:enumeration value="Asia/Pyongyang"/>
<xs:enumeration value="Asia/Qatar"/>
<xs:enumeration value="Asia/Qyzylorda"/>
<xs:enumeration value="Asia/Rangoon"/>
<xs:enumeration value="Asia/Riyadh"/>
<xs:enumeration value="Asia/Sakhalin"/>
<xs:enumeration value="Asia/Samarkand"/>
<xs:enumeration value="Asia/Seoul"/>
<xs:enumeration value="Asia/Shanghai"/>
<xs:enumeration value="Asia/Singapore"/>
<xs:enumeration value="Asia/Taipei"/>
<xs:enumeration value="Asia/Tashkent"/>
<xs:enumeration value="Asia/Tbilisi"/>
<xs:enumeration value="Asia/Tehran"/>
<xs:enumeration value="Asia/Thimphu"/>
<xs:enumeration value="Asia/Tokyo"/>
<xs:enumeration value="Asia/Ulaanbaatar"/>
<xs:enumeration value="Asia/Urumqi"/>
<xs:enumeration value="Asia/Vientiane"/>
<xs:enumeration value="Asia/Vladivostok"/>
<xs:enumeration value="Asia/Yakutsk"/>
<xs:enumeration value="Asia/Yekaterinburg"/>
<xs:enumeration value="Asia/Yerevan"/>
<xs:enumeration value="Atlantic/Azores"/>
<xs:enumeration value="Atlantic/Bermuda"/>
<xs:enumeration value="Atlantic/Canary"/>
<xs:enumeration value="Atlantic/Cape_Verde"/>
<xs:enumeration value="Atlantic/Faroe"/>
<xs:enumeration value="Atlantic/Madeira"/>
<xs:enumeration value="Atlantic/Reykjavik"/>
<xs:enumeration value="Atlantic/South_Georgia"/>
<xs:enumeration value="Atlantic/St_Helena"/>
<xs:enumeration value="Atlantic/Stanley"/>
<xs:enumeration value="Australia/Adelaide"/>
<xs:enumeration value="Australia/Brisbane"/>
<xs:enumeration value="Australia/Broken_Hill"/>
<xs:enumeration value="Australia/Currie"/>
<xs:enumeration value="Australia/Darwin"/>
<xs:enumeration value="Australia/Eucla"/>
<xs:enumeration value="Australia/Hobart"/>
<xs:enumeration value="Australia/Lindeman"/>
<xs:enumeration value="Australia/Lord_Howe"/>
<xs:enumeration value="Australia/Melbourne"/>
<xs:enumeration value="Australia/Perth"/>
<xs:enumeration value="Australia/Sydney"/>
<xs:enumeration value="Europe/Amsterdam"/>
<xs:enumeration value="Europe/Andorra"/>
<xs:enumeration value="Europe/Athens"/>
<xs:enumeration value="Europe/Belgrade"/>
<xs:enumeration value="Europe/Berlin"/>
<xs:enumeration value="Europe/Bratislava"/>
<xs:enumeration value="Europe/Brussels"/>
<xs:enumeration value="Europe/Bucharest"/>
<xs:enumeration value="Europe/Budapest"/>
<xs:enumeration value="Europe/Chisinau"/>
<xs:enumeration value="Europe/Copenhagen"/>
<xs:enumeration value="Europe/Dublin"/>
<xs:enumeration value="Europe/Gibraltar"/>
<xs:enumeration value="Europe/Guernsey"/>
<xs:enumeration value="Europe/Helsinki"/>
<xs:enumeration value="Europe/Isle_of_Man"/>
<xs:enumeration value="Europe/Istanbul"/>
<xs:enumeration value="Europe/Jersey"/>
<xs:enumeration value="Europe/Kaliningrad"/>
<xs:enumeration value="Europe/Kiev"/>
<xs:enumeration value="Europe/Lisbon"/>
<xs:enumeration value="Europe/Ljubljana"/>
<xs:enumeration value="Europe/London"/>
<xs:enumeration value="Europe/Luxembourg"/>
<xs:enumeration value="Europe/Madrid"/>
<xs:enumeration value="Europe/Malta"/>
<xs:enumeration value="Europe/Mariehamn"/>
<xs:enumeration value="Europe/Minsk"/>
<xs:enumeration value="Europe/Monaco"/>
<xs:enumeration value="Europe/Moscow"/>
<xs:enumeration value="Europe/Oslo"/>
<xs:enumeration value="Europe/Paris"/>
<xs:enumeration value="Europe/Podgorica"/>
<xs:enumeration value="Europe/Prague"/>
<xs:enumeration value="Europe/Riga"/>
<xs:enumeration value="Europe/Rome"/>
<xs:enumeration value="Europe/Samara"/>
<xs:enumeration value="Europe/San_Marino"/>
<xs:enumeration value="Europe/Sarajevo"/>
<xs:enumeration value="Europe/Simferopol"/>
<xs:enumeration value="Europe/Skopje"/>
<xs:enumeration value="Europe/Sofia"/>
<xs:enumeration value="Europe/Stockholm"/>
<xs:enumeration value="Europe/Tallinn"/>
<xs:enumeration value="Europe/Tirane"/>
<xs:enumeration value="Europe/Uzhgorod"/>
<xs:enumeration value="Europe/Vaduz"/>
<xs:enumeration value="Europe/Vatican"/>
<xs:enumeration value="Europe/Vienna"/>
<xs:enumeration value="Europe/Vilnius"/>
<xs:enumeration value="Europe/Volgograd"/>
<xs:enumeration value="Europe/Warsaw"/>
<xs:enumeration value="Europe/Zagreb"/>
<xs:enumeration value="Europe/Zaporozhye"/>
<xs:enumeration value="Europe/Zurich"/>
<xs:enumeration value="Indian/Antananarivo"/>
<xs:enumeration value="Indian/Chagos"/>
<xs:enumeration value="Indian/Christmas"/>
<xs:enumeration value="Indian/Cocos"/>
<xs:enumeration value="Indian/Comoro"/>
<xs:enumeration value="Indian/Kerguelen"/>
<xs:enumeration value="Indian/Mahe"/>
<xs:enumeration value="Indian/Maldives"/>
<xs:enumeration value="Indian/Mauritius"/>
<xs:enumeration value="Indian/Mayotte"/>
<xs:enumeration value="Indian/Reunion"/>
<xs:enumeration value="Pacific/Apia"/>
<xs:enumeration value="Pacific/Auckland"/>
<xs:enumeration value="Pacific/Chatham"/>
<xs:enumeration value="Pacific/Easter"/>
<xs:enumeration value="Pacific/Efate"/>
<xs:enumeration value="Pacific/Enderbury"/>
<xs:enumeration value="Pacific/Fakaofo"/>
<xs:enumeration value="Pacific/Fiji"/>
<xs:enumeration value="Pacific/Funafuti"/>
<xs:enumeration value="Pacific/Galapagos"/>
<xs:enumeration value="Pacific/Gambier"/>
<xs:enumeration value="Pacific/Guadalcanal"/>
<xs:enumeration value="Pacific/Guam"/>
<xs:enumeration value="Pacific/Honolulu"/>
<xs:enumeration value="Pacific/Johnston"/>
<xs:enumeration value="Pacific/Kiritimati"/>
<xs:enumeration value="Pacific/Kosrae"/>
<xs:enumeration value="Pacific/Kwajalein"/>
<xs:enumeration value="Pacific/Majuro"/>
<xs:enumeration value="Pacific/Marquesas"/>
<xs:enumeration value="Pacific/Midway"/>
<xs:enumeration value="Pacific/Nauru"/>
<xs:enumeration value="Pacific/Niue"/>
<xs:enumeration value="Pacific/Norfolk"/>
<xs:enumeration value="Pacific/Noumea"/>
<xs:enumeration value="Pacific/Pago_Pago"/>
<xs:enumeration value="Pacific/Palau"/>
<xs:enumeration value="Pacific/Pitcairn"/>
<xs:enumeration value="Pacific/Ponape"/>
<xs:enumeration value="Pacific/Port_Moresby"/>
<xs:enumeration value="Pacific/Rarotonga"/>
<xs:enumeration value="Pacific/Saipan"/>
<xs:enumeration value="Pacific/Tahiti"/>
<xs:enumeration value="Pacific/Tarawa"/>
<xs:enumeration value="Pacific/Tongatapu"/>
<xs:enumeration value="Pacific/Truk"/>
<xs:enumeration value="Pacific/Wake"/>
<xs:enumeration value="Pacific/Wallis"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<!-- Please email any revisions to the Steward of the Master Model & Mapping artifacts at algotech@fixprotocol.org -->
<!-- Revision History -->
<!-- Date Version Author Comments
Authors - Greg Malatestinic, Rick Labs, Zoltan Feledy, Jim Arlet, Gideon Kaplan, Martin Naughton, Mike McDermott and other members of FPL Algo Trading WG.
-if there is anyone else then please speak up :-)
27Mar09 v2.6.6 by Mike McDermott
- Initial Version
10Jan10 v2.6.7 by John Shields
- removed trailing whitespace from timezone values
27Jan10 by v2.7.1 by Greg Malatestinic
- added xmlns:tz="http://www.fixprotocol.org/ATDL-1-1/Timezones"
22Feb v2.7.2 by Greg Malatestinic
- All xsd files renamed to fixatdl-{sub-schema}-1-1.xsd. Import/@schemaLocation adjusted accordingly.
- Namespaces changed to http://www.fixprotocol.org/FIXatdl-1-1/{sub-schema}
-->
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- - - - - - - - - - - - - - - - - - - - - - - - - -
FIXatdl Sample document instance for FIXatdl Schema Version 1.1
(C) 2010 FIX Protocol Limited. All use of the FIXatdl Schema is subject to
the disclaimer which is printed on one of the initial pages of the written specification
for the FIXatdl Schema and is included in the zip file which you downloaded to
obtain the Schema.
Comments and errors should be posted on the FIX protocol web-site
http://www.fixprotocol.org
- - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:lay="http://www.fixprotocol.org/FIXatdl-1-1/Validation" xmlns:core="http://www.fixprotocol.org/FIXatdl-1-1/Core" targetNamespace="http://www.fixprotocol.org/FIXatdl-1-1/Validation" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
<xs:annotation>
<xs:documentation>
This value is the internal build number of the ATDL Schema
</xs:documentation>
<xs:appinfo>
<BuildInfo buildNumber="2.7.2e20101221"/>
</xs:appinfo>
</xs:annotation>
<xs:import namespace="http://www.fixprotocol.org/FIXatdl-1-1/Core" schemaLocation="fixatdl-core-1-1.xsd"/>
<!-- Please email any suggestions or revisions to algotech@fixprotocol.org-->
<!-- Please note - Revision history is at the end of this xsd -->
<!--
Validation Sub-Schema
In order to validate the parameter values entered by the user the following sub-schema has been provided.
It enables the creation of complex and conditional validation rules that can be applied to the algorithmic
orders generated by an OMS or EMS. -->
<xs:element name="StrategyEdit" type="lay:StrategyEdit_t"/>
<xs:complexType name="StrategyEdit_t">
<xs:annotation>
<xs:documentation>Specifies a strategy-wide rule consisting of a boolean expression and an error message to be didsplayed when the boolean expression evaluates to False().</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="core:Description" minOccurs="0">
<xs:annotation>
<xs:documentation>Optional description of the Strategy Edit.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="Edit" type="lay:Edit_t">
<xs:annotation>
<xs:documentation>Boolean expression evaluated in validation and flow control rules. An Edit element will describe a condition that is either true or false.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EditRef" type="lay:EditRef_t"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="errorMessage" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>The error message to display when the boolean expression defined by StrategyEdit/Edit evaluates to False.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="Edit" type="lay:Edit_t"/>
<xs:complexType name="Edit_t">
<xs:annotation>
<xs:documentation>Construct used to build a boolean expression.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="core:Description" minOccurs="0">
<xs:annotation>
<xs:documentation>Description of the Edit.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Edit" type="lay:Edit_t" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="EditRef" type="lay:EditRef_t" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="field" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Field name for comparison. When the edit is used within a stateRule, this field must refer to the ID of a Control. When the edit is used within a strategyEdit, this field must refer to either the name of a parameter or a standard FIX field name. When referring to a standard FIX tag then the name must be pre-pended with the string “FIX_”, e.g. “FIX_OrderQty”.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="field2" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Value used as the second operand. Used in conjunction with Edit/@field and Edit/@operator. Similar definition to Edit/@field except that it is mutually exclusive with Edit/@value.
Required when: Edit/@operator is in {GE, GT, LE, LT, EQ, NE} and Edit/@value is not specified.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Value used as the second operand. Used in conjunction with Edit/@field and Edit/@operator. Represents a string literal value and not a reference.
When Edit is a descendant of a StateRule element, Edit/@value refers to the value of the control referred by Edit/@field. If the control referred by Edit/@field has enumerated values then Edit/@value refers to the enumID of one of the control’s ListItem elements.
When Edit is a descendant of a StrategyEdit element, Edit/@value refers to the wireValue of the parameter referred by Edit/@field.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="operator" type="lay:operator_t" use="optional">
<xs:annotation>
<xs:documentation>One of the following enumerated types: EX (Exists or supplied by user), NX (Does not exist or was not supplied), EQ (Equal), LT (Less than), GT (Greater than), NE (Not equal), LE (Less than equal), GE (Greater than equal). Required when logicOperator is not present. An edit element must contain either a logicOperator attribute or an operator attribute, but never both.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="logicOperator" type="lay:logicOperator_t" use="optional">
<xs:annotation>
<xs:documentation>Operator where operands are one or more Edit elements. Short-circuit evaluation is assumed in all edit statements. Valid values are one of the enumerations: AND, OR, XOR, NOT. Required when operator is not present. An edit element must contain either a logicOperator attribute or an operator attribute, but never both.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Optional identifier. Allows for re-use of this edit within stateRule or editRef elements. This attribute is required if the Edit element is a direct child of either the Strategies or Strategy elements.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:element name="EditRef" type="lay:EditRef_t"/>
<xs:complexType name="EditRef_t">
<xs:attribute name="id" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Refers to an ID of a previously defined edit element. The edit element may be defined at the strategy level or at the strategies level.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="operator_t">
<xs:restriction base="xs:string">
<xs:enumeration value="EX"/>
<xs:enumeration value="NX"/>
<xs:enumeration value="EQ"/>
<xs:enumeration value="NE"/>
<xs:enumeration value="LE"/>
<xs:enumeration value="LT"/>
<xs:enumeration value="GE"/>
<xs:enumeration value="GT"/>
<!-- exists -->
<!-- not exists -->
<!-- equal -->
<!-- not equal -->
<!-- less than or equal -->
<!-- less than -->
<!-- greater than or equal -->
<!-- greater than -->
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="logicOperator_t">
<xs:restriction base="xs:string">
<xs:enumeration value="AND"/>
<xs:enumeration value="OR"/>
<xs:enumeration value="XOR"/>
<xs:enumeration value="NOT"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
<!-- Please email any revisions to the Steward of the Master Model & Mapping artifacts at algotech@fixprotocol.org -->
<!-- Revision History -->
<!-- Date Version Author Comments
Authors - Greg Malatestinic, Rick Labs, Zoltan Feledy, Jim Arlet, Gideon Kaplan, Martin Naughton, Mike McDermott and other
members of FPL Algo Trading WG. - if there is anyone else then please speak up :-)
30Jan08 v2.5 by Robert Golan for uris, revision history, and version stamping.
14May08 v2.4.9 by Greg Malatestinic
- changes to <edit> to support tree-like expression structure. Added field2 attribute. logicOperator and operator
are mutually exclusive - one is required.
23Jan09 v2.5.6 by Martin Naughton and Mike McDermott
- added a description element to strategyEdit and edit
- added a reference to the Core schema to support the description element reference
16Feb09 v2.5.9 by Mike McDermott
- added a 'val' alias to the default namespace for consistency
- created a StrategyEdit_t complex type to conform with the existing pattern
22Feb v2.7.2 by Greg Malatestinic
- All xsd files renamed to fixatdl-{sub-schema}-1-1.xsd. Import/@schemaLocation adjusted accordingly.
- Namespaces changed to http://www.fixprotocol.org/FIXatdl-1-1/{sub-schema}
15Dec2010 v2.7.2e by Greg Malatestinic
- Sync'd documentation with specification document.
-->
@@ -0,0 +1,282 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Concurrency;
using System.Text;
using QuickFix;
using QuickFix.Fields;
using bts.api;
using bts.api.core;
using bts.api.orderman;
using bts.api.user;
using bts.api.admin;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
using QuickFix.FIX42;
using Message = QuickFix.Message;
using System.Threading;
using System.Threading.Tasks;
namespace bts.fix
{
class DropCopySession : SessionBase
{
protected IDisposable _fillsdisp;
protected IDisposable _ordersdisp;
protected static Lazy<OrderService> _orderservice = new Lazy<OrderService>(() => bts.api.Locator.locate<OrderService>(), true);
protected readonly ConcurrentDictionary<uint, OrderRecordImmutable> _order_cache = new ConcurrentDictionary<uint, OrderRecordImmutable>();
protected readonly ConcurrentDictionary<uint, string> _fix_clorderids = new ConcurrentDictionary<uint, string>();
public DropCopySession(IFixRouter router, SessionID sess) : base(router, sess)
{
}
override public void OnLogon(SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
var msg = sessionID.ToString() + " Logged on";
log_info(msg);
subscribe_fills_and_orders(sessionID);
}
override public void OnLogout(SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
var msg = sessionID.ToString() + " Logged out";
log_info(msg);
if (_ordersdisp != null)
_ordersdisp.Dispose();
if (_fillsdisp != null)
_fillsdisp.Dispose();
}
override public void FromApp(Message message, SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
MsgType type = Message.IdentifyType(message.ToString());
switch (type.getValue())
{
case MsgType.ORDER_STATUS_REQUEST:
case MsgType.SECURITYDEFINITIONREQUEST:
log_info("IN: " + message);
Crack(message, sessionID);
break;
default:
log_info("UNSUPPORTED MESSAGE IN: " + type.getValue());
throw new UnsupportedMessageType();
}
}
virtual public void OnMessage(OrderStatusRequest req, SessionID s)
{
uint oid = uint.Parse(req.OrderID.getValue());
if (_order_cache.TryGetValue(oid, out OrderRecordImmutable order))
{
var ostat = build_order_status(s, order);
//ostat.OrdStatusReqID = new OrdStatusReqID(req.OrdStatusReqID.getValue());
//TODO
_router.send(ostat, s);
}
}
virtual public void OnMessage(SecurityDefinitionRequest req, SessionID s)
{
if (req.SecurityRequestType.getValue() == SecurityRequestType.REQUEST_LIST_SECURITIES)
{
var secs = _router.get_securities();
if (req.IsSetSymbol())
secs = secs.Where(x => x.Symbol.ToLower() == req.Symbol.getValue().ToLower());
if (req.IsSetSecurityType())
secs = secs.Where(x => security_types_equal(x.security_type(), req.SecurityType));
if (req.IsSetSecurityExchange())
secs = secs.Where(x => exchanges_equal(x.Exchange, req.SecurityExchange));
var def = new SecurityDefinition(req.SecurityReqID,
new SecurityResponseID(Guid.NewGuid().ToString()),
new TotalNumSecurities(secs.Count()));
_router.send(def, s);
}
else
throw new IncorrectTagValue(QuickFix.Fields.Tags.SecurityRequestType);
}
virtual async protected void subscribe_fills_and_orders(SessionID sessionID)
{
var scheduler = TaskPoolScheduler.Default;
var interval = TimeSpan.FromMilliseconds(500);
var on_orders = _orderservice.Value.subscribei_orders().Naggle(interval, scheduler).PermissionFilter(_adminobservable).Table().Cache();
var on_fills = _orderservice.Value.subscribei_fills().Naggle(interval, scheduler).PermissionFilter(_adminobservable).Table().Cache();
var odone = new TaskCompletionSource<int>();
_ordersdisp = on_orders.Subscribe(o =>
{
foreach (var order in o.added)
{
var ostat = build_order_status(sessionID, order);
_order_cache[order.Key] = order;
_router.send(ostat, sessionID);
}
foreach (var order in o.changed)
{
var ostat = build_order_status(sessionID, order, true);
_router.send(ostat, sessionID);
}
odone.TrySetResult(0);
});
await odone.Task;
_fillsdisp = on_fills.Subscribe(f =>
{
foreach (var fill in f.added)
{
var fi = build_fill(sessionID, fill);
_router.send(fi, sessionID);
}
foreach (var fill in f.changed)
{
var fi = build_fill(sessionID, fill, true);
_router.send(fi, sessionID);
}
});
}
virtual protected void process_order_state(in OrderStateImmutable state, ref uint filled, ref uint leaves, ref double avgprx,
ref QuickFix.Fields.OrdStatus fstatus, ref NativeOrderStateImmutable? native, FillImmutable? fill = null)
{
filled = state.FilledQuantity;
leaves = state.Quantity - state.FilledQuantity;
avgprx = state.AvgPrice;
fstatus = translate_status(state, ref native);
}
protected bts.api.SecurityImmutable? resolve_execution_report_security(bts.api.SecurityImmutable? sec, ExecutionReport report)
{
report.SecurityExchange = convert_exchange(sec.Value.Exchange);
var sectype = sec.Value.security_type();
report.SecurityType = convert_security_type(sectype);
if (sec.Value.HasGlbx)
report.SecurityDesc = new SecurityDesc(sec.Value.Glbx.SecurityDesc);
switch (sectype)
{
case bts.api.SecurityType.Future:
report.MaturityMonthYear = new MaturityMonthYear(sec.Value.EarliestExpiration().ToString("yyyyMMdd"));
break;
case bts.api.SecurityType.Spread: //TODO this is not quite right for spreads of spreads
var leg = sec.Value.Spread.Legs.OrderBy(x => x.Security.EarliestExpiration()).First();
report.MaturityMonthYear = new MaturityMonthYear(leg.Security.EarliestExpiration().ToString("yyyyMMdd"));
break;
default:
throw new UnsupportedMessageType();
}
return sec;
}
virtual protected ExecutionReport build_fill(SessionID sess, in FillImmutable fill, bool change = false)
{
var exec = new QuickFix.Fields.ExecType(QuickFix.Fields.ExecType.PARTIAL_FILL);
QuickFix.Fields.OrdStatus status = new QuickFix.Fields.OrdStatus();
uint filled = 0; uint leaves = 0; double prx = 0.0; uint orig_qty = 0;
OrderRecordImmutable order; NativeOrderStateImmutable? native = null;
if (_order_cache.TryGetValue(fill.OrderKey, out order))
{
orig_qty = order.State.Quantity;
process_order_state(order.State, ref filled, ref leaves, ref prx, ref status, ref native);
if(Convert.ToDouble(order.State.Quantity) == fill.LastShares)
exec = new QuickFix.Fields.ExecType(QuickFix.Fields.ExecType.FILL);
}
if (change)
exec = new QuickFix.Fields.ExecType(QuickFix.Fields.ExecType.TRADE_CORRECT);
var sec = _router.lookup(fill.SecurityKey);
ExecutionReport report = new ExecutionReport(
new OrderID(fill.OrderKey.ToString()),
new ExecID(fill.FillKey.ToString()),
new QuickFix.Fields.ExecTransType( ExecTransType.NEW ),
exec,
status,
new Symbol(sec?.Symbol ?? string.Empty),
new QuickFix.Fields.Side(fill.Side == bts.api.Side.Buy ? QuickFix.Fields.Side.BUY : QuickFix.Fields.Side.SELL),
new LeavesQty(leaves),
new CumQty(filled),
new AvgPx(Convert.ToDecimal(prx)));
report.Account = new Account(fill.Account);
report.OrderQty = new OrderQty(orig_qty);
report.LastShares = new LastShares(Convert.ToDecimal(fill.LastShares));
report.LastPx = new LastPx(Convert.ToDecimal(fill.LastPrice));
var ts = fill.HasTimestamp ? fill.Timestamp.ToDateTime() : DateTime.MinValue;
report.TransactTime = new TransactTime(ts, true);
report.TradeDate = new TradeDate(ts.ToString("yyyyMMdd"));
sec = resolve_execution_report_security(sec, report);
if (native.HasValue && !string.IsNullOrEmpty(native.Value.ExchangeOrderId))
report.SecondaryOrderID = new SecondaryOrderID(native.Value.ExchangeOrderId);
if (sec.HasValue && sec.Value.security_type() == bts.api.SecurityType.Spread ||
sec.Value.security_type() == bts.api.SecurityType.Synthetic)
{
if (fill.FillKind == bts.api.orderman.Fill.Types.FillKind.Leg)
report.MultiLegReportingType = new MultiLegReportingType('2');
else
report.MultiLegReportingType = new MultiLegReportingType('3');
}
return report;
}
virtual protected ExecutionReport build_order_status(SessionID sess, in OrderRecordImmutable order, bool change = false)
{
var exec = new QuickFix.Fields.ExecType(QuickFix.Fields.ExecType.NEW);
if (_order_cache.TryGetValue(order.Key, out OrderRecordImmutable _))
exec = new QuickFix.Fields.ExecType(QuickFix.Fields.ExecType.ORDER_STATUS);
QuickFix.Fields.OrdStatus status = new QuickFix.Fields.OrdStatus();
uint filled = 0; uint leaves = 0; double prx = 0.0; NativeOrderStateImmutable? native = null;
process_order_state(order.State, ref filled, ref leaves, ref prx, ref status, ref native);
var sec = _router.lookup(order.Def.SecurityKey);
ExecutionReport report = new ExecutionReport(
new OrderID(order.Key.ToString()),
new ExecID("0"),
new QuickFix.Fields.ExecTransType(ExecTransType.STATUS),
exec,
status,
new Symbol(sec?.Symbol ?? string.Empty),
new QuickFix.Fields.Side(order.Def.Side == bts.api.Side.Buy ? QuickFix.Fields.Side.BUY : QuickFix.Fields.Side.SELL),
new LeavesQty(leaves),
new CumQty(filled),
new AvgPx(Convert.ToDecimal(prx)));
report.Account = new Account(order.Def.Account);
report.OrderQty = new OrderQty(order.State.Quantity);
report.Price = new Price(Convert.ToDecimal(order.State.Price));
report.TimeInForce = new QuickFix.Fields.TimeInForce((char)order.Def.TimeInForce);
var ts = order.State.LastChange.ToDateTime();
report.TransactTime = new TransactTime(ts, true);
if(!string.IsNullOrEmpty(order.State.LastMsg))
report.Text = new Text(order.State.LastMsg);
sec = resolve_execution_report_security(sec, report);
if (native.HasValue)
{
report.OrdType = new OrdType((char)native.Value.NativeType);
if(!string.IsNullOrEmpty(native.Value.ExchangeOrderId))
report.SecondaryOrderID = new SecondaryOrderID(native.Value.ExchangeOrderId);
}
//TODO Big race here, we need a correlation id of some sort
if (_fix_clorderids.TryGetValue(order.Key, out string clorderid))
{
report.ClOrdID = new ClOrdID(clorderid);
}
return report;
}
}
}
@@ -0,0 +1,8 @@
using System;
namespace bts.fix
{
interface IFIXSession : QuickFix.IApplication
{
}
}
@@ -0,0 +1,191 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuickFix;
using QuickFix.Fields;
using bts.api;
using bts.api.orderman;
using QuickFix.FIX42;
using Message = QuickFix.Message;
namespace bts.fix
{
/*
create limit
8=FIX.4.29=15635=D49=CQG56=SPARK34=150=3073797=N52=20200109-20:20:5011=900010081=ACC A21=255=SIM:ESH0207=SIM54=160=20200809-18:20:3238=1040=244=320059=010=129
update limit
8=FIX.4.29=11035=G49=CQG56=SPARK37=1341=9000100811=9000200821=155= ESH054=160=20200113-19:45:2938=1040=244=320110=017
delete limit
8=FIX.4.29=9335=F49=CQG56=SPARK41= 9000100837=1311=9000300855=ESH054=160=20200113-19:45:2738=1010=247
create algo
8=FIX.4.29=15635=D49=CQG56=SPARK34=150=3073797=N52=20200109-20:20:5011=900010081=ACC A21=255=SIM:ESH0207=SIM54=160=20200809-18:20:3238=1040=244=320059=06401=Lean8401=118402=28405=010=128
*/
class OrderSession : DropCopySession
{
readonly ATDL _atdl = new ATDL();
public OrderSession(IFixRouter router, SessionID sess) : base(router, sess)
{
}
override public void FromApp(Message message, SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
MsgType type = Message.IdentifyType(message.ToString());
switch (type.getValue())
{
case MsgType.ORDER_STATUS_REQUEST: //handled in DropCopySession
case MsgType.SECURITYDEFINITIONREQUEST: //handled in DropCopySession
case MsgType.NEWORDERSINGLE:
case MsgType.ORDERCANCELREPLACEREQUEST:
case MsgType.ORDERCANCELREQUEST:
log_info("IN: " + message);
Crack(message, sessionID);
break;
default:
log_info("UNSUPPORTED MESSAGE IN: " + type.getValue());
throw new UnsupportedMessageType();
}
}
virtual public void OnMessage(OrderCancelRequest cancel, SessionID s)
{
var id = cancel.OrderID.getValue();
if(!uint.TryParse(id, out uint key))
throw new IncorrectTagValue(QuickFix.Fields.Tags.OrderID);
var resp = _orderservice.Value.cancel_order(new Cancel { OrderKey = key });
if (resp.ErrorCode != OrderError.Ok)
{
send_cancel_reject(s, "Cancel Rejected: " + resp.ErrorCode.ToString() + " - " + resp.Msg, cancel);
}
}
virtual public void OnMessage(OrderCancelReplaceRequest replace, SessionID s)
{
var id = replace.OrderID.getValue();
if (!uint.TryParse(id, out uint key))
throw new IncorrectTagValue(QuickFix.Fields.Tags.OrderID);
double price = Convert.ToDouble(replace.Price.getValue());
uint sz = Convert.ToUInt32(Math.Abs(replace.OrderQty.getValue()));
var upd = new Update
{
OrderKey = key,
Price = price,
Quantity = sz,
Custom = get_custom(replace),
};
var resp = _orderservice.Value.update_order(upd);
if (resp.ErrorCode != OrderError.Ok)
{
send_cancel_reject(s, "Cancel Rejected: " + resp.ErrorCode.ToString() + " - " + resp.Msg, replace);
}
}
virtual public void OnMessage(NewOrderSingle create, SessionID s)
{
Venue ven = Venue.Glbx;
if(create.IsSetSecurityExchange())
ven = convert_exchange(create.SecurityExchange);
if(create.IsSetExDestination())
ven = convert_exchange(create.ExDestination);
if (ven == bts.api.Venue.Unset)
throw new IncorrectTagValue(QuickFix.Fields.Tags.SecurityExchange);
var sec = _router.lookup(create.Symbol.getValue());
if (!sec.HasValue)
sec = _router.lookup(create.SecurityDesc.getValue());
if (!sec.HasValue)
throw new IncorrectTagValue(QuickFix.Fields.Tags.Symbol);
OrderDefinition def = (OrderDefinition)ProtoFix.create_message(OrderDefinition.Descriptor, create);
def.SecurityKey = sec.Value.Id;
def.User = _login_name;
def.UserId = lookup_user(_login_name);
def.AccountId = lookup_account(def.Account);
Create cr = new Create();
def.CustomDef = get_custom(create);
cr.NewOrder = def;
try
{
if (create.IsSetPrice())
cr.Price = Convert.ToDouble(create.Price.getValue());
}
catch { throw new IncorrectTagValue(QuickFix.Fields.Tags.Price); }
try
{
if(!create.IsSetOrderQty() || create.OrderQty.getValue() < 0)
throw new IncorrectTagValue(QuickFix.Fields.Tags.OrderQty);
cr.Quantity = Convert.ToUInt32(Math.Abs(create.OrderQty.getValue()));
}
catch { throw new IncorrectTagValue(QuickFix.Fields.Tags.OrderQty); }
if(!create.IsSetClOrdID())
throw new IncorrectTagValue(QuickFix.Fields.Tags.ClOrdID);
var resp = _orderservice.Value.create_order(cr);
_fix_clorderids[resp.OrderKey] = create.ClOrdID.getValue();
if (resp.ErrorCode != OrderError.Ok)
{
_router.send_biz_reject(s, "Order Rejected: " + resp.ErrorCode.ToString() + " - " + resp.Msg, create);
}
}
CustomOrderDefinition get_custom(Message fix)
{
FIXAlgoDefinition.Descriptor.FindFieldByNumber(FIXAlgoDefinition.NameFieldNumber).
CustomOptions.TryGetInt32((int)ApioptionsReflection.FieldOptions.fix_tag, out int algotag);
if(fix.IsSetField(algotag))
{
string algotype = fix.GetString(algotag);
if(!_atdl.algo_definitions.TryGetValue(algotype, out FIXAlgoDefinition algodef))
throw new IncorrectTagValue(algotag);
else
{
var custom = algodef.Definition.Clone();
var imsg = ATDL.extract_order_from_custom(custom);
ProtoFix.fix_to_imsg(imsg, fix);
return custom;
}
}
else
{
if(!fix.IsSetField(QuickFix.Fields.Tags.OrdType))
throw new IncorrectTagValue(QuickFix.Fields.Tags.OrdType);
switch (fix.GetChar(QuickFix.Fields.Tags.OrdType))
{
case '1':
return new CustomOrderDefinition { Market = new MarketOrderDefinition() };
case '2':
{
if(fix.IsSetField(QuickFix.Fields.Tags.MaxShow))
return new CustomOrderDefinition { GlbxIceberg =
new GLBXIcebergOrderDefinition() { MaxShowQuantity = (uint)Math.Abs(fix.GetInt(QuickFix.Fields.Tags.MaxShow)) }};
else
return new CustomOrderDefinition { Limit = new LimitOrderDefinition() };
}
case '3':
return new CustomOrderDefinition { Stop = new StopOrderDefinition()
{
StopPrice = Convert.ToDouble(fix.GetDecimal(QuickFix.Fields.Tags.StopPx)) }
};
case '4':
return new CustomOrderDefinition { StopLimit = new StopLimitOrderDefinition()
{
StopPrice = Convert.ToDouble(fix.GetDecimal(QuickFix.Fields.Tags.StopPx)) }
};
default:
throw new IncorrectTagValue(QuickFix.Fields.Tags.OrdType);
}
}
}
}
}
+378
View File
@@ -0,0 +1,378 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Concurrency;
using System.Text;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
using QuickFix;
using QuickFix.Fields;
using mbts;
using bts.api;
using bts.api.core;
using bts.api.orderman;
using bts.api.user;
using bts.api.admin;
using QuickFix.FIX42;
using Message = QuickFix.Message;
namespace bts.fix
{
abstract class SessionBase : QuickFix.MessageCracker, IFIXSession
{
protected static AuthService _authservice = bts.api.Locator.locate<AuthService>();
protected static Lazy<AdminService> _adminservice = new Lazy<AdminService>(() => bts.api.Locator.locate<AdminService>(), true);
protected static Lazy<bts.metrics.ShellLatencyService> _latencyservice =
new Lazy<bts.metrics.ShellLatencyService>(() => bts.api.Locator.locate<bts.metrics.ShellLatencyService>(), true);
protected string _login_name;
protected AuthToken _token;
protected IDisposable _admindisp;
protected IObservable<AdminModelWrapper> _adminobservable;
protected AdminDataImmutable? _admin_data;
protected readonly IFixRouter _router;
protected readonly SessionID _sess;
public SessionBase(IFixRouter router, SessionID sess)
{
_router = router;
_sess = sess;
_clockdisp = _latencyservice.Value.subscribe_clock().Subscribe(x =>
{
var t = x.all.FirstOrDefault();
if(t != null)
_clock = t.Timestamp;
});
_adminobservable = _adminservice.Value.subscribei_admin_data().Select(x =>
{
return new AdminModelWrapper(x.all.TryFirst(), _login_name);
});
_admindisp = _adminobservable.Subscribe(x => _admin_data = x.admin_data);
}
abstract public void FromApp(Message message, SessionID sessionID);
abstract public void OnLogon(SessionID sessionID); //subscribe to your stuff
abstract public void OnLogout(SessionID sessionID); //unsub
virtual public void ToApp(Message message, SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
log_info("OUT: " + message);
}
readonly IDisposable _clockdisp; ulong _clock = 0;
virtual public void FromAdmin(Message message, SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
MsgType type = Message.IdentifyType(message.ToString());
switch (type.getValue())
{
case MsgType.LOGON:
{
try
{
Logon msg = (Logon)message;
var fixlogin = new QuickFix.Fields.SenderCompID();
string login = msg.Header.GetString(fixlogin.Tag).ToLower();
// var fixuser = new QuickFix.Fields.TargetSubID();
// string user = msg.Header.GetString(fixuser.Tag);
_login_name = login;
string pass = string.Empty;
if(msg.IsSetRawData())
pass = msg.RawData.getValue();
var resp = _authservice.authenticate_login(new AuthenticateLoginRequest {
Login = login, Password = pass});
if (resp != null && resp.IsValid)
_token = resp.Token;
else
throw new RejectLogon("Logon rejected " + resp?.Reason ?? string.Empty);
}
catch (RejectLogon)
{
throw;
}
catch (Exception ex)
{
throw new RejectLogon("Logon rejected " + ex.ToString());
}
}
break;
case MsgType.HEARTBEAT:
{
Heartbeat hb = (Heartbeat)message;
handle_heartbeat(hb, sessionID);
}
break;
default:
log_info("ADMININ: " + message);
break;
}
}
async protected void handle_heartbeat(Heartbeat hb, SessionID sessionID)
{
var resp = await _latencyservice.Value.report_async(new bts.metrics.Report { HostName = "BTSFIX_" + sessionID.ToString(),
Timestamp = _clock, User = _login_name });
if (resp.success)
_router.send(hb, sessionID);
}
virtual public void ToAdmin(Message message, SessionID sessionID)
{
Log.assert_d(sessionID.Equals(_sess));
log_info("ADMINOUT: " + message);
}
virtual public void OnCreate(SessionID sessionID)
{
log_info("CREATE");
}
virtual public void OnMessage(BusinessMessageReject n, SessionID s)
{
//Log.assert(false, "biz reject wtf " + n.EncodedText.getValue());
Log.FIX.warn(_sess.ToString() + " Business Reject " + n.BusinessRejectReason.getValue() + " " + n.Text.getValue());
}
virtual public void OnMessage(News n, SessionID s)
{
log_info("news " + n.EncodedHeadline.getValue());
}
protected void log_info(string message, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0)
{
Log.FIX.info(_sess.ToString() + " " + message, file, line);
}
protected void log_error(string message, [CallerFilePath] string file = "", [CallerLineNumber] int line = 0)
{
Log.FIX.error(_sess.ToString() + " " + message, file, line);
}
protected void send_cancel_reject(SessionID sess, string text, Message refmessage)
{
OrderCancelReject rej = new OrderCancelReject();
if (refmessage is QuickFix.FIX42.OrderCancelRequest cancel)
{
if (cancel.IsSetClOrdID())
rej.SetField(cancel.ClOrdID);
if (cancel.IsSetOrigClOrdID())
rej.SetField(cancel.OrigClOrdID);
if (cancel.IsSetOrderID())
rej.SetField(cancel.OrderID);
rej.CxlRejResponseTo = new CxlRejResponseTo('1');
rej.Text = new Text(text);
_router.send(rej, sess);
}
else if (refmessage is OrderCancelReplaceRequest replace)
{
if (replace.IsSetClOrdID())
rej.SetField(replace.ClOrdID);
if (replace.IsSetOrigClOrdID())
rej.SetField(replace.OrigClOrdID);
if (replace.IsSetOrderID())
rej.SetField(replace.OrderID);
rej.CxlRejResponseTo = new CxlRejResponseTo('2');
rej.Text = new Text(text);
_router.send(rej, sess);
}
else
throw new UnsupportedMessageType();
}
protected bool security_types_equal(bts.api.SecurityType btstype, QuickFix.Fields.SecurityType fixtype)
{
return btstype == convert_security_type(fixtype);
}
protected QuickFix.Fields.SecurityType convert_security_type(bts.api.SecurityType btstype)
{
switch (btstype)
{
case bts.api.SecurityType.Future:
return new QuickFix.Fields.SecurityType("FUT");
case bts.api.SecurityType.Option:
return new QuickFix.Fields.SecurityType("OPT");
case bts.api.SecurityType.Spread:
return new QuickFix.Fields.SecurityType("MLEG");
case bts.api.SecurityType.Stock:
return new QuickFix.Fields.SecurityType("CS");
case bts.api.SecurityType.Synthetic:
return new QuickFix.Fields.SecurityType("SYNTH");
default:
return new QuickFix.Fields.SecurityType();
}
}
protected bts.api.SecurityType convert_security_type(QuickFix.Fields.SecurityType fixtype)
{
switch (fixtype.getValue())
{
case "FUT":
return bts.api.SecurityType.Future;
case "OPT":
return bts.api.SecurityType.Option;
case "MLEG":
return bts.api.SecurityType.Spread;
case "CS":
return bts.api.SecurityType.Stock;
case "SYNTH":
return bts.api.SecurityType.Synthetic;
default:
return bts.api.SecurityType.Unset;
}
}
protected bool exchanges_equal(bts.api.Venue btstype, QuickFix.Fields.SecurityExchange fixtype)
{
return btstype == convert_exchange(fixtype);
}
protected QuickFix.Fields.SecurityExchange convert_exchange(bts.api.Venue btstype)
{
switch (btstype)
{
case bts.api.Venue.Bts:
return new QuickFix.Fields.SecurityExchange("BTS");
case bts.api.Venue.Cboe:
return new QuickFix.Fields.SecurityExchange("XCBO");
case bts.api.Venue.Cboecfe:
return new QuickFix.Fields.SecurityExchange("XCBF");
case bts.api.Venue.Glbx:
return new QuickFix.Fields.SecurityExchange("XCME");
case bts.api.Venue.Ice:
return new QuickFix.Fields.SecurityExchange("IEPA");
case bts.api.Venue.Sim:
return new QuickFix.Fields.SecurityExchange("SIM");
default:
return new QuickFix.Fields.SecurityExchange();
}
}
protected bts.api.Venue convert_exchange(QuickFix.Fields.SecurityExchange fixtype)
{
return convert_exchange(fixtype.getValue());
}
protected bts.api.Venue convert_exchange(QuickFix.Fields.ExDestination fixtype)
{
return convert_exchange(fixtype.getValue());
}
protected bts.api.Venue convert_exchange(string venue)
{
switch (venue)
{
case "BTS":
return bts.api.Venue.Bts;
case "XCBO":
return bts.api.Venue.Cboe;
case "XCBF":
return bts.api.Venue.Cboecfe;
case "GLBX":
case "XCME":
case "XCBT":
case "XCEC":
case "XNYM":
return bts.api.Venue.Glbx;
case "IEPA":
case "IFUS":
case "IFEU":
case "IFLL":
return bts.api.Venue.Ice;
case "SIM":
return bts.api.Venue.Sim;
default:
return bts.api.Venue.Unset;
}
}
protected QuickFix.Fields.OrdStatus translate_status(in bts.api.orderman.OrderStateImmutable state,
ref bts.api.orderman.NativeOrderStateImmutable? native)
{
native = null;
if (state.HasMarket && state.Market.HasNativeState && state.Market.NativeState.NativeStatus != NativeOrderStatus.Unacknowledged)
{
native = state.Market.NativeState;
return new OrdStatus((char)native?.NativeStatus);
}
else if (state.HasLimit && state.Limit.HasNativeState && state.Limit.NativeState.NativeStatus != NativeOrderStatus.Unacknowledged)
{
native = state.Limit.NativeState;
return new OrdStatus((char)native?.NativeStatus);
}
else if (state.HasStop && state.Stop.HasNativeState && state.Stop.NativeState.NativeStatus != NativeOrderStatus.Unacknowledged)
{
native = state.Stop.NativeState;
return new OrdStatus((char)native?.NativeStatus);
}
else if (state.HasStopLimit && state.StopLimit.HasNativeState && state.StopLimit.NativeState.NativeStatus != NativeOrderStatus.Unacknowledged)
{
native = state.StopLimit.NativeState;
return new OrdStatus((char)native?.NativeStatus);
}
else
{
switch (state.Status)
{
case OrderStatus.Canceled:
return new OrdStatus(OrdStatus.CANCELED);
case OrderStatus.Completed:
return new OrdStatus(OrdStatus.FILLED);
case OrderStatus.Disconnected:
return new OrdStatus(OrdStatus.STOPPED);
case OrderStatus.Error:
return new OrdStatus(OrdStatus.REJECTED);
case OrderStatus.Inactive:
return new OrdStatus(OrdStatus.PENDING_NEW);
case OrderStatus.PendingWorking:
return new OrdStatus(OrdStatus.PENDING_NEW);
case OrderStatus.RejectedBySpark:
return new OrdStatus(OrdStatus.REJECTED);
case OrderStatus.Working:
{
if (state.FilledQuantity < state.Quantity)
return new OrdStatus(OrdStatus.PARTIALLY_FILLED);
else
return new OrdStatus(OrdStatus.NEW);
}
default:
return new OrdStatus();
}
}
}
protected uint lookup_account(string acct)
{
if (_admin_data.HasValue)
{
var ac = _admin_data.Value.Accounts.Where(x => x.Name == acct).TryFirst();
if(ac.HasValue)
return ac.Value.Id;
}
throw new IncorrectTagValue(new Account().Tag);
}
protected uint lookup_user(string user)
{
if (_admin_data.HasValue)
{
var ac = _admin_data.Value.Users.Where(x => x.Name == user).TryFirst();
if (ac.HasValue)
return ac.Value.Id;
}
throw new IncorrectTagValue(new Username().Tag);
}
}
}
+90
View File
@@ -0,0 +1,90 @@
{
"algoStrategy": [
{
"name": "TickAndCover",
"definition":
{
"cover":
{
"child":
{
"top": { "child": { "limit": {} } }
},
"hedge":
{
"lean": { "child": { "limit": {} } }
}
}
}
},
{
"name": "SmashAndCover",
"definition":
{
"cover":
{
"child":
{
"lean": { "child": { "limit": {} } }
},
"hedge":
{
"lean": { "child": { "limit": {} } }
}
}
}
},
{
"name": "JoinAndCover",
"definition":
{
"cover":
{
"child":
{
"join": { "child": { "limit": {} } }
},
"hedge":
{
"lean": { "child": { "limit": {} } }
}
}
}
},
{
"name": "Prorata",
"definition":
{
"prorata":
{
"child": { "limit": {} },
"hedge":
{
"scratch": { "child": { "limit": {} } }
},
"overfill_hedge":
{
"lean": { "child": { "limit": {} } }
}
}
}
},
{ "name": "Top", "definition": { "top": { "child": { "limit": {} } } } },
{ "name": "Cover",
"definition":
{
"cover":
{
"child" : { "limit": {} },
"hedge" : { "limit": {} }
}
}
},
{ "name": "Lean", "definition": { "lean": { "child": { "limit": {} } } } },
{ "name": "Join", "definition": { "join": { "child": { "limit": {} } } } },
{ "name": "Iceberg", "definition": { "iceberg": { "child": { "limit": {} } } } },
{ "name": "Scratch", "definition": { "scratch": { "child": { "limit": {} } } } },
{ "name": "ISpreader", "definition": { "iceberg": { "child": { "spreader": {} } } } },
{ "name": "Spreader", "definition": { "spreader": { } } }
]
}
+42
View File
@@ -0,0 +1,42 @@
#http://www.quickfixengine.org/quickfix/doc/html/configuration.html
#https://www.onixs.biz/fix-dictionary.html
[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=5001
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
FileLogPath=log
UseDataDictionary=N
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y
HeartBtInt=30
LogonTimeout=30
SSLEnable=N
# SSLEnable=Y
# # It is recommended to install the certificate and refer to it by name instead of using filename + password
# SSLCertificate=QuickFixn-TestServer.pfx
# SSLCertificatePassword=QuickFixn-TestServer
# # For production refer to certificate by name instead: SSLCertificate=CN=QuickFixn-TestServer
# SSLCACertificate=QuickFixn-TestCA.cer
# SSLCheckCertificateRevocation=N
[SESSION]
BeginString=FIX.4.2
SenderCompID=SPARK
TargetCompID=CQG
FileStorePath=store
DataDictionary=./spec/fix/FIX42.xml
[SESSION]
BeginString=FIX.4.2
SenderCompID=SPARK
TargetCompID=CLIENT2
FileStorePath=store
DataDictionary=./spec/fix/FIX42.xml
+65
View File
@@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Authors>Blue Trading Systems</Authors>
<Company>Blue Trading Systems</Company>
<Product>Spark</Product>
<Description />
<Platforms>x64</Platforms>
<PlatformTarget>AnyCPU</PlatformTarget>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<LangVersion>7.2</LangVersion>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive.PlatformServices" Version="3.1.1" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="QuickFix.Net.NETCore" Version="1.8.1" />
<PackageReference Include="QuickFix.Net.NETCore.FIX42" Version="1.8.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
<ItemGroup Condition = " '$(OS)' == 'Windows_NT' ">
<Reference Include="fixatdl">
<HintPath>../../../externals/windows/lib/debug/Atdl4net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../spark_api/spark_api.csproj"/>
<ProjectReference Include="../spark_core/spark_core.csproj"/>
</ItemGroup>
<Target Name="copy_fix" AfterTargets="PostBuildEvent" >
<Copy SourceFiles="./spark_fix.cfg" DestinationFolder="$(OutputPath)/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spark_algos.json" DestinationFolder="$(OutputPath)/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spec/fix/FIX42.xml" DestinationFolder="$(OutputPath)/spec/fix/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spec/fix/FIX44.xml" DestinationFolder="$(OutputPath)/spec/fix/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-core-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-flow-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-layout-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-regions-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-timezones-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-validation-1-1.xsd" DestinationFolder="$(OutputPath)/atdl/schema/" SkipUnchangedFiles="true" />
</Target>
<Target Name="copy_fix471" AfterTargets="PostBuildEvent" >
<Copy SourceFiles="./spark_fix.cfg" DestinationFolder="$(OutputPath)/../net471" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spark_algos.json" DestinationFolder="$(OutputPath)/../net471" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spec/fix/FIX42.xml" DestinationFolder="$(OutputPath)/../net471/spec/fix/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./spec/fix/FIX44.xml" DestinationFolder="$(OutputPath)/../net471/spec/fix/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-core-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-flow-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-layout-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-regions-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-timezones-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
<Copy SourceFiles="./atdl/schema/fixatdl-validation-1-1.xsd" DestinationFolder="$(OutputPath)/../net471/atdl/schema/" SkipUnchangedFiles="true" />
</Target>
</Project>
+828
View File
@@ -0,0 +1,828 @@
<fix major="4" minor="0">
<header>
<field name="BeginString" required="Y"/>
<field name="BodyLength" required="Y"/>
<field name="MsgType" required="Y"/>
<field name="SenderCompID" required="Y"/>
<field name="TargetCompID" required="Y"/>
<field name="OnBehalfOfCompID" required="N"/>
<field name="DeliverToCompID" required="N"/>
<field name="SecureDataLen" required="N"/>
<field name="SecureData" required="N"/>
<field name="MsgSeqNum" required="Y"/>
<field name="SenderSubID" required="N"/>
<field name="TargetSubID" required="N"/>
<field name="OnBehalfOfSubID" required="N"/>
<field name="DeliverToSubID" required="N"/>
<field name="PossDupFlag" required="N"/>
<field name="PossResend" required="N"/>
<field name="SendingTime" required="Y"/>
<field name="OrigSendingTime" required="N"/>
</header>
<trailer>
<field name="SignatureLength" required="N"/>
<field name="Signature" required="N"/>
<field name="CheckSum" required="Y"/>
</trailer>
<messages>
<message name="Heartbeat" msgtype="0" msgcat="admin">
<field name="TestReqID" required="N"/>
</message>
<message name="Logon" msgtype="A" msgcat="admin">
<field name="EncryptMethod" required="Y"/>
<field name="HeartBtInt" required="Y"/>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="TestRequest" msgtype="1" msgcat="admin">
<field name="TestReqID" required="Y"/>
</message>
<message name="ResendRequest" msgtype="2" msgcat="admin">
<field name="BeginSeqNo" required="Y"/>
<field name="EndSeqNo" required="Y"/>
</message>
<message name="Reject" msgtype="3" msgcat="admin">
<field name="RefSeqNum" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="SequenceReset" msgtype="4" msgcat="admin">
<field name="GapFillFlag" required="N"/>
<field name="NewSeqNo" required="Y"/>
</message>
<message name="Logout" msgtype="5" msgcat="admin">
<field name="Text" required="N"/>
</message>
<message name="Advertisement" msgtype="7" msgcat="app">
<field name="AdvId" required="Y"/>
<field name="AdvTransType" required="Y"/>
<field name="AdvRefID" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="AdvSide" required="Y"/>
<field name="Shares" required="Y"/>
<field name="Price" required="N"/>
<field name="Currency" required="N"/>
<field name="TransactTime" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="IndicationofInterest" msgtype="6" msgcat="app">
<field name="IOIid" required="Y"/>
<field name="IOITransType" required="Y"/>
<field name="IOIRefID" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="IOIShares" required="Y"/>
<field name="Price" required="N"/>
<field name="Currency" required="N"/>
<field name="ValidUntilTime" required="N"/>
<field name="IOIQltyInd" required="N"/>
<field name="IOIOthSvc" required="N"/>
<field name="IOINaturalFlag" required="N"/>
<field name="IOIQualifier" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="News" msgtype="B" msgcat="app">
<field name="OrigTime" required="N"/>
<field name="Urgency" required="N"/>
<field name="RelatdSym" required="N" repeating="Y"/>
<group name="LinesOfText" required="Y">
<field name="Text" required="Y"/>
</group>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="Email" msgtype="C" msgcat="app">
<field name="EmailType" required="Y"/>
<field name="OrigTime" required="N"/>
<field name="RelatdSym" required="N" repeating="Y"/>
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="N"/>
<group name="LinesOfText" required="Y">
<field name="Text" required="Y"/>
</group>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="QuoteRequest" msgtype="R" msgcat="app">
<field name="QuoteReqID" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="N"/>
<field name="OrderQty" required="N"/>
</message>
<message name="Quote" msgtype="S" msgcat="app">
<field name="QuoteReqID" required="N"/>
<field name="QuoteID" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="BidPx" required="Y"/>
<field name="OfferPx" required="N"/>
<field name="BidSize" required="N"/>
<field name="OfferSize" required="N"/>
<field name="ValidUntilTime" required="N"/>
</message>
<message name="NewOrderSingle" msgtype="D" msgcat="app">
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="ProcessCode" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="Y"/>
<field name="LocateReqd" required="N"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="IOIid" required="N"/>
<field name="QuoteID" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ExecutionReport" msgtype="8" msgcat="app">
<field name="OrderID" required="Y"/>
<field name="ClOrdID" required="N"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ListID" required="N"/>
<field name="ExecID" required="Y"/>
<field name="ExecTransType" required="Y"/>
<field name="ExecRefID" required="N"/>
<field name="OrdStatus" required="Y"/>
<field name="OrdRejReason" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="N"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="ExecInst" required="N"/>
<field name="Rule80A" required="N"/>
<field name="LastShares" required="Y"/>
<field name="LastPx" required="Y"/>
<field name="LastMkt" required="N"/>
<field name="LastCapacity" required="N"/>
<field name="CumQty" required="Y"/>
<field name="AvgPx" required="Y"/>
<field name="TradeDate" required="N"/>
<field name="TransactTime" required="N"/>
<field name="ReportToExch" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<group name="NoMiscFees" required="N">
<field name="MiscFeeAmt" required="N"/>
<field name="MiscFeeCurr" required="N"/>
<field name="MiscFeeType" required="N"/>
</group>
<field name="NetMoney" required="N"/>
<field name="SettlCurrAmt" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="DontKnowTrade" msgtype="Q" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ExecID" required="N"/>
<field name="DKReason" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="LastShares" required="Y"/>
<field name="LastPx" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelReplaceRequest" msgtype="G" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="OrigClOrdID" required="Y"/>
<field name="ClOrdID" required="Y"/>
<field name="ListID" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelRequest" msgtype="F" msgcat="app">
<field name="OrigClOrdID" required="Y"/>
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ListID" required="N"/>
<field name="CxlType" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelReject" msgtype="9" msgcat="app">
<field name="OrderID" required="Y"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ListID" required="N"/>
<field name="CxlRejReason" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="OrderStatusRequest" msgtype="H" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
</message>
<message name="Allocation" msgtype="J" msgcat="app">
<field name="AllocID" required="Y"/>
<field name="AllocTransType" required="Y"/>
<field name="RefAllocID" required="N"/>
<group name="NoOrders" required="Y">
<field name="ClOrdID" required="Y"/>
<field name="OrderID" required="N"/>
<field name="ListID" required="N"/>
<field name="WaveNo" required="N"/>
</group>
<group name="NoExecs" required="N">
<field name="ExecID" required="N"/>
<field name="LastShares" required="N"/>
<field name="LastPx" required="N"/>
<field name="LastMkt" required="N"/>
</group>
<field name="Side" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Shares" required="Y"/>
<field name="AvgPx" required="Y"/>
<field name="Currency" required="N"/>
<field name="AvgPrxPrecision" required="N"/>
<field name="TradeDate" required="Y"/>
<field name="TransactTime" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="NetMoney" required="N"/>
<group name="NoMiscFees" required="N">
<field name="MiscFeeAmt" required="N"/>
<field name="MiscFeeCurr" required="N"/>
<field name="MiscFeeType" required="N"/>
</group>
<field name="SettlCurrAmt" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="OpenClose" required="N"/>
<field name="Text" required="N"/>
<group name="NoAllocs" required="Y">
<field name="AllocAccount" required="Y"/>
<field name="AllocShares" required="Y"/>
<field name="ProcessCode" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ClientID" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<group name="NoDlvyInst" required="N">
<field name="BrokerOfCredit" required="N"/>
<field name="DlvyInst" required="N"/>
</group>
</group>
</message>
<message name="AllocationACK" msgtype="P" msgcat="app">
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="AllocID" required="Y"/>
<field name="TradeDate" required="Y"/>
<field name="TransactTime" required="N"/>
<field name="AllocStatus" required="Y"/>
<field name="AllocRejCode" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="NewOrderList" msgtype="E" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="ListSeqNo" required="Y"/>
<field name="ListNoOrds" required="Y"/>
<field name="ListExecInst" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="ProcessCode" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="Y"/>
<field name="LocateReqd" required="N"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListStatus" msgtype="N" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="NoRpts" required="Y"/>
<field name="RptSeq" required="Y"/>
<group name="NoOrders" required="Y">
<field name="ClOrdID" required="Y"/>
<field name="CumQty" required="Y"/>
<field name="CxlQty" required="Y"/>
<field name="AvgPx" required="Y"/>
</group>
</message>
<message name="ListExecute" msgtype="L" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListCancelRequest" msgtype="K" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListStatusRequest" msgtype="M" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
</messages>
<fields>
<field number="1" name="Account" type="STRING"/>
<field number="2" name="AdvId" type="INT"/>
<field number="3" name="AdvRefID" type="INT"/>
<field number="4" name="AdvSide" type="STRING">
<value enum="B" description="BUY"/>
<value enum="S" description="SELL"/>
<value enum="X" description="CROSS"/>
<value enum="T" description="TRADE"/>
</field>
<field number="5" name="AdvTransType" type="STRING">
<value enum="N" description="NEW"/>
<value enum="C" description="CANCEL"/>
<value enum="R" description="REPLACE"/>
</field>
<field number="6" name="AvgPx" type="FLOAT"/>
<field number="7" name="BeginSeqNo" type="INT"/>
<field number="8" name="BeginString" type="STRING"/>
<field number="9" name="BodyLength" type="INT"/>
<field number="10" name="CheckSum" type="STRING"/>
<field number="11" name="ClOrdID" type="STRING"/>
<field number="12" name="Commission" type="FLOAT"/>
<field number="13" name="CommType" type="STRING">
<value enum="1" description="PER_SHARE"/>
<value enum="2" description="PERCENTAGE"/>
<value enum="3" description="ABSOLUTE"/>
</field>
<field number="14" name="CumQty" type="INT"/>
<field number="15" name="Currency" type="STRING"/>
<field number="16" name="EndSeqNo" type="INT"/>
<field number="17" name="ExecID" type="INT"/>
<field number="18" name="ExecInst" type="MULTIPLEVALUESTRING">
<value enum="1" description="NOT_HELD"/>
<value enum="2" description="WORK"/>
<value enum="3" description="GO_ALONG"/>
<value enum="4" description="OVER_THE_DAY"/>
<value enum="5" description="HELD"/>
<value enum="6" description="PARTICIPATE_DONT_INITIATE"/>
<value enum="7" description="STRICT_SCALE"/>
<value enum="8" description="TRY_TO_SCALE"/>
<value enum="9" description="STAY_ON_BIDSIDE"/>
<value enum="0" description="STAY_ON_OFFERSIDE"/>
<value enum="A" description="NO_CROSS"/>
<value enum="B" description="OK_TO_CROSS"/>
<value enum="C" description="CALL_FIRST"/>
<value enum="D" description="PERCENT_OF_VOLUME"/>
<value enum="E" description="DO_NOT_INCREASE_DNI"/>
<value enum="F" description="DO_NOT_REDUCE_DNR"/>
<value enum="G" description="ALL_OR_NONE_AON"/>
<value enum="I" description="INSTITUTIONS_ONLY"/>
<value enum="L" description="LAST_PEG"/>
<value enum="M" description="MIDPRICE_PEG"/>
<value enum="N" description="NONNEGOTIABLE"/>
<value enum="O" description="OPENING_PEG"/>
<value enum="P" description="MARKET_PEG"/>
<value enum="R" description="PRIMARY_PEG"/>
<value enum="S" description="SUSPEND"/>
</field>
<field number="19" name="ExecRefID" type="INT"/>
<field number="20" name="ExecTransType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="CANCEL"/>
<value enum="2" description="CORRECT"/>
<value enum="3" description="STATUS"/>
</field>
<field number="21" name="HandlInst" type="STRING">
<value enum="1" description="AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION"/>
<value enum="2" description="AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK"/>
<value enum="3" description="MANUAL_ORDER_BEST_EXECUTION"/>
</field>
<field number="22" name="IDSource" type="STRING">
<value enum="1" description="CUSIP"/>
<value enum="2" description="SEDOL"/>
<value enum="3" description="QUIK"/>
<value enum="4" description="ISIN_NUMBER"/>
<value enum="5" description="RIC_CODE"/>
</field>
<field number="23" name="IOIid" type="INT"/>
<field number="24" name="IOIOthSvc" type="STRING"/>
<field number="25" name="IOIQltyInd" type="STRING">
<value enum="L" description="LOW"/>
<value enum="M" description="MEDIUM"/>
<value enum="H" description="HIGH"/>
</field>
<field number="26" name="IOIRefID" type="INT"/>
<field number="27" name="IOIShares" type="STRING"/>
<field number="28" name="IOITransType" type="STRING">
<value enum="N" description="NEW"/>
<value enum="C" description="CANCEL"/>
<value enum="R" description="REPLACE"/>
</field>
<field number="29" name="LastCapacity" type="STRING">
<value enum="1" description="AGENT"/>
<value enum="2" description="CROSS_AS_AGENT"/>
<value enum="3" description="CROSS_AS_PRINCIPAL"/>
<value enum="4" description="PRINCIPAL"/>
</field>
<field number="30" name="LastMkt" type="STRING"/>
<field number="31" name="LastPx" type="FLOAT"/>
<field number="32" name="LastShares" type="INT"/>
<field number="33" name="LinesOfText" type="INT"/>
<field number="34" name="MsgSeqNum" type="INT"/>
<field number="35" name="MsgType" type="STRING"/>
<field number="36" name="NewSeqNo" type="INT"/>
<field number="37" name="OrderID" type="STRING"/>
<field number="38" name="OrderQty" type="INT"/>
<field number="39" name="OrdStatus" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="PARTIALLY_FILLED"/>
<value enum="2" description="FILLED"/>
<value enum="3" description="DONE_FOR_DAY"/>
<value enum="4" description="CANCELED"/>
<value enum="5" description="REPLACED"/>
<value enum="6" description="PENDING_CANCELREPLACE"/>
<value enum="7" description="STOPPED"/>
<value enum="8" description="REJECTED"/>
<value enum="9" description="SUSPENDED"/>
<value enum="A" description="PENDING_NEW"/>
<value enum="B" description="CALCULATED"/>
<value enum="C" description="EXPIRED"/>
</field>
<field number="40" name="OrdType" type="STRING">
<value enum="1" description="MARKET"/>
<value enum="2" description="LIMIT"/>
<value enum="3" description="STOP"/>
<value enum="4" description="STOP_LIMIT"/>
<value enum="5" description="MARKET_ON_CLOSE"/>
<value enum="6" description="WITH_OR_WITHOUT"/>
<value enum="7" description="LIMIT_OR_BETTER"/>
<value enum="8" description="LIMIT_WITH_OR_WITHOUT"/>
<value enum="9" description="ON_BASIS"/>
<value enum="A" description="ON_CLOSE"/>
<value enum="B" description="LIMIT_ON_CLOSE"/>
<value enum="C" description="FOREX"/>
<value enum="D" description="PREVIOUSLY_QUOTED"/>
<value enum="E" description="PREVIOUSLY_INDICATED"/>
<value enum="P" description="PEGGED"/>
</field>
<field number="41" name="OrigClOrdID" type="STRING"/>
<field number="42" name="OrigTime" type="TIME"/>
<field number="43" name="PossDupFlag" type="STRING">
<value enum="Y" description="POSSIBLE_DUPLICATE"/>
<value enum="N" description="ORIGINAL_TRANSMISSION"/>
</field>
<field number="44" name="Price" type="FLOAT"/>
<field number="45" name="RefSeqNum" type="INT"/>
<field number="46" name="RelatdSym" type="STRING"/>
<field number="47" name="Rule80A" type="STRING">
<value enum="A" description="AGENCY_SINGLE_ORDER"/>
<value enum="D" description="PROGRAM_ORDER_INDEX_ARB_FOR_MEMBER_FIRMORG"/>
<value enum="C" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_MEMBER_FIRMORG"/>
<value enum="J" description="PROGRAM_ORDER_INDEX_ARB_FOR_INDIVIDUAL_CUSTOMER"/>
<value enum="K" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_INDIVIDUAL_CUSTOMER"/>
<value enum="U" description="PROGRAM_ORDER_INDEX_ARB_FOR_OTHER_AGENCY"/>
<value enum="Y" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_OTHER_AGENCY"/>
<value enum="M" description="PROGRAM_ORDER_INDEX_ARB_FOR_OTHER_MEMBER"/>
<value enum="N" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_OTHER_MEMBER"/>
<value enum="W" description="ALL_OTHER_ORDERS_AS_AGENT_FOR_OTHER_MEMBER"/>
</field>
<field number="48" name="SecurityID" type="STRING"/>
<field number="49" name="SenderCompID" type="STRING"/>
<field number="50" name="SenderSubID" type="STRING"/>
<field number="52" name="SendingTime" type="TIME"/>
<field number="53" name="Shares" type="INT"/>
<field number="54" name="Side" type="STRING">
<value enum="1" description="BUY"/>
<value enum="2" description="SELL"/>
<value enum="3" description="BUY_MINUS"/>
<value enum="4" description="SELL_PLUS"/>
<value enum="5" description="SELL_SHORT"/>
<value enum="6" description="SELL_SHORT_EXEMPT"/>
</field>
<field number="55" name="Symbol" type="STRING"/>
<field number="56" name="TargetCompID" type="STRING"/>
<field number="57" name="TargetSubID" type="STRING"/>
<field number="58" name="Text" type="STRING"/>
<field number="59" name="TimeInForce" type="STRING">
<value enum="0" description="DAY"/>
<value enum="1" description="GOOD_TILL_CANCEL"/>
<value enum="2" description="AT_THE_OPENING"/>
<value enum="3" description="IMMEDIATE_OR_CANCEL"/>
<value enum="4" description="FILL_OR_KILL"/>
<value enum="5" description="GOOD_TILL_CROSSING"/>
<value enum="6" description="GOOD_TILL_DATE"/>
</field>
<field number="60" name="TransactTime" type="TIME"/>
<field number="61" name="Urgency" type="STRING">
<value enum="0" description="NORMAL"/>
<value enum="1" description="FLASH"/>
<value enum="2" description="BACKGROUND"/>
</field>
<field number="62" name="ValidUntilTime" type="TIME"/>
<field number="63" name="SettlmntTyp" type="STRING">
<value enum="0" description="REGULAR"/>
<value enum="1" description="CASH"/>
<value enum="2" description="NEXT_DAY"/>
<value enum="3" description="TPLUS2"/>
<value enum="4" description="TPLUS3"/>
<value enum="5" description="TPLUS4"/>
<value enum="6" description="FUTURE"/>
<value enum="7" description="WHEN_ISSUED"/>
<value enum="8" description="SELLERS_OPTION"/>
<value enum="9" description="TPLUS5"/>
</field>
<field number="64" name="FutSettDate" type="DATE"/>
<field number="65" name="SymbolSfx" type="STRING"/>
<field number="66" name="ListID" type="STRING"/>
<field number="67" name="ListSeqNo" type="INT"/>
<field number="68" name="ListNoOrds" type="INT"/>
<field number="69" name="ListExecInst" type="STRING"/>
<field number="70" name="AllocID" type="INT"/>
<field number="71" name="AllocTransType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="REPLACE"/>
<value enum="2" description="CANCEL"/>
</field>
<field number="72" name="RefAllocID" type="INT"/>
<field number="73" name="NoOrders" type="INT"/>
<field number="74" name="AvgPrxPrecision" type="INT"/>
<field number="75" name="TradeDate" type="DATE"/>
<field number="76" name="ExecBroker" type="STRING"/>
<field number="77" name="OpenClose" type="STRING"/>
<field number="78" name="NoAllocs" type="INT"/>
<field number="79" name="AllocAccount" type="STRING"/>
<field number="80" name="AllocShares" type="INT"/>
<field number="81" name="ProcessCode" type="STRING">
<value enum="0" description="REGULAR"/>
<value enum="1" description="SOFT_DOLLAR"/>
<value enum="2" description="STEPIN"/>
<value enum="3" description="STEPOUT"/>
<value enum="4" description="SOFTDOLLAR_STEPIN"/>
<value enum="5" description="SOFTDOLLAR_STEPOUT"/>
<value enum="6" description="PLAN_SPONSOR"/>
</field>
<field number="82" name="NoRpts" type="INT"/>
<field number="83" name="RptSeq" type="INT"/>
<field number="84" name="CxlQty" type="INT"/>
<field number="85" name="NoDlvyInst" type="INT"/>
<field number="86" name="DlvyInst" type="STRING"/>
<field number="87" name="AllocStatus" type="INT">
<value enum="0" description="ACCEPTED"/>
<value enum="1" description="REJECTED"/>
<value enum="2" description="PARTIAL_ACCEPT"/>
<value enum="3" description="RECEIVED"/>
</field>
<field number="88" name="AllocRejCode" type="INT">
<value enum="0" description="UNKNOWN_ACCOUNT"/>
<value enum="1" description="INCORRECT_QUANTITY"/>
<value enum="2" description="INCORRECT_AVERAGE_PRICE"/>
<value enum="3" description="UNKNOWN_EXECUTING_BROKER_MNEMONIC"/>
<value enum="4" description="COMMISSION_DIFFERENCE"/>
<value enum="5" description="UNKNOWN_ORDERID"/>
<value enum="6" description="UNKNOWN_LISTID"/>
<value enum="7" description="OTHER"/>
</field>
<field number="89" name="Signature" type="DATA"/>
<field number="90" name="SecureDataLen" type="INT"/>
<field number="91" name="SecureData" type="DATA"/>
<field number="92" name="BrokerOfCredit" type="STRING"/>
<field number="93" name="SignatureLength" type="INT"/>
<field number="94" name="EmailType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="REPLY"/>
<value enum="2" description="ADMIN_REPLY"/>
</field>
<field number="95" name="RawDataLength" type="INT"/>
<field number="96" name="RawData" type="DATA"/>
<field number="97" name="PossResend" type="STRING"/>
<field number="98" name="EncryptMethod" type="INT">
<value enum="0" description="NONE_OTHER"/>
<value enum="1" description="PKCS"/>
<value enum="2" description="DES"/>
<value enum="3" description="PKCSDES"/>
<value enum="4" description="PGPDES"/>
<value enum="5" description="PGPDESMD5"/>
<value enum="6" description="PEMDESMD5"/>
</field>
<field number="99" name="StopPx" type="FLOAT"/>
<field number="100" name="ExDestination" type="STRING">
<value enum="0" description="NONE"/>
<value enum="4" description="POSIT"/>
</field>
<field number="102" name="CxlRejReason" type="INT">
<value enum="0" description="TOO_LATE_TO_CANCEL"/>
<value enum="1" description="UNKNOWN_ORDER"/>
</field>
<field number="103" name="OrdRejReason" type="INT">
<value enum="0" description="BROKER_OPTION"/>
<value enum="1" description="UNKNOWN_SYMBOL"/>
<value enum="2" description="EXCHANGE_CLOSED"/>
<value enum="3" description="ORDER_EXCEEDS_LIMIT"/>
<value enum="4" description="TOO_LATE_TO_ENTER"/>
</field>
<field number="104" name="IOIQualifier" type="STRING">
<value enum="X" description="CROSSING_OPPORTUNITY"/>
<value enum="O" description="AT_THE_OPEN"/>
<value enum="M" description="MORE_BEHIND"/>
<value enum="P" description="TAKING_A_POSITION"/>
<value enum="V" description="VERSUS"/>
<value enum="Q" description="CURRENT_QUOTE"/>
<value enum="C" description="AT_THE_CLOSE"/>
<value enum="S" description="PORTFOLIO_SHOWN"/>
<value enum="I" description="IN_TOUCH_WITH"/>
<value enum="W" description="INDICATION_WORKING_AWAY"/>
<value enum="A" description="ALL_OR_NONE"/>
<value enum="L" description="LIMIT"/>
<value enum="T" description="THROUGH_THE_DAY"/>
</field>
<field number="105" name="WaveNo" type="STRING"/>
<field number="106" name="Issuer" type="STRING"/>
<field number="107" name="SecurityDesc" type="STRING"/>
<field number="108" name="HeartBtInt" type="INT"/>
<field number="109" name="ClientID" type="STRING"/>
<field number="110" name="MinQty" type="INT"/>
<field number="111" name="MaxFloor" type="INT"/>
<field number="112" name="TestReqID" type="STRING"/>
<field number="113" name="ReportToExch" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="114" name="LocateReqd" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="115" name="OnBehalfOfCompID" type="STRING"/>
<field number="116" name="OnBehalfOfSubID" type="STRING"/>
<field number="117" name="QuoteID" type="STRING"/>
<field number="118" name="NetMoney" type="FLOAT"/>
<field number="119" name="SettlCurrAmt" type="FLOAT"/>
<field number="120" name="SettlCurrency" type="STRING"/>
<field number="121" name="ForexReq" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="122" name="OrigSendingTime" type="TIME"/>
<field number="123" name="GapFillFlag" type="STRING">
<value enum="Y" description="GAP_FILL_MESSAGE_MSGSEQNUM_FIELD_VALID"/>
<value enum="N" description="SEQUENCE_RESET_IGNORE_MSGSEQNUM"/>
</field>
<field number="124" name="NoExecs" type="INT"/>
<field number="125" name="CxlType" type="STRING">
<value enum="P" description="PARTIAL_CANCEL"/>
<value enum="F" description="FULL_REMAINING_QUANTITY"/>
</field>
<field number="126" name="ExpireTime" type="TIME"/>
<field number="127" name="DKReason" type="STRING">
<value enum="A" description="UNKNOWN_SYMBOL"/>
<value enum="B" description="WRONG_SIDE"/>
<value enum="C" description="QUANTITY_EXCEEDS_ORDER"/>
<value enum="D" description="NO_MATCHING_ORDER"/>
<value enum="E" description="PRICE_EXCEEDS_LIMIT"/>
<value enum="Z" description="OTHER" />
</field>
<field number="128" name="DeliverToCompID" type="STRING"/>
<field number="129" name="DeliverToSubID" type="STRING"/>
<field number="130" name="IOINaturalFlag" type="STRING">
<value enum="Y" description="NATURAL"/>
<value enum="N" description="NOT_NATURAL"/>
</field>
<field number="131" name="QuoteReqID" type="STRING"/>
<field number="132" name="BidPx" type="FLOAT"/>
<field number="133" name="OfferPx" type="FLOAT"/>
<field number="134" name="BidSize" type="INT"/>
<field number="135" name="OfferSize" type="INT"/>
<field number="136" name="NoMiscFees" type="INT"/>
<field number="137" name="MiscFeeAmt" type="FLOAT"/>
<field number="138" name="MiscFeeCurr" type="STRING"/>
<field number="139" name="MiscFeeType" type="STRING">
<value enum="1" description="REGULATORY"/>
<value enum="2" description="TAX"/>
<value enum="3" description="LOCAL_COMMISSION"/>
<value enum="4" description="EXCHANGE_FEES"/>
<value enum="5" description="STAMP"/>
<value enum="6" description="LEVY"/>
<value enum="7" description="OTHER"/>
</field>
<field number="140" name="PrevClosePx" type="FLOAT"/>
</fields>
</fix>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+313
View File
@@ -0,0 +1,313 @@
<?xml version='1.0' encoding='UTF-8'?>
<fix type='FIXT' major='1' minor='1' servicepack='0'>
<header>
<field name='BeginString' required='Y'/>
<field name='BodyLength' required='Y'/>
<field name='MsgType' required='Y'/>
<field name='SenderCompID' required='Y'/>
<field name='TargetCompID' required='Y'/>
<field name='OnBehalfOfCompID' required='N'/>
<field name='DeliverToCompID' required='N'/>
<field name='SecureDataLen' required='N'/>
<field name='SecureData' required='N'/>
<field name='MsgSeqNum' required='Y'/>
<field name='SenderSubID' required='N'/>
<field name='SenderLocationID' required='N'/>
<field name='TargetSubID' required='N'/>
<field name='TargetLocationID' required='N'/>
<field name='OnBehalfOfSubID' required='N'/>
<field name='OnBehalfOfLocationID' required='N'/>
<field name='DeliverToSubID' required='N'/>
<field name='DeliverToLocationID' required='N'/>
<field name='PossDupFlag' required='N'/>
<field name='PossResend' required='N'/>
<field name='SendingTime' required='Y'/>
<field name='OrigSendingTime' required='N'/>
<field name='XmlDataLen' required='N'/>
<field name='XmlData' required='N'/>
<field name='MessageEncoding' required='N'/>
<field name='LastMsgSeqNumProcessed' required='N'/>
<component name='HopGrp' required='N'/>
<field name='ApplVerID' required='N'/>
<field name='CstmApplVerID' required='N'/>
</header>
<trailer>
<field name='SignatureLength' required='N'/>
<field name='Signature' required='N'/>
<field name='CheckSum' required='Y'/>
</trailer>
<messages>
<message msgcat='admin' msgtype='0' name='Heartbeat'>
<field name='TestReqID' required='N'/>
</message>
<message msgcat='admin' msgtype='1' name='TestRequest'>
<field name='TestReqID' required='Y'/>
</message>
<message msgcat='admin' msgtype='2' name='ResendRequest'>
<field name='BeginSeqNo' required='Y'/>
<field name='EndSeqNo' required='Y'/>
</message>
<message msgcat='admin' msgtype='3' name='Reject'>
<field name='RefSeqNum' required='Y'/>
<field name='RefTagID' required='N'/>
<field name='RefMsgType' required='N'/>
<field name='SessionRejectReason' required='N'/>
<field name='Text' required='N'/>
<field name='EncodedTextLen' required='N'/>
<field name='EncodedText' required='N'/>
</message>
<message msgcat='admin' msgtype='4' name='SequenceReset'>
<field name='GapFillFlag' required='N'/>
<field name='NewSeqNo' required='Y'/>
</message>
<message msgcat='admin' msgtype='5' name='Logout'>
<field name='Text' required='N'/>
<field name='EncodedTextLen' required='N'/>
<field name='EncodedText' required='N'/>
</message>
<message msgcat='admin' msgtype='A' name='Logon'>
<field name='EncryptMethod' required='Y'/>
<field name='HeartBtInt' required='Y'/>
<field name='RawDataLength' required='N'/>
<field name='RawData' required='N'/>
<field name='ResetSeqNumFlag' required='N'/>
<field name='NextExpectedMsgSeqNum' required='N'/>
<field name='MaxMessageSize' required='N'/>
<field name='TestMessageIndicator' required='N'/>
<field name='Username' required='N'/>
<field name='Password' required='N'/>
<field name='DefaultApplVerID' required='Y'/>
<component name='MsgTypeGrp' required='N'/>
</message>
</messages>
<components>
<component name='HopGrp'>
<group name='NoHops' required='N'>
<field name='HopCompID' required='N'/>
<field name='HopSendingTime' required='N'/>
<field name='HopRefID' required='N'/>
</group>
</component>
<component name='MsgTypeGrp'>
<group name='NoMsgTypes' required='N'>
<field name='RefMsgType' required='N'/>
<field name='MsgDirection' required='N'/>
<field name='RefApplVerID' required='N'/>
<field name='RefCstmApplVerID' required='N'/>
</group>
</component>
</components>
<fields>
<field name='BeginSeqNo' number='7' type='SEQNUM'/>
<field name='BeginString' number='8' type='STRING'/>
<field name='BodyLength' number='9' type='LENGTH'/>
<field name='CheckSum' number='10' type='STRING'/>
<field name='EndSeqNo' number='16' type='SEQNUM'/>
<field name='MsgSeqNum' number='34' type='SEQNUM'/>
<field number='35' name='MsgType' type='STRING'>
<value enum='0' description='HEARTBEAT'/>
<value enum='1' description='TEST_REQUEST'/>
<value enum='2' description='RESEND_REQUEST'/>
<value enum='3' description='REJECT'/>
<value enum='4' description='SEQUENCE_RESET'/>
<value enum='5' description='LOGOUT'/>
<value enum='6' description='INDICATION_OF_INTEREST'/>
<value enum='7' description='ADVERTISEMENT'/>
<value enum='8' description='EXECUTION_REPORT'/>
<value enum='9' description='ORDER_CANCEL_REJECT'/>
<value enum='A' description='LOGON'/>
<value enum='B' description='NEWS'/>
<value enum='C' description='EMAIL'/>
<value enum='D' description='ORDER_SINGLE'/>
<value enum='E' description='ORDER_LIST'/>
<value enum='F' description='ORDER_CANCEL_REQUEST'/>
<value enum='G' description='ORDER_CANCEL_REPLACE_REQUEST'/>
<value enum='H' description='ORDER_STATUS_REQUEST'/>
<value enum='J' description='ALLOCATION_INSTRUCTION'/>
<value enum='K' description='LIST_CANCEL_REQUEST'/>
<value enum='L' description='LIST_EXECUTE'/>
<value enum='M' description='LIST_STATUS_REQUEST'/>
<value enum='N' description='LIST_STATUS'/>
<value enum='P' description='ALLOCATION_INSTRUCTION_ACK'/>
<value enum='Q' description='DONT_KNOW_TRADE'/>
<value enum='R' description='QUOTE_REQUEST'/>
<value enum='S' description='QUOTE'/>
<value enum='T' description='SETTLEMENT_INSTRUCTIONS'/>
<value enum='V' description='MARKET_DATA_REQUEST'/>
<value enum='W' description='MARKET_DATA_SNAPSHOT_FULL_REFRESH'/>
<value enum='X' description='MARKET_DATA_INCREMENTAL_REFRESH'/>
<value enum='Y' description='MARKET_DATA_REQUEST_REJECT'/>
<value enum='Z' description='QUOTE_CANCEL'/>
<value enum='a' description='QUOTE_STATUS_REQUEST'/>
<value enum='b' description='MASS_QUOTE_ACKNOWLEDGEMENT'/>
<value enum='c' description='SECURITY_DEFINITION_REQUEST'/>
<value enum='d' description='SECURITY_DEFINITION'/>
<value enum='e' description='SECURITY_STATUS_REQUEST'/>
<value enum='f' description='SECURITY_STATUS'/>
<value enum='g' description='TRADING_SESSION_STATUS_REQUEST'/>
<value enum='h' description='TRADING_SESSION_STATUS'/>
<value enum='i' description='MASS_QUOTE'/>
<value enum='j' description='BUSINESS_MESSAGE_REJECT'/>
<value enum='k' description='BID_REQUEST'/>
<value enum='l' description='BID_RESPONSE'/>
<value enum='m' description='LIST_STRIKE_PRICE'/>
<value enum='n' description='XML_MESSAGE'/>
<value enum='o' description='REGISTRATION_INSTRUCTIONS'/>
<value enum='p' description='REGISTRATION_INSTRUCTIONS_RESPONSE'/>
<value enum='q' description='ORDER_MASS_CANCEL_REQUEST'/>
<value enum='r' description='ORDER_MASS_CANCEL_REPORT'/>
<value enum='s' description='NEW_ORDER_CROSS'/>
<value enum='t' description='CROSS_ORDER_CANCEL_REPLACE_REQUEST'/>
<value enum='u' description='CROSS_ORDER_CANCEL_REQUEST'/>
<value enum='v' description='SECURITY_TYPE_REQUEST'/>
<value enum='w' description='SECURITY_TYPES'/>
<value enum='x' description='SECURITY_LIST_REQUEST'/>
<value enum='y' description='SECURITY_LIST'/>
<value enum='z' description='DERIVATIVE_SECURITY_LIST_REQUEST'/>
<value enum='AA' description='DERIVATIVE_SECURITY_LIST'/>
<value enum='AB' description='NEW_ORDER_MULTILEG'/>
<value enum='AC' description='MULTILEG_ORDER_CANCEL_REPLACE'/>
<value enum='AD' description='TRADE_CAPTURE_REPORT_REQUEST'/>
<value enum='AE' description='TRADE_CAPTURE_REPORT'/>
<value enum='AF' description='ORDER_MASS_STATUS_REQUEST'/>
<value enum='AG' description='QUOTE_REQUEST_REJECT'/>
<value enum='AH' description='RFQ_REQUEST'/>
<value enum='AI' description='QUOTE_STATUS_REPORT'/>
<value enum='AJ' description='QUOTE_RESPONSE'/>
<value enum='AK' description='CONFIRMATION'/>
<value enum='AL' description='POSITION_MAINTENANCE_REQUEST'/>
<value enum='AM' description='POSITION_MAINTENANCE_REPORT'/>
<value enum='AN' description='REQUEST_FOR_POSITIONS'/>
<value enum='AO' description='REQUEST_FOR_POSITIONS_ACK'/>
<value enum='AP' description='POSITION_REPORT'/>
<value enum='AQ' description='TRADE_CAPTURE_REPORT_REQUEST_ACK'/>
<value enum='AR' description='TRADE_CAPTURE_REPORT_ACK'/>
<value enum='AS' description='ALLOCATION_REPORT'/>
<value enum='AT' description='ALLOCATION_REPORT_ACK'/>
<value enum='AU' description='CONFIRMATION_ACK'/>
<value enum='AV' description='SETTLEMENT_INSTRUCTION_REQUEST'/>
<value enum='AW' description='ASSIGNMENT_REPORT'/>
<value enum='AX' description='COLLATERAL_REQUEST'/>
<value enum='AY' description='COLLATERAL_ASSIGNMENT'/>
<value enum='AZ' description='COLLATERAL_RESPONSE'/>
<value enum='BA' description='COLLATERAL_REPORT'/>
<value enum='BB' description='COLLATERAL_INQUIRY'/>
<value enum='BC' description='NETWORK_STATUS_REQUEST'/>
<value enum='BD' description='NETWORK_STATUS_RESPONSE'/>
<value enum='BE' description='USER_REQUEST'/>
<value enum='BF' description='USER_RESPONSE'/>
<value enum='BG' description='COLLATERAL_INQUIRY_ACK'/>
<value enum='BH' description='CONFIRMATION_REQUEST'/>
<value enum='BI' description='TRADING_SESSION_LIST_REQUEST'/>
<value enum='BJ' description='TRADING_SESSION_LIST'/>
<value enum='BK' description='SECURITY_LIST_UPDATE_REPORT'/>
<value enum='BL' description='ADJUSTED_POSITION_REPORT'/>
<value enum='BM' description='ALLOCATION_INSTRUCTION_ALERT'/>
<value enum='BN' description='EXECUTION_ACKNOWLEDGEMENT'/>
<value enum='BO' description='CONTRARY_INTENTION_REPORT'/>
<value enum='BP' description='SECURITY_DEFINITION_UPDATE_REPORT'/>
</field>
<field name='NewSeqNo' number='36' type='SEQNUM'/>
<field name='PossDupFlag' number='43' type='BOOLEAN'/>
<field name='RefSeqNum' number='45' type='SEQNUM'/>
<field name='SenderCompID' number='49' type='STRING'/>
<field name='SenderSubID' number='50' type='STRING'/>
<field name='SendingTime' number='52' type='UTCTIMESTAMP'/>
<field name='TargetCompID' number='56' type='STRING'/>
<field name='TargetSubID' number='57' type='STRING'/>
<field name='Text' number='58' type='STRING'/>
<field name='Signature' number='89' type='DATA'/>
<field name='SecureDataLen' number='90' type='LENGTH'/>
<field name='SecureData' number='91' type='DATA'/>
<field name='SignatureLength' number='93' type='LENGTH'/>
<field name='RawDataLength' number='95' type='LENGTH'/>
<field name='RawData' number='96' type='DATA'/>
<field name='PossResend' number='97' type='BOOLEAN'/>
<field name='EncryptMethod' number='98' type='INT'>
<value description='NONE_OTHER' enum='0'/>
<value description='PKCS' enum='1'/>
<value description='DES' enum='2'/>
<value description='PKCS_DES' enum='3'/>
<value description='PGP_DES' enum='4'/>
<value description='PGP_DES_MD5' enum='5'/>
<value description='PEM_DES_MD5' enum='6'/>
</field>
<field name='HeartBtInt' number='108' type='INT'/>
<field name='TestReqID' number='112' type='STRING'/>
<field name='OnBehalfOfCompID' number='115' type='STRING'/>
<field name='OnBehalfOfSubID' number='116' type='STRING'/>
<field name='OrigSendingTime' number='122' type='UTCTIMESTAMP'/>
<field name='GapFillFlag' number='123' type='BOOLEAN'/>
<field name='DeliverToCompID' number='128' type='STRING'/>
<field name='DeliverToSubID' number='129' type='STRING'/>
<field name='ResetSeqNumFlag' number='141' type='BOOLEAN'/>
<field name='SenderLocationID' number='142' type='STRING'/>
<field name='TargetLocationID' number='143' type='STRING'/>
<field name='OnBehalfOfLocationID' number='144' type='STRING'/>
<field name='DeliverToLocationID' number='145' type='STRING'/>
<field name='XmlDataLen' number='212' type='LENGTH'/>
<field name='XmlData' number='213' type='DATA'/>
<field number='347' name='MessageEncoding' type='STRING'>
<value enum='ISO-2022-JP' description='ISO_2022_JP'/>
<value enum='EUC-JP' description='EUC_JP'/>
<value enum='SHIFT_JIS' description='SHIFT_JIS'/>
<value enum='UTF-8' description='UTF_8'/>
</field>
<field name='EncodedTextLen' number='354' type='LENGTH'/>
<field name='EncodedText' number='355' type='DATA'/>
<field name='LastMsgSeqNumProcessed' number='369' type='SEQNUM'/>
<field name='RefTagID' number='371' type='INT'/>
<field name='RefMsgType' number='372' type='STRING'/>
<field name='SessionRejectReason' number='373' type='INT'>
<value description='INVALID_TAG_NUMBER' enum='0'/>
<value description='REQUIRED_TAG_MISSING' enum='1'/>
<value description='SENDINGTIME_ACCURACY_PROBLEM' enum='10'/>
<value description='INVALID_MSGTYPE' enum='11'/>
<value description='XML_VALIDATION_ERROR' enum='12'/>
<value description='TAG_APPEARS_MORE_THAN_ONCE' enum='13'/>
<value description='TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER' enum='14'/>
<value description='REPEATING_GROUP_FIELDS_OUT_OF_ORDER' enum='15'/>
<value description='INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP' enum='16'/>
<value description='NON_DATA_VALUE_INCLUDES_FIELD_DELIMITER' enum='17'/>
<value description='TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE' enum='2'/>
<value description='UNDEFINED_TAG' enum='3'/>
<value description='TAG_SPECIFIED_WITHOUT_A_VALUE' enum='4'/>
<value description='VALUE_IS_INCORRECT' enum='5'/>
<value description='INCORRECT_DATA_FORMAT_FOR_VALUE' enum='6'/>
<value description='DECRYPTION_PROBLEM' enum='7'/>
<value description='SIGNATURE_PROBLEM' enum='8'/>
<value description='COMPID_PROBLEM' enum='9'/>
<value description='OTHER' enum='99'/>
</field>
<field name='MaxMessageSize' number='383' type='LENGTH'/>
<field name='NoMsgTypes' number='384' type='NUMINGROUP'/>
<field name='MsgDirection' number='385' type='CHAR'>
<value description='RECEIVE' enum='R'/>
<value description='SEND' enum='S'/>
</field>
<field name='TestMessageIndicator' number='464' type='BOOLEAN'/>
<field name='Username' number='553' type='STRING'/>
<field name='Password' number='554' type='STRING'/>
<field name='NoHops' number='627' type='NUMINGROUP'/>
<field name='HopCompID' number='628' type='STRING'/>
<field name='HopSendingTime' number='629' type='UTCTIMESTAMP'/>
<field name='HopRefID' number='630' type='SEQNUM'/>
<field name='NextExpectedMsgSeqNum' number='789' type='SEQNUM'/>
<field name='ApplVerID' number='1128' type='STRING'>
<value description='FIX27' enum='0'/>
<value description='FIX30' enum='1'/>
<value description='FIX40' enum='2'/>
<value description='FIX41' enum='3'/>
<value description='FIX42' enum='4'/>
<value description='FIX43' enum='5'/>
<value description='FIX44' enum='6'/>
<value description='FIX50' enum='7'/>
<value description='FIX50SP1' enum='8'/>
<value description='FIX50SP2' enum='9'/>
</field>
<field name='CstmApplVerID' number='1129' type='STRING'/>
<field name='RefApplVerID' number='1130' type='STRING'/>
<field name='RefCstmApplVerID' number='1131' type='STRING'/>
<field name='DefaultApplVerID' number='1137' type='STRING'/>
</fields>
</fix>
+8 -1
View File
@@ -1,6 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
<TargetFrameworks>net471</TargetFrameworks>
<RuntimeIdentifiers>win7-x64</RuntimeIdentifiers>
<TargetFrameworks Condition = " '$(OS)' != 'Windows_NT' ">netcoreapp3.1</TargetFrameworks>
<RuntimeIdentifier Condition = " '$(OS)' != 'Windows_NT' ">linux-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<OutputType>Exe</OutputType>
<GeneratePackageOnBuild Condition="$(Configuration) == 'Release' or $(Configuration) == 'Release'">true</GeneratePackageOnBuild>
<PackageOutputPath>$(OutputPath)\net471</PackageOutputPath>
+2 -1
View File
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Platform>x64</Platform>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
+80
View File
@@ -0,0 +1,80 @@
using System;
using System.Linq;
using CommandLine;
using bts.fix;
namespace bts
{
[Verb("fix", HelpText = "Fix command")]
public class FIXCommandOptions
{
[Option('f', "config", Required = false, Default = "./spark_fix.cfg")]
public string config_file { get; set; }
[Option('i', "initiator", Default = false, Required = false)]
public bool initiator{ get; set; }
[Option('w', "http", Required = false, Default = "http://127.0.0.1:5080/")]
public string http{ get; set; }
[Option('o', "order_session", Default = false, Required = false)]
public bool order_session{ get; set; }
[Option('d', "dropcopy_only", Default = false, Required = false)]
public bool dropcopy_only { get; set; }
[Option('e', "algo_import_file", Default = ATDL.default_algo_import_path, Required = false)]
public string algo_import_file { get; set; }
[Option('e', "export_atdl_path", Default = null, Required = false)]
public string export_atdl_path { get; set; }
[Option('e', "validate_atdl_path", Default = null, Required = false)]
public string validate_atdl_path { get; set; }
[Option('s', "export_single_file", Default = false, Required = false)]
public bool export_single_file { get; set; }
}
public class FIXCommand
{
public static int Run(FIXCommandOptions opt)
{
if (opt.order_session)
{
Console.WriteLine("Starting FIX ORDERS Acceptor using " + opt.config_file);
if(!string.IsNullOrEmpty(opt.http))
Console.WriteLine(" Http server " + opt.http);
return FixInit.start_acceptor(opt.config_file, true, (string.IsNullOrEmpty(opt.http) ? null : opt.http));
}
else if (opt.dropcopy_only)
{
Console.WriteLine("Starting FIX DROP Acceptor using " + opt.config_file);
if (!string.IsNullOrEmpty(opt.http))
Console.WriteLine(" Http server " + opt.http);
return FixInit.start_acceptor(opt.config_file, false, (string.IsNullOrEmpty(opt.http) ? null : opt.http));
}
else if (opt.initiator)
{
Console.WriteLine("Initiator not supported yet");
return -1;
}
else if(opt.export_atdl_path != null)
{
new ATDL(opt.algo_import_file).write_fix_atdl(opt.export_atdl_path, opt.export_single_file);
return 0;
}
else if (opt.validate_atdl_path != null)
{
ATDL.validate_fix_atdl(opt.validate_atdl_path);
return 0;
}
string[] args = Parser.Default.FormatCommandLine(opt).Split(' ');
var res = Parser.Default.ParseArguments<FIXCommandOptions>(args);
var help = CommandLine.Text.HelpText.AutoBuild(res, h => h, r => r).ToString();
Console.WriteLine(help);
return -1;
}
}
}
+4 -1
View File
@@ -44,7 +44,8 @@ namespace sparkcmd {
SettingsManagerOptions,
TestCommandOptions,
OrderStressOptions,
MBOCommandOptions
MBOCommandOptions,
FIXCommandOptions
>(BTS.remove_config_arg(args))
.MapResult<
ConfigcheckOptions,
@@ -55,6 +56,7 @@ namespace sparkcmd {
TestCommandOptions,
OrderStressOptions,
MBOCommandOptions,
FIXCommandOptions,
int>(
Configcheck.Run,
ScriptClientCommand.Run,
@@ -64,6 +66,7 @@ namespace sparkcmd {
TestCommand.Run,
OrderStress.Run,
MBOCommand.Run,
FIXCommand.Run,
errors => 1);
}
}
+8 -2
View File
@@ -2,8 +2,13 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net471;netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers>win7-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
<TargetFramework>net471</TargetFramework>
<TargetFramework Condition = " '$(OS)' != 'Windows_NT' ">netcoreapp3.1</TargetFramework>
<RuntimeIdentifier Condition = " '$(OS)' != 'Windows_NT' ">linux-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<Authors>Blue Trading Systems</Authors>
<Company>Blue Trading Systems</Company>
<Product>Spark</Product>
@@ -18,6 +23,7 @@
<!--<ProjectReference Include="..\spark\Spark.csproj" />-->
<ProjectReference Include="..\spark_core\spark_core.csproj" />
<ProjectReference Include="..\spark_test\spark_test.csproj" />
<ProjectReference Include="../spark_fix/spark_fix.csproj" />
<!--<Proto3 Include="**/*.proto" />-->
</ItemGroup>
-1
View File
@@ -1 +0,0 @@
set(sources files/cert_secure_logon.txt;files/futures.coconut.xz;files/onixs_ice/ConnectivityConfiguration.APITest.xml;files/onixs_ice/ConnectivityConfiguration.PerfTest.xml;files/onixs_ice/ConnectivityConfiguration.Production.xml;files/perf_trace/compiled.css;files/perf_trace/index.html;files/perf_trace/jquery-3.3.1.min.js;files/perf_trace/main.js;files/perf_trace/perf_log.sql;files/perf_trace/perf_trace_analysis.sql;files/perf_trace/plotly-latest.min.js)
+41
View File
@@ -0,0 +1,41 @@
#http://www.quickfixengine.org/quickfix/doc/html/configuration.html
#https://www.onixs.biz/fix-dictionary.html
[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=5001
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
ResetOnLogon=Y
ResetOnLogout=Y
ResetOnDisconnect=Y
HeartBtInt=30
LogonTimeout=30
FileLogPath=data_files/fix/log/
FileStorePath=data_files/fix/store/
SSLEnable=N
# SSLEnable=Y
# # It is recommended to install the certificate and refer to it by name instead of using filename + password
# SSLCertificate=QuickFixn-TestServer.pfx
# SSLCertificatePassword=QuickFixn-TestServer
# # For production refer to certificate by name instead: SSLCertificate=CN=QuickFixn-TestServer
# SSLCACertificate=QuickFixn-TestCA.cer
# SSLCheckCertificateRevocation=N
[SESSION]
BeginString=FIX.4.4
SenderCompID=SPARKFIX
TargetCompID=CLIENT1
DataDictionary=data_files/fix/spec/fix/FIX44.xml
[SESSION]
BeginString=FIX.4.4
SenderCompID=SPARKFIX
TargetCompID=CLIENT2
DataDictionary=data_files/fix/spec/fix/FIX44.xml
+828
View File
@@ -0,0 +1,828 @@
<fix major="4" minor="0">
<header>
<field name="BeginString" required="Y"/>
<field name="BodyLength" required="Y"/>
<field name="MsgType" required="Y"/>
<field name="SenderCompID" required="Y"/>
<field name="TargetCompID" required="Y"/>
<field name="OnBehalfOfCompID" required="N"/>
<field name="DeliverToCompID" required="N"/>
<field name="SecureDataLen" required="N"/>
<field name="SecureData" required="N"/>
<field name="MsgSeqNum" required="Y"/>
<field name="SenderSubID" required="N"/>
<field name="TargetSubID" required="N"/>
<field name="OnBehalfOfSubID" required="N"/>
<field name="DeliverToSubID" required="N"/>
<field name="PossDupFlag" required="N"/>
<field name="PossResend" required="N"/>
<field name="SendingTime" required="Y"/>
<field name="OrigSendingTime" required="N"/>
</header>
<trailer>
<field name="SignatureLength" required="N"/>
<field name="Signature" required="N"/>
<field name="CheckSum" required="Y"/>
</trailer>
<messages>
<message name="Heartbeat" msgtype="0" msgcat="admin">
<field name="TestReqID" required="N"/>
</message>
<message name="Logon" msgtype="A" msgcat="admin">
<field name="EncryptMethod" required="Y"/>
<field name="HeartBtInt" required="Y"/>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="TestRequest" msgtype="1" msgcat="admin">
<field name="TestReqID" required="Y"/>
</message>
<message name="ResendRequest" msgtype="2" msgcat="admin">
<field name="BeginSeqNo" required="Y"/>
<field name="EndSeqNo" required="Y"/>
</message>
<message name="Reject" msgtype="3" msgcat="admin">
<field name="RefSeqNum" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="SequenceReset" msgtype="4" msgcat="admin">
<field name="GapFillFlag" required="N"/>
<field name="NewSeqNo" required="Y"/>
</message>
<message name="Logout" msgtype="5" msgcat="admin">
<field name="Text" required="N"/>
</message>
<message name="Advertisement" msgtype="7" msgcat="app">
<field name="AdvId" required="Y"/>
<field name="AdvTransType" required="Y"/>
<field name="AdvRefID" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="AdvSide" required="Y"/>
<field name="Shares" required="Y"/>
<field name="Price" required="N"/>
<field name="Currency" required="N"/>
<field name="TransactTime" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="IndicationofInterest" msgtype="6" msgcat="app">
<field name="IOIid" required="Y"/>
<field name="IOITransType" required="Y"/>
<field name="IOIRefID" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="IOIShares" required="Y"/>
<field name="Price" required="N"/>
<field name="Currency" required="N"/>
<field name="ValidUntilTime" required="N"/>
<field name="IOIQltyInd" required="N"/>
<field name="IOIOthSvc" required="N"/>
<field name="IOINaturalFlag" required="N"/>
<field name="IOIQualifier" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="News" msgtype="B" msgcat="app">
<field name="OrigTime" required="N"/>
<field name="Urgency" required="N"/>
<field name="RelatdSym" required="N" repeating="Y"/>
<group name="LinesOfText" required="Y">
<field name="Text" required="Y"/>
</group>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="Email" msgtype="C" msgcat="app">
<field name="EmailType" required="Y"/>
<field name="OrigTime" required="N"/>
<field name="RelatdSym" required="N" repeating="Y"/>
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="N"/>
<group name="LinesOfText" required="Y">
<field name="Text" required="Y"/>
</group>
<field name="RawDataLength" required="N"/>
<field name="RawData" required="N"/>
</message>
<message name="QuoteRequest" msgtype="R" msgcat="app">
<field name="QuoteReqID" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="N"/>
<field name="OrderQty" required="N"/>
</message>
<message name="Quote" msgtype="S" msgcat="app">
<field name="QuoteReqID" required="N"/>
<field name="QuoteID" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="BidPx" required="Y"/>
<field name="OfferPx" required="N"/>
<field name="BidSize" required="N"/>
<field name="OfferSize" required="N"/>
<field name="ValidUntilTime" required="N"/>
</message>
<message name="NewOrderSingle" msgtype="D" msgcat="app">
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="ProcessCode" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="Y"/>
<field name="LocateReqd" required="N"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="IOIid" required="N"/>
<field name="QuoteID" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ExecutionReport" msgtype="8" msgcat="app">
<field name="OrderID" required="Y"/>
<field name="ClOrdID" required="N"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ListID" required="N"/>
<field name="ExecID" required="Y"/>
<field name="ExecTransType" required="Y"/>
<field name="ExecRefID" required="N"/>
<field name="OrdStatus" required="Y"/>
<field name="OrdRejReason" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="N"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="ExecInst" required="N"/>
<field name="Rule80A" required="N"/>
<field name="LastShares" required="Y"/>
<field name="LastPx" required="Y"/>
<field name="LastMkt" required="N"/>
<field name="LastCapacity" required="N"/>
<field name="CumQty" required="Y"/>
<field name="AvgPx" required="Y"/>
<field name="TradeDate" required="N"/>
<field name="TransactTime" required="N"/>
<field name="ReportToExch" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<group name="NoMiscFees" required="N">
<field name="MiscFeeAmt" required="N"/>
<field name="MiscFeeCurr" required="N"/>
<field name="MiscFeeType" required="N"/>
</group>
<field name="NetMoney" required="N"/>
<field name="SettlCurrAmt" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="DontKnowTrade" msgtype="Q" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ExecID" required="N"/>
<field name="DKReason" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="LastShares" required="Y"/>
<field name="LastPx" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelReplaceRequest" msgtype="G" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="OrigClOrdID" required="Y"/>
<field name="ClOrdID" required="Y"/>
<field name="ListID" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelRequest" msgtype="F" msgcat="app">
<field name="OrigClOrdID" required="Y"/>
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ListID" required="N"/>
<field name="CxlType" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
<field name="OrderQty" required="Y"/>
<field name="Text" required="N"/>
</message>
<message name="OrderCancelReject" msgtype="9" msgcat="app">
<field name="OrderID" required="Y"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ListID" required="N"/>
<field name="CxlRejReason" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="OrderStatusRequest" msgtype="H" msgcat="app">
<field name="OrderID" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Side" required="Y"/>
</message>
<message name="Allocation" msgtype="J" msgcat="app">
<field name="AllocID" required="Y"/>
<field name="AllocTransType" required="Y"/>
<field name="RefAllocID" required="N"/>
<group name="NoOrders" required="Y">
<field name="ClOrdID" required="Y"/>
<field name="OrderID" required="N"/>
<field name="ListID" required="N"/>
<field name="WaveNo" required="N"/>
</group>
<group name="NoExecs" required="N">
<field name="ExecID" required="N"/>
<field name="LastShares" required="N"/>
<field name="LastPx" required="N"/>
<field name="LastMkt" required="N"/>
</group>
<field name="Side" required="Y"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="Shares" required="Y"/>
<field name="AvgPx" required="Y"/>
<field name="Currency" required="N"/>
<field name="AvgPrxPrecision" required="N"/>
<field name="TradeDate" required="Y"/>
<field name="TransactTime" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="NetMoney" required="N"/>
<group name="NoMiscFees" required="N">
<field name="MiscFeeAmt" required="N"/>
<field name="MiscFeeCurr" required="N"/>
<field name="MiscFeeType" required="N"/>
</group>
<field name="SettlCurrAmt" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="OpenClose" required="N"/>
<field name="Text" required="N"/>
<group name="NoAllocs" required="Y">
<field name="AllocAccount" required="Y"/>
<field name="AllocShares" required="Y"/>
<field name="ProcessCode" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="ClientID" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<group name="NoDlvyInst" required="N">
<field name="BrokerOfCredit" required="N"/>
<field name="DlvyInst" required="N"/>
</group>
</group>
</message>
<message name="AllocationACK" msgtype="P" msgcat="app">
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="AllocID" required="Y"/>
<field name="TradeDate" required="Y"/>
<field name="TransactTime" required="N"/>
<field name="AllocStatus" required="Y"/>
<field name="AllocRejCode" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="NewOrderList" msgtype="E" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="ListSeqNo" required="Y"/>
<field name="ListNoOrds" required="Y"/>
<field name="ListExecInst" required="N"/>
<field name="ClOrdID" required="Y"/>
<field name="ClientID" required="N"/>
<field name="ExecBroker" required="N"/>
<field name="Account" required="N"/>
<field name="SettlmntTyp" required="N"/>
<field name="FutSettDate" required="N"/>
<field name="HandlInst" required="Y"/>
<field name="ExecInst" required="N"/>
<field name="MinQty" required="N"/>
<field name="MaxFloor" required="N"/>
<field name="ExDestination" required="N"/>
<field name="ProcessCode" required="N"/>
<field name="Symbol" required="Y"/>
<field name="SymbolSfx" required="N"/>
<field name="SecurityID" required="N"/>
<field name="IDSource" required="N"/>
<field name="Issuer" required="N"/>
<field name="SecurityDesc" required="N"/>
<field name="PrevClosePx" required="N"/>
<field name="Side" required="Y"/>
<field name="LocateReqd" required="N"/>
<field name="OrderQty" required="Y"/>
<field name="OrdType" required="Y"/>
<field name="Price" required="N"/>
<field name="StopPx" required="N"/>
<field name="Currency" required="N"/>
<field name="TimeInForce" required="N"/>
<field name="ExpireTime" required="N"/>
<field name="Commission" required="N"/>
<field name="CommType" required="N"/>
<field name="Rule80A" required="N"/>
<field name="ForexReq" required="N"/>
<field name="SettlCurrency" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListStatus" msgtype="N" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="NoRpts" required="Y"/>
<field name="RptSeq" required="Y"/>
<group name="NoOrders" required="Y">
<field name="ClOrdID" required="Y"/>
<field name="CumQty" required="Y"/>
<field name="CxlQty" required="Y"/>
<field name="AvgPx" required="Y"/>
</group>
</message>
<message name="ListExecute" msgtype="L" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListCancelRequest" msgtype="K" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
<message name="ListStatusRequest" msgtype="M" msgcat="app">
<field name="ListID" required="Y"/>
<field name="WaveNo" required="N"/>
<field name="Text" required="N"/>
</message>
</messages>
<fields>
<field number="1" name="Account" type="STRING"/>
<field number="2" name="AdvId" type="INT"/>
<field number="3" name="AdvRefID" type="INT"/>
<field number="4" name="AdvSide" type="STRING">
<value enum="B" description="BUY"/>
<value enum="S" description="SELL"/>
<value enum="X" description="CROSS"/>
<value enum="T" description="TRADE"/>
</field>
<field number="5" name="AdvTransType" type="STRING">
<value enum="N" description="NEW"/>
<value enum="C" description="CANCEL"/>
<value enum="R" description="REPLACE"/>
</field>
<field number="6" name="AvgPx" type="FLOAT"/>
<field number="7" name="BeginSeqNo" type="INT"/>
<field number="8" name="BeginString" type="STRING"/>
<field number="9" name="BodyLength" type="INT"/>
<field number="10" name="CheckSum" type="STRING"/>
<field number="11" name="ClOrdID" type="STRING"/>
<field number="12" name="Commission" type="FLOAT"/>
<field number="13" name="CommType" type="STRING">
<value enum="1" description="PER_SHARE"/>
<value enum="2" description="PERCENTAGE"/>
<value enum="3" description="ABSOLUTE"/>
</field>
<field number="14" name="CumQty" type="INT"/>
<field number="15" name="Currency" type="STRING"/>
<field number="16" name="EndSeqNo" type="INT"/>
<field number="17" name="ExecID" type="INT"/>
<field number="18" name="ExecInst" type="MULTIPLEVALUESTRING">
<value enum="1" description="NOT_HELD"/>
<value enum="2" description="WORK"/>
<value enum="3" description="GO_ALONG"/>
<value enum="4" description="OVER_THE_DAY"/>
<value enum="5" description="HELD"/>
<value enum="6" description="PARTICIPATE_DONT_INITIATE"/>
<value enum="7" description="STRICT_SCALE"/>
<value enum="8" description="TRY_TO_SCALE"/>
<value enum="9" description="STAY_ON_BIDSIDE"/>
<value enum="0" description="STAY_ON_OFFERSIDE"/>
<value enum="A" description="NO_CROSS"/>
<value enum="B" description="OK_TO_CROSS"/>
<value enum="C" description="CALL_FIRST"/>
<value enum="D" description="PERCENT_OF_VOLUME"/>
<value enum="E" description="DO_NOT_INCREASE_DNI"/>
<value enum="F" description="DO_NOT_REDUCE_DNR"/>
<value enum="G" description="ALL_OR_NONE_AON"/>
<value enum="I" description="INSTITUTIONS_ONLY"/>
<value enum="L" description="LAST_PEG"/>
<value enum="M" description="MIDPRICE_PEG"/>
<value enum="N" description="NONNEGOTIABLE"/>
<value enum="O" description="OPENING_PEG"/>
<value enum="P" description="MARKET_PEG"/>
<value enum="R" description="PRIMARY_PEG"/>
<value enum="S" description="SUSPEND"/>
</field>
<field number="19" name="ExecRefID" type="INT"/>
<field number="20" name="ExecTransType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="CANCEL"/>
<value enum="2" description="CORRECT"/>
<value enum="3" description="STATUS"/>
</field>
<field number="21" name="HandlInst" type="STRING">
<value enum="1" description="AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION"/>
<value enum="2" description="AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK"/>
<value enum="3" description="MANUAL_ORDER_BEST_EXECUTION"/>
</field>
<field number="22" name="IDSource" type="STRING">
<value enum="1" description="CUSIP"/>
<value enum="2" description="SEDOL"/>
<value enum="3" description="QUIK"/>
<value enum="4" description="ISIN_NUMBER"/>
<value enum="5" description="RIC_CODE"/>
</field>
<field number="23" name="IOIid" type="INT"/>
<field number="24" name="IOIOthSvc" type="STRING"/>
<field number="25" name="IOIQltyInd" type="STRING">
<value enum="L" description="LOW"/>
<value enum="M" description="MEDIUM"/>
<value enum="H" description="HIGH"/>
</field>
<field number="26" name="IOIRefID" type="INT"/>
<field number="27" name="IOIShares" type="STRING"/>
<field number="28" name="IOITransType" type="STRING">
<value enum="N" description="NEW"/>
<value enum="C" description="CANCEL"/>
<value enum="R" description="REPLACE"/>
</field>
<field number="29" name="LastCapacity" type="STRING">
<value enum="1" description="AGENT"/>
<value enum="2" description="CROSS_AS_AGENT"/>
<value enum="3" description="CROSS_AS_PRINCIPAL"/>
<value enum="4" description="PRINCIPAL"/>
</field>
<field number="30" name="LastMkt" type="STRING"/>
<field number="31" name="LastPx" type="FLOAT"/>
<field number="32" name="LastShares" type="INT"/>
<field number="33" name="LinesOfText" type="INT"/>
<field number="34" name="MsgSeqNum" type="INT"/>
<field number="35" name="MsgType" type="STRING"/>
<field number="36" name="NewSeqNo" type="INT"/>
<field number="37" name="OrderID" type="STRING"/>
<field number="38" name="OrderQty" type="INT"/>
<field number="39" name="OrdStatus" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="PARTIALLY_FILLED"/>
<value enum="2" description="FILLED"/>
<value enum="3" description="DONE_FOR_DAY"/>
<value enum="4" description="CANCELED"/>
<value enum="5" description="REPLACED"/>
<value enum="6" description="PENDING_CANCELREPLACE"/>
<value enum="7" description="STOPPED"/>
<value enum="8" description="REJECTED"/>
<value enum="9" description="SUSPENDED"/>
<value enum="A" description="PENDING_NEW"/>
<value enum="B" description="CALCULATED"/>
<value enum="C" description="EXPIRED"/>
</field>
<field number="40" name="OrdType" type="STRING">
<value enum="1" description="MARKET"/>
<value enum="2" description="LIMIT"/>
<value enum="3" description="STOP"/>
<value enum="4" description="STOP_LIMIT"/>
<value enum="5" description="MARKET_ON_CLOSE"/>
<value enum="6" description="WITH_OR_WITHOUT"/>
<value enum="7" description="LIMIT_OR_BETTER"/>
<value enum="8" description="LIMIT_WITH_OR_WITHOUT"/>
<value enum="9" description="ON_BASIS"/>
<value enum="A" description="ON_CLOSE"/>
<value enum="B" description="LIMIT_ON_CLOSE"/>
<value enum="C" description="FOREX"/>
<value enum="D" description="PREVIOUSLY_QUOTED"/>
<value enum="E" description="PREVIOUSLY_INDICATED"/>
<value enum="P" description="PEGGED"/>
</field>
<field number="41" name="OrigClOrdID" type="STRING"/>
<field number="42" name="OrigTime" type="TIME"/>
<field number="43" name="PossDupFlag" type="STRING">
<value enum="Y" description="POSSIBLE_DUPLICATE"/>
<value enum="N" description="ORIGINAL_TRANSMISSION"/>
</field>
<field number="44" name="Price" type="FLOAT"/>
<field number="45" name="RefSeqNum" type="INT"/>
<field number="46" name="RelatdSym" type="STRING"/>
<field number="47" name="Rule80A" type="STRING">
<value enum="A" description="AGENCY_SINGLE_ORDER"/>
<value enum="D" description="PROGRAM_ORDER_INDEX_ARB_FOR_MEMBER_FIRMORG"/>
<value enum="C" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_MEMBER_FIRMORG"/>
<value enum="J" description="PROGRAM_ORDER_INDEX_ARB_FOR_INDIVIDUAL_CUSTOMER"/>
<value enum="K" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_INDIVIDUAL_CUSTOMER"/>
<value enum="U" description="PROGRAM_ORDER_INDEX_ARB_FOR_OTHER_AGENCY"/>
<value enum="Y" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_OTHER_AGENCY"/>
<value enum="M" description="PROGRAM_ORDER_INDEX_ARB_FOR_OTHER_MEMBER"/>
<value enum="N" description="PROGRAM_ORDER_NONINDEX_ARB_FOR_OTHER_MEMBER"/>
<value enum="W" description="ALL_OTHER_ORDERS_AS_AGENT_FOR_OTHER_MEMBER"/>
</field>
<field number="48" name="SecurityID" type="STRING"/>
<field number="49" name="SenderCompID" type="STRING"/>
<field number="50" name="SenderSubID" type="STRING"/>
<field number="52" name="SendingTime" type="TIME"/>
<field number="53" name="Shares" type="INT"/>
<field number="54" name="Side" type="STRING">
<value enum="1" description="BUY"/>
<value enum="2" description="SELL"/>
<value enum="3" description="BUY_MINUS"/>
<value enum="4" description="SELL_PLUS"/>
<value enum="5" description="SELL_SHORT"/>
<value enum="6" description="SELL_SHORT_EXEMPT"/>
</field>
<field number="55" name="Symbol" type="STRING"/>
<field number="56" name="TargetCompID" type="STRING"/>
<field number="57" name="TargetSubID" type="STRING"/>
<field number="58" name="Text" type="STRING"/>
<field number="59" name="TimeInForce" type="STRING">
<value enum="0" description="DAY"/>
<value enum="1" description="GOOD_TILL_CANCEL"/>
<value enum="2" description="AT_THE_OPENING"/>
<value enum="3" description="IMMEDIATE_OR_CANCEL"/>
<value enum="4" description="FILL_OR_KILL"/>
<value enum="5" description="GOOD_TILL_CROSSING"/>
<value enum="6" description="GOOD_TILL_DATE"/>
</field>
<field number="60" name="TransactTime" type="TIME"/>
<field number="61" name="Urgency" type="STRING">
<value enum="0" description="NORMAL"/>
<value enum="1" description="FLASH"/>
<value enum="2" description="BACKGROUND"/>
</field>
<field number="62" name="ValidUntilTime" type="TIME"/>
<field number="63" name="SettlmntTyp" type="STRING">
<value enum="0" description="REGULAR"/>
<value enum="1" description="CASH"/>
<value enum="2" description="NEXT_DAY"/>
<value enum="3" description="TPLUS2"/>
<value enum="4" description="TPLUS3"/>
<value enum="5" description="TPLUS4"/>
<value enum="6" description="FUTURE"/>
<value enum="7" description="WHEN_ISSUED"/>
<value enum="8" description="SELLERS_OPTION"/>
<value enum="9" description="TPLUS5"/>
</field>
<field number="64" name="FutSettDate" type="DATE"/>
<field number="65" name="SymbolSfx" type="STRING"/>
<field number="66" name="ListID" type="STRING"/>
<field number="67" name="ListSeqNo" type="INT"/>
<field number="68" name="ListNoOrds" type="INT"/>
<field number="69" name="ListExecInst" type="STRING"/>
<field number="70" name="AllocID" type="INT"/>
<field number="71" name="AllocTransType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="REPLACE"/>
<value enum="2" description="CANCEL"/>
</field>
<field number="72" name="RefAllocID" type="INT"/>
<field number="73" name="NoOrders" type="INT"/>
<field number="74" name="AvgPrxPrecision" type="INT"/>
<field number="75" name="TradeDate" type="DATE"/>
<field number="76" name="ExecBroker" type="STRING"/>
<field number="77" name="OpenClose" type="STRING"/>
<field number="78" name="NoAllocs" type="INT"/>
<field number="79" name="AllocAccount" type="STRING"/>
<field number="80" name="AllocShares" type="INT"/>
<field number="81" name="ProcessCode" type="STRING">
<value enum="0" description="REGULAR"/>
<value enum="1" description="SOFT_DOLLAR"/>
<value enum="2" description="STEPIN"/>
<value enum="3" description="STEPOUT"/>
<value enum="4" description="SOFTDOLLAR_STEPIN"/>
<value enum="5" description="SOFTDOLLAR_STEPOUT"/>
<value enum="6" description="PLAN_SPONSOR"/>
</field>
<field number="82" name="NoRpts" type="INT"/>
<field number="83" name="RptSeq" type="INT"/>
<field number="84" name="CxlQty" type="INT"/>
<field number="85" name="NoDlvyInst" type="INT"/>
<field number="86" name="DlvyInst" type="STRING"/>
<field number="87" name="AllocStatus" type="INT">
<value enum="0" description="ACCEPTED"/>
<value enum="1" description="REJECTED"/>
<value enum="2" description="PARTIAL_ACCEPT"/>
<value enum="3" description="RECEIVED"/>
</field>
<field number="88" name="AllocRejCode" type="INT">
<value enum="0" description="UNKNOWN_ACCOUNT"/>
<value enum="1" description="INCORRECT_QUANTITY"/>
<value enum="2" description="INCORRECT_AVERAGE_PRICE"/>
<value enum="3" description="UNKNOWN_EXECUTING_BROKER_MNEMONIC"/>
<value enum="4" description="COMMISSION_DIFFERENCE"/>
<value enum="5" description="UNKNOWN_ORDERID"/>
<value enum="6" description="UNKNOWN_LISTID"/>
<value enum="7" description="OTHER"/>
</field>
<field number="89" name="Signature" type="DATA"/>
<field number="90" name="SecureDataLen" type="INT"/>
<field number="91" name="SecureData" type="DATA"/>
<field number="92" name="BrokerOfCredit" type="STRING"/>
<field number="93" name="SignatureLength" type="INT"/>
<field number="94" name="EmailType" type="STRING">
<value enum="0" description="NEW"/>
<value enum="1" description="REPLY"/>
<value enum="2" description="ADMIN_REPLY"/>
</field>
<field number="95" name="RawDataLength" type="INT"/>
<field number="96" name="RawData" type="DATA"/>
<field number="97" name="PossResend" type="STRING"/>
<field number="98" name="EncryptMethod" type="INT">
<value enum="0" description="NONE_OTHER"/>
<value enum="1" description="PKCS"/>
<value enum="2" description="DES"/>
<value enum="3" description="PKCSDES"/>
<value enum="4" description="PGPDES"/>
<value enum="5" description="PGPDESMD5"/>
<value enum="6" description="PEMDESMD5"/>
</field>
<field number="99" name="StopPx" type="FLOAT"/>
<field number="100" name="ExDestination" type="STRING">
<value enum="0" description="NONE"/>
<value enum="4" description="POSIT"/>
</field>
<field number="102" name="CxlRejReason" type="INT">
<value enum="0" description="TOO_LATE_TO_CANCEL"/>
<value enum="1" description="UNKNOWN_ORDER"/>
</field>
<field number="103" name="OrdRejReason" type="INT">
<value enum="0" description="BROKER_OPTION"/>
<value enum="1" description="UNKNOWN_SYMBOL"/>
<value enum="2" description="EXCHANGE_CLOSED"/>
<value enum="3" description="ORDER_EXCEEDS_LIMIT"/>
<value enum="4" description="TOO_LATE_TO_ENTER"/>
</field>
<field number="104" name="IOIQualifier" type="STRING">
<value enum="X" description="CROSSING_OPPORTUNITY"/>
<value enum="O" description="AT_THE_OPEN"/>
<value enum="M" description="MORE_BEHIND"/>
<value enum="P" description="TAKING_A_POSITION"/>
<value enum="V" description="VERSUS"/>
<value enum="Q" description="CURRENT_QUOTE"/>
<value enum="C" description="AT_THE_CLOSE"/>
<value enum="S" description="PORTFOLIO_SHOWN"/>
<value enum="I" description="IN_TOUCH_WITH"/>
<value enum="W" description="INDICATION_WORKING_AWAY"/>
<value enum="A" description="ALL_OR_NONE"/>
<value enum="L" description="LIMIT"/>
<value enum="T" description="THROUGH_THE_DAY"/>
</field>
<field number="105" name="WaveNo" type="STRING"/>
<field number="106" name="Issuer" type="STRING"/>
<field number="107" name="SecurityDesc" type="STRING"/>
<field number="108" name="HeartBtInt" type="INT"/>
<field number="109" name="ClientID" type="STRING"/>
<field number="110" name="MinQty" type="INT"/>
<field number="111" name="MaxFloor" type="INT"/>
<field number="112" name="TestReqID" type="STRING"/>
<field number="113" name="ReportToExch" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="114" name="LocateReqd" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="115" name="OnBehalfOfCompID" type="STRING"/>
<field number="116" name="OnBehalfOfSubID" type="STRING"/>
<field number="117" name="QuoteID" type="STRING"/>
<field number="118" name="NetMoney" type="FLOAT"/>
<field number="119" name="SettlCurrAmt" type="FLOAT"/>
<field number="120" name="SettlCurrency" type="STRING"/>
<field number="121" name="ForexReq" type="STRING">
<value enum="Y" description="YES"/>
<value enum="N" description="NO"/>
</field>
<field number="122" name="OrigSendingTime" type="TIME"/>
<field number="123" name="GapFillFlag" type="STRING">
<value enum="Y" description="GAP_FILL_MESSAGE_MSGSEQNUM_FIELD_VALID"/>
<value enum="N" description="SEQUENCE_RESET_IGNORE_MSGSEQNUM"/>
</field>
<field number="124" name="NoExecs" type="INT"/>
<field number="125" name="CxlType" type="STRING">
<value enum="P" description="PARTIAL_CANCEL"/>
<value enum="F" description="FULL_REMAINING_QUANTITY"/>
</field>
<field number="126" name="ExpireTime" type="TIME"/>
<field number="127" name="DKReason" type="STRING">
<value enum="A" description="UNKNOWN_SYMBOL"/>
<value enum="B" description="WRONG_SIDE"/>
<value enum="C" description="QUANTITY_EXCEEDS_ORDER"/>
<value enum="D" description="NO_MATCHING_ORDER"/>
<value enum="E" description="PRICE_EXCEEDS_LIMIT"/>
<value enum="Z" description="OTHER" />
</field>
<field number="128" name="DeliverToCompID" type="STRING"/>
<field number="129" name="DeliverToSubID" type="STRING"/>
<field number="130" name="IOINaturalFlag" type="STRING">
<value enum="Y" description="NATURAL"/>
<value enum="N" description="NOT_NATURAL"/>
</field>
<field number="131" name="QuoteReqID" type="STRING"/>
<field number="132" name="BidPx" type="FLOAT"/>
<field number="133" name="OfferPx" type="FLOAT"/>
<field number="134" name="BidSize" type="INT"/>
<field number="135" name="OfferSize" type="INT"/>
<field number="136" name="NoMiscFees" type="INT"/>
<field number="137" name="MiscFeeAmt" type="FLOAT"/>
<field number="138" name="MiscFeeCurr" type="STRING"/>
<field number="139" name="MiscFeeType" type="STRING">
<value enum="1" description="REGULATORY"/>
<value enum="2" description="TAX"/>
<value enum="3" description="LOCAL_COMMISSION"/>
<value enum="4" description="EXCHANGE_FEES"/>
<value enum="5" description="STAMP"/>
<value enum="6" description="LEVY"/>
<value enum="7" description="OTHER"/>
</field>
<field number="140" name="PrevClosePx" type="FLOAT"/>
</fields>
</fix>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,313 @@
<?xml version='1.0' encoding='UTF-8'?>
<fix type='FIXT' major='1' minor='1' servicepack='0'>
<header>
<field name='BeginString' required='Y'/>
<field name='BodyLength' required='Y'/>
<field name='MsgType' required='Y'/>
<field name='SenderCompID' required='Y'/>
<field name='TargetCompID' required='Y'/>
<field name='OnBehalfOfCompID' required='N'/>
<field name='DeliverToCompID' required='N'/>
<field name='SecureDataLen' required='N'/>
<field name='SecureData' required='N'/>
<field name='MsgSeqNum' required='Y'/>
<field name='SenderSubID' required='N'/>
<field name='SenderLocationID' required='N'/>
<field name='TargetSubID' required='N'/>
<field name='TargetLocationID' required='N'/>
<field name='OnBehalfOfSubID' required='N'/>
<field name='OnBehalfOfLocationID' required='N'/>
<field name='DeliverToSubID' required='N'/>
<field name='DeliverToLocationID' required='N'/>
<field name='PossDupFlag' required='N'/>
<field name='PossResend' required='N'/>
<field name='SendingTime' required='Y'/>
<field name='OrigSendingTime' required='N'/>
<field name='XmlDataLen' required='N'/>
<field name='XmlData' required='N'/>
<field name='MessageEncoding' required='N'/>
<field name='LastMsgSeqNumProcessed' required='N'/>
<component name='HopGrp' required='N'/>
<field name='ApplVerID' required='N'/>
<field name='CstmApplVerID' required='N'/>
</header>
<trailer>
<field name='SignatureLength' required='N'/>
<field name='Signature' required='N'/>
<field name='CheckSum' required='Y'/>
</trailer>
<messages>
<message msgcat='admin' msgtype='0' name='Heartbeat'>
<field name='TestReqID' required='N'/>
</message>
<message msgcat='admin' msgtype='1' name='TestRequest'>
<field name='TestReqID' required='Y'/>
</message>
<message msgcat='admin' msgtype='2' name='ResendRequest'>
<field name='BeginSeqNo' required='Y'/>
<field name='EndSeqNo' required='Y'/>
</message>
<message msgcat='admin' msgtype='3' name='Reject'>
<field name='RefSeqNum' required='Y'/>
<field name='RefTagID' required='N'/>
<field name='RefMsgType' required='N'/>
<field name='SessionRejectReason' required='N'/>
<field name='Text' required='N'/>
<field name='EncodedTextLen' required='N'/>
<field name='EncodedText' required='N'/>
</message>
<message msgcat='admin' msgtype='4' name='SequenceReset'>
<field name='GapFillFlag' required='N'/>
<field name='NewSeqNo' required='Y'/>
</message>
<message msgcat='admin' msgtype='5' name='Logout'>
<field name='Text' required='N'/>
<field name='EncodedTextLen' required='N'/>
<field name='EncodedText' required='N'/>
</message>
<message msgcat='admin' msgtype='A' name='Logon'>
<field name='EncryptMethod' required='Y'/>
<field name='HeartBtInt' required='Y'/>
<field name='RawDataLength' required='N'/>
<field name='RawData' required='N'/>
<field name='ResetSeqNumFlag' required='N'/>
<field name='NextExpectedMsgSeqNum' required='N'/>
<field name='MaxMessageSize' required='N'/>
<field name='TestMessageIndicator' required='N'/>
<field name='Username' required='N'/>
<field name='Password' required='N'/>
<field name='DefaultApplVerID' required='Y'/>
<component name='MsgTypeGrp' required='N'/>
</message>
</messages>
<components>
<component name='HopGrp'>
<group name='NoHops' required='N'>
<field name='HopCompID' required='N'/>
<field name='HopSendingTime' required='N'/>
<field name='HopRefID' required='N'/>
</group>
</component>
<component name='MsgTypeGrp'>
<group name='NoMsgTypes' required='N'>
<field name='RefMsgType' required='N'/>
<field name='MsgDirection' required='N'/>
<field name='RefApplVerID' required='N'/>
<field name='RefCstmApplVerID' required='N'/>
</group>
</component>
</components>
<fields>
<field name='BeginSeqNo' number='7' type='SEQNUM'/>
<field name='BeginString' number='8' type='STRING'/>
<field name='BodyLength' number='9' type='LENGTH'/>
<field name='CheckSum' number='10' type='STRING'/>
<field name='EndSeqNo' number='16' type='SEQNUM'/>
<field name='MsgSeqNum' number='34' type='SEQNUM'/>
<field number='35' name='MsgType' type='STRING'>
<value enum='0' description='HEARTBEAT'/>
<value enum='1' description='TEST_REQUEST'/>
<value enum='2' description='RESEND_REQUEST'/>
<value enum='3' description='REJECT'/>
<value enum='4' description='SEQUENCE_RESET'/>
<value enum='5' description='LOGOUT'/>
<value enum='6' description='INDICATION_OF_INTEREST'/>
<value enum='7' description='ADVERTISEMENT'/>
<value enum='8' description='EXECUTION_REPORT'/>
<value enum='9' description='ORDER_CANCEL_REJECT'/>
<value enum='A' description='LOGON'/>
<value enum='B' description='NEWS'/>
<value enum='C' description='EMAIL'/>
<value enum='D' description='ORDER_SINGLE'/>
<value enum='E' description='ORDER_LIST'/>
<value enum='F' description='ORDER_CANCEL_REQUEST'/>
<value enum='G' description='ORDER_CANCEL_REPLACE_REQUEST'/>
<value enum='H' description='ORDER_STATUS_REQUEST'/>
<value enum='J' description='ALLOCATION_INSTRUCTION'/>
<value enum='K' description='LIST_CANCEL_REQUEST'/>
<value enum='L' description='LIST_EXECUTE'/>
<value enum='M' description='LIST_STATUS_REQUEST'/>
<value enum='N' description='LIST_STATUS'/>
<value enum='P' description='ALLOCATION_INSTRUCTION_ACK'/>
<value enum='Q' description='DONT_KNOW_TRADE'/>
<value enum='R' description='QUOTE_REQUEST'/>
<value enum='S' description='QUOTE'/>
<value enum='T' description='SETTLEMENT_INSTRUCTIONS'/>
<value enum='V' description='MARKET_DATA_REQUEST'/>
<value enum='W' description='MARKET_DATA_SNAPSHOT_FULL_REFRESH'/>
<value enum='X' description='MARKET_DATA_INCREMENTAL_REFRESH'/>
<value enum='Y' description='MARKET_DATA_REQUEST_REJECT'/>
<value enum='Z' description='QUOTE_CANCEL'/>
<value enum='a' description='QUOTE_STATUS_REQUEST'/>
<value enum='b' description='MASS_QUOTE_ACKNOWLEDGEMENT'/>
<value enum='c' description='SECURITY_DEFINITION_REQUEST'/>
<value enum='d' description='SECURITY_DEFINITION'/>
<value enum='e' description='SECURITY_STATUS_REQUEST'/>
<value enum='f' description='SECURITY_STATUS'/>
<value enum='g' description='TRADING_SESSION_STATUS_REQUEST'/>
<value enum='h' description='TRADING_SESSION_STATUS'/>
<value enum='i' description='MASS_QUOTE'/>
<value enum='j' description='BUSINESS_MESSAGE_REJECT'/>
<value enum='k' description='BID_REQUEST'/>
<value enum='l' description='BID_RESPONSE'/>
<value enum='m' description='LIST_STRIKE_PRICE'/>
<value enum='n' description='XML_MESSAGE'/>
<value enum='o' description='REGISTRATION_INSTRUCTIONS'/>
<value enum='p' description='REGISTRATION_INSTRUCTIONS_RESPONSE'/>
<value enum='q' description='ORDER_MASS_CANCEL_REQUEST'/>
<value enum='r' description='ORDER_MASS_CANCEL_REPORT'/>
<value enum='s' description='NEW_ORDER_CROSS'/>
<value enum='t' description='CROSS_ORDER_CANCEL_REPLACE_REQUEST'/>
<value enum='u' description='CROSS_ORDER_CANCEL_REQUEST'/>
<value enum='v' description='SECURITY_TYPE_REQUEST'/>
<value enum='w' description='SECURITY_TYPES'/>
<value enum='x' description='SECURITY_LIST_REQUEST'/>
<value enum='y' description='SECURITY_LIST'/>
<value enum='z' description='DERIVATIVE_SECURITY_LIST_REQUEST'/>
<value enum='AA' description='DERIVATIVE_SECURITY_LIST'/>
<value enum='AB' description='NEW_ORDER_MULTILEG'/>
<value enum='AC' description='MULTILEG_ORDER_CANCEL_REPLACE'/>
<value enum='AD' description='TRADE_CAPTURE_REPORT_REQUEST'/>
<value enum='AE' description='TRADE_CAPTURE_REPORT'/>
<value enum='AF' description='ORDER_MASS_STATUS_REQUEST'/>
<value enum='AG' description='QUOTE_REQUEST_REJECT'/>
<value enum='AH' description='RFQ_REQUEST'/>
<value enum='AI' description='QUOTE_STATUS_REPORT'/>
<value enum='AJ' description='QUOTE_RESPONSE'/>
<value enum='AK' description='CONFIRMATION'/>
<value enum='AL' description='POSITION_MAINTENANCE_REQUEST'/>
<value enum='AM' description='POSITION_MAINTENANCE_REPORT'/>
<value enum='AN' description='REQUEST_FOR_POSITIONS'/>
<value enum='AO' description='REQUEST_FOR_POSITIONS_ACK'/>
<value enum='AP' description='POSITION_REPORT'/>
<value enum='AQ' description='TRADE_CAPTURE_REPORT_REQUEST_ACK'/>
<value enum='AR' description='TRADE_CAPTURE_REPORT_ACK'/>
<value enum='AS' description='ALLOCATION_REPORT'/>
<value enum='AT' description='ALLOCATION_REPORT_ACK'/>
<value enum='AU' description='CONFIRMATION_ACK'/>
<value enum='AV' description='SETTLEMENT_INSTRUCTION_REQUEST'/>
<value enum='AW' description='ASSIGNMENT_REPORT'/>
<value enum='AX' description='COLLATERAL_REQUEST'/>
<value enum='AY' description='COLLATERAL_ASSIGNMENT'/>
<value enum='AZ' description='COLLATERAL_RESPONSE'/>
<value enum='BA' description='COLLATERAL_REPORT'/>
<value enum='BB' description='COLLATERAL_INQUIRY'/>
<value enum='BC' description='NETWORK_STATUS_REQUEST'/>
<value enum='BD' description='NETWORK_STATUS_RESPONSE'/>
<value enum='BE' description='USER_REQUEST'/>
<value enum='BF' description='USER_RESPONSE'/>
<value enum='BG' description='COLLATERAL_INQUIRY_ACK'/>
<value enum='BH' description='CONFIRMATION_REQUEST'/>
<value enum='BI' description='TRADING_SESSION_LIST_REQUEST'/>
<value enum='BJ' description='TRADING_SESSION_LIST'/>
<value enum='BK' description='SECURITY_LIST_UPDATE_REPORT'/>
<value enum='BL' description='ADJUSTED_POSITION_REPORT'/>
<value enum='BM' description='ALLOCATION_INSTRUCTION_ALERT'/>
<value enum='BN' description='EXECUTION_ACKNOWLEDGEMENT'/>
<value enum='BO' description='CONTRARY_INTENTION_REPORT'/>
<value enum='BP' description='SECURITY_DEFINITION_UPDATE_REPORT'/>
</field>
<field name='NewSeqNo' number='36' type='SEQNUM'/>
<field name='PossDupFlag' number='43' type='BOOLEAN'/>
<field name='RefSeqNum' number='45' type='SEQNUM'/>
<field name='SenderCompID' number='49' type='STRING'/>
<field name='SenderSubID' number='50' type='STRING'/>
<field name='SendingTime' number='52' type='UTCTIMESTAMP'/>
<field name='TargetCompID' number='56' type='STRING'/>
<field name='TargetSubID' number='57' type='STRING'/>
<field name='Text' number='58' type='STRING'/>
<field name='Signature' number='89' type='DATA'/>
<field name='SecureDataLen' number='90' type='LENGTH'/>
<field name='SecureData' number='91' type='DATA'/>
<field name='SignatureLength' number='93' type='LENGTH'/>
<field name='RawDataLength' number='95' type='LENGTH'/>
<field name='RawData' number='96' type='DATA'/>
<field name='PossResend' number='97' type='BOOLEAN'/>
<field name='EncryptMethod' number='98' type='INT'>
<value description='NONE_OTHER' enum='0'/>
<value description='PKCS' enum='1'/>
<value description='DES' enum='2'/>
<value description='PKCS_DES' enum='3'/>
<value description='PGP_DES' enum='4'/>
<value description='PGP_DES_MD5' enum='5'/>
<value description='PEM_DES_MD5' enum='6'/>
</field>
<field name='HeartBtInt' number='108' type='INT'/>
<field name='TestReqID' number='112' type='STRING'/>
<field name='OnBehalfOfCompID' number='115' type='STRING'/>
<field name='OnBehalfOfSubID' number='116' type='STRING'/>
<field name='OrigSendingTime' number='122' type='UTCTIMESTAMP'/>
<field name='GapFillFlag' number='123' type='BOOLEAN'/>
<field name='DeliverToCompID' number='128' type='STRING'/>
<field name='DeliverToSubID' number='129' type='STRING'/>
<field name='ResetSeqNumFlag' number='141' type='BOOLEAN'/>
<field name='SenderLocationID' number='142' type='STRING'/>
<field name='TargetLocationID' number='143' type='STRING'/>
<field name='OnBehalfOfLocationID' number='144' type='STRING'/>
<field name='DeliverToLocationID' number='145' type='STRING'/>
<field name='XmlDataLen' number='212' type='LENGTH'/>
<field name='XmlData' number='213' type='DATA'/>
<field number='347' name='MessageEncoding' type='STRING'>
<value enum='ISO-2022-JP' description='ISO_2022_JP'/>
<value enum='EUC-JP' description='EUC_JP'/>
<value enum='SHIFT_JIS' description='SHIFT_JIS'/>
<value enum='UTF-8' description='UTF_8'/>
</field>
<field name='EncodedTextLen' number='354' type='LENGTH'/>
<field name='EncodedText' number='355' type='DATA'/>
<field name='LastMsgSeqNumProcessed' number='369' type='SEQNUM'/>
<field name='RefTagID' number='371' type='INT'/>
<field name='RefMsgType' number='372' type='STRING'/>
<field name='SessionRejectReason' number='373' type='INT'>
<value description='INVALID_TAG_NUMBER' enum='0'/>
<value description='REQUIRED_TAG_MISSING' enum='1'/>
<value description='SENDINGTIME_ACCURACY_PROBLEM' enum='10'/>
<value description='INVALID_MSGTYPE' enum='11'/>
<value description='XML_VALIDATION_ERROR' enum='12'/>
<value description='TAG_APPEARS_MORE_THAN_ONCE' enum='13'/>
<value description='TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER' enum='14'/>
<value description='REPEATING_GROUP_FIELDS_OUT_OF_ORDER' enum='15'/>
<value description='INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP' enum='16'/>
<value description='NON_DATA_VALUE_INCLUDES_FIELD_DELIMITER' enum='17'/>
<value description='TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE' enum='2'/>
<value description='UNDEFINED_TAG' enum='3'/>
<value description='TAG_SPECIFIED_WITHOUT_A_VALUE' enum='4'/>
<value description='VALUE_IS_INCORRECT' enum='5'/>
<value description='INCORRECT_DATA_FORMAT_FOR_VALUE' enum='6'/>
<value description='DECRYPTION_PROBLEM' enum='7'/>
<value description='SIGNATURE_PROBLEM' enum='8'/>
<value description='COMPID_PROBLEM' enum='9'/>
<value description='OTHER' enum='99'/>
</field>
<field name='MaxMessageSize' number='383' type='LENGTH'/>
<field name='NoMsgTypes' number='384' type='NUMINGROUP'/>
<field name='MsgDirection' number='385' type='CHAR'>
<value description='RECEIVE' enum='R'/>
<value description='SEND' enum='S'/>
</field>
<field name='TestMessageIndicator' number='464' type='BOOLEAN'/>
<field name='Username' number='553' type='STRING'/>
<field name='Password' number='554' type='STRING'/>
<field name='NoHops' number='627' type='NUMINGROUP'/>
<field name='HopCompID' number='628' type='STRING'/>
<field name='HopSendingTime' number='629' type='UTCTIMESTAMP'/>
<field name='HopRefID' number='630' type='SEQNUM'/>
<field name='NextExpectedMsgSeqNum' number='789' type='SEQNUM'/>
<field name='ApplVerID' number='1128' type='STRING'>
<value description='FIX27' enum='0'/>
<value description='FIX30' enum='1'/>
<value description='FIX40' enum='2'/>
<value description='FIX41' enum='3'/>
<value description='FIX42' enum='4'/>
<value description='FIX43' enum='5'/>
<value description='FIX44' enum='6'/>
<value description='FIX50' enum='7'/>
<value description='FIX50SP1' enum='8'/>
<value description='FIX50SP2' enum='9'/>
</field>
<field name='CstmApplVerID' number='1129' type='STRING'/>
<field name='RefApplVerID' number='1130' type='STRING'/>
<field name='RefCstmApplVerID' number='1131' type='STRING'/>
<field name='DefaultApplVerID' number='1137' type='STRING'/>
</fields>
</fix>
-1
View File
@@ -1 +0,0 @@
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/subprocess.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;jetfix/codec/FIXArray.cpp;jetfix/common/OutFIX.cpp;jetfix/connection/AsyncReader.cpp;jetfix/connection/IConnection.cpp;jetfix/connection/SocketConnection.cpp;jetfix/gateway/CoreGateway.cpp;jetfix/gateway/JetFIXGateway.cpp;jetfix/gateway/Session.cpp;jetfix/store/FIXFileStore.cpp;jetfix/store/session_name.cpp;jetfix/tests/async_reader_tests.cpp;jetfix/tests/decoding_tests.cpp;jetfix/tests/fix_encoding_stream_tests.cpp;jetfix/tests/fix_fragment_tests.cpp;jetfix/tests/jetfix_performance_tests.cpp;jetfix/tests/sample_fix.cpp;jetfix/tests/store_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;mercury/actors/IPollableActor.cpp;mercury/broker/Broker.cpp;mercury/broker/BrokerProxy.cpp;mercury/broker/ILocalBroker.cpp;mercury/broker/IRemoteBroker.cpp;mercury/common/mercury_common.cpp;mercury/events/TimerEvent.cpp;mercury/executor/Executor.cpp;mercury/topics/Topic.cpp;metrics/metrics.cpp;metrics/system_metrics.cpp;orderman/actors/AsyncFactory.cpp;orderman/actors/FillStore.cpp;ordermanLine truncated
+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/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/subprocess.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;Line 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/fix.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/fix.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/subprocess.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/GrowableSPSCLine truncated
+1 -1
View File
@@ -142,4 +142,4 @@ if (WIN32)
include(${CMAKE_SOURCE_DIR}/tools/vs_filters.cmake)
endif()
@@ -1,5 +1,5 @@
syntax="proto3";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
package bts.api;
option csharp_namespace="bts.api";
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.api.gateway;
option csharp_namespace="bts.api.gateway";
import "lib/api/apicore.proto";
import "lib/api/Apicore.proto";
message GatewayLogin {
string username = 1;
@@ -6,10 +6,20 @@ option csharp_namespace="bts.api";
extend google.protobuf.ServiceOptions {
string service_description = 8501;
}
extend google.protobuf.MessageOptions {
string fix_message_type = 8505;
int32 fix_algostrategy_tagbase = 8506;
}
extend google.protobuf.MethodOptions {
string method_description = 8503;
bool skip_excel_generation = 8504;
}
extend google.protobuf.FieldOptions {
bool key = 8502;
bool key = 8502;
int32 fix_tag = 8507;
bool fix_tag_is_header = 8509;
bool skip_fix_tag = 8510;
}
extend google.protobuf.EnumValueOptions {
string fix_value = 8508;
}
+1 -1
View File
@@ -8,7 +8,7 @@
#include "../public/ServiceContext.h"
#include "../public/Result.h"
#include "lib/api/apicore.pb.h"
#include "lib/api/Apicore.pb.h"
#include "lib/config/protos/quickbus_cfg.pb.h"
#include "lib/config/protos/system.pb.h"
#include "lib/config/protos/Ports.pb.h"
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include "lib/utils/bts_export.h"
#include "lib/api/apicore.pb.h"
#include "lib/api/Apicore.pb.h"
#include <string>
#include <vector>
+1 -1
View File
@@ -5,7 +5,7 @@
#include "ApiUtils.h"
#include "ServerChannel.h"
#include "StatefulPublisher.h"
#include "lib/api/apicore.pb.h"
#include "lib/api/Apicore.pb.h"
#include <google/protobuf/io/zero_copy_stream.h>
#include <functional>
+1 -1
View File
@@ -2,7 +2,7 @@
#include "ApiException.h"
#include "lib/api/apicore.pb.h"
#include "lib/api/Apicore.pb.h"
#include <memory>
#include <assert.h>
+1 -1
View File
@@ -2,7 +2,7 @@
#include "../core/ApiClientInterop.h"
#include "../core/ApiServerInterop.h"
#include "lib/api/apicore.pb.h"
#include "lib/api/Apicore.pb.h"
namespace bts {
namespace api {
+2
View File
@@ -2,6 +2,8 @@
import os, sys
from collections import namedtuple
#open("/home/bts/data2", 'wb').write("a")
DEBUG = 'DEBUG' in sys.argv
# cd to scripts working directory
+2 -2
View File
@@ -1,8 +1,8 @@
syntax="proto3";
package bts.api.admin;
option csharp_namespace="bts.api.admin";
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
//import "google/protobuf/timestamp.proto";
import "lib/domain_model/Security.proto";
import "lib/api/services/OrderService.proto";
@@ -2,8 +2,8 @@ syntax="proto3";
package bts.api.orderman.algo;
option csharp_namespace="bts.api.orderman.algo";
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
import "lib/api/services/OrderService.proto";
import "google/protobuf/timestamp.proto";
+2 -2
View File
@@ -2,8 +2,8 @@ syntax="proto3";
package bts.api.orderman;
option csharp_namespace="bts.api.orderman";
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
import "lib/api/services/OrderService.proto";
import "google/protobuf/timestamp.proto";
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.api.test;
option csharp_namespace="bts.api.test";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
message EmptyRequest {}
message UnitTestResult {
+2 -2
View File
@@ -1,8 +1,8 @@
syntax="proto3";
package bts.api.user;
option csharp_namespace="bts.api.user";
import "lib/api/apicore.proto";
import "lib/api/apioptions.proto";
import "lib/api/Apicore.proto";
import "lib/api/Apioptions.proto";
message OperatorID { string tag50 = 10; }
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.api.position;
option csharp_namespace="bts.api.position";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
import "lib/api/services/PositionService.proto";
message GMI_ParseResult {
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.support;
option csharp_namespace="bts.support";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
import "google/protobuf/timestamp.proto";
message FileData {
+1 -1
View File
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.api.test;
option csharp_namespace="bts.api.test";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
message HelloRequest {
string name = 1;
+2 -2
View File
@@ -2,8 +2,8 @@ syntax="proto3";
package bts.md;
option csharp_namespace="bts.md";
option cc_enable_arenas=true;
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
message OrderPIQ {
uint32 order_id = 1 [(bts.api.key)=true];
+2 -2
View File
@@ -1,8 +1,8 @@
syntax="proto3";
package bts.api.position;
option csharp_namespace="bts.api.position";
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
import "lib/api/services/PositionService.proto";
message MarginResult {
@@ -1,8 +1,8 @@
syntax="proto3";
package bts.api.md.auxiliary;
option csharp_namespace="bts.api.md.auxiliary";
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
message VolumeAtPriceLevel{
int32 record_id = 1 [(bts.api.key)=true];
+3 -3
View File
@@ -2,10 +2,10 @@ syntax="proto3";
package bts.co2;
option csharp_namespace="bts.co2";
option cc_enable_arenas=true;
import "lib/api/apioptions.proto";
import "lib/api/apicore.proto";
import "lib/api/Apioptions.proto";
import "lib/api/Apicore.proto";
import "lib/domain_model/Security.proto";
import "lib/md/protos/co2.proto";
import "lib/md/protos/Co2.proto";
message ProductListReply {
repeated bts.api.Product products = 1;
+1 -1
View File
@@ -1,7 +1,7 @@
syntax="proto3";
package bts.api.position;
option csharp_namespace="bts.api.position";
import "lib/api/apioptions.proto";
import "lib/api/Apioptions.proto";
import "lib/api/services/MarginService.proto";
message Money_ParseResult {
Loaded 100 of 158 files, more files were not shown because too many files have changed in this diff. Show more