Test Author: Kevin
If it breaks: Kevin

This will test our ability to compute and enforce span margin at CME

1) Make sure span.conf looks like:

SpanMargin {
   value {
      enabled: true
      login: 'api_bts1'
      password: 'Summer123'
      url: 'https://cmecorenr.cmegroup.com/MarginServiceApi/1.4/'
   }
}

2) Fire up a shell and trade 1 ES into ACC A

3) Open a webui, look at Margin Tab in ACC A

You should see a value of around 6300 in maintenance margin after a minute or two

4) If not already zero, set your cash balance to zero and set leverage factor to 1

5) Try to trade an ES in ACC A, you should be blocked by a limit breach

6) Increase your cash balance to 10,000 (or higher, your Excess Liquidity should be positive)

7) Try to trade again, you should be able to.