Models & Exceptions
===================

Data models and exception classes used throughout the project-x-py package.

Core Models
-----------

.. currentmodule:: project_x_py.models

.. automodule:: project_x_py.models
   :members:
   :undoc-members:
   :show-inheritance:
   :no-index:

Configuration
~~~~~~~~~~~~~

.. autoclass:: ProjectXConfig
   :members:
   :undoc-members:
   :show-inheritance:

Client Models
~~~~~~~~~~~~~

.. autoclass:: Account
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: Instrument
   :members:
   :undoc-members:
   :show-inheritance:

Trading Models
~~~~~~~~~~~~~~

.. autoclass:: Order
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: OrderPlaceResponse
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: BracketOrderResponse
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: Position
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: Trade
   :members:
   :undoc-members:
   :show-inheritance:

Exception Classes
-----------------

.. currentmodule:: project_x_py.exceptions

Base Exception
~~~~~~~~~~~~~~

.. autoclass:: ProjectXError
   :members:
   :undoc-members:
   :show-inheritance:

API Exceptions
~~~~~~~~~~~~~~

.. autoclass:: ProjectXConnectionError
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: ProjectXAuthenticationError
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: ProjectXServerError
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: ProjectXRateLimitError
   :members:
   :undoc-members:
   :show-inheritance:

Data Exceptions
~~~~~~~~~~~~~~~

.. autoclass:: ProjectXDataError
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: ProjectXInstrumentError
   :members:
   :undoc-members:
   :show-inheritance:

Trading Exceptions
~~~~~~~~~~~~~~~~~~

.. autoclass:: ProjectXOrderError
   :members:
   :undoc-members:
   :show-inheritance:

.. autoclass:: ProjectXPositionError
   :members:
   :undoc-members:
   :show-inheritance: 