#include <real_trading_executor.h>
|
| | RealTradingExecutor (const RealTradingExecutorConfig &config) |
| | ~RealTradingExecutor ()=default |
| common::TradeResult | buy (const std::string_view &product, double quantity) override |
| | Executes a buy order for a specified product and quantity.
|
| common::TradeResult | sell (const std::string_view &product, double quantity) override |
| | Executes a sell order for a specified product and quantity.
|
| double | getBalance (const std::string_view ¤cy) const override |
| | Retrieves the current balance of a specified currency.
|
| std::optional< double > | getPosition (const std::string_view &product) const override |
| | Retrieves the current position (holdings) for a given product.
|
| void | processTickerData (const std::string_view &product, double price, const T::Timestamp ×tamp) override |
| | Processes new ticker data to update the executor's internal state.
|
| virtual | ~Executor ()=default |
| | Destructor for the Executor interface.
|
◆ RealTradingExecutor()
template<common::MarketData T>
◆ ~RealTradingExecutor()
template<common::MarketData T>
◆ buy()
template<common::MarketData T>
Executes a buy order for a specified product and quantity.
- Parameters
-
| product | The symbol of the product to buy (e.g., "BTC-USD"). |
| quantity | The amount of the product to buy. |
- Returns
- The result of the trade execution.
Implements crypto_trader::protocols::Executor< T >.
◆ getBalance()
template<common::MarketData T>
Retrieves the current balance of a specified currency.
- Parameters
-
| currency | The symbol of the currency (e.g., "USD", "BTC"). |
- Returns
- The current balance of the currency.
Implements crypto_trader::protocols::Executor< T >.
◆ getPosition()
template<common::MarketData T>
Retrieves the current position (holdings) for a given product.
- Parameters
-
| product | The symbol of the product (e.g., "BTC-USD"). |
- Returns
- An optional containing the quantity held, or empty if no position.
Implements crypto_trader::protocols::Executor< T >.
◆ processTickerData()
template<common::MarketData T>
Processes new ticker data to update the executor's internal state.
- Parameters
-
| product | The symbol of the product for the ticker. |
| price | The latest price of the product. |
| timestamp | The timestamp of the ticker data. |
Implements crypto_trader::protocols::Executor< T >.
◆ sell()
template<common::MarketData T>
Executes a sell order for a specified product and quantity.
- Parameters
-
| product | The symbol of the product to sell (e.g., "BTC-USD"). |
| quantity | The amount of the product to sell. |
- Returns
- The result of the trade execution.
Implements crypto_trader::protocols::Executor< T >.
The documentation for this class was generated from the following file: