more spreader unit tests
This commit is contained in:
1 parent
2083204673
commit
842e8f4fc9
11 files changed
+143
-67
No files matched your search
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "enter program name, for example ${workspaceRoot}/a.exe",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceRoot}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/path/to/gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -25,7 +25,7 @@ struct SpreaderOrder::PImpl
|
||||
resurrected (resurrected_arg),
|
||||
create_order_request (create_order_request_arg),
|
||||
db (db_arg),
|
||||
orderkey (orderkey_arg),
|
||||
order_key (orderkey_arg),
|
||||
status(status),
|
||||
price(price),
|
||||
quantity(quantity),
|
||||
@@ -34,7 +34,7 @@ struct SpreaderOrder::PImpl
|
||||
const bool resurrected;
|
||||
const api::orderman::CreateOrderRequest create_order_request;
|
||||
securities::ISecurityDB& db;
|
||||
const OrderKey orderkey;
|
||||
const OrderKey order_key;
|
||||
api::orderman::OrderStatus status;
|
||||
Price price;
|
||||
Quantity quantity;
|
||||
@@ -197,17 +197,9 @@ void SpreaderOrder::on_cancel(const api::orderman::CancelSpreaderOrder& c)
|
||||
void SpreaderOrder::on_book(TickToTradeCorID cid, Book const& book)
|
||||
{
|
||||
if (me->resurrected) return;
|
||||
LOG(OrderMan, Diag, "on_book {} {}/{}",
|
||||
book.security_key().value(),
|
||||
book.bid()[0].price(),
|
||||
book.ask()[0].price());
|
||||
LOG(Latency, Info, "on_book {} {}", cid, utils::TimeStamp::now().to_uint64());
|
||||
if (_state == State::START)
|
||||
bts_assert(false);
|
||||
else if (_state == State::WAITING_FOR_FIRST_CONNECT)
|
||||
// no md updates until connection is established
|
||||
bts_assert(false);
|
||||
else if (_state == State::WORKING)
|
||||
LOG(OrderMan, Diag, "on_book");
|
||||
LOG(Latency, Info, "on_book {} {}", cid, utils::TimeStamp::now().to_uint64());
|
||||
if (_state == State::WORKING)
|
||||
{
|
||||
// this is a key->index lookup
|
||||
SpreaderLegData& md_leg = _bookkeeping_data->get_leg_data(book.security_key());
|
||||
@@ -227,6 +219,11 @@ void SpreaderOrder::on_book(TickToTradeCorID cid, Book const& book)
|
||||
h.hedger().update_md();
|
||||
}
|
||||
}
|
||||
else if (_state == State::START)
|
||||
bts_assert(false);
|
||||
else if (_state == State::WAITING_FOR_FIRST_CONNECT)
|
||||
// no md updates until connection is established
|
||||
bts_assert(false);
|
||||
else if (_state == State::WAITING_FOR_CANCEL_ALL)
|
||||
{
|
||||
// no need to send md, quoters and hedgers
|
||||
@@ -243,7 +240,7 @@ void SpreaderOrder::on_time(TimeStamp const&)
|
||||
// and call them
|
||||
}
|
||||
|
||||
void SpreaderOrder::on_child_update(OrderKey orderkey,
|
||||
void SpreaderOrder::on_child_update(OrderKey order_key,
|
||||
api::orderman::OrderStatus status,
|
||||
Quantity filled_quantity,
|
||||
Price average_price,
|
||||
@@ -254,14 +251,14 @@ void SpreaderOrder::on_child_update(OrderKey orderkey,
|
||||
static std::string empty;
|
||||
LOG(OrderMan,Diag, "SpreaderOrder.on_child_update "
|
||||
"k: {} status: {} filled_qty: {} avg_price: {} reject_msg: {}",
|
||||
orderkey.value(), status, filled_quantity.value(), average_price.value(), error_msg == nullptr ? empty : *error_msg);
|
||||
order_key.value(), status, filled_quantity.value(), average_price.value(), error_msg == nullptr ? empty : *error_msg);
|
||||
if (_state == State::START)
|
||||
bts_assert(false);
|
||||
else if (_state == State::WAITING_FOR_FIRST_CONNECT)
|
||||
bts_assert(false);
|
||||
else if (_state == State::WORKING)
|
||||
{
|
||||
SpreaderLegData* leg_data_ptr = _bookkeeping_data->find_leg_from_quoter_orderkey(orderkey);
|
||||
SpreaderLegData* leg_data_ptr = _bookkeeping_data->find_leg_from_quoter_orderkey(order_key);
|
||||
if (leg_data_ptr != nullptr)
|
||||
{
|
||||
SpreaderLegData& leg_data = *(leg_data_ptr);
|
||||
@@ -274,7 +271,7 @@ void SpreaderOrder::on_child_update(OrderKey orderkey,
|
||||
else
|
||||
{
|
||||
// should be a hedge order then
|
||||
SpreaderHedgerData* hedger_data = _bookkeeping_data->find_hedger_from_orderkey(orderkey);
|
||||
SpreaderHedgerData* hedger_data = _bookkeeping_data->find_hedger_from_orderkey(order_key);
|
||||
if (hedger_data != nullptr)
|
||||
{
|
||||
/// TODO
|
||||
@@ -289,7 +286,7 @@ void SpreaderOrder::on_child_update(OrderKey orderkey,
|
||||
else if (_state == State::WAITING_FOR_CANCEL_ALL)
|
||||
{
|
||||
// all it has to do
|
||||
SpreaderLegData* q_leg_data_ptr = _bookkeeping_data->find_leg_from_quoter_orderkey(orderkey);
|
||||
SpreaderLegData* q_leg_data_ptr = _bookkeeping_data->find_leg_from_quoter_orderkey(order_key);
|
||||
if (q_leg_data_ptr != nullptr)
|
||||
{
|
||||
SpreaderLegData& q_leg_data = *(q_leg_data_ptr);
|
||||
@@ -298,7 +295,7 @@ void SpreaderOrder::on_child_update(OrderKey orderkey,
|
||||
}
|
||||
else
|
||||
{
|
||||
SpreaderHedgerData* hedger_data = _bookkeeping_data->find_hedger_from_orderkey(orderkey);
|
||||
SpreaderHedgerData* hedger_data = _bookkeeping_data->find_hedger_from_orderkey(order_key);
|
||||
if (hedger_data != nullptr)
|
||||
{
|
||||
// SpreaderOrderUpdateMessage update_message(orderkey, status, filled_quantity, average_price, hedger_data->filled_quantity, hedger_data->avergage_filled_price);
|
||||
@@ -535,10 +532,10 @@ bool SpreaderOrder::can_resolve_securties ()
|
||||
/*******************************************************************************/
|
||||
/******************Functions to Help Testing************************************/
|
||||
|
||||
SingleLegQuoter& SpreaderOrder::quoter (size_t index)
|
||||
SpreaderLegData& SpreaderOrder::test_only_func_leg_data (size_t index)
|
||||
{
|
||||
SpreaderLegData& leg_data = _bookkeeping_data->get_leg_data (index);
|
||||
return leg_data.quoter();
|
||||
return leg_data;
|
||||
}
|
||||
|
||||
}}
|
||||
}}
|
||||
@@ -78,8 +78,9 @@ public:
|
||||
// ISpreaderManager members
|
||||
const orderman::Book& get_book(size_t leg_index) const override;
|
||||
const LegPropertyData& get_leg_data(size_t leg_index) const override;
|
||||
State state () const {return _state;} // this is exposed for testing reasons only
|
||||
SingleLegQuoter& quoter (size_t index);
|
||||
// this is exposed for testing reasons only
|
||||
State test_only_func_state () const {return _state;}
|
||||
SpreaderLegData& test_only_func_leg_data (size_t index);
|
||||
private:
|
||||
void _init_state ();
|
||||
void _transform_to_START();
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
#include "server/sparkd/orderman/native_orders/NativeOrderFactory.h"
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "server/sparkd/orderman/spreader_orders/SpreaderOrder.h"
|
||||
#include "server/sparkd/spreader/SpreaderLegData.h"
|
||||
#include "lib/utils/datetime.h"
|
||||
#include "lib/utils/PBUtils.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
|
||||
|
||||
namespace bts {
|
||||
@@ -191,6 +193,22 @@ void _fill_book(Book& book, double inside_market, double tick_size, uint16_t* si
|
||||
}
|
||||
}
|
||||
|
||||
void _test_quoter_price_quantity (const QuoteLegPriceQuantityState& qp_state,
|
||||
Price target_spread_price,
|
||||
Quantity target_leg_quantity,
|
||||
Quantity aggregated_filled_quantity,
|
||||
Quantity aggregated_hedged_reduction,
|
||||
Price out_price,
|
||||
Quantity out_quantity)
|
||||
{
|
||||
bts_assert (qp_state.target_spread_price() == target_spread_price);
|
||||
bts_assert (qp_state.target_leg_quantity( ) == target_leg_quantity);
|
||||
bts_assert (qp_state.aggregated_filled_quantity() == aggregated_filled_quantity);
|
||||
bts_assert (qp_state.aggregated_hedged_reduction() == aggregated_hedged_reduction);
|
||||
bts_assert (qp_state.out_price() == out_price);
|
||||
bts_assert (qp_state.out_quantity() == out_quantity);
|
||||
}
|
||||
|
||||
TEST_CASE ("Spreader Order", "[spreader]")
|
||||
{
|
||||
auto sec1 = securities::from_str(fut1);
|
||||
@@ -214,49 +232,83 @@ TEST_CASE ("Spreader Order", "[spreader]")
|
||||
do_nothing,
|
||||
do_nothing,
|
||||
do_nothing);
|
||||
bts_assert (order.state() == SpreaderOrder::State::START);
|
||||
bts_assert (order.test_only_func_state() == SpreaderOrder::State::START);
|
||||
/*********************Initing the order********************/
|
||||
order.init ();
|
||||
bts_assert (order.state() == SpreaderOrder::State::WAITING_FOR_FIRST_CONNECT);
|
||||
bts_assert (order.test_only_func_state() == SpreaderOrder::State::WAITING_FOR_FIRST_CONNECT);
|
||||
/*********************First on_connect*********************/
|
||||
order.on_connect ();
|
||||
bts_assert (order.state() == SpreaderOrder::State::WORKING);
|
||||
/*********************First on_connect*********************/
|
||||
SingleLegQuoter& quoter = order.quoter (1);
|
||||
bts_assert (quoter.state() == SingleLegQuoter::QuoterState::WAITING_FOR_MARKET);
|
||||
bts_assert (order.test_only_func_state() == SpreaderOrder::State::WORKING);
|
||||
bts::spreader::SpreaderLegData& leg_data = order.test_only_func_leg_data (1);
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WAITING_FOR_MARKET);
|
||||
const QuoteLegPriceQuantityState& qp_state = leg_data.quoter().test_only_func_price_quantity_state ();
|
||||
_test_quoter_price_quantity (qp_state, Price (0), Quantity(100), Quantity(0), Quantity(0), Price (0), Quantity (0));
|
||||
/*********************Market*********************/
|
||||
Book book;
|
||||
uint16_t book_sizes_1[] = { 11, 13, 17, 19, 23 };
|
||||
_fill_book (book, 2500, 0.25, book_sizes_1, bts::api::Side::SIDE_SELL);
|
||||
book = Book (bts::SecurityKey(cor.spreader().security().synthetic().legs(0).security().id()), book.side (api::Side::SIDE_BUY), book.side (api::Side::SIDE_SELL));
|
||||
for (int i =0; i < 100; i++)
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
order.on_book (bts::orderman::NullTickToTradeCorID, book);
|
||||
bts_assert (quoter.state() == SingleLegQuoter::QuoterState::WAITING_FOR_FIRST_ACK);
|
||||
}
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WAITING_FOR_FIRST_ACK);
|
||||
auto qp_state_1 = leg_data.quoter().test_only_func_price_quantity_state ();
|
||||
_test_quoter_price_quantity (qp_state_1, Price (0), Quantity(100), Quantity(0), Quantity(0), Price (2501.00), Quantity (83));
|
||||
}
|
||||
/*********************OrderStatus*********************/
|
||||
// OS_UNACKNOWLEDGED
|
||||
for (int i =0; i < 100; i++)
|
||||
|
||||
/*********************un ack******************/
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
order.on_child_update (bts::orderman::OrderKey (0), api::orderman::OrderStatus::OS_UNACKNOWLEDGED, Quantity(0), Price(0), nullptr);
|
||||
bts_assert (quoter.state() == SingleLegQuoter::QuoterState::WAITING_FOR_FIRST_ACK);
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WAITING_FOR_FIRST_ACK);
|
||||
auto qp_state_2 = leg_data.quoter().test_only_func_price_quantity_state ();
|
||||
_test_quoter_price_quantity (qp_state_2, Price (0), Quantity(100), Quantity(0), Quantity(0), Price (2501.00), Quantity (83));
|
||||
}
|
||||
// send an ack
|
||||
for (int i =0; i < 100; i++)
|
||||
/*********************ack *********************/
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
order.on_child_update (bts::orderman::OrderKey (0), api::orderman::OrderStatus::OS_NEW, Quantity(0), Price(0), nullptr);
|
||||
bts_assert (quoter.state() == SingleLegQuoter::QuoterState::WORKING);
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WORKING);
|
||||
auto qp_state_3 = leg_data.quoter().test_only_func_price_quantity_state ();
|
||||
_test_quoter_price_quantity (qp_state_3, Price (0), Quantity(100), Quantity(0), Quantity(0), Price (2501.00), Quantity (83));
|
||||
}
|
||||
/**************md measure requote time *********/
|
||||
for (int n = 0; n < 25; n++)
|
||||
{
|
||||
int n_runs = 1000000;
|
||||
auto t0 = Timer::now();
|
||||
for (int i = 0; i < n_runs; i++)
|
||||
order.on_book (bts::orderman::NullTickToTradeCorID, book);
|
||||
auto t1 = Timer::now();
|
||||
double us = static_cast<double>(us_diff(t1,t0))/n_runs;
|
||||
std::cout << "Spreader reprice time " << us << " usecs" << std::endl;
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WORKING);
|
||||
}
|
||||
/**************23 lot fill************/
|
||||
// send a fill and assert for fill qty
|
||||
// fill it all and assert for end
|
||||
|
||||
order.on_child_update (bts::orderman::OrderKey (0), api::orderman::OrderStatus::OS_NEW,
|
||||
Quantity(23), Price(2500), nullptr);
|
||||
bts_assert (leg_data.order_update_message().filled_quantity().value() == 23);
|
||||
bts_assert (leg_data.order_update_message().last_update_filled_quantity().value() == 23);
|
||||
bts_assert (leg_data.order_update_message().last_update_filled_price().value() == 2500.00);
|
||||
// send an error, assert for cxl-waiting for both spreader and quoter
|
||||
// send a cxl'ed
|
||||
// assert for end and end
|
||||
// TODO price/qty check
|
||||
// fill it all
|
||||
// cancel it
|
||||
// order.on_cancel (api::orderman::CancelSpreaderOrder());
|
||||
// bts_assert (order.test_only_func_state() == SpreaderOrder::State::WAITING_FOR_CANCEL_ALL);
|
||||
// bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::WAITING_FOR_CANCEL_ACK);
|
||||
// send cxl ack
|
||||
order.on_child_update (bts::orderman::OrderKey (0), api::orderman::OrderStatus::OS_CANCELED,
|
||||
Quantity(23), Price(2500), nullptr);
|
||||
bts_assert (order.test_only_func_state() == SpreaderOrder::State::END);
|
||||
bts_assert (leg_data.quoter().test_only_func_state() == SingleLegQuoter::QuoterState::END);
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ void QuoteLegPriceQuantityState::update_out_price_quantity(Price new_out_price,
|
||||
_out_quantity = new_out_quantity;
|
||||
}
|
||||
|
||||
Quantity QuoteLegPriceQuantityState::remaining_to_fill()
|
||||
Quantity QuoteLegPriceQuantityState::remaining_to_fill() const
|
||||
{
|
||||
if (_aggregated_hedged_reduction.value() >= _in_target_leg_quantity.value())
|
||||
{
|
||||
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
// updates the out price and quantity
|
||||
void update_out_price_quantity(Price new_computed_price, Quantity new_computed_quantity);
|
||||
// Accessor functions
|
||||
Price target_spread_price() { return _in_target_spread_price; }
|
||||
Quantity target_leg_quantity() { return _in_target_leg_quantity; }
|
||||
Quantity aggregated_filled_quantity() { return _aggregated_filled_quantity; }
|
||||
Quantity aggregated_hedged_reduction() { return _aggregated_hedged_reduction; }
|
||||
Price out_price() { return _out_price; }
|
||||
Quantity out_quantity() { return _out_quantity; }
|
||||
Quantity remaining_to_fill();
|
||||
Price target_spread_price() const { return _in_target_spread_price; }
|
||||
Quantity target_leg_quantity() const { return _in_target_leg_quantity; }
|
||||
Quantity aggregated_filled_quantity() const { return _aggregated_filled_quantity; }
|
||||
Quantity aggregated_hedged_reduction() const { return _aggregated_hedged_reduction; }
|
||||
Price out_price() const { return _out_price; }
|
||||
Quantity out_quantity() const { return _out_quantity; }
|
||||
Quantity remaining_to_fill() const;
|
||||
};
|
||||
}}
|
||||
@@ -177,8 +177,6 @@ void SingleLegQuoter::_handle_events_in_WAITING_FOR_FIRST_ACK(const EventData& e
|
||||
_transform_to_WAITING_FOR_CANCEL_ACK();
|
||||
else if (order_udpate_message.acknowledged())
|
||||
{
|
||||
if (order_udpate_message.acknowledged())
|
||||
return;
|
||||
if (_price_quantity_state.remaining_to_fill().value() == 0)
|
||||
_transform_to_WAITING_FOR_CANCEL_ACK();
|
||||
else
|
||||
@@ -220,7 +218,8 @@ void SingleLegQuoter::_transform_to_WORKING()
|
||||
}
|
||||
|
||||
void SingleLegQuoter::_reprice_in_WORKING()
|
||||
{
|
||||
{
|
||||
// TODO: dont change state here, make state changing more explicit
|
||||
Price new_price; Quantity new_quantity;
|
||||
_compute_price_quantity(new_price, new_quantity);
|
||||
if (new_quantity.value() == 0)
|
||||
|
||||
@@ -166,7 +166,9 @@ public:
|
||||
// called when the hedge order is cancelled, either
|
||||
// manually or automatically
|
||||
void cancel_order();
|
||||
QuoterState state() { return _state; }
|
||||
// for test reasons
|
||||
QuoterState test_only_func_state() { return _state; }
|
||||
const QuoteLegPriceQuantityState& test_only_func_price_quantity_state () const {return _price_quantity_state;}
|
||||
private:
|
||||
/********************External Event Handling in START***********************/
|
||||
void _handle_events_in_START(const EventData& event_data);
|
||||
|
||||
@@ -40,19 +40,19 @@ public:
|
||||
}
|
||||
size_t count() { return _leg_data.size(); }
|
||||
|
||||
SpreaderLegData* find_leg_from_quoter_orderkey(orderman::OrderKey orderkey)
|
||||
SpreaderLegData* find_leg_from_quoter_orderkey(orderman::OrderKey order_key)
|
||||
{
|
||||
for (auto q_it = _leg_data.begin(); q_it != _leg_data.end(); q_it++)
|
||||
if (q_it->leg_property_data.is_active_quoting())
|
||||
if (q_it->order_key() == orderkey)
|
||||
if (q_it->order_key() == order_key)
|
||||
return &(*q_it);
|
||||
return nullptr;
|
||||
}
|
||||
SpreaderHedgerData* find_hedger_from_orderkey(orderman::OrderKey orderkey)
|
||||
SpreaderHedgerData* find_hedger_from_orderkey(orderman::OrderKey order_key)
|
||||
{
|
||||
for (auto l_it = _leg_data.begin(); l_it != _leg_data.end(); ++l_it)
|
||||
{
|
||||
SpreaderHedgerData* rv = l_it->find_hedger_from_orderkey (orderkey);
|
||||
SpreaderHedgerData* rv = l_it->find_hedger_from_orderkey (order_key);
|
||||
if (rv != nullptr)
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ private:
|
||||
public:
|
||||
SpreaderLegData(const LegPropertyData& leg_property_data_arg,
|
||||
SingleLegQuoter quoter_arg,
|
||||
orderman::OrderKey orderkey)
|
||||
orderman::OrderKey order_key)
|
||||
:
|
||||
leg_property_data(leg_property_data_arg),
|
||||
_quoter (quoter_arg),
|
||||
_book(),
|
||||
_order_update_message (SpreaderOrderUpdateMessage (orderkey)),
|
||||
_order_update_message (SpreaderOrderUpdateMessage (order_key)),
|
||||
_hedger_data_vector() {}
|
||||
|
||||
SingleLegQuoter& quoter() {return _quoter;}
|
||||
@@ -44,16 +44,16 @@ public:
|
||||
// are copied by value
|
||||
void set_book(const orderman::Book& book_arg) {_book = book_arg;}
|
||||
SpreaderOrderUpdateMessage& order_update_message () {return _order_update_message;}
|
||||
orderman::OrderKey order_key() {return _order_update_message.key;}
|
||||
orderman::OrderKey order_key() {return _order_update_message.order_key;}
|
||||
// returns the number of active hedgers
|
||||
size_t n_hedgers() { return _hedger_data_vector.size(); }
|
||||
// returns the hedger at a given index
|
||||
SpreaderHedgerData& get_hedger(size_t index) {return _hedger_data_vector[index];}
|
||||
// returns a hedger from its orderkey
|
||||
SpreaderHedgerData* find_hedger_from_orderkey(orderman::OrderKey orderkey)
|
||||
// returns a hedger from its order_key
|
||||
SpreaderHedgerData* find_hedger_from_orderkey(orderman::OrderKey order_key)
|
||||
{
|
||||
for (auto h_it = _hedger_data_vector.begin(); h_it != _hedger_data_vector.end(); ++h_it)
|
||||
if (h_it->order_update_message().key == orderkey)
|
||||
if (h_it->order_update_message().order_key == order_key)
|
||||
return &(*h_it);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class SpreaderOrderUpdateMessage
|
||||
public:
|
||||
// original order_state passed from the engine infrastructure
|
||||
// (do not cache it)
|
||||
const orderman::OrderKey key;
|
||||
const orderman::OrderKey order_key;
|
||||
private:
|
||||
api::orderman::OrderStatus _status;
|
||||
Price _average_price;
|
||||
@@ -27,9 +27,9 @@ private:
|
||||
Quantity _last_update_filled_quantity;
|
||||
bool _has_error;
|
||||
public:
|
||||
SpreaderOrderUpdateMessage(orderman::OrderKey orderkey_arg)
|
||||
SpreaderOrderUpdateMessage(orderman::OrderKey order_key_arg)
|
||||
:
|
||||
key(orderkey_arg),
|
||||
order_key(order_key_arg),
|
||||
_status (api::orderman::OrderStatus::OS_UNACKNOWLEDGED),
|
||||
_average_price(Price(0)),
|
||||
_filled_quantity(Quantity (0)),
|
||||
|
||||
Reference in new issue
Block a user