Skip to content

Repo standards relating to markets.

Trading System Constants

This module defines various constants used throughout the trading system. These constants are used for defining fields in transaction records, account details, order types, and more.

General Constants

  • TIMESTAMP (int): "timestamp"
  • TICKER (str): "ticker"
  • AMOUNT (Decimal): "amount"
  • PRICE (float): "price"
  • ENTRY (Decimal): "entry"
  • LEVERAGE (float): "leverage"
  • LIQUIDATION (float): "liquidation"
  • MARGIN (float): "margin"
  • VALUE (Decimal): "value"
  • REALIZED_PNL (float): "realized_pnl"
  • UNREALIZED_PNL (float): "unrealized_pnl"

Account Constants

  • ACCOUNT_EQUITY (float): "equity_total"
  • ACCOUNT_WITHDRAWABLE (float): "equity_withdrawable"
  • ACCOUNT_NOTIONAL_POS (float): "notional_position"
  • MARGIN_MAINTENANCE (float): "margin_maintenance"
  • MARGIN_TOTAL (float): "margin_total"

Order Constants

  • LIMIT_PRICE (float): "limit_price"
  • ORDER_ID (str): "order_id"
  • ORDER_TAG (str): "order_tag"
  • ORDER_TOFILL (Decimal): "amount_left"
  • ORDER_AMOUNT (Decimal): "amount_total"

Order Types

  • ORDER_TYPE (str): "order_type"
  • ORDER_TYPE_MARKET (str): "market"
  • ORDER_TYPE_LIMIT (str): "limit"
  • ORDER_TYPE_STOP_MARKET (str): "stop_market"
  • ORDER_TYPE_STOP_LIMIT (str): "stop_limit"
  • ORDER_TYPE_TWAP (str): "twap"

Price Match Types

  • PRICE_MATCH_OPPONENT_1 (str): "OPPONENT"
  • PRICE_MATCH_OPPONENT_5 (str): "OPPONENT_5"
  • PRICE_MATCH_OPPONENT_10 (str): "OPPONENT_10"
  • PRICE_MATCH_OPPONENT_20 (str): "OPPONENT_20"
  • PRICE_MATCH_QUEUE_1 (str): "QUEUE"
  • PRICE_MATCH_QUEUE_5 (str): "QUEUE_5"
  • PRICE_MATCH_QUEUE_10 (str): "QUEUE_10"
  • PRICE_MATCH_QUEUE_20 (str): "QUEUE_20"

Time In Force Constants

  • TIME_IN_FORCE (str): "tif"
  • TIME_IN_FORCE_GTC (str): 'GTC'
  • TIME_IN_FORCE_IOC (str): 'IOC'
  • TIME_IN_FORCE_FOK (str): 'FOK'
  • TIME_IN_FORCE_GTD (str): 'GTD'
  • TIME_IN_FORCE_MOC (str): 'MOC'
  • TIME_IN_FORCE_MOO (str): 'MOO'
  • TIME_IN_FORCE_ALO (str): "ALO"

Contract Constants

  • SYMBOL_MIN_QTY (Decimal): "min_qty"
  • SYMBOL_PRICE_PRECISION (int): "price_precision"
  • SYMBOL_QUOTE_PRECISION (int): "quote_precision"
  • SYMBOL_QUANTITY_PRECISION (int): "quantity_precision"
  • SYMBOL_MIN_NOTIONAL (float): "min_notional"