Jump to content
SupereeDuperee

Discrepancy on MarginRequired amount from API call and WebTrader

Recommended Posts

I am trying to get Margin Required amount for GBP/JPY, 20000 Quantity. I call POST on this URL

https://ciapi.cityindex.com/TradingAPI/order/simulate/newtradeorder?UserName=demo210127&Session=

The Request JSON is

{
   "MarketId":401484385,
   "Currency":null,
   "AutoRollover":false,
   "Direction":"Buy",
   "Quantity":20000.0,
   "QuoteId":0,
   "PositionMethodId":1,
   "BidPrice":1.0001,
   "OfferPrice":999.9999,
   "AuditId":"1739236",
   "TradingAccountId":101295826,
   "IfDone":null,
   "Close":null,
   "Reference":null,
   "AllocationProfileId":0,
   "OrderReference":null,
   "Source":null,
   "PriceTolerance":0
}

 

The Response JSON is:-

{
    "Status": 1,
    "StatusReason": 1,
    "SimulatedCash": 49991.82,
    "ActualCash": 49991.82,
    "SimulatedTotalMarginRequirement": 2648.42,
    "ActualTotalMarginRequirement": 1280.36,
    "CurrencyId": 11,
    "Orders": [
        {
            "StatusReason": 1,
            "Status": 3
        }
    ]
}

 

From the documentation, if I am not wrong, "SimulatedTotalMarginRequirement": 2648.42, is the REQUIRED MARGIN Amount. I am using my DEMO account.

However if I try to place a NEW TRADE ORDER from the WebTrader website, using the same DEMO account I get required margin amount = 1369.10. Screenshot attached.

Why the margin requirement amount is not SAME from WebTrader and API call? 

 

ForexMarginReq.PNG

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×