unofficial_tabdeal_api.exceptions

This module holds the custom exceptions.

Exceptions

Error

Exception raised for an error.

AuthorizationError

Exception raised when Authorization token is invalid or expired.

RequestError

Exception raised when the server could not understand the request.

MarketNotFoundError

Exception raised when requested market is not found on Tabdeal platform.

MarginTradingNotActiveError

Exception raised when requested market is not available for margin trading on Tabdeal.

NotEnoughBalanceError

Exception raised when asset balance is insufficient to perform the requested order.

NotEnoughCreditAvailableError

Exception raised when requested borrow amount is over available credit.

RequestedParametersInvalidError

Exception raised when requested parameters are invalid.

TransferAmountOverAccountBalanceError

Exception raised when requested transfer amount is over the account available balance.

TransferFromMarginAssetToWalletNotPossibleError

Exception raised when requested transfer is not possible due to unknown reason.

MarginPositionNotFoundError

Exception raised when can't set SL/TP because margin position is not found.

BreakEvenPriceNotFoundError

Exception raised when break even price point is not found.

OrderNotFoundInSpecifiedHistoryRangeError

Exception raised when order is not found in specified history range.

MarginOrderNotFoundInActiveOrdersError

Exception raised when requested margin order is not in active orders list.

Module Contents

exception unofficial_tabdeal_api.exceptions.Error(status_code)

Bases: Exception

Exception raised for an error.

Parameters:

status_code (int)

status_code
exception unofficial_tabdeal_api.exceptions.AuthorizationError(status_code)

Bases: Error

Exception raised when Authorization token is invalid or expired.

Parameters:

status_code (int)

exception unofficial_tabdeal_api.exceptions.RequestError(*, status_code, server_response)

Bases: Error

Exception raised when the server could not understand the request.

Parameters:
  • status_code (int)

  • server_response (str)

server_response
exception unofficial_tabdeal_api.exceptions.MarketNotFoundError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested market is not found on Tabdeal platform.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.MarginTradingNotActiveError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested market is not available for margin trading on Tabdeal.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.NotEnoughBalanceError(*, status_code, server_response)

Bases: RequestError

Exception raised when asset balance is insufficient to perform the requested order.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.NotEnoughCreditAvailableError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested borrow amount is over available credit.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.RequestedParametersInvalidError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested parameters are invalid.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.TransferAmountOverAccountBalanceError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested transfer amount is over the account available balance.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.TransferFromMarginAssetToWalletNotPossibleError(*, status_code, server_response)

Bases: RequestError

Exception raised when requested transfer is not possible due to unknown reason.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.MarginPositionNotFoundError(*, status_code, server_response)

Bases: RequestError

Exception raised when can’t set SL/TP because margin position is not found.

Parameters:
  • status_code (int)

  • server_response (str)

exception unofficial_tabdeal_api.exceptions.BreakEvenPriceNotFoundError

Bases: Exception

Exception raised when break even price point is not found.

exception unofficial_tabdeal_api.exceptions.OrderNotFoundInSpecifiedHistoryRangeError

Bases: Exception

Exception raised when order is not found in specified history range.

exception unofficial_tabdeal_api.exceptions.MarginOrderNotFoundInActiveOrdersError

Bases: Exception

Exception raised when requested margin order is not in active orders list.