Jump to content


Community Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Benjamin

  • Rank
    Occasional Contributor
  1. When submitting /positions/otc version 2 POST requests, my positions are occasionally getting rejected with reason UNKNOWN. In the account past activity, I find that the result column lists "Rejected: invalid stop or limit". However, the requests I am submitting do not have a stop or limit. The parameters I provide (copied from my Python code) for my API request are as follows: create_position( epic=epic, direction='SELL', size=1, currencyCode='GBP', expiry=expiry, forceOpen=True, guaranteedStop=False, dealReference=None, level=bid, limitDistance=None, limitLevel=None, orderType='LIMIT', quoteId=None, stopDistance=None, stopLevel=None, timeInForce='FILL_OR_KILL', trailingStop=None, trailingStopIncrement=None) It would be extremely useful if someone would explain why some of the requests are being rejected, and how to avoid or deal with this. Thank you.
  2. Thanks for the info , this makes sense. I have a couple of follow up questions. When making trades via the API, I would like to be sure of precicely what is being traded. Is the preferred/only way to check what a specific EPIC corresponds to, to check its name (e.g. "Daily N225 Cash to keep in range -460 to +460")? If they did, do you happen to know when the DJIA and FTSE tunnels changed in the past, and if possible what these changes were? It would be really useful to be able to query what any given historical data point corresponded to specifically. Thanks
  3.  Thanks for your reply. I'm glad I asked, in that case. I noticed after posting that the REST IG API Companion says "Trading" before the Positions and Working Orders sections in the menu on the left and assumed requests under these headdings were considered trading requests. However, trade confirmation, listing positions and perhaps a few other requests in these sections don't seem to fall into your list. Are you sure these are not also considered trading requests? It would be very useful if the REST API reference specifically clarified this for each request.
  4.  You're welcome - thought I might as well mention it even though it's relatively insignificant. I wondered whether it was delayed, though the timing of it coming through seconds after my second post seemed rather coincidental.
  5. I received the "1st Post badge" immediately after my second post. IG may care to look into this minor issue when they next work on the community forum. I couldn't see a more relevant subforum to post this in.
  6. Which API requests are trading requests, and which are non-trading requests? This is important given that the limits are different for each.
  7. When I first began to use the IG REST API, I believed that EPICs were unique instrument identifiers: that a given EPIC would always correspond to a specific instrument and that this instrument would never change. However, I have recently discovered that this is untrue. For example, there are 19 daily Japan 225 tunnels available, which always have a set of corresponding EPICs of the form BT.D.NIK._.IP, where _ can take a value from 1 to 19. However, the size of tunnel specified by any given EPIC changes. Last week, BT.D.NIK.1.IP was +/-120 points, at the time of posting this it is +/-160 points. This causes issues and opens questions. Are all EPICs mutable in this way? If not, which are and which are not? If I would like to programatically pull historical data or open positions on a market such as the Japan 225 daily tunnels, how can I be sure of what I am doing - I wouldn't want to open a position on a 160 tunnel when I thought it was 120? For the Japan 225 daily tunnels, there are historical prices going back to 2012-05-28; do these data correspond to the price for the EPIC (i.e. a whole bunch of different tunnel sizes), or the price for the given tunnel size, i.e. always 120? If the latter is true, it would be exceedingly useful to be able to pull data for all tunnel sizes that you store, rather than only the ones offered at the present time; however, if this is the case, are you computing prices for tunnels not currently offered, or are days simply missing for this? If they are computed, are these prices likely to be different to live prices (i.e. are live prices affected by demand in a way that unavailable prices are not?). Is what is true for the Japan 225 daily tunnels also true for other markets with one-to-many EPIC-instrument relationships? What is behind IG's decision to switch to different tunnel sizes in this case, and in others? - the Wall St and FTSE daily tunnels do not appear to switch (have they ever?). How can I know when switches have occurred? What else should I be aware of on this issue? I need to make sure that I am analysing the correct data and opening the correct positions.