General Models

This section documents the general data models used across modules.

class bingx_py.models.general.MainAccountInternalTransferResponse(*, code, timestamp, data)[source]

Bases: BaseModel

Model for the response of Main Account Internal Transfer.

Parameters:
code: int
data: MainAccountInternalTransferResponseData
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: BaseModel

Model 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, Enum

Enum 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, Enum

Enum 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, Enum

Enum 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'