Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34fc6af137 | ||
|
|
6cc25a7337 | ||
|
|
0c9a9fcb5e | ||
|
|
48b62f1cab | ||
|
|
5a0ceafa66 | ||
|
|
d31969606e | ||
|
|
6c6fb74506 | ||
|
|
a69ed30e70 | ||
|
|
a654f302a2 | ||
|
|
9ca3285888 | ||
|
|
df4c3b9376 | ||
|
|
f21c9f96d1 | ||
|
|
16a71a9f63 | ||
|
|
facb3249d0 | ||
|
|
f323efc61a | ||
|
|
a8689aee06 | ||
|
|
85b2d257a7 | ||
|
|
f49ca9f7bd | ||
|
|
297233eae6 | ||
|
|
0114dd0276 | ||
|
|
ffd35aebac | ||
|
|
b92fed4f47 |
No files matched your search
@@ -10,13 +10,17 @@ insert_anchor_links = "right"
|
||||
- A new, more powerful PnL form is now available
|
||||
### API Changes
|
||||
- Added security state information (pre open, halted, normal, closed, etc)
|
||||
### Bug Fixes
|
||||
- Brought back the "select all" check box in the mini order book
|
||||
- Fixed an issue in the market data subsystem that on rare occasions could result in a startup crash
|
||||
### Internal Changes
|
||||
- Fixed an issue that was stopping us from interpreting SOD times as local rather than GMT
|
||||
|
||||
## 2.9.3
|
||||
### Internal Changes
|
||||
- Fixed system test scripts
|
||||
## 2.9.2
|
||||
### Bug Fixes
|
||||
- Fixed an issue with the exchange simulator that could lead to crossed markets
|
||||
|
||||
## 2.9.1
|
||||
### Bug Fixes
|
||||
- Fixed an issue with trade sound alerts, where in some cases the use of a "In Between" condition could lead to a UI failure.
|
||||
|
||||
+1
-1
Submodule externals updated: 67a79263ba...b5ca264286.
@@ -227,7 +227,7 @@ namespace bts.shell {
|
||||
public string strip_name;
|
||||
[ProtoMember(26)]
|
||||
public string last_price_from_spread;
|
||||
[ProtoMember(27)]
|
||||
[ProtoMember(28)]
|
||||
public string mic_code;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace bts.shell.fills {
|
||||
[DIYGridColumnID(nameof(Columns.Symbol))]
|
||||
public string[] symbol { get; set; }
|
||||
|
||||
[ProtoMember(16)]
|
||||
[ProtoMember(17)]
|
||||
[DIYGridColumnID(nameof(Columns.FillStatus))]
|
||||
public Fill.Types.FillStatus[] fill_status { get; set; }
|
||||
}
|
||||
|
||||
@@ -750,6 +750,7 @@ namespace mbts.spark {
|
||||
};
|
||||
header_cb.SetBinding(CheckBox.IsCheckedProperty, new Binding(nameof(OrderBookVM.all_rows_selected)));
|
||||
this.Header = header_cb;
|
||||
is_visible = true;
|
||||
}
|
||||
|
||||
public override FrameworkElement view_factory() {
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="spark_excel_example_2018.xlsm"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></None>
|
||||
<None Include="spark_excel_example_2019.xlsm"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></None>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- <Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
|
||||
|
||||
Binary file not shown.
@@ -62,35 +62,45 @@ include: "http://location:8000/config/"
|
||||
* Make sure you can connect to a running server
|
||||
* run spark_sdk.exe with no parameters to see help
|
||||
```
|
||||
spark_sdk\bin\Debug\net471> spark_sdk.exe
|
||||
spark_sdk\bin\Debug\net471> spark_sdk.exe -ConfigServer http://location:8000/config
|
||||
|
||||
BTS Spark SDK
|
||||
Usages: spark_sdk [command] [arguments]
|
||||
|
||||
Commands:
|
||||
md <exchange> <security_type> <symbol> [<security_desc>]
|
||||
ui <exchange> <security_type> <symbol> <security_desc> <poll_interval_in_ms>
|
||||
order <exchange> <security_type> <symbol> <security_desc> <signed_quantity> [<price>]
|
||||
order <account> <exchange> <security_type> <symbol> <security_desc> <signed_quantity> [<price>]
|
||||
Arguments:
|
||||
--user=<bts user name>
|
||||
--pass=<password>
|
||||
--pump=<pump_interval_in_ms=100 default>
|
||||
|
||||
Example:
|
||||
To print simulated market data to the screen:
|
||||
spark_sdk.exe md SIM FUTURE ES SIM:ESU9 --user=bts
|
||||
```
|
||||
```
|
||||
* To print simulated market data to the screen:
|
||||
|
||||
```spark_sdk.exe md SIM FUTURE ES SIM:ESU9 --user=bts --pass= -ConfigServer http://location:8000/config```
|
||||
|
||||
* To send a 1 lot sell order for ES in account ACC A:
|
||||
|
||||
```spark_sdk.exe order "ACC A" SIM FUTURE ES SIM:ESU9 -1 4000.5 --user=bts --pass= -ConfigServer http://location:8000/config ```
|
||||
|
||||
You should see an order status stream print to the screen after running this command
|
||||
|
||||
|
||||
* Check out sample code
|
||||
* [Market Data](src/spark_sdk/samples/MarketDataSample.cs)
|
||||
* [Orders](src/spark_sdk/samples/OrderSample.cs)
|
||||
* [Driver](src/spark_sdk/samples/SDKMain.cs)
|
||||
|
||||
|
||||
```
|
||||
### Excel
|
||||
```
|
||||
spark_sdk\bin\Debug\net471> start spark_excel-addin64.xll
|
||||
* Most BTS Client API calls can be made through Excel 2016, load the example spreadsheet to see how
|
||||
```
|
||||
spark_sdk\bin\Debug\net471> start spark_excel-addin64-packed.xll
|
||||
```
|
||||
* This will start excel and load the bts addin
|
||||
* Check the [```excel```](excel/) directory for an example spreadsheet
|
||||
* From excel, open ```spark_sdk\bin\Debug\net471\spark_excel_example_2019.xlsm``` to get started
|
||||
* Check the [```excel```](excel/) directory for other example spreadsheets
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<ItemGroup Condition= " '$(SparkRoot)' != '' ">
|
||||
<None Include="README.md" pack="true" PackagePath="." />
|
||||
<None Include="$(OutputPath)\net471\spark_excel_example_2018.xlsm" pack="true" PackagePath=".\excel\spark_excel_example_2018.xlsm" />
|
||||
<None Include="$(OutputPath)\net471\spark_excel_example_2019.xlsm" pack="true" PackagePath=".\excel\spark_excel_example_2019.xlsm" />
|
||||
<None Include="$(OutputPath)\net471\spark_excel-addin64-packed.xll" pack="true" PackagePath=".\excel\spark_excel-addin64-packed.xll" />
|
||||
<None Include="$(OutputPath)\net471\spark_excel-addin64.dna" pack="true" PackagePath=".\excel\spark_excel-addin64.dna" />
|
||||
<None Include="doc/**" pack="true" PackagePath=".\doc\" />
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
<Target Name="copy_lib_deployed471" AfterTargets="PostBuildEvent" Condition= " '$(SparkRoot)' == '' and '$(TargetFramework)' == 'net471'" >
|
||||
<Copy SourceFiles="..\..\lib\net471\spark_excel.dll" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="..\..\excel\spark_excel_example_2018.xlsm" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="..\..\excel\spark_excel_example_2019.xlsm" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="..\..\excel\spark_excel-addin64-packed.xll" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
<Copy SourceFiles="..\..\excel\spark_excel-addin64.dna" DestinationFolder="$(OutputPath)\" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
#include "ExchangeOrderKey.h"
|
||||
#include "MDProducerHandle.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "google/btree/btree_map.h"
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
@@ -109,13 +107,8 @@ struct MBOWorkingState {
|
||||
// Used for 'change' messages which update price
|
||||
std::unordered_map<ExchangeOrderKey, key_t> orderid_index;
|
||||
|
||||
#ifdef _WIN32
|
||||
std::map<key_t,Data,LessBid> bid;
|
||||
std::map<key_t,Data> ask;
|
||||
#else
|
||||
btree::btree_map<key_t,Data,LessBid> bid;
|
||||
btree::btree_map<key_t,Data> ask;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
+34
-27
@@ -13,6 +13,7 @@
|
||||
#include "lib/utils/sane_algorithm.h"
|
||||
|
||||
#include <tbb/queuing_mutex.h>
|
||||
#include <google/btree/btree_map.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@@ -21,6 +22,7 @@
|
||||
|
||||
using namespace std;
|
||||
using namespace bts::api;
|
||||
using namespace btree;
|
||||
namespace bts {
|
||||
namespace md {
|
||||
|
||||
@@ -158,32 +160,36 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void search_handles(map<security_key, MDConsumerHandle>& handles) {
|
||||
btree_map<security_key, tuple<const ColdEntry*,const void*>> search_handles(const std::set<security_key>& keys) {
|
||||
btree_map<security_key, tuple<const ColdEntry*, const void*>> result;
|
||||
// Walk hot and cold lists and fill in any found handles
|
||||
if (!_cold.is_initialized()) return;
|
||||
if (!_cold.is_initialized()) return result;
|
||||
_cold.all_entries([&](const ColdEntry& entry) {
|
||||
auto iter = handles.find(entry.security.key);
|
||||
if (iter != handles.end()) {
|
||||
iter->second.set_cold(&cold_header(), &entry);
|
||||
if (keys.find(entry.security.key) != keys.end()) {
|
||||
result.insert(
|
||||
std::make_pair(
|
||||
entry.security.key,
|
||||
make_tuple(&entry,nullptr)));
|
||||
}
|
||||
});
|
||||
// Do the same for hot
|
||||
if (_hot_depth) {
|
||||
_hot_depth->all_entries([&](const HotDepthEntry& entry) {
|
||||
auto iter = handles.find(entry.key);
|
||||
if (iter != handles.end() && iter->second.is_initialized()) {
|
||||
iter->second.set_hot(&entry);
|
||||
auto iter = result.find(entry.key);
|
||||
if (iter != result.end()) {
|
||||
iter->second = make_tuple(get<0>(iter->second), &entry);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (_hot){
|
||||
_hot->all_entries([&](const HotEntry& entry) {
|
||||
auto iter = handles.find(entry.key);
|
||||
if (iter != handles.end() && iter->second.is_initialized()) {
|
||||
iter->second.set_hot(&entry);
|
||||
auto iter = result.find(entry.key);
|
||||
if (iter != result.end()) {
|
||||
iter->second = make_tuple(get<0>(iter->second), &entry);
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename CB>
|
||||
@@ -661,24 +667,24 @@ public:
|
||||
map<security_key, MDConsumerHandle> get_handles(const set<security_key>& keys) {
|
||||
map<security_key, MDConsumerHandle> result;
|
||||
if (keys.empty()) return result;
|
||||
// Initialize the result to match the input
|
||||
for (security_key key : keys) {
|
||||
result.insert(std::make_pair(key, MDConsumerHandle()));
|
||||
}
|
||||
|
||||
for (auto& inst : _instances) {
|
||||
inst->search_handles(result);
|
||||
}
|
||||
|
||||
// Erase anything that wasn't found from the resulting map
|
||||
// Set the mbo pointer on anything else
|
||||
for (auto it = result.begin(); it != result.end(); ) {
|
||||
if (!it->second.is_initialized()) {
|
||||
it = result.erase(it);
|
||||
}
|
||||
else {
|
||||
it->second.set_mbo(_mbo);
|
||||
++it;
|
||||
auto found = inst->search_handles(keys);
|
||||
for (const auto& t : found) {
|
||||
// auto [cold,hot] = t.second;
|
||||
auto cold = get<0>(t.second);
|
||||
auto hot = get<1>(t.second);
|
||||
if (cold && hot) {
|
||||
result.insert(
|
||||
make_pair(
|
||||
cold->security.key,
|
||||
MDConsumerHandle {
|
||||
inst->cold_header(),
|
||||
*cold,
|
||||
hot,
|
||||
_mbo
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,6 +725,7 @@ public:
|
||||
vector<MutSecurityPtr> legs;
|
||||
legs.reserve(handles.size());
|
||||
for (const auto& pair : handles) {
|
||||
bts_assert_d(pair.second.is_initialized());
|
||||
if (pair.second.is_initialized()) {
|
||||
legs.push_back(make_shared<Security>(pair.second.get_normalized_security()));
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ MDConsumerHandle::MDConsumerHandle(const MDConsumerHandle& other) {
|
||||
*this = other;
|
||||
}
|
||||
|
||||
MDConsumerHandle::MDConsumerHandle(const ColdHeader& cheader, const ColdEntry& centry, const void* pvhot, const MBOReader* mbo)
|
||||
{init(cheader,centry,pvhot,mbo);}
|
||||
|
||||
MDConsumerHandle::~MDConsumerHandle() {}
|
||||
|
||||
void MDConsumerHandle::init(const ColdHeader& cheader, const ColdEntry& centry, const void* pvhot, const MBOReader* mbo) {
|
||||
|
||||
@@ -156,6 +156,7 @@ public:
|
||||
explicit MDConsumerHandle(const std::shared_ptr<const SyntheticStrategy>&);
|
||||
~MDConsumerHandle();
|
||||
MDConsumerHandle(const MDConsumerHandle& other);
|
||||
MDConsumerHandle(const ColdHeader&, const ColdEntry&, const void* hot, const MBOReader*);
|
||||
|
||||
void init(const ColdHeader&, const ColdEntry&, const void* hot, const MBOReader*);
|
||||
|
||||
@@ -297,9 +298,6 @@ public:
|
||||
std::unique_ptr<MBOSnapshot,std::function<void(MBOSnapshot*)>> get_mbo() const;
|
||||
|
||||
private:
|
||||
friend class MDConsumerInst;
|
||||
friend class MDConsumerImpl;
|
||||
|
||||
template <class Read>
|
||||
HandleReadResult get_book(Read read, TimeStamp& time, uint32_t copydepth, PriceSize* bids, PriceSize* asks) const {
|
||||
bts_assert_d(copydepth <= COCONUT_MAX_DEPTH);
|
||||
|
||||
+2
-1
@@ -51,9 +51,10 @@ $ docker run \
|
||||
### Git
|
||||
|
||||
|
||||
Now that you're inside the docker container, clone the repo into ```~/spark_sdk/```
|
||||
Now that you're inside the docker container, install git large-file-support and then clone the repo into ```~/spark_sdk/```
|
||||
```
|
||||
$ cd
|
||||
~$ git lfs install
|
||||
~$ git clone https://github.com/BlueTradingSystems/spark_sdk.git
|
||||
|
||||
```
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Test Author: Kevin
|
||||
If it breaks: Kevin
|
||||
|
||||
Go here: https://github.com/BlueTradingSystems/spark_client_sdk
|
||||
|
||||
If you can't get to this URL, please ask support to get you in
|
||||
|
||||
1) Scroll down to the readme and do the steps listed there to test the client side api
|
||||
|
||||
2) Also do the excel steps using excel 2016, support can help you find a copy
|
||||
|
||||
Once you have the example spreadsheet working, visit each of the tabs and make sure you
|
||||
see non-nan data in all of the cells.
|
||||
|
||||
** For extra credit try changing one or more of the filters in the All Orders or Working Orders sheets
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Test Author: Kevin
|
||||
If it breaks: Kevin
|
||||
|
||||
Go here: https://github.com/BlueTradingSystems/spark_sdk
|
||||
|
||||
If you can't get to this URL, please ask Kevin
|
||||
|
||||
Scroll down to the readme and do the steps listed there to setup the server side api
|
||||
@@ -8,5 +8,6 @@ copy /y tools\cpp.build.props build\Directory.Build.Props > nul
|
||||
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" > nul
|
||||
cd /d %~dp0\..
|
||||
set path=%spark_build_python_path%;%path%
|
||||
touch src\lib\CMakeLists.txt
|
||||
msbuild /m /p:debugtype=portable /p:platform=x64 /clp:verbosity=minimal /clp:summary /t:restore %* spark_client.sln
|
||||
msbuild /m /p:debugtype=portable /p:platform=x64 /p:GenerateFullPaths=true /clp:verbosity=minimal /clp:summary %* spark_client.sln
|
||||
Reference in new issue
Block a user