Jump to content

josé muñiz

Members
  • Content count

    2
  • Joined

  • Last visited

Posts posted by josé muñiz


  1. Ok, I’ve found the problem. Let me give you some context first: I’m using the CIAPI.CS, and more specifically, the WP7 branch.

    The problem is that the ApiStopLimitOrderDTO inherits from ApiOrderDTO, which has a Price property. Then I found an important difference when I compared my JSON message with the one sent by FlexITP: the API expects stop/limits with a property calledTriggerPrice, so the mapping is not correct. I tested the same JSON message with the corrected property name and it worked fine.

    Could you please give it a look?


  2. Sometimes, when I try to close a position in our application I get the messsage “Cannot create new position when closing specific order serial number(s)”, but trying to close the position with the Flex ITP succeeds. It’s worth mentioning that most positions are closed correctly by our app. I’ve copied a sample of the JSON DTOs we send (first one) and the ones sent by Flex. Most of the extra fields with nulls and zeros are autogenerated and we have no control over them. I’ve tried removing them in the test harness but it changes nothing.

    {
      "OrderId": 0,
      "MarketId": 400494179,
      "Currency": null,
      "AutoRollover": true,
      "Direction": "sell",
      "Quantity": 10000.0,
      "QuoteId": null,
      "BidPrice": 1.00100,
      "OfferPrice": 1.00132,
      "AuditId": "sbPreProdFX12839254",
      "TradingAccountId": 400195958,
      "IfDone": null,
      "Close": [469637454]
    }
    
    {
      "BidPrice":0.82845,
      "Close":[469636669],
      "Direction":"sell",
      "AuditId":"634596294531260447",
      "OfferPrice":0.82878,
      "TradingAccountId":400195958,
      "Quantity":10000,
      "MarketId":400481146,
      "QuoteId":null
    }

    As an example of this behavior, I’m unable to close the position # 469637454. I haven’t tried closing it with Flex because it usually succeeds, so I don’t want to spoil the last piece of evidence I have about this issue. I’m using the account XX790537 for these tests.

    Are we missing something?

×