IB API Margin Checks.

Discussion in 'Automated Trading' started by Craig66, Nov 13, 2012.

  1. Craig66


    IB details the various calculations they do here...

    All the values in the various boxes can be obtained through updates in the API. What I want to know is does anybody do any margin pre-checking before sending orders using the API account information? One thing that springs to mind is checking that we have some amount of breathing space on the 'ExcessLiquidity' value (say as a percentage of account size).

    Thanks in advance.

    Edit: Doing some searching on TWS API group, it seems 'Cushion' may be the best indicator to check?
  2. You can use various... as long as you can interpret it in real-time.
    The point is to avoid having orders cancelled by IB.

    IB is highly intelligent in this regard.

    Since I trade well hedged, lo vol stocks...
    I often have 200-300 orders worth > $1,000,000...
    With < $30,000 in Buying Power...
    Which is roughly the point at which IB starts cancelling outlying orders.
  3. Craig66


    Thanks for the answer, is it possible to give a specific example of one of the 'various'? BTW are you using Reg-T or Portfolio margin?
  4. I agree . IB handles ton of orders really well. Sometimes we send dozens of orders at the same time . Nothing gets canceled or lost. No wonder they are a logical choice for algotraders of all kind.
  5. Craig66


    Someone's going to actually answer the question...one of these days.