Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Removed type from market order
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenewald committed Oct 1, 2023
1 parent 1e46266 commit be31a1c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/mock_api/mock_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
namespace nutc {
namespace mock_api {
std::function<
bool(const std::string&, const std::string&, const std::string&, float, float)>
bool(const std::string&, const std::string&, float, float)>

getMarketFunc()
{
return [](const std::string& side,
const std::string& type,
const std::string& ticker,
float quantity,
float price) {
log_i(
mock_api,
"Mock API: Placing order side {} type {} ticker {} quantity {} price "
"Mock API: Placing order side {} ticker {} quantity {} price "
"{}",
side,
type,
ticker,
quantity,
price
Expand Down
2 changes: 1 addition & 1 deletion src/mock_api/mock_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace nutc {
namespace mock_api {

std::function<
bool(const std::string&, const std::string&, const std::string&, float, float)>
bool(const std::string&, const std::string&, float, float)>
getMarketFunc();
}
} // namespace nutc
6 changes: 3 additions & 3 deletions src/pywrapper/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace pywrapper {
bool
create_api_module(
std::function<
bool(const std::string&, const std::string&, const std::string&, float, float)>
bool(const std::string&, const std::string&, float, float)>
publish_market_order
)
{
Expand All @@ -24,8 +24,8 @@ create_api_module(

py::exec(R"(import nutc_api)");
py::exec(R"(
def place_market_order(side, type, ticker, quantity, price):
nutc_api.publish_market_order(side, type, ticker, quantity, price)
def place_market_order(side, ticker, quantity, price):
nutc_api.publish_market_order(side, ticker, quantity, price)
)");
} catch (const std::exception& e) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/pywrapper/runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace nutc {
namespace pywrapper {
bool create_api_module(
std::function<
bool(const std::string&, const std::string&, const std::string&, float, float)>
bool(const std::string&, const std::string&, float, float)>
publish_market_order
);
std::optional<std::string> import_py_code(const std::string& code);
Expand Down

0 comments on commit be31a1c

Please sign in to comment.