Sub Account Models

This section documents the data models used in the Sub Account module.

class bingx_py.models.sub_account.AccountBalance(*, accountType, usdtBalance)[source]

Bases: BaseModel

Model for account balance.

Parameters:
  • account_type (str) – Account type.

  • usdt_balance (float) – Equivalent to USDT amount.

  • accountType (str)

  • usdtBalance (float)

account_type: str
model_config: ClassVar[ConfigDict] = {}

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

usdt_balance: float
class bingx_py.models.sub_account.ApiInfo(*, apiKey, note, permissions, ipAddresses, status, createTime, updateTime)[source]

Bases: BaseModel

Model for the API Key information.

Parameters:
  • api_key (str) – API Key.

  • note (str) – Notes.

  • permissions (List[int]) – Permissions.

  • ip_addresses (List[str]) – IP whitelist.

  • status (int) – Status.

  • create_time (int) – Creation time.

  • update_time (int) – Update time.

  • apiKey (str)

  • ipAddresses (list[str])

  • createTime (int)

  • updateTime (int)

api_key: str
create_time: int
ip_addresses: list[str]
model_config: ClassVar[ConfigDict] = {}

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

note: str
permissions: list[int]
status: int
update_time: int
class bingx_py.models.sub_account.AssetBalance(*, asset, free, locked)[source]

Bases: BaseModel

Model for the asset balance.

Parameters:
  • asset (str) – Asset name.

  • free (float) – Available limit.

  • locked (float) – Locked assets.

asset: str
free: float
locked: float
model_config: ClassVar[ConfigDict] = {}

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

class bingx_py.models.sub_account.AuthorizeSubAccountInternalTransferResponse(*, code, timestamp, data)[source]

Bases: BaseModel

Model for the response of AuthorizeSubAccountInternalTransfer.

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

  • timestamp (int) – Response timestamp.

  • data (bool) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.BatchQuerySubAccountAssetOverviewData(**data)[source]

Bases: BaseModel

Model for the response data of BatchQuerySubAccountAssetOverview.

Parameters:
  • result (List[SubAccountAssetInfo]) – List of sub-account asset information.

  • page_id (int) – Page number.

  • total (int) – Total number of records.

  • data (Any)

model_config: ClassVar[ConfigDict] = {}

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

page_id: int
result: list[SubAccountAssetInfo]
total: int
class bingx_py.models.sub_account.BatchQuerySubAccountAssetOverviewResponse(**data)[source]

Bases: BaseModel

Model for the response of BatchQuerySubAccountAssetOverview.

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

  • timestamp (int) – Response timestamp.

  • data (BatchQuerySubAccountAssetOverviewData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.CoinInfo(*, id, name, availableAmount)[source]

Bases: BaseModel

Model for coin information.

Parameters:
  • id (int) – Coin ID.

  • name (str) – Coin name, e.g., USDT.

  • available_amount (float) – Available transfer amount.

  • availableAmount (float)

available_amount: float
id: int
model_config: ClassVar[ConfigDict] = {}

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

name: str
class bingx_py.models.sub_account.CreateSubAccountApiKeyData(*, note, apiKey, apiSecret, permissions, ipAddresses)[source]

Bases: BaseModel

Model for the response data of CreateSubAccountApiKey.

Parameters:
  • note (str) – Notes.

  • api_key (str) – API Key.

  • api_secret (str) – API Secret.

  • permissions (List[str]) – Permissions.

  • ip_addresses (List[str]) – IP whitelist.

  • apiKey (str)

  • apiSecret (str)

  • ipAddresses (list[str])

api_key: str
api_secret: str
ip_addresses: list[str]
model_config: ClassVar[ConfigDict] = {}

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

note: str
permissions: list[str]
class bingx_py.models.sub_account.CreateSubAccountApiKeyResponse(**data)[source]

Bases: BaseModel

Model for the response of CreateSubAccountApiKey.

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

  • timestamp (int) – Response timestamp.

  • data (CreateSubAccountApiKeyData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.CreateSubAccountData(*, subUid, subAccountString)[source]

Bases: BaseModel

Model for the response data of CreateSubAccount.

Parameters:
  • sub_uid (int) – Sub account uid.

  • sub_account_string (str) – Sub account username.

  • subUid (int)

  • subAccountString (str)

model_config: ClassVar[ConfigDict] = {}

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

sub_account_string: str
sub_uid: int
class bingx_py.models.sub_account.CreateSubAccountDepositAddressData(*, coin, address, network, addressTag, status, ts)[source]

Bases: BaseModel

Model for the response data of CreateSubAccountDepositAddress.

Parameters:
  • coin (str) – Currency name.

  • address (str) – Deposit address.

  • network (str) – Network name.

  • address_tag (str) – Address tag.

  • status (int) – Address status (0=activated, 1=pending, 2=not applied).

  • ts (int) – Creation time in Unix timestamp format in milliseconds.

  • addressTag (str)

address: str
address_tag: str
coin: str
model_config: ClassVar[ConfigDict] = {}

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

network: str
status: int
ts: int
class bingx_py.models.sub_account.CreateSubAccountDepositAddressResponse(**data)[source]

Bases: BaseModel

Model for the response of CreateSubAccountDepositAddress.

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

  • timestamp (int) – Response timestamp.

  • data (CreateSubAccountDepositAddressData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.CreateSubAccountResponse(**data)[source]

Bases: BaseModel

Model for the response of CreateSubAccount.

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

  • timestamp (int) – Response timestamp.

  • data (CreateSubAccountData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.DeleteSubAccountApiKeyResponse(*, code, timestamp)[source]

Bases: BaseModel

Model for the response of DeleteSubAccountApiKey.

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

  • timestamp (int) – Response timestamp.

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.sub_account.DepositAddress(*, coin, network, address, addressWithPrefix, tag, status)[source]

Bases: BaseModel

Model for the deposit address.

Parameters:
  • coin (str) – Coin name.

  • network (str) – Network name.

  • address (str) – Deposit address.

  • address_with_prefix (str) – Deposit address with prefix.

  • tag (str) – Address tag.

  • status (int) – Address status (0=activated, 1=applied, 2=not applied).

  • addressWithPrefix (str)

address: str
address_with_prefix: str
coin: str
model_config: ClassVar[ConfigDict] = {}

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

network: str
status: int
tag: str
class bingx_py.models.sub_account.DepositRecord(*, subUid, amount, coin, network, status, address, addressTag, txId, insertTime, transferType, unlockConfirmTimes, confirmTimes)[source]

Bases: BaseModel

Model for a deposit record.

Parameters:
  • sub_uid (int) – Sub-account UID.

  • amount (float) – Transfer amount.

  • coin (str) – Currency name.

  • network (str) – Network name.

  • status (int) – Status (0-In progress, 6-Chain uploaded, 1-Completed).

  • address (str) – Deposit address.

  • address_tag (str) – Deposit address tag.

  • tx_id (str) – Transaction ID.

  • insert_time (int) – Transaction scan time.

  • transfer_type (int) – Transfer type (0-deposit).

  • unlock_confirm_times (int) – Number of confirmations required to unlock the deposit.

  • confirm_times (int) – Number of confirmations.

  • subUid (int)

  • addressTag (str)

  • txId (str)

  • insertTime (int)

  • transferType (int)

  • unlockConfirmTimes (int)

  • confirmTimes (int)

address: str
address_tag: str
amount: float
coin: str
confirm_times: int
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
sub_uid: int
transfer_type: int
tx_id: str
unlock_confirm_times: int
class bingx_py.models.sub_account.FreezeUnfreezeSubAccountResponse(*, subUid, freeze=None)[source]

Bases: BaseModel

Model for the response of FreezeUnfreezeSubAccount.

Parameters:
  • sub_uid (int) – Sub account uid.

  • freeze (Optional[bool]) – Whether the account is frozen.

  • subUid (int)

freeze: bool | None
model_config: ClassVar[ConfigDict] = {}

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

sub_uid: int
class bingx_py.models.sub_account.GetSubAccountDepositAddressData(**data)[source]

Bases: BaseModel

Model for the response data of GetSubAccountDepositAddress.

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.sub_account.GetSubAccountDepositAddressResponse(**data)[source]

Bases: BaseModel

Model for the response of GetSubAccountDepositAddress.

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

  • timestamp (int) – Response timestamp.

  • data (GetSubAccountDepositAddressData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.GetSubAccountDepositRecordsData(**data)[source]

Bases: BaseModel

Model for the response data of GetSubAccountDepositRecords.

Parameters:
  • total (int) – Total number of records.

  • data (List[DepositRecord]) – List of deposit records.

data: list[DepositRecord]
model_config: ClassVar[ConfigDict] = {}

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

total: int
class bingx_py.models.sub_account.GetSubAccountDepositRecordsResponse(**data)[source]

Bases: BaseModel

Model for the response of GetSubAccountDepositRecords.

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

  • timestamp (int) – Response timestamp.

  • data (GetSubAccountDepositRecordsData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.GetSubAccountListData(**data)[source]

Bases: BaseModel

Model for the response data of GetSubAccountList.

Parameters:
  • result (List[SubAccountInfo]) – List of sub-accounts.

  • page_id (int) – Page number.

  • total (int) – Total number of sub-accounts.

  • data (Any)

model_config: ClassVar[ConfigDict] = {}

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

page_id: int
result: list[SubAccountInfo]
total: int
class bingx_py.models.sub_account.GetSubAccountListResponse(**data)[source]

Bases: BaseModel

Model for the response of GetSubAccountList.

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

  • timestamp (int) – Response timestamp.

  • data (GetSubAccountListData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.QueryAccountUidData(*, uid)[source]

Bases: BaseModel

Model for the response data of QueryAccountUid.

Parameters:

uid (int) – Account uid.

model_config: ClassVar[ConfigDict] = {}

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

uid: int
class bingx_py.models.sub_account.QueryAccountUidResponse(**data)[source]

Bases: BaseModel

Model for the response of QueryAccountUid.

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

  • timestamp (int) – Response timestamp.

  • data (QueryAccountUidData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.QuerySubAccountApiKeyData(**data)[source]

Bases: BaseModel

Model for the response data of QuerySubAccountApiKey.

Parameters:
  • api_infos (List[ApiInfo]) – List of API Key information.

  • data (Any)

api_infos: list[ApiInfo]
model_config: ClassVar[ConfigDict] = {}

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

class bingx_py.models.sub_account.QuerySubAccountApiKeyResponse(**data)[source]

Bases: BaseModel

Model for the response of QuerySubAccountApiKey.

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

  • timestamp (int) – Response timestamp.

  • data (QuerySubAccountApiKeyData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.QuerySubAccountInternalTransferRecordsResponse(*, data=None, total=None, id, coin, receiver, amount, time, status=None, transferClientId, fromUid, recordType)[source]

Bases: BaseModel

Model for the response of QuerySubAccountInternalTransferRecords.

Parameters:
  • data (Optional[Dict[str, Any]]) – Internal transfer record list.

  • total (Optional[int]) – Total number of records.

  • id (int) – Internal transfer ID.

  • coin (str) – Currency name.

  • receiver (int) – Receiver’s UID.

  • amount (float) – Transfer amount.

  • time (int) – Internal transfer time.

  • status (Optional[int]) – Status (4-Pending review, 5-Failed, 6-Completed).

  • transfer_client_id (str) – Client’s self-defined internal transfer ID.

  • from_uid (int) – Payer’s account.

  • record_type (str) – Transfer type (out: transfer out, in: transfer in).

  • transferClientId (str)

  • fromUid (int)

  • recordType (str)

amount: float
coin: str
data: dict[str, Any] | None
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 | None
time: int
total: int | None
transfer_client_id: str
class bingx_py.models.sub_account.QuerySubAccountSpotAssetsData(**data)[source]

Bases: BaseModel

Model for the response data of QuerySubAccountSpotAssets.

Parameters:
  • balances (List[AssetBalance]) – List of asset balances.

  • data (Any)

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.sub_account.QuerySubAccountSpotAssetsResponse(**data)[source]

Bases: BaseModel

Model for the response of QuerySubAccountSpotAssets.

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

  • timestamp (int) – Response timestamp.

  • data (QuerySubAccountSpotAssetsData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.QuerySubAccountTransferHistoryResponse(**data)[source]

Bases: BaseModel

Model for the response of QuerySubAccountTransferHistory.

Parameters:
  • total (int) – Total count.

  • rows (List[TransferRecord]) – Data array.

  • data (Any)

model_config: ClassVar[ConfigDict] = {}

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

rows: list[TransferRecord]
total: int
class bingx_py.models.sub_account.QueryTransferableAmountData(**data)[source]

Bases: BaseModel

Model for the response data of QueryTransferableAmount.

Parameters:
  • coins (List[CoinInfo]) – List of supported coins.

  • data (Any)

coins: list[CoinInfo]
model_config: ClassVar[ConfigDict] = {}

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

class bingx_py.models.sub_account.QueryTransferableAmountResponse(**data)[source]

Bases: BaseModel

Model for the response of QueryTransferableAmount.

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

  • timestamp (int) – Response timestamp.

  • data (QueryTransferableAmountData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.ResetSubAccountApiKeyData(*, note, permissions, ipAddresses)[source]

Bases: BaseModel

Model for the response data of ResetSubAccountApiKey.

Parameters:
  • note (str) – Notes.

  • permissions (List[int]) – Permissions.

  • ip_addresses (List[str]) – IP whitelist.

  • ipAddresses (list[str])

ip_addresses: list[str]
model_config: ClassVar[ConfigDict] = {}

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

note: str
permissions: list[int]
class bingx_py.models.sub_account.ResetSubAccountApiKeyResponse(**data)[source]

Bases: BaseModel

Model for the response of ResetSubAccountApiKey.

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

  • timestamp (int) – Response timestamp.

  • data (ResetSubAccountApiKeyData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.SubAccountAssetInfo(**data)[source]

Bases: BaseModel

Model for sub-account asset information.

Parameters:
  • sub_uid (int) – Sub-account UID.

  • account_balances (List[AccountBalance]) – List of account balances.

  • data (Any)

account_balances: list[AccountBalance]
model_config: ClassVar[ConfigDict] = {}

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

sub_uid: int
class bingx_py.models.sub_account.SubAccountAssetTransferData(*, tranId)[source]

Bases: BaseModel

Model for the response data of SubAccountAssetTransfer.

Parameters:
  • tran_id (str) – Transfer record 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.sub_account.SubAccountAssetTransferResponse(**data)[source]

Bases: BaseModel

Model for the response of SubAccountAssetTransfer.

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

  • timestamp (int) – Response timestamp.

  • data (SubAccountAssetTransferData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.SubAccountInfo(*, subUid, subAccountString, note, freeze, createTime)[source]

Bases: BaseModel

Model for the sub-account information.

Parameters:
  • sub_uid (int) – Sub account uid.

  • sub_account_string (str) – Sub account username.

  • note (str) – Sub account note information.

  • freeze (bool) – Whether the account is frozen.

  • create_time (int) – Creation time.

  • subUid (int)

  • subAccountString (str)

  • createTime (int)

create_time: int
freeze: bool
model_config: ClassVar[ConfigDict] = {}

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

note: str
sub_account_string: str
sub_uid: int
class bingx_py.models.sub_account.SubAccountInternalTransferData(*, id)[source]

Bases: BaseModel

Model for the response data of SubAccountInternalTransfer.

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.sub_account.SubAccountInternalTransferResponse(**data)[source]

Bases: BaseModel

Model for the response of SubAccountInternalTransfer.

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

  • timestamp (int) – Response timestamp.

  • data (SubAccountInternalTransferData) – The response data.

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

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

timestamp: int
class bingx_py.models.sub_account.TransferRecord(*, asset, amount, type, status, tranId, timestamp, fromUid, toUid)[source]

Bases: BaseModel

Model for a transfer record.

Parameters:
  • asset (str) – Name of the asset.

  • amount (float) – Amount of the asset.

  • type (str) – Transfer type.

  • status (str) – Status (e.g., CONFIRMED).

  • tran_id (str) – Transfer ID.

  • timestamp (int) – Transfer timestamp.

  • from_uid (int) – UID of the sender.

  • to_uid (int) – UID of the receiver.

  • tranId (str)

  • fromUid (int)

  • toUid (int)

amount: float
asset: str
from_uid: int
model_config: ClassVar[ConfigDict] = {}

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

status: str
timestamp: int
to_uid: int
tran_id: str
type: str