General Models¶
This section documents the general data models used across modules.
- class bingx_py.models.general.MainAccountInternalTransferResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Main Account Internal Transfer.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (MainAccountInternalTransferResponseData) – Response data.
- code: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.general.MainAccountInternalTransferResponseData(*, id)[source]¶
Bases:
BaseModelModel for the data field in MainAccountInternalTransferResponse.
- Parameters:
id (str) – The platform returns the unique ID of the internal transfer record.
- id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bingx_py.models.general.OrderSide(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for order sides.
- Parameters:
BUY (str) – Buy order.
SELL (str) – Sell order.
- BUY = 'BUY'¶
- SELL = 'SELL'¶
- class bingx_py.models.general.OrderStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for order statuses.
- Parameters:
NEW (str) – The order has been accepted by the system.
PENDING (str) – The order is pending execution.
PARTIALLY_FILLED (str) – The order has been partially filled.
FILLED (str) – The order has been fully filled.
CANCELED (str) – The order has been canceled.
FAILED (str) – The order has failed.
- CANCELED = 'CANCELED'¶
- FAILED = 'FAILED'¶
- FILLED = 'FILLED'¶
- NEW = 'NEW'¶
- PARTIALLY_FILLED = 'PARTIALLY_FILLED'¶
- PENDING = 'PENDING'¶
- class bingx_py.models.general.TimeInForce(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for time in force options.
- Parameters:
POST_ONLY (str) – Post-only order (will not execute immediately).
GTC (str) – Good ‘til canceled (order remains active until canceled).
IOC (str) – Immediate or cancel (order executes immediately or is canceled).
FOK (str) – Fill or kill (order must be filled immediately or canceled).
- FOK = 'FOK'¶
- GTC = 'GTC'¶
- IOC = 'IOC'¶
- POST_ONLY = 'PostOnly'¶