unofficial_tabdeal_api.models¶
This module holds the data models for the API.
Classes¶
Model for the isolated symbol pair details. |
|
Model for the trigger price details. |
|
Model for the currency details. |
|
Model for the currency credit details. |
|
Model for isolated symbol details. |
|
Model for open margin orders. |
|
This is the class storing information about a margin order. |
|
Model for transferring USDT from margin asset. |
|
Model for transferring USDT to margin asset. |
|
Model for wallet details. |
Module Contents¶
- class unofficial_tabdeal_api.models.PairModel(/, **data)¶
Bases:
pydantic.BaseModelModel for the isolated symbol pair details.
- Parameters:
data (Any)
- last_trade_price: decimal.Decimal¶
NOT YET KNOWN
- class unofficial_tabdeal_api.models.TriggerPriceModel(/, **data)¶
Bases:
pydantic.BaseModelModel for the trigger price details.
- Parameters:
data (Any)
- sl_price: decimal.Decimal | None = None¶
Stop Loss price, e.g. 9500.00
- tp_price: decimal.Decimal | None = None¶
Take Profit price, e.g. 10500.00
- class unofficial_tabdeal_api.models.CurrencyModel(/, **data)¶
Bases:
pydantic.BaseModelModel for the currency details.
- Parameters:
data (Any)
- id: int | None = None¶
ID of the currency.
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided
AVAILABLE: get_margin_all_open_orders
NOT AVAILABLE: get_isolated_symbol_details
- class unofficial_tabdeal_api.models.CurrencyCreditModel(/, **data)¶
Bases:
pydantic.BaseModelModel for the currency credit details.
- Parameters:
data (Any)
- amount: decimal.Decimal¶
Total amount of the currency, e.g. 1100.00
- available_amount: decimal.Decimal¶
Available amount of the currency, e.g. 1000.00
- average_entry_price: decimal.Decimal¶
Average entry price of the currency, e.g. 10000.00
- borrow: decimal.Decimal¶
NOT YET KNOWN
- currency: CurrencyModel¶
Currency details of the credit
- frozen_amount: decimal.Decimal¶
Frozen amount of the currency, e.g. 100.00
- genre: str | None = None¶
Genre of the currency, e.g. ‘IsolatedMargin’
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided
AVAILABLE: get_isolated_symbol_details
NOT AVAILABLE: get_margin_all_open_orders
- genre_fa: str | None = None¶
Genre of the currency in Persian, e.g. ‘کیف پول معامله اهرمدار Isolated’
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided
AVAILABLE: get_isolated_symbol_details
NOT AVAILABLE: get_margin_all_open_orders
- interest: decimal.Decimal¶
Interest on the currency, e.g. 10.00
- irt_average_entry_price: decimal.Decimal¶
Average entry price of the currency in IRT, e.g. 100000000.00
- irt_value: decimal.Decimal¶
Amount of credit in symbol as IRT, e.g. 10000000.00
- max_transfer_out_amount: decimal.Decimal | None = None¶
Max amount of the currency that can be transferred out, e.g. 900.00
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided
AVAILABLE: get_isolated_symbol_details
NOT AVAILABLE: get_margin_all_open_orders
- pair: PairModel | None = None¶
Pair details of the credit
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided
AVAILABLE: get_isolated_symbol_details
NOT AVAILABLE: get_margin_all_open_orders
- position: decimal.Decimal¶
NOT YET KNOWN
- position_usdt_value: decimal.Decimal | None = None¶
Value of the position as USDT. For example, 93427.9345
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided.
AVAILABLE: get_margin_all_open_orders
NOT AVAILABLE: get_isolated_symbol_details
- position_irt_value: decimal.Decimal | None = None¶
Value of the position as IRT. For example, 3255.787
server MAY NOT SEND this property in some requests, Therefore, it defaults to None if not provided.
AVAILABLE: get_margin_all_open_orders
NOT AVAILABLE: get_isolated_symbol_details
- position_value: decimal.Decimal¶
NOT YET KNOWN
- usdt_value: decimal.Decimal¶
Amount of credit in symbol as USDT, e.g. 1000.00
- class unofficial_tabdeal_api.models.IsolatedSymbolDetailsModel(/, **data)¶
Bases:
pydantic.BaseModelModel for isolated symbol details.
- Parameters:
data (Any)
- break_even_point: decimal.Decimal¶
Break-even point for the isolated symbol, e.g. 10000.00 This is the point where the profit/loss is zero.
- first_currency_borrowable_amount: decimal.Decimal¶
Borrowable amount of the first currency, e.g. 1000.00
- first_currency_credit: CurrencyCreditModel¶
Currency details of first symbol.
- max_margin_level: decimal.Decimal¶
Max margin level for the isolated symbol, e.g. 60.0 This is defined by symbol and user trading amount
- second_currency_borrowable_amount: decimal.Decimal¶
Borrowable amount of the second currency, e.g. 1000.00
- second_currency_credit: CurrencyCreditModel¶
Currency details of second symbol, for example, USDT in BTCUSDT
- transfer_active: bool¶
Whether the isolated symbol is active for transferring credit, e.g. True or False
- trigger_price: TriggerPriceModel¶
User-set trigger price points for Stop loss and Take profit.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class unofficial_tabdeal_api.models.MarginOpenOrderModel(/, **data)¶
Bases:
pydantic.BaseModelModel for open margin orders.
- Parameters:
data (Any)
- break_even_point: decimal.Decimal¶
Break-even point for the isolated symbol, e.g. 10000.00 This is the point where the profit/loss is zero.
- first_currency_credit: CurrencyCreditModel¶
Currency details of first symbol, for example, BTC in BTCUSDT
- second_currency_credit: CurrencyCreditModel¶
Currency details of second symbol, for example, USDT in BTCUSDT
- trigger_price: TriggerPriceModel¶
User-set trigger price points for Stop loss and Take profit.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class unofficial_tabdeal_api.models.MarginOrderModel(/, **data)¶
Bases:
pydantic.BaseModelThis is the class storing information about a margin order.
- Parameters:
data (Any)
- deposit_amount: decimal.Decimal¶
Deposit amount for the order, e.g. 1000.00
- margin_level: decimal.Decimal¶
Margin level of the order, Must be greater than 0 and less than or equal to MAX_ALLOWED_MARGIN_LEVEL
- order_price: decimal.Decimal¶
Price of the order, e.g. 10000.00
- order_side: unofficial_tabdeal_api.enums.OrderSide¶
Side of the order, either BUY or SELL
- stop_loss_percent: decimal.Decimal¶
Percentile of tolerate-able loss, e.g. 5 for 5%
- take_profit_percent: decimal.Decimal¶
Percentile of expected profit, e.g. 10 for 10%
- class unofficial_tabdeal_api.models.TransferFromMarginModel(/, **data)¶
Bases:
pydantic.BaseModelModel for transferring USDT from margin asset.
- Parameters:
data (Any)
- amount: decimal.Decimal¶
Amount to transfer, must be a positive decimal value.
- class unofficial_tabdeal_api.models.TransferToMarginModel(/, **data)¶
Bases:
pydantic.BaseModelModel for transferring USDT to margin asset.
- Parameters:
data (Any)
- transfer_amount_from_main: decimal.Decimal¶
Amount to transfer from main account, must be a positive decimal value.
- class unofficial_tabdeal_api.models.WalletDetailsModel(/, **data)¶
Bases:
pydantic.BaseModelModel for wallet details.
- Parameters:
data (Any)
- tether_us: decimal.Decimal¶
Amount of Tether US in the wallet, must be a positive decimal value.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].