Spot Trading Models¶
This section documents the data models used in the Spot Trading module.
- class bingx_py.models.spot.account.AccountType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for account types.
- Values:
SPOT: Spot (fund account). STD_FUTURES: Standard futures account. COIN_M_PERP: Coin base account. USDT_M_PERP: U base account. COPY_TRADING: Copy trading account. GRID: Grid account. ERAN: Wealth account. C2C: C2C account.
- C2C = 'c2c'¶
- COIN_M_PERP = 'coinMPerp'¶
- COPY_TRADING = 'copyTrading'¶
- ERAN = 'eran'¶
- GRID = 'grid'¶
- SPOT = 'sopt'¶
- STD_FUTURES = 'stdFutures'¶
- USDT_M_PERP = 'USDTMPerp'¶
- class bingx_py.models.spot.account.AssetBalance(*, asset, free, locked)[source]¶
Bases:
BaseModelModel for asset balance data.
- Parameters:
asset (str) – Asset symbol (e.g., USDT, CHEEMS).
free (str) – Available balance.
locked (str) – Locked balance.
- asset: str¶
- free: str¶
- locked: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bingx_py.models.spot.account.AssetOverviewResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Asset Overview.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (AssetOverviewResponseData) – Response data.
- code: int¶
- data: list[AssetOverviewResult]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.account.AssetOverviewResult(*, accountType, usdtBalance)[source]¶
Bases:
BaseModelModel for a single asset overview result.
- Parameters:
account_type (AccountType) – Account type.
usdt_balance (str) – Equivalent to USDT amount.
accountType (AccountType)
usdtBalance (str)
- account_type: AccountType¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- usdt_balance: str¶
- class bingx_py.models.spot.account.AssetTransferRecord(*, asset, amount, type, status, tranId, timestamp)[source]¶
Bases:
BaseModelModel for a single asset transfer record.
- Parameters:
asset (str) – Coin name.
amount (str) – Coin amount.
type (str) – Transfer type.
status (str) – Status, e.g., CONFIRMED.
tran_id (int) – Transaction ID.
timestamp (int) – Transfer timestamp.
tranId (int)
- amount: str¶
- asset: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: str¶
- timestamp: int¶
- tran_id: int¶
- type: str¶
- class bingx_py.models.spot.account.AssetTransferRecordsResponse(*, total, rows)[source]¶
Bases:
BaseModelModel for the response of Asset Transfer Records.
- Parameters:
total (int) – Total number of records.
rows (List[AssetTransferRecord]) – List of asset transfer records.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- rows: list[AssetTransferRecord]¶
- total: int¶
- class bingx_py.models.spot.account.AssetTransferResponse(*, tranId)[source]¶
Bases:
BaseModelModel for the response of Asset Transfer.
- Parameters:
tran_id (str) – Transaction ID.
tranId (str)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- tran_id: str¶
- class bingx_py.models.spot.account.InternalTransferRecord(*, id, coin, receiver, amount, status, fromUid, recordType)[source]¶
Bases:
BaseModelModel for a single internal transfer record.
- Parameters:
id (int) – Inner transfer ID.
coin (str) – Coin name.
receiver (int) – Receiver UID.
amount (float) – Transfer amount.
status (int) – Status (4=Pending review, 5=Failed, 6=Completed).
from_uid (int) – Payer’s account.
record_type (str) – Record type (out: transfer out record, in: transfer in record).
fromUid (int)
recordType (str)
- amount: float¶
- coin: str¶
- from_uid: int¶
- id: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- receiver: int¶
- record_type: str¶
- status: int¶
- class bingx_py.models.spot.account.MainAccountInternalTransferRecordsResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Main Account Internal Transfer Records.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (MainAccountInternalTransferRecordsResponseData) – 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.spot.account.MainAccountInternalTransferRecordsResponseData(*, data, total)[source]¶
Bases:
BaseModelModel for the data field in MainAccountInternalTransferRecordsResponse.
- Parameters:
data (List[InternalTransferRecord]) – Inner transfer records list.
total (int) – Total number of records.
- data: list[InternalTransferRecord]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- total: int¶
- class bingx_py.models.spot.account.QueryAssetsResponse(*, code, msg, debugMsg, data)[source]¶
Bases:
BaseModelModel for the response of Query Assets.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
msg (str) – Error Details Description.
debug_msg (str) – Debug message.
data (QueryAssetsResponseData) – Response data.
debugMsg (str)
- code: int¶
- data: QueryAssetsResponseData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.account.QueryAssetsResponseData(*, balances)[source]¶
Bases:
BaseModelModel for the data field in QueryAssetsResponse.
- Parameters:
balances (List[AssetBalance]) – Asset list.
- balances: list[AssetBalance]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bingx_py.models.spot.account.TransferDirection(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for direction of transfer.
FUND_SFUTURES: Funding Account->Standard Contract SFUTURES_FUND: Standard Contract->Funding Account FUND_PFUTURES: Funding Account->Perpetual Futures PFUTURES_FUND: Perpetual Futures->Funding Account SFUTURES_PFUTURES: Standard Contract->Perpetual Futures PFUTURES_SFUTURES: Perpetual Futures->Standard Contract
- FUND_PFUTURES = 'FUND_PFUTURES'¶
- FUND_SFUTURES = 'FUND_SFUTURES'¶
- PFUTURES_FUND = 'PFUTURES_FUND'¶
- PFUTURES_SFUTURES = 'PFUTURES_SFUTURES'¶
- SFUTURES_FUND = 'SFUTURES_FUND'¶
- SFUTURES_PFUTURES = 'SFUTURES_PFUTURES'¶
- class bingx_py.models.spot.market.HistoricalKlineResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Historical K-line.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[List[Union[int, float]]]) – List of klines, each kline is a list of [timestamp, open, high, low, close, volume, close_time, quote_asset_volume].
- code: int¶
- data: list[list[int | float]]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.KlineDataResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Kline/Candlestick Data.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[List[Union[int, float]]]) – List of klines, each kline is a list of [timestamp, open, high, low, close, volume, close_time, quote_asset_volume].
- code: int¶
- data: list[list[int | float]]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.OldTrade(*, tid, t, ms, s, p, v)[source]¶
Bases:
BaseModelModel for a single old trade.
- Parameters:
tid (str) – Trade ID.
t (int) – Trade time.
ms (int) – Milliseconds.
s (str) – Trading pair, e.g., BTC-USDT.
p (float) – Price.
v (float) – Volume.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ms: int¶
- p: float¶
- s: str¶
- t: int¶
- tid: str¶
- v: float¶
- class bingx_py.models.spot.market.OldTradeLookupResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Old Trade Lookup.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[OldTrade]) – List of old trades.
- 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.spot.market.OrderBookAggregationResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Order Book Aggregation.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (OrderBookAggregationResponseData) – Order book 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.spot.market.OrderBookAggregationResponseData(*, bids, asks, ts)[source]¶
Bases:
BaseModelModel for the data field in OrderBookAggregationResponse.
- Parameters:
bids (List[List[str]]) – Buy depth, where the first element is the price and the second is the quantity.
asks (List[List[str]]) – Sell depth, where the first element is the price and the second is the quantity.
ts (int) – Timestamp.
- asks: list[list[str]]¶
- bids: list[list[str]]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ts: int¶
- class bingx_py.models.spot.market.OrderBookResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Order Book.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (OrderBookResponseData) – Order book data.
- code: int¶
- data: OrderBookResponseData¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.OrderBookResponseData(*, bids, asks, ts)[source]¶
Bases:
BaseModelModel for the data field in OrderBookResponse.
- Parameters:
bids (List[List[str]]) – List of bids, each bid is a list of [price, quantity].
asks (List[List[str]]) – List of asks, each ask is a list of [price, quantity].
ts (int) – Timestamp of the order book.
- asks: list[list[str]]¶
- bids: list[list[str]]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ts: int¶
- class bingx_py.models.spot.market.RecentTrade(*, id, price, qty, time, buyerMaker)[source]¶
Bases:
BaseModelModel for a single recent trade.
- Parameters:
id (int) – Transaction ID.
price (float) – Price.
qty (float) – Quantity.
time (int) – Time of the trade.
buyer_maker (bool) – Whether the buyer is the maker.
buyerMaker (bool)
- buyer_maker: bool¶
- id: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- price: float¶
- qty: float¶
- time: int¶
- class bingx_py.models.spot.market.RecentTradesListResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Recent Trades List.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[RecentTrade]) – List of recent trades.
- code: int¶
- data: list[RecentTrade]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.SpotSymbolOrderBookTickerResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Symbol Order Book Ticker.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[SymbolOrderBookTickerResponseData]) – List of order book ticker data.
- code: int¶
- data: list[SymbolOrderBookTickerResponseData]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.SpotTradingSymbol(*, symbol, minQty, maxQty, minNotional, maxNotional, status, tickSize, stepSize)[source]¶
Bases:
BaseModelModel for a single spot trading symbol.
- Parameters:
symbol (str) – Trading pair, e.g., BTC-USDT.
min_qty (float) – Minimum order quantity.
max_qty (float) – Maximum order quantity.
min_notional (float) – Minimum notional value.
max_notional (float) – Maximum notional value.
status (int) – Symbol status (1=active, 0=inactive).
tick_size (float) – Tick size.
step_size (float) – Step size.
minQty (float)
maxQty (float)
minNotional (float)
maxNotional (float)
tickSize (float)
stepSize (float)
- max_notional: float¶
- max_qty: float¶
- min_notional: float¶
- min_qty: float¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- status: int¶
- step_size: float¶
- symbol: str¶
- tick_size: float¶
- class bingx_py.models.spot.market.SpotTradingSymbolsResponse(*, code, msg, debugMsg, data)[source]¶
Bases:
BaseModelModel for the response of Spot Trading Symbols.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
msg (str) – Error Details Description.
debug_msg (str) – Debug message.
data (SpotTradingSymbolsResponseData) – Response data.
debugMsg (str)
- code: int¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.market.SpotTradingSymbolsResponseData(*, symbols)[source]¶
Bases:
BaseModelModel for the data field in SpotTradingSymbolsResponse.
- Parameters:
symbols (List[SpotTradingSymbol]) – List of spot trading symbols.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- symbols: list[SpotTradingSymbol]¶
- class bingx_py.models.spot.market.SymbolOrderBookTickerResponseData(*, eventType, time, symbol, bidPrice, bidVolume, askPrice, askVolume)[source]¶
Bases:
BaseModelModel for the data field in SymbolOrderBookTickerResponse.
- Parameters:
event_type (str) – Data type.
time (int) – Timestamp.
symbol (str) – Trading pair, e.g., BTC-USDT.
bid_price (str) – Best bid price.
bid_volume (str) – Best bid volume.
ask_price (str) – Best ask price.
ask_volume (str) – Best ask volume.
eventType (str)
bidPrice (str)
bidVolume (str)
askPrice (str)
askVolume (str)
- ask_price: str¶
- ask_volume: str¶
- bid_price: str¶
- bid_volume: str¶
- event_type: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- symbol: str¶
- time: int¶
- class bingx_py.models.spot.market.SymbolPriceTickerResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of Symbol Price Ticker.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[SymbolPriceTickerResponseData]) – List of symbol price ticker data.
- code: int¶
- data: list[SymbolPriceTickerResponseData]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.SymbolPriceTickerResponseData(*, symbol, trades)[source]¶
Bases:
BaseModelModel for the data field in SymbolPriceTickerResponse.
- Parameters:
symbol (str) – Trading pair, e.g., BTC_USDT.
trades (List[Trade]) – List of trades.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- symbol: str¶
- class bingx_py.models.spot.market.Ticker24hr(*, symbol, openPrice, highPrice, lowPrice, lastPrice, volume, quoteVolume, openTime, closeTime, bidPrice, bidQty, askPrice, askQty, priceChangePercent)[source]¶
Bases:
BaseModelModel for 24hr ticker price change statistics.
- Parameters:
symbol (str) – Trading pair, e.g., BTC-USDT.
open_price (str) – Opening price in the last 24 hours.
high_price (str) – The highest price in the last 24 hours.
low_price (str) – The lowest price in the last 24 hours.
last_price (str) – Latest price.
volume (str) – Total trading volume (base asset).
quote_volume (str) – Total quote volume (quote asset).
open_time (int) – The start time of the ticker interval.
close_time (int) – End time of the ticker interval.
bid_price (float) – Bid price.
bid_qty (float) – Bid quantity.
ask_price (float) – Ask price.
ask_qty (float) – Ask quantity.
price_change_percent (str) – Price change percentage.
openPrice (str)
highPrice (str)
lowPrice (str)
lastPrice (str)
quoteVolume (str)
openTime (int)
closeTime (int)
bidPrice (float)
bidQty (float)
askPrice (float)
askQty (float)
priceChangePercent (str)
- ask_price: float¶
- ask_qty: float¶
- bid_price: float¶
- bid_qty: float¶
- close_time: int¶
- high_price: str¶
- last_price: str¶
- low_price: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- open_price: str¶
- open_time: int¶
- price_change_percent: str¶
- quote_volume: str¶
- symbol: str¶
- volume: str¶
- class bingx_py.models.spot.market.Ticker24hrResponse(*, code, timestamp, data)[source]¶
Bases:
BaseModelModel for the response of 24hr ticker price change statistics.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[Ticker24hr]) – List of ticker data.
- code: int¶
- data: list[Ticker24hr]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.market.TradeItem(*, timestamp, tradeId, price, amount, type, volume)[source]¶
Bases:
BaseModelModel for a trade item.
- Parameters:
timestamp (int) – Trade timestamp in milliseconds.
trade_id (str) – Trade ID.
price (str) – Trade price.
amount (str) – Trade amount (empty in this case).
type (int) – Trade type (1 for buy, 2 for sell, etc.).
volume (str) – Trade volume.
tradeId (str)
- amount: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- price: str¶
- timestamp: int¶
- trade_id: str¶
- type: int¶
- volume: str¶
- class bingx_py.models.spot.trades.CancelAllAfterData(**data)[source]¶
Bases:
BaseModelModel for the response data of CancelAllAfter.
- Parameters:
trigger_time (int) – Trigger time for deleting all pending orders.
status (CancelAllAfterStatus) – ACTIVATED (Activation successful)/CLOSED (Closed successfully)/FAILED (Failed).
note (str) – Explanation.
data (Any)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- note: str¶
- status: CancelAllAfterStatus¶
- trigger_time: int¶
- class bingx_py.models.spot.trades.CancelAllAfterStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumStatus of cancel all after operation.
- Parameters:
ACTIVATED (str) – Activation successful.
CLOSED (str) – Closed successfully.
FAILED (str) – Failed.
- ACTIVATED = 'ACTIVATED'¶
- CLOSED = 'CLOSED'¶
- FAILED = 'FAILED'¶
- class bingx_py.models.spot.trades.CancelAllAfterType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for cancel all after type.
- Values:
ACTIVATE: Activate the cancel all after feature. CLOSE: Close the cancel all after feature.
- ACTIVATE = 'ACTIVATE'¶
- CLOSE = 'CLOSE'¶
- class bingx_py.models.spot.trades.CancelAllOpenOrdersData(*, orders)[source]¶
Bases:
BaseModelModel for the response data of CancelAllOpenOrders.
- Parameters:
orders (List[CancelOrderData]) – List of canceled orders.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orders: list[CancelOrderData]¶
- class bingx_py.models.spot.trades.CancelMultipleOrdersData(**data)[source]¶
Bases:
BaseModelModel for the response data of CancelMultipleOrders.
- Parameters:
fails (List[FailItem]) – List of failed orders.
orders (List[CancelOrderData]) – List of successfully canceled orders.
data (Any)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orders: list[CancelOrderData]¶
- class bingx_py.models.spot.trades.CancelOcoOrderData(*, orderId, clientOrderId)[source]¶
Bases:
BaseModelModel for the response data of CancelOcoOrder.
- Parameters:
order_id (str) – Order ID.
client_order_id (str) – User-defined order ID.
orderId (str)
clientOrderId (str)
- client_order_id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: str¶
- class bingx_py.models.spot.trades.CancelOcoOrderResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelOcoOrder.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelOcoOrderData) – The response data.
- code: int¶
- data: CancelOcoOrderData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.CancelOrderData(*, symbol, orderId, price, stopPrice, origQty, executedQty, cummulativeQuoteQty, status, type, side)[source]¶
Bases:
BaseModelModel for the response data of CancelOrder.
- Parameters:
symbol (str) – Trading pair.
order_id (int) – Order ID.
price (str) – Price.
stop_price (str) – Trigger price.
orig_qty (str) – Original quantity.
executed_qty (str) – Executed quantity.
cummulative_quote_qty (str) – Cumulative quote asset transacted quantity.
status (OrderStatus) – Order status.
type (SpotOrderType) – Order type.
side (OrderSide) – BUY/SELL.
orderId (int)
stopPrice (str)
origQty (str)
executedQty (str)
cummulativeQuoteQty (str)
- cummulative_quote_qty: str¶
- executed_qty: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- orig_qty: str¶
- price: str¶
- status: OrderStatus¶
- stop_price: str¶
- symbol: str¶
- type: SpotOrderType¶
- class bingx_py.models.spot.trades.CancelReplaceMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for cancel replace modes.
- Parameters:
STOP_ON_FAILURE (str) – Stop on failure.
ALLOW_FAILURE (str) – Allow failure.
- ALLOW_FAILURE = 'ALLOW_FAILURE'¶
- STOP_ON_FAILURE = 'STOP_ON_FAILURE'¶
- class bingx_py.models.spot.trades.CancelReplaceOrderData(**data)[source]¶
Bases:
BaseModelModel for the response data of CancelReplaceOrder.
- Parameters:
cancel_result (CancelResult) – Result of the cancel operation.
open_result (OpenResult) – Result of the open operation.
order_open_response (OrderOpenResponse) – Response for the open order.
order_cancel_response (OrderCancelResponse) – Response for the cancel order.
data (Any)
- cancel_result: CancelResult¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- open_result: OpenResult¶
- order_cancel_response: OrderCancelResponse¶
- order_open_response: OrderOpenResponse¶
- class bingx_py.models.spot.trades.CancelRestrictions(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for cancel restrictions.
- Values:
NEW: Restrict cancellation to new orders. PENDING: Restrict cancellation to pending orders. PARTIALLY_FILLED: Restrict cancellation to partially filled orders.
- NEW = 'NEW'¶
- PARTIALLY_FILLED = 'PARTIALLY_FILLED'¶
- PENDING = 'PENDING'¶
- class bingx_py.models.spot.trades.CancelResult(*, code, msg, result)[source]¶
Bases:
BaseModelModel for the cancel result.
- Parameters:
code (int) – Error code.
msg (str) – Error message.
result (bool) – Result of the cancel operation.
- code: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- result: bool¶
- class bingx_py.models.spot.trades.CreateOcoOrderResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CreateOcoOrder.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (List[OcoOrderItem]) – The response data.
- code: int¶
- data: list[OcoOrderItem]¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.CurrentOpenOrdersData(*, orders)[source]¶
Bases:
BaseModelModel for the response data of CurrentOpenOrders.
- Parameters:
orders (List[QueryOrderDetailsData]) – Order list, max length is 2000.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orders: list[QueryOrderDetailsData]¶
- class bingx_py.models.spot.trades.CurrentOpenOrdersResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CurrentOpenOrders.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CurrentOpenOrdersData) – The response data.
- code: int¶
- data: CurrentOpenOrdersData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.FailItem(*, orderId, error)[source]¶
Bases:
BaseModelModel for the failed order item.
- Parameters:
order_id (str) – Order ID.
error (str) – Error message.
orderId (str)
- error: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: str¶
- class bingx_py.models.spot.trades.FillItem(*, symbol, id, orderId, price, qty, quoteQty, commission, commissionAsset, time, isBuyer, isMaker)[source]¶
Bases:
BaseModelModel for the fill item.
- Parameters:
symbol (str) – Trading symbol.
id (int) – Trade ID.
order_id (int) – Order ID.
price (str) – Price of the trade.
qty (str) – Quantity of the trade.
quote_qty (str) – Quote asset quantity traded.
commission (float) – Commission amount.
commission_asset (str) – Commission asset type.
time (int) – Trade time.
is_buyer (bool) – Whether the buyer.
is_maker (bool) – Whether the maker.
orderId (int)
quoteQty (str)
commissionAsset (str)
isBuyer (bool)
isMaker (bool)
- commission: float¶
- commission_asset: str¶
- id: int¶
- is_buyer: bool¶
- is_maker: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- price: str¶
- qty: str¶
- quote_qty: str¶
- symbol: str¶
- time: int¶
- class bingx_py.models.spot.trades.OcoOrderItem(*, transactionTime, orderId, clientOrderId, symbol, spotOrderType, side, triggerPrice, price, quantity, orderListId, status)[source]¶
Bases:
BaseModelModel for the OCO order item.
- Parameters:
transaction_time (int) – Order time.
order_id (str) – Order ID.
client_order_id (str) – User-defined order ID.
symbol (str) – Trading pair.
order_type (str) – OCO order type.
side (str) – BUY or SELL.
trigger_price (float) – Trigger price.
price (float) – Order price.
quantity (float) – Order quantity.
order_list_id (str) – OCO order group ID.
status (str) – Order status.
transactionTime (int)
orderId (str)
clientOrderId (str)
spotOrderType (str)
triggerPrice (float)
orderListId (str)
- client_order_id: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: str¶
- order_list_id: str¶
- order_type: str¶
- price: float¶
- quantity: float¶
- side: str¶
- status: str¶
- symbol: str¶
- transaction_time: int¶
- trigger_price: float¶
- class bingx_py.models.spot.trades.OpenResult(*, code, msg, result)[source]¶
Bases:
BaseModelModel for the open result.
- Parameters:
code (int) – Error code.
msg (str) – Error message.
result (bool) – Result of the open operation.
- code: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- result: bool¶
- class bingx_py.models.spot.trades.OrderCancelResponse(*, symbol, orderId, price, stopPrice, origQty, executedQty, cummulativeQuoteQty, status, type, side)[source]¶
Bases:
BaseModelModel for the order cancel response.
- Parameters:
symbol (str) – Trading symbol.
order_id (int) – Order ID.
price (str) – Order price.
stop_price (str) – Trigger price.
orig_qty (str) – Original quantity.
executed_qty (str) – Executed quantity.
cummulative_quote_qty (str) – Cumulative quote quantity.
status (OrderStatus) – Order status.
type (SpotOrderType) – Order type.
side (OrderSide) – BUY or SELL.
orderId (int)
stopPrice (str)
origQty (str)
executedQty (str)
cummulativeQuoteQty (str)
- cummulative_quote_qty: str¶
- executed_qty: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- orig_qty: str¶
- price: str¶
- status: OrderStatus¶
- stop_price: str¶
- symbol: str¶
- type: SpotOrderType¶
- class bingx_py.models.spot.trades.OrderOpenResponse(*, symbol, orderId, transactTime, price, stopPrice, origQty, executedQty, cummulativeQuoteQty, status, type, side, clientOrderID)[source]¶
Bases:
BaseModelModel for the order open response.
- Parameters:
symbol (str) – Trading symbol.
order_id (int) – Order ID.
transact_time (int) – Transaction timestamp.
price (str) – Order price.
stop_price (str) – Trigger price.
orig_qty (str) – Original quantity.
executed_qty (str) – Executed quantity.
cummulative_quote_qty (str) – Cumulative quote quantity.
status (OrderStatus) – Order status.
type (SpotOrderType) – Order type.
side (OrderSide) – BUY or SELL.
client_order_id (str) – User-defined order ID.
orderId (int)
transactTime (int)
stopPrice (str)
origQty (str)
executedQty (str)
cummulativeQuoteQty (str)
clientOrderID (str)
- client_order_id: str¶
- cummulative_quote_qty: str¶
- executed_qty: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- orig_qty: str¶
- price: str¶
- status: OrderStatus¶
- stop_price: str¶
- symbol: str¶
- transact_time: int¶
- type: SpotOrderType¶
- class bingx_py.models.spot.trades.PlaceMultipleOrdersData(*, orders)[source]¶
Bases:
BaseModelModel for the response data of PlaceMultipleOrders.
- Parameters:
orders (List[PlaceOrderData]) – Response array for a single order.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orders: list[PlaceOrderData]¶
- class bingx_py.models.spot.trades.PlaceOrderData(*, symbol, orderId, transactTime, price, origQty, executedQty, cummulativeQuoteQty, status, type, side)[source]¶
Bases:
BaseModelModel for the response data of PlaceOrder.
- Parameters:
symbol (str) – Trading pair.
order_id (int) – Order ID.
transact_time (int) – Transaction timestamp.
price (str) – Price.
orig_qty (str) – Original quantity.
executed_qty (str) – Executed quantity.
cummulative_quote_qty (str) – Cumulative quote asset transacted quantity.
status (OrderStatus) – Order status.
type (SpotOrderType) – Order type.
side (OrderSide) – BUY/SELL.
orderId (int)
transactTime (int)
origQty (str)
executedQty (str)
cummulativeQuoteQty (str)
- cummulative_quote_qty: str¶
- executed_qty: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- orig_qty: str¶
- price: str¶
- status: OrderStatus¶
- symbol: str¶
- transact_time: int¶
- type: SpotOrderType¶
- class bingx_py.models.spot.trades.PlaceOrderRequest(*, symbol, side, type, stop_price=None, quantity=None, quote_order_qty=None, price=None, new_client_order_id=None, time_in_force=None)[source]¶
Bases:
BaseModelModel for the request of PlaceOrder.
- Parameters:
symbol (str) – Trading pair, e.g., BTC-USDT.
side (OrderSide) – BUY/SELL.
type (SpotOrderType) – MARKET/LIMIT/TAKE_STOP_LIMIT/TAKE_STOP_MARKET/TRIGGER_LIMIT/TRIGGER_MARKET.
stop_price (Optional[str]) – Order trigger price, used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET type orders. Defaults to None.
quantity (Optional[float]) – Original quantity, e.g., 0.1BTC. Defaults to None.
quote_order_qty (Optional[float]) – Quote order quantity, e.g., 100USDT. If quantity and quote_order_qty are input at the same time, quantity will be used first. Defaults to None.
price (Optional[float]) – Price, e.g., 10000USDT. Defaults to None.
new_client_order_id (Optional[str]) – Customized order ID for users, with a limit of characters from 1 to 40. Defaults to None.
time_in_force (Optional[TimeInForce]) – Time in force, currently supports PostOnly, GTC, IOC, FOK. Default is GTC if not specified. Defaults to None.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- new_client_order_id: str | None¶
- price: float | None¶
- quantity: float | None¶
- quote_order_qty: float | None¶
- stop_price: str | None¶
- symbol: str¶
- time_in_force: TimeInForce | None¶
- type: SpotOrderType¶
- class bingx_py.models.spot.trades.QueryAllOpenOcoOrdersResponse(*, code, msg, debugMsg, data)[source]¶
Bases:
BaseModelModel for the response of QueryAllOpenOcoOrders.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (List[OcoOrderItem]) – The response data.
debugMsg (str)
- code: int¶
- data: list[OcoOrderItem]¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.QueryOcoHistoricalOrderListResponse(*, code, msg, debugMsg, data)[source]¶
Bases:
BaseModelModel for the response of QueryOcoHistoricalOrderList.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (List[OcoOrderItem]) – The response data.
debugMsg (str)
- code: int¶
- data: list[OcoOrderItem]¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.QueryOcoOrderListResponse(*, code, msg, debugMsg, data)[source]¶
Bases:
BaseModelModel for the response of QueryOcoOrderList.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (List[OcoOrderItem]) – The response data.
debugMsg (str)
- code: int¶
- data: list[OcoOrderItem]¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.QueryOrderDetailsData(*, symbol, orderId, price, StopPrice, origQty, executedQty, cummulativeQuoteQty, status, type, side, time, updateTime, origQuoteOrderQty, fee, feeAsset, clientOrderID=None, avgPrice)[source]¶
Bases:
BaseModelModel for the response data of QueryOrderDetails.
- Parameters:
symbol (str) – Trading pair.
order_id (int) – Order ID.
price (str) – Price.
stop_price (str) – Trigger price.
orig_qty (str) – Original quantity.
executed_qty (str) – Executed quantity.
cummulative_quote_qty (str) – Cumulative quote asset transacted quantity.
status (OrderStatus) – Order status.
type (SpotOrderType) – Order type.
side (OrderSide) – BUY/SELL.
time (int) – Order timestamp.
update_time (int) – Update timestamp.
orig_quote_order_qty (str) – Original quote order quantity.
fee (str) – Fee.
fee_asset (str) – Fee asset.
client_order_id (Optional[str]) – Customized order ID for users.
avg_price (str) – Average fill price.
orderId (int)
StopPrice (str)
origQty (str)
executedQty (str)
cummulativeQuoteQty (str)
updateTime (int)
origQuoteOrderQty (str)
feeAsset (str)
clientOrderID (str | None)
avgPrice (str)
- avg_price: str¶
- client_order_id: str | None¶
- cummulative_quote_qty: str¶
- executed_qty: str¶
- fee: str¶
- fee_asset: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- order_id: int¶
- orig_qty: str¶
- orig_quote_order_qty: str¶
- price: str¶
- status: OrderStatus¶
- stop_price: str¶
- symbol: str¶
- time: int¶
- type: SpotOrderType¶
- update_time: int¶
- class bingx_py.models.spot.trades.QueryOrderHistoryData(*, orders)[source]¶
Bases:
BaseModelModel for the response data of QueryOrderHistory.
- Parameters:
orders (List[QueryOrderDetailsData]) – Order list, max length is 2000.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- orders: list[QueryOrderDetailsData]¶
- class bingx_py.models.spot.trades.QueryOrderHistoryResponse(**data)[source]¶
Bases:
BaseModelModel for the response of QueryOrderHistory.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (QueryOrderHistoryData) – The response data.
- code: int¶
- data: QueryOrderHistoryData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.QueryTradingCommissionRateData(*, takerCommissionRate, makerCommissionRate)[source]¶
Bases:
BaseModelModel for the response data of QueryTradingCommissionRate.
- Parameters:
taker_commission_rate (float) – Taker commission rate.
maker_commission_rate (float) – Maker commission rate.
takerCommissionRate (float)
makerCommissionRate (float)
- maker_commission_rate: float¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- taker_commission_rate: float¶
- class bingx_py.models.spot.trades.QueryTradingCommissionRateResponse(**data)[source]¶
Bases:
BaseModelModel for the response of QueryTradingCommissionRate.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (QueryTradingCommissionRateData) – The response data.
- code: int¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.QueryTransactionDetailsData(**data)[source]¶
Bases:
BaseModelModel for the response data of QueryTransactionDetails.
- Parameters:
fills (List[FillItem]) – List of trade details.
data (Any)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bingx_py.models.spot.trades.QueryTransactionDetailsResponse(**data)[source]¶
Bases:
BaseModelModel for the response of QueryTransactionDetails.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (QueryTransactionDetailsData) – The response data.
- code: int¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotCancelAllAfterResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelAllAfter.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelAllAfterData) – The response data.
- code: int¶
- data: CancelAllAfterData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotCancelAllOpenOrdersResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelAllOpenOrders.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelAllOpenOrdersData) – The response data.
- code: int¶
- data: CancelAllOpenOrdersData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotCancelMultipleOrdersResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelMultipleOrders.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelMultipleOrdersData) – The response data.
- code: int¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotCancelOrderResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelOrder.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelOrderData) – The response data.
- code: int¶
- data: CancelOrderData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotCancelReplaceOrderResponse(**data)[source]¶
Bases:
BaseModelModel for the response of CancelReplaceOrder.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (CancelReplaceOrderData) – The response data.
- code: int¶
- data: CancelReplaceOrderData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotOrderType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,EnumEnum for spot order types.
- Parameters:
MARKET (str) – Market order.
LIMIT (str) – Limit order.
TAKE_STOP_LIMIT (str) – Take profit/stop loss limit order.
TAKE_STOP_MARKET (str) – Take profit/stop loss market order.
TRIGGER_LIMIT (str) – Trigger limit order.
TRIGGER_MARKET (str) – Trigger market order.
- LIMIT = 'LIMIT'¶
- MARKET = 'MARKET'¶
- TAKE_STOP_LIMIT = 'TAKE_STOP_LIMIT'¶
- TAKE_STOP_MARKET = 'TAKE_STOP_MARKET'¶
- TRIGGER_LIMIT = 'TRIGGER_LIMIT'¶
- TRIGGER_MARKET = 'TRIGGER_MARKET'¶
- class bingx_py.models.spot.trades.SpotPlaceMultipleOrdersResponse(**data)[source]¶
Bases:
BaseModelModel for the response of PlaceMultipleOrders.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (PlaceMultipleOrdersData) – The response data.
- code: int¶
- data: PlaceMultipleOrdersData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotPlaceOrderResponse(**data)[source]¶
Bases:
BaseModelModel for the response of PlaceOrder.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (PlaceOrderData) – The response data.
- code: int¶
- data: PlaceOrderData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.trades.SpotQueryOrderDetailsResponse(**data)[source]¶
Bases:
BaseModelModel for the response of QueryOrderDetails.
- Parameters:
code (int) – Error code, 0 means successfully response, others means response failure.
msg (str) – Error details description.
debug_msg (str) – Debug message.
data (QueryOrderDetailsData) – The response data.
- code: int¶
- data: QueryOrderDetailsData¶
- debug_msg: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.wallet.CurrencyDepositWithdrawalData(*, coin, name, networkList)[source]¶
Bases:
BaseModelModel for currency deposit and withdrawal data.
- Parameters:
coin (str) – Coin identification.
name (str) – Coin name.
network_list (List[NetworkInfo]) – List of network information.
networkList (list[NetworkInfo])
- coin: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- network_list: list[NetworkInfo]¶
- class bingx_py.models.spot.wallet.CurrencyDepositWithdrawalDataResponse(**data)[source]¶
Bases:
BaseModelModel for the response of currency deposit and withdrawal data.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (List[CurrencyDepositWithdrawalData]) – List of currency deposit and withdrawal data.
- code: int¶
- data: list[CurrencyDepositWithdrawalData]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.wallet.DepositAddress(*, coinId, coin, network, address, tag)[source]¶
Bases:
BaseModelModel for a single deposit address.
- Parameters:
coin_id (int) – Coin ID.
coin (str) – Coin name.
network (str) – Network name.
address (str) – Deposit address.
tag (str) – Address tag.
coinId (int)
- address: str¶
- coin: str¶
- coin_id: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- network: str¶
- tag: str¶
- class bingx_py.models.spot.wallet.DepositRecord(*, amount, coin, network, status, address, addressTag, txId, insertTime, unlockConfirm, confirmTimes)[source]¶
Bases:
BaseModelModel for a single deposit record.
- Parameters:
amount (str) – Recharge amount.
coin (str) – Coin name.
network (str) – Recharge network.
status (int) – Status (0-In progress, 6-Chain uploaded, 1-Completed).
address (str) – Recharge address.
address_tag (str) – Remark.
tx_id (str) – Transaction ID.
insert_time (int) – Transaction time.
unlock_confirm (str) – Confirm times for unlocking.
confirm_times (str) – Network confirmation times.
addressTag (str)
txId (str)
insertTime (int)
unlockConfirm (str)
confirmTimes (str)
- address: str¶
- address_tag: str¶
- amount: str¶
- coin: str¶
- confirm_times: str¶
- insert_time: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- network: str¶
- status: int¶
- tx_id: str¶
- unlock_confirm: str¶
- class bingx_py.models.spot.wallet.DepositRecordsResponse(*, code, msg, data)[source]¶
Bases:
BaseModelModel for the response of deposit records.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
msg (str) – Error message.
data (List[DepositRecord]) – List of deposit records.
- code: int¶
- data: list[DepositRecord]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.wallet.DepositRiskControlRecord(*, uid, coin, amount, sourceAddress, address, insetTime)[source]¶
Bases:
BaseModelModel for a single deposit risk control record.
- Parameters:
uid (str) – User ID.
coin (str) – Currency name.
amount (str) – Amount.
source_address (str) – Source address.
address (str) – Recharge address.
inset_time (str) – Creation time.
sourceAddress (str)
insetTime (str)
- address: str¶
- amount: str¶
- coin: str¶
- inset_time: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- source_address: str¶
- uid: str¶
- class bingx_py.models.spot.wallet.DepositRiskControlRecordsResponse(*, code, msg, data)[source]¶
Bases:
BaseModelModel for the response of deposit risk control records.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
msg (str) – Error message.
data (List[DepositRiskControlRecord]) – List of deposit risk control records.
- code: int¶
- data: list[DepositRiskControlRecord]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.wallet.MainAccountDepositAddressResponse(**data)[source]¶
Bases:
BaseModelModel for the response of main account deposit address.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (MainAccountDepositAddressResponseData) – Deposit address 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.spot.wallet.MainAccountDepositAddressResponseData(**data)[source]¶
Bases:
BaseModelModel for the data field in MainAccountDepositAddressResponse.
- Parameters:
data (List[DepositAddress]) – List of deposit addresses.
total (int) – Total number of addresses.
- data: list[DepositAddress]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- total: int¶
- class bingx_py.models.spot.wallet.NetworkInfo(*, name, network, isDefault, minConfirm, withdrawEnable, depositEnable, withdrawFee, withdrawMax, withdrawMin, depositMin)[source]¶
Bases:
BaseModelModel for network information.
- Parameters:
name (str) – Network name.
network (str) – Network identifier.
is_default (bool) – Whether it is the default network.
min_confirm (int) – Minimum confirmations required.
withdraw_enable (bool) – Whether withdrawals are enabled.
deposit_enable (bool) – Whether deposits are enabled.
withdraw_fee (str) – Withdrawal fee.
withdraw_max (str) – Maximum withdrawal amount.
withdraw_min (str) – Minimum withdrawal amount.
deposit_min (str) – Minimum deposit amount.
isDefault (bool)
minConfirm (int)
withdrawEnable (bool)
depositEnable (bool)
withdrawFee (str)
withdrawMax (str)
withdrawMin (str)
depositMin (str)
- deposit_enable: bool¶
- deposit_min: str¶
- is_default: bool¶
- min_confirm: int¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- network: str¶
- withdraw_enable: bool¶
- withdraw_fee: str¶
- withdraw_max: str¶
- withdraw_min: str¶
- class bingx_py.models.spot.wallet.WithdrawRecord(*, address, amount, applyTime, coin, id, network, transferType, transactionFee, confirmNo, info, txId)[source]¶
Bases:
BaseModelModel for a single withdraw record.
- Parameters:
address (str) – Withdrawal address.
amount (str) – Withdrawal amount.
apply_time (str) – Withdraw time.
coin (str) – Coin name.
id (str) – The ID of the withdrawal.
network (str) – Withdrawal network.
transfer_type (int) – Transfer type (1=Withdrawal, 2=Internal transfer).
transaction_fee (str) – Handling fee.
confirm_no (int) – Withdrawal confirmation times.
info (str) – Reason for withdrawal failure.
tx_id (str) – Withdrawal transaction ID.
applyTime (str)
transferType (int)
transactionFee (str)
confirmNo (int)
txId (str)
- address: str¶
- amount: str¶
- apply_time: str¶
- coin: str¶
- confirm_no: int¶
- id: str¶
- info: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- network: str¶
- transaction_fee: str¶
- transfer_type: int¶
- tx_id: str¶
- class bingx_py.models.spot.wallet.WithdrawRecordsResponse(*, code, msg, data)[source]¶
Bases:
BaseModelModel for the response of withdraw records.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
msg (str) – Error message.
data (List[WithdrawRecord]) – List of withdraw records.
- code: int¶
- data: list[WithdrawRecord]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- msg: str¶
- class bingx_py.models.spot.wallet.WithdrawResponse(**data)[source]¶
Bases:
BaseModelModel for the response of a withdrawal.
- Parameters:
code (int) – Error code, 0 means successful response, others mean response failure.
timestamp (int) – Response timestamp.
data (WithdrawResponseData) – Withdrawal response data.
- code: int¶
- data: WithdrawResponseData¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: int¶
- class bingx_py.models.spot.wallet.WithdrawResponseData(*, id)[source]¶
Bases:
BaseModelModel for the data field in WithdrawResponse.
- 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].