crypto_trader
Cryptocurrency Trading Bot API Documentation
Loading...
Searching...
No Matches
crypto_trader::protocols::Trader Class Referenceabstract

Abstract base class defining the interface for a trading entity (Trader). More...

#include <trader.h>

Inheritance diagram for crypto_trader::protocols::Trader:
Inheritance graph
Collaboration diagram for crypto_trader::protocols::Trader:
Collaboration graph

Public Member Functions

 Trader ()
 Constructs a Trader object.
virtual ~Trader ()=0
 Destructor for the Trader interface.
virtual void listen (const std::string_view &buffer)=0
 Processes incoming raw market data or messages from an external source.
virtual void start ()=0
 Starts the trading process, including connecting to data sources and initializing strategies/executors.
virtual void stop ()=0
 Stops the trading process, disconnecting from data sources and performing necessary cleanup.

Detailed Description

Abstract base class defining the interface for a trading entity (Trader).

A Trader orchestrates the interaction between market data sources (e.g., WebSockets), trading strategies, and execution mechanisms.

Constructor & Destructor Documentation

◆ Trader()

crypto_trader::protocols::Trader::Trader ( )

Constructs a Trader object.

◆ ~Trader()

crypto_trader::protocols::Trader::~Trader ( )
pure virtual

Destructor for the Trader interface.

Member Function Documentation

◆ listen()

virtual void crypto_trader::protocols::Trader::listen ( const std::string_view & buffer)
pure virtual

Processes incoming raw market data or messages from an external source.

Parameters
bufferThe raw data buffer containing market information.

Implemented in crypto_trader::traders::CoinbaseTrader.

◆ start()

virtual void crypto_trader::protocols::Trader::start ( )
pure virtual

Starts the trading process, including connecting to data sources and initializing strategies/executors.

Implemented in crypto_trader::traders::CoinbaseTrader.

◆ stop()

virtual void crypto_trader::protocols::Trader::stop ( )
pure virtual

Stops the trading process, disconnecting from data sources and performing necessary cleanup.

Implemented in crypto_trader::traders::CoinbaseTrader.


The documentation for this class was generated from the following files:
  • /home/runner/work/crypto_trader/crypto_trader/protocols/trader.h
  • /home/runner/work/crypto_trader/crypto_trader/protocols/trader.cpp