Agent Models

This section documents the data models used in the Agent module.

class bingx_py.models.agent.AgentUserInformationData(*, uid, existInviter, inviteResult, directInvitation, inviterSid, registerDateTime, deposit, kycResult, balanceVolume, trade, userLevel, commissionRatio, currentBenefit, benefitRatio, benefitExpiration)[source]

Bases: BaseModel

Model for the data field in QueryAgentUserInformationResponse.

Parameters:
  • uid (int) – Invited User UID.

  • exist_inviter (str) – True: There is an inviter, False: There is no inviter.

  • invite_result (bool) – True: Invitation relationship, False: Non-invitation relationship.

  • direct_invitation (bool) – True: Direct invitation, False: Indirect invitation.

  • inviter_sid (int) – Superiors Uid.

  • register_time (int) – Registration timestamp, unit: milliseconds.

  • deposit (bool) – True: Deposited, False: Not deposited.

  • kyc_result (str) – True: KYC, False: No KYC.

  • balance_volume (str) – Net assets (USDT).

  • trade (bool) – True: Traded, False: Not traded, excluding trades made with trial funds or additional funds.

  • user_level (int) – Customer level.

  • commission_ratio (int) – Commission percentage, unit: %.

  • current_benefit (int) – Current welfare method: 0 - No welfare, 1 - Fee cashback, 2 - Perpetual fee discount.

  • benefit_ratio (int) – Transaction fee reduction percentage, unit: %.

  • benefit_expiration (int) – Welfare expiration timestamp, unit: milliseconds.

  • existInviter (str)

  • inviteResult (bool)

  • directInvitation (bool)

  • inviterSid (int)

  • registerDateTime (int)

  • kycResult (str)

  • balanceVolume (str)

  • userLevel (int)

  • commissionRatio (int)

  • currentBenefit (int)

  • benefitRatio (int)

  • benefitExpiration (int)

balance_volume: str
benefit_expiration: int
benefit_ratio: int
commission_ratio: int
current_benefit: int
deposit: bool
direct_invitation: bool
exist_inviter: str
invite_result: bool
inviter_sid: int
kyc_result: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

register_time: int
trade: bool
uid: int
user_level: int
class bingx_py.models.agent.ApiTransactionCommissionNonInvitationData(*, uid, commissionTime, tradeVolume, commissionVolume, commissionBizType)[source]

Bases: BaseModel

Model for API transaction commission data (non-invitation relationship).

Parameters:
  • uid (int) – UID of the trading user (non-invitation relationship user).

  • commission_time (int) – Commission timestamp, date.

  • trade_volume (str) – API order amount is discounted in USDT.

  • commission_volume (str) – Rebate commission amount in USDT.

  • commission_biz_type (int) – 81: Perpetual contract trading API commission, 82: Spot trading API commission.

  • commissionTime (int)

  • tradeVolume (str)

  • commissionVolume (str)

  • commissionBizType (int)

commission_biz_type: int
commission_time: int
commission_volume: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

trade_volume: str
uid: int
class bingx_py.models.agent.CommissionBizType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Enum for commission business types.

Parameters:
  • PERPETUAL_CONTRACT (int) – Perpetual contract commission.

  • SPOT (int) – Spot trading commission.

PERPETUAL_CONTRACT = 81
SPOT = 82
class bingx_py.models.agent.CommissionData(*, uid, commissionTime, tradingVolume, commissionVolume, spotTradingVolume, swapTradingVolume, stdTradingVolume, extCopyTradingVolume, mt5TradingVolume, spotCommissionVolume, swapCommissionVolume, stdCommissionVolume, extCopyCommissionVolume, mt5CommissionVolume)[source]

Bases: BaseModel

Model for commission data.

Parameters:
  • uid (int) – Invited User UID.

  • commission_time (int) – Commission timestamp, date.

  • trading_volume (str) – Total trading volume in USDT for Spot, Standard Contract, Perpetual Contract, Copy Trading, and MT5 business lines combined.

  • commission_volume (str) – Commission amount in USDT.

  • spot_trading_volume (str) – Spot transaction amount, discounted to USDT.

  • swap_trading_volume (str) – Perpetual contract trading volume, converted into USDT.

  • std_trading_volume (str) – Standard contract transaction amount, discounted in USDT.

  • ext_copy_trading_volume (str) – Copy transaction amount, discounted in USDT.

  • mt5_trading_volume (str) – MT5 transaction volume, discount USDT.

  • spot_commission_volume (str) – Spot commission rebate amount, discounted in USDT.

  • swap_commission_volume (str) – Perpetual contract rebate commission amount, converted into USDT.

  • std_commission_volume (str) – Standard contract rebate amount, discounted in USDT.

  • ext_copy_commission_volume (str) – The commission amount for following orders is discounted in USDT.

  • mt5_commission_volume (str) – MT5 rebate commission amount, discount USDT.

  • commissionTime (int)

  • tradingVolume (str)

  • commissionVolume (str)

  • spotTradingVolume (str)

  • swapTradingVolume (str)

  • stdTradingVolume (str)

  • extCopyTradingVolume (str)

  • mt5TradingVolume (str)

  • spotCommissionVolume (str)

  • swapCommissionVolume (str)

  • stdCommissionVolume (str)

  • extCopyCommissionVolume (str)

  • mt5CommissionVolume (str)

commission_time: int
commission_volume: str
ext_copy_commission_volume: str
ext_copy_trading_volume: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

mt5_commission_volume: str
mt5_trading_volume: str
spot_commission_volume: str
spot_trading_volume: str
std_commission_volume: str
std_trading_volume: str
swap_commission_volume: str
swap_trading_volume: str
trading_volume: str
uid: int
class bingx_py.models.agent.DailyCommissionQueryResponse(*, code, timestamp, data)[source]

Bases: BaseModel

Model for the response of Daily Commission Query.

Parameters:
  • code (int) – Error code, 0 means successful response, others mean response failure.

  • timestamp (int) – Response timestamp.

  • data (DailyCommissionQueryResponseData) – Response data.

code: int
data: DailyCommissionQueryResponseData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

timestamp: int
class bingx_py.models.agent.DailyCommissionQueryResponseData(*, list, total, currentAgentUid)[source]

Bases: BaseModel

Model for the data field in DailyCommissionQueryResponse.

Parameters:
  • data (List[CommissionData]) – List of commission data.

  • total (int) – Total number of records.

  • current_agent_uid (int) – Current agent UID.

  • list (list[CommissionData])

  • currentAgentUid (int)

current_agent_uid: int
data: list[CommissionData]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total: int
class bingx_py.models.agent.DepositDetail(*, uid, inviteResult, directInvitation, bizType, bizTime, assetType, assetTypeName, currencyName, currencyAmountVolume)[source]

Bases: BaseModel

Model for deposit details.

Parameters:
  • uid (int) – Invited User UID.

  • invite_result (bool) – True: Invitation relationship, False: Non-invitation relationship.

  • direct_invitation (bool) – True: Direct invitation, False: Indirect invitation.

  • biz_type (int) – 1: Deposit.

  • biz_time (int) – Event time.

  • asset_type (int) – Operation type breakdown.

  • asset_type_name (str) – Operation type subdivision name.

  • currency_name (str) – Currency.

  • currency_amount_volume (str) – Amount.

  • inviteResult (bool)

  • directInvitation (bool)

  • bizType (int)

  • bizTime (int)

  • assetType (int)

  • assetTypeName (str)

  • currencyName (str)

  • currencyAmountVolume (str)

asset_type: int
asset_type_name: str
biz_time: int
biz_type: int
currency_amount_volume: str
currency_name: str
direct_invitation: bool
invite_result: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

uid: int
class bingx_py.models.agent.InvitedUser(*, uid, ownInviteCode, inviterSid, InvitationCode, registerTime, directInvitation, kycResult, deposit, balanceVolume, trade, userLevel, commissionRatio, currentBenefit, benefitRatio, benefitExpiration)[source]

Bases: BaseModel

Model for an invited user.

Parameters:
  • uid (str) – Invited User UID.

  • own_invite_code (str) – Invitation code for Invited User.

  • inviter_sid (int) – Superiors Uid.

  • invitation_code (str) – Invitation code for superiors.

  • register_time (int) – Registration timestamp, unit: milliseconds.

  • direct_invitation (bool) – True: Direct invitation, False: Indirect invitation.

  • kyc_result (str) – True: KYC, False: No KYC.

  • deposit (bool) – True: Deposited, False: Not deposited.

  • balance_volume (str) – Net assets (USDT).

  • trade (bool) – True: Traded, False: Not traded, excluding trades made with trial funds or additional funds.

  • user_level (int) – Customer level.

  • commission_ratio (int) – Commission percentage, unit: %.

  • current_benefit (int) – Current welfare method: 0 - No welfare, 1 - Fee cashback, 2 - Perpetual fee discount.

  • benefit_ratio (int) – Transaction fee reduction percentage, unit: %.

  • benefit_expiration (int) – Welfare expiration timestamp, unit: milliseconds.

  • ownInviteCode (str)

  • inviterSid (int)

  • InvitationCode (str)

  • registerTime (int)

  • directInvitation (bool)

  • kycResult (str)

  • balanceVolume (str)

  • userLevel (int)

  • commissionRatio (int)

  • currentBenefit (int)

  • benefitRatio (int)

  • benefitExpiration (int)

balance_volume: str
benefit_expiration: int
benefit_ratio: int
commission_ratio: int
current_benefit: int
deposit: bool
direct_invitation: bool
invitation_code: str
inviter_sid: int
kyc_result: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

own_invite_code: str
register_time: int
trade: bool
uid: str
user_level: int
class bingx_py.models.agent.PaginationParams(*, pageIndex, pageSize)[source]

Bases: BaseModel

Model for pagination parameters.

Parameters:
  • page_index (int) – Page number for pagination, must be greater than 0.

  • page_size (int) – The number of pages must be greater than 0 and the maximum value is 200.

  • pageIndex (int)

  • pageSize (int)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

page_index: int
page_size: int
class bingx_py.models.agent.PartnerInformationData(*, uid, email, Phone, referralType, remarks, referrerUid, language, newReferees, firstTrade, branchDeposits, branchTrading, branchTradingVol, level, commissionRatio)[source]

Bases: BaseModel

Model for partner information data.

Parameters:
  • uid (int) – Partner UID.

  • email (str) – Partner mailbox, encrypted status.

  • phone (str) – Partner’s mobile phone number, encrypted.

  • referral_type (ReferralType) – Invitation type: 1: direct invitation, 2: indirect invitation.

  • remarks (str) – Remarks.

  • referrer_uid (int) – Superior Uid.

  • language (str) – Language.

  • new_referees (str) – The number of new invitees during the query period.

  • first_trade (str) – Number of people who made their first transaction during the query period.

  • branch_deposits (str) – The amount of channel recharge during the query period.

  • branch_trading (str) – Number of channel transactions during query time.

  • branch_trading_vol (str) – The transaction amount of the channel during the query period.

  • level (str) – Level.

  • commission_ratio (str) – Rebate ratio.

  • Phone (str)

  • referralType (ReferralType)

  • referrerUid (int)

  • newReferees (str)

  • firstTrade (str)

  • branchDeposits (str)

  • branchTrading (str)

  • branchTradingVol (str)

  • commissionRatio (str)

branch_deposits: str
branch_trading: str
branch_trading_vol: str
commission_ratio: str
email: str
first_trade: str
language: str
level: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

new_referees: str
phone: str
referral_type: ReferralType
referrer_uid: int
remarks: str
uid: int
class bingx_py.models.agent.QueryAgentUserInformationResponse(*, code, msg, timestamp, data)[source]

Bases: BaseModel

Model for the response of Query Agent User Information.

Parameters:
  • code (int) – Error code, 0 means successful response, others mean response failure.

  • msg (str) – Error Details Description.

  • timestamp (int) – Response timestamp.

  • data (AgentUserInformationData) – Response data.

code: int
data: AgentUserInformationData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

msg: str
timestamp: int
class bingx_py.models.agent.QueryApiTransactionCommissionNonInvitationResponse(*, code, msg, timestamp, data)[source]

Bases: BaseModel

Model for the response of Query API transaction commission (non-invitation relationship).

Parameters:
code: int
data: QueryApiTransactionCommissionNonInvitationResponseData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

msg: str
timestamp: int
class bingx_py.models.agent.QueryApiTransactionCommissionNonInvitationResponseData(*, list, total)[source]

Bases: BaseModel

Model for the data field in QueryApiTransactionCommissionNonInvitationResponse.

Parameters:
data: list[ApiTransactionCommissionNonInvitationData]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total: int
class bingx_py.models.agent.QueryDepositDetailsOfInvitedUsersResponse(*, code, msg, timestamp, data)[source]

Bases: BaseModel

Model for the response of Query the deposit details of invited users.

Parameters:
  • code (int) – Error code, 0 means successful response, others mean response failure.

  • msg (str) – Error Details Description.

  • timestamp (int) – Response timestamp.

  • data (QueryDepositDetailsOfInvitedUsersResponseData) – Response data.

code: int
data: QueryDepositDetailsOfInvitedUsersResponseData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

msg: str
timestamp: int
class bingx_py.models.agent.QueryDepositDetailsOfInvitedUsersResponseData(*, list, total)[source]

Bases: BaseModel

Model for the data field in QueryDepositDetailsOfInvitedUsersResponse.

Parameters:
data: list[DepositDetail]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total: int
class bingx_py.models.agent.QueryInvitedUsersResponse(*, code, timestamp, data)[source]

Bases: BaseModel

Model for the response of Query Invited Users.

Parameters:
  • code (int) – Error code, 0 means successful response, others mean response failure.

  • timestamp (int) – Response timestamp.

  • data (QueryInvitedUsersResponseData) – Response data.

code: int
data: QueryInvitedUsersResponseData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

timestamp: int
class bingx_py.models.agent.QueryInvitedUsersResponseData(*, list, total, currentAgentUid)[source]

Bases: BaseModel

Model for the data field in QueryInvitedUsersResponse.

Parameters:
  • data (List[InvitedUser]) – List of invited users.

  • total (int) – Total number of invited users.

  • current_agent_uid (int) – Current agent UID.

  • list (list[InvitedUser])

  • currentAgentUid (int)

current_agent_uid: int
data: list[InvitedUser]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total: int
class bingx_py.models.agent.QueryPartnerInformationResponse(*, code, timestamp, data)[source]

Bases: BaseModel

Model for the response of Query partner information.

Parameters:
  • code (int) – Error code, 0 means successful response, others mean response failure.

  • timestamp (int) – Response timestamp.

  • data (QueryPartnerInformationResponseData) – Response data.

code: int
data: QueryPartnerInformationResponseData
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

timestamp: int
class bingx_py.models.agent.QueryPartnerInformationResponseData(*, list, total)[source]

Bases: BaseModel

Model for the data field in QueryPartnerInformationResponse.

Parameters:
data: list[PartnerInformationData]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total: int
class bingx_py.models.agent.ReferralType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Enum for referral types.

Parameters:
  • DIRECT (int) – Direct referral.

  • INDIRECT (int) – Indirect referral.

DIRECT = 1
INDIRECT = 2