unofficial_tabdeal_api.constants¶
Constants storage.
Attributes¶
URL for getting account preferences. Used for checking authorization key validity |
|
The request succeeded |
|
Authorization token is invalid or expired |
|
The server could not understand the request. |
|
The requested resource could not be found but may be available in the future. |
|
Response when requested market is not found on Tabdeal |
|
Response when requested market is not available for margin trading on Tabdeal platform |
|
Response when asset balance is insufficient for requested order |
|
Response when requested borrow amount is over available credit |
|
Response when order is successfully placed |
|
Response when requested parameters are invalid |
|
Response when order type is invalid |
|
Response when requested transfer amount is over the account available balance |
|
Response when for some unknown reason, |
|
Response when server can't set SL/TP for margin order due to unknown error |
|
Response when server receives the request, no guarantee of actually processing it!!! |
|
URL for getting margin asset details |
|
URL for getting all open margin orders. |
|
URL for opening a margin order |
|
Max allowed margin level for margin orders |
|
URL for getting all orders history |
|
Time to wait before retrying an operation |
|
URL for getting the USDT balance of account |
|
QUERY for getting the USDT balance of account |
|
URL for transferring USDT from wallet to margin asset |
|
URL for transferring USDT from margin asset to wallet |
|
URL for setting stop loss and take profit points for a margin order |
|
Max decimal precision needed |
|
Precision needed for USDT |
Module Contents¶
- unofficial_tabdeal_api.constants.GET_ACCOUNT_PREFERENCES_URI: str = '/r/preferences/'¶
URL for getting account preferences. Used for checking authorization key validity
- unofficial_tabdeal_api.constants.STATUS_UNAUTHORIZED: int = 401¶
Authorization token is invalid or expired
- unofficial_tabdeal_api.constants.STATUS_BAD_REQUEST: int = 400¶
The server could not understand the request.
- unofficial_tabdeal_api.constants.STATUS_NOT_FOUND: int = 404¶
The requested resource could not be found but may be available in the future.
- unofficial_tabdeal_api.constants.MARKET_NOT_FOUND_RESPONSE: str = '{"error":"بازار یافت نشد."}'¶
Response when requested market is not found on Tabdeal
- unofficial_tabdeal_api.constants.MARGIN_NOT_ACTIVE_RESPONSE: str = '{"error":"معامله\u200cی اهرم\u200cدار فعال نیست."}'¶
Response when requested market is not available for margin trading on Tabdeal platform
- unofficial_tabdeal_api.constants.NOT_ENOUGH_BALANCE_RESPONSE: str = '{"error":"اعتبار کافی نیست."}'¶
Response when asset balance is insufficient for requested order
- unofficial_tabdeal_api.constants.NOT_ENOUGH_CREDIT_AVAILABLE_RESPONSE: str = '{"error":"شما به سقف دریافت اعتبار رسیده\u200cاید."}'¶
Response when requested borrow amount is over available credit
- unofficial_tabdeal_api.constants.ORDER_PLACED_SUCCESSFULLY_RESPONSE: str = 'سفارش با موفقیت ثبت شد.'¶
Response when order is successfully placed
- unofficial_tabdeal_api.constants.REQUESTED_PARAMETERS_INVALID_RESPONSE: str = '{"error":"پارامتر های ورود اشتباه است."}'¶
Response when requested parameters are invalid
- unofficial_tabdeal_api.constants.ORDER_IS_INVALID_RESPONSE: str = '{"error":"نوع سفارش اشتباه است."}'¶
Response when order type is invalid
- unofficial_tabdeal_api.constants.TRANSFER_AMOUNT_OVER_ACCOUNT_BALANCE_RESPONSE: str = '{"error":"مقدار واردشده، بیش از حداکثر مقدار قابل جابه\u200cجایی است."}'¶
Response when requested transfer amount is over the account available balance
- unofficial_tabdeal_api.constants.TRANSFER_FROM_MARGIN_ASSET_TO_WALLET_NOT_POSSIBLE_RESPONSE: str = '{"error":"امکان انتقال ارز به خارج اکانت معامله اهرم\u200cدار، امکان\u200cپذیر نیست."}'¶
Response when for some unknown reason, It’s not possible to transfer USDT out of margin asset
- unofficial_tabdeal_api.constants.MARGIN_POSITION_NOT_FOUND_RESPONSE: str = '{"error":"پوزیشن مورد نظر یافت نشد."}'¶
Response when server can’t set SL/TP for margin order due to unknown error
- unofficial_tabdeal_api.constants.GENERIC_SERVER_CONFIRMATION_RESPONSE: str = '"درخواست مورد نظر با موفقیت انجام شد."'¶
Response when server receives the request, no guarantee of actually processing it!!!
- unofficial_tabdeal_api.constants.GET_MARGIN_ASSET_DETAILS_URI: str = '/r/margin/margin-account-v2/'¶
URL for getting margin asset details
- unofficial_tabdeal_api.constants.GET_ALL_MARGIN_OPEN_ORDERS_URI: str = '/r/treasury/isolated_positions/'¶
URL for getting all open margin orders.
- unofficial_tabdeal_api.constants.OPEN_MARGIN_ORDER_URI: str = '/api/order/'¶
URL for opening a margin order
- unofficial_tabdeal_api.constants.MAX_ALLOWED_MARGIN_LEVEL: decimal.Decimal¶
Max allowed margin level for margin orders
- unofficial_tabdeal_api.constants.GET_ORDERS_HISTORY_URI: str = '/r/api/user_order/'¶
URL for getting all orders history
- unofficial_tabdeal_api.constants.RETRY_SLEEP_SECONDS: int = 10¶
Time to wait before retrying an operation
- unofficial_tabdeal_api.constants.GET_WALLET_USDT_BALANCE_URI: str = '/r/api/user/'¶
URL for getting the USDT balance of account
- unofficial_tabdeal_api.constants.GET_WALLET_USDT_BALANCE_QUERY: dict[str, Any]¶
QUERY for getting the USDT balance of account
- unofficial_tabdeal_api.constants.TRANSFER_USDT_TO_MARGIN_ASSET_URI: str = '/margin/other-margins-transfer/'¶
URL for transferring USDT from wallet to margin asset
- unofficial_tabdeal_api.constants.TRANSFER_USDT_FROM_MARGIN_ASSET_TO_WALLET_URI: str = '/margin/transfer/'¶
URL for transferring USDT from margin asset to wallet