basana.external.binance.margin

class basana.external.binance.margin.Balance(json)
Parameters:

json (dict)

property available: Decimal

The available balance.

property borrowed: Decimal

The borrowed balance.

property locked: Decimal

The locked balance.

property total: Decimal

The total balance (available + locked).

class basana.external.binance.margin.CreatedOrder(json)
Parameters:

json (dict)

property amount: Decimal | None

The amount.

Only available for RESULT / FULL responses.

property amount_filled: Decimal | None

The amount filled.

Only available for RESULT / FULL responses.

property client_order_id: str

The client order id.

property datetime: datetime

The creation datetime.

property fills: List[Fill]

The fills.

Only available for FULL responses.

property id: str

The order id.

property is_open: bool

True if the order is open, False otherwise.

Only available for RESULT / FULL responses.

property limit_price: Decimal | None

The limit price.

Only available for RESULT / FULL responses.

property quote_amount_filled: Decimal | None

The amount filled in quote units.

Only available for RESULT / FULL responses.

property status: str | None

The status.

Only available for RESULT / FULL responses. Check Order status in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-status-status.

property time_in_force: str | None

The time in force.

Only available for RESULT / FULL responses. Check Time in force in https://developers.binance.com/docs/binance-spot-api-docs/enums#time-in-force-timeinforce.

class basana.external.binance.margin.OrderInfo(json, trades)
Parameters:
  • json (dict)

  • trades (Sequence[Trade])

property amount: Decimal

The amount.

property amount_filled: Decimal

The amount filled.

property amount_remaining: Decimal

The amount remaining to be filled.

property client_order_id: str

The client order id.

property fees: Dict[str, Decimal]

The fees.

property fill_price: Decimal | None

The fill price.

property id: str

The order id.

property is_open: bool

True if the order is open, False otherwise.

property limit_price: Decimal | None

The limit price.

property operation: OrderOperation

The operation.

property order_list_id: str | None

The order list id.

property quote_amount_filled: Decimal

The amount filled in quote units.

property status: str

The status.

Check Order status in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-status-status.

property stop_price: Decimal | None

The stop price.

property time_in_force: str | None

The time in force.

Check Time in force in https://developers.binance.com/docs/binance-spot-api-docs/enums#time-in-force-timeinforce.

class basana.external.binance.margin.OpenOrder(json)
Parameters:

json (dict)

property amount: Decimal

The amount.

property amount_filled: Decimal

The amount filled.

property client_order_id: str

The client order id.

property datetime: datetime

The creation datetime.

property id: str

The order id.

property is_open: bool

True if the order is open, False otherwise.

property limit_price: Decimal | None

The limit price.

property operation: OrderOperation

The operation.

property order_list_id: str | None

The order list id.

property quote_amount_filled: Decimal

The amount filled in quote units.

property status: str

The status.

Check Order status in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-status-status.

property stop_price: Decimal | None

The stop price.

property time_in_force: str | None

The time in force.

Check Time in force in https://developers.binance.com/docs/binance-spot-api-docs/enums#time-in-force-timeinforce.

property type: str

The type of order.

Check Order types in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-types-ordertypes-type.

class basana.external.binance.margin.CanceledOrder(json)
Parameters:

json (dict)

property amount: Decimal

The amount.

property amount_filled: Decimal

The amount filled.

property client_order_id: str

The client order id.

property id: str

The order id.

property is_open: bool

True if the order is open, False otherwise.

property limit_price: Decimal | None

The limit price.

property operation: OrderOperation

The operation.

property order_list_id: str | None

The order list id.

property quote_amount_filled: Decimal

The amount filled in quote units.

property status: str

The status.

Check Order status in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-status-status.

property stop_price: Decimal | None

The stop price.

property time_in_force: str | None

The time in force.

Check Time in force in https://developers.binance.com/docs/binance-spot-api-docs/enums#time-in-force-timeinforce.

property type: str

The type of order.

Check Order types in https://developers.binance.com/docs/binance-spot-api-docs/enums#order-types-ordertypes-type.

class basana.external.binance.margin.CreatedOCOOrder(json)
Parameters:

json (dict)

property client_order_list_id: str

A client id for the order list.

property datetime: datetime

The creation datetime.

property is_open: bool

True if the order is open, False otherwise.

property limit_order_id: str

The id for the limit order.

property order_list_id: str

The order list id.

property stop_loss_order_id: str

The id for the stop loss order.

class basana.external.binance.margin.OCOOrderInfo(json)
Parameters:

json (dict)

property client_order_list_id: str

A client id for the order list.

property datetime: datetime

The creation datetime.

property is_open: bool

True if the order is open, False otherwise.

property limit_order_id: str

The id for the limit order.

property order_list_id: str

The order list id.

property stop_loss_order_id: str

The id for the stop loss order.

class basana.external.binance.margin.CanceledOCOOrder(json)
Parameters:

json (dict)

property client_order_list_id: str

A client id for the order list.

property datetime: datetime

The creation datetime.

property is_open: bool

True if the order is open, False otherwise.

property limit_order_id: str

The id for the limit order.

property order_list_id: str

The order list id.

property stop_loss_order_id: str

The id for the stop loss order.