unofficial_tabdeal_api.order

This module holds the OrderClass.

Classes

OrderClass

This is the class storing methods related to Ordering.

Module Contents

class unofficial_tabdeal_api.order.OrderClass(*, user_hash, authorization_key, _is_test=False)

Bases: unofficial_tabdeal_api.base.BaseClass

This is the class storing methods related to Ordering.

Parameters:
  • user_hash (str)

  • authorization_key (str)

  • _is_test (bool)

async get_orders_details_history(_max_history=500)

Gets the last 500(by default) orders details and returns them as a list.

Parameters:

_max_history (int, optional) – Max number of histories. Defaults to 500.

Raises:

TypeError – If the server responds incorrectly

Returns:

A List of dictionaries

Return type:

list[dict[str, Any]]

async get_order_state(order_id)

Gets the state of the requested order and returns it as an OrderState enum.

Parameters:

order_id (int) – ID of the trade order

Returns:

State of the order as enum

Return type:

OrderState