exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
cli_parsing.cpp File Reference
#include "client/cli_parsing.hpp"
#include <CLI/CLI.hpp>
#include <google/protobuf/timestamp.pb.h>
#include <google/protobuf/util/time_util.h>
#include <regex>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for cli_parsing.cpp:

Namespaces

namespace  exchange
namespace  exchange::client
namespace  exchange::client::cli_option_names
namespace  exchange::client::cli_arg_descriptions

Functions

ParseCommandResult exchange::client::parseCommand (int argc, char **argv, std::string &serverUrl)

Variables

const auto exchange::client::cli_option_names::SERVER_URL = "--server"
const auto exchange::client::cli_option_names::SECURITY_ID = "--security"
const auto exchange::client::cli_option_names::SIDE = "--side"
const auto exchange::client::cli_option_names::QUANTITY = "-q,--quantity"
const auto exchange::client::cli_option_names::PRICE_CENTS = "-p,--price-cents"
const auto exchange::client::cli_option_names::TIF = "--tif"
const auto exchange::client::cli_option_names::ORDER_ID = "-o,--order"
const auto exchange::client::cli_option_names::RESOLUTION_SECONDS = "--resolution-seconds"
const auto exchange::client::cli_option_names::START_TIME = "--start"
const auto exchange::client::cli_option_names::END_TIME = "--end"
const auto exchange::client::cli_option_names::NUMBER_OF_LEVELS = "--number-of-levels"
const auto exchange::client::cli_option_names::SYMBOL = "--symbol"
const auto exchange::client::cli_arg_descriptions::SERVER_URL = "The host:port string corresponding to the exchange server's address"
const auto exchange::client::cli_arg_descriptions::SECURITY_ID = "The numerical id of the security (1, 2, or 3)"
const auto exchange::client::cli_arg_descriptions::SIDE = R"("buy" or "sell")"
const auto exchange::client::cli_arg_descriptions::QUANTITY = "The number of units to purchase/sell"
const auto exchange::client::cli_arg_descriptions::PRICE_CENTS = "The price in cents for the given order"
const auto exchange::client::cli_arg_descriptions::TIF = R"(The time in force qualifier ("GTC", "IOC", or "FOK"))"
const auto exchange::client::cli_arg_descriptions::ORDER_ID = "The UUID of the order"
const auto exchange::client::cli_arg_descriptions::RESOLUTION_SECONDS = "How many seconds each candle should cover"
const auto exchange::client::cli_arg_descriptions::START_TIME = "The beginning timestamp, in the RFC 3339 format (e.g. 2026-11-04T09:30:00Z)"
const auto exchange::client::cli_arg_descriptions::END_TIME = "The end timestamp, in the RFC 3339 format (e.g. 2026-11-04T09:30:00Z)"
const auto exchange::client::cli_arg_descriptions::NUMBER_OF_LEVELS = "The number of (price, quantity) pairs to provide for the best buys and sells"
const auto exchange::client::cli_arg_descriptions::SYMBOL = "The stock ticker symbol of the security"