Enums

Enums definitions

Enums help you to manipulate the values requested by the binance api.

import binance

order = await client.create_order(
    "ETHPAX",
    binance.Side.BUY.value,
    binance.OrderType.MARKET, # A shortcut for binance.OrderType.MARKET.value
    quantity="1",
    test=True,
)

You can also import them with the "from" instruction:

from binance import Side, OrderType

order = await client.create_order(
    "ETHPAX",
    Side.BUY,
    OrderType.MARKET,
    quantity="1",
    test=True,
)

SymbolStatus

  • PRE_TRADING

  • POST_TRADING

  • END_OF_DAY

  • HALT

  • AUCTION_MATCH

  • BREAK

SymbolType

  • SPOT

OrderStatus

  • NEW the order has been accepted by the engine.

  • PARTIALLY_FILLED a part of the order has been filled.

  • FILLED the order has been completely filled.

  • CANCELED the order has been canceled by the user.

  • PENDING_CANCELED (currently unused)

  • REJECTED the order was not accepted by the engine and not processed.

  • EXPIRED the order was canceled according to the order type's rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance)

ListStatusType

  • RESPONSE

  • EXEC_STARTED

  • ALL_DONE

ListOrderStatus

  • EXECUTING

  • ALL_DONE

  • REJECT

ContingencyType

  • OCO

OrderType

  • LIMIT

  • MARKET

  • STOP_LOSS

  • STOP_LOSS_LIMIT

  • TAKE_PROFIT

  • TAKE_PROFIT_LIMIT

  • LIMIT_MAKER

ResponseType

  • ACK

  • RESULT

  • FULL

Side

  • BUY

  • SELL

TimeInForce

  • GTC

  • IOC

  • FOK

Interval

  • ONE_MINUTE

  • THREE_MINUTES

  • FIVE_MINUTES

  • FIFTY_MINUTES

  • THIRTY_MINUTES

  • ONE_HOUR

  • TWO_HOURS

  • FOUR_HOURS

  • SIX_HOURS

  • HEIGHT_HOURS

  • TWELVE_HOURS

  • ONE_DAY

  • THREE_DAY

  • ONE_WEEK

  • ONE_MONTH

Last updated