Jump to content

bug-or-feature

Community Member
  • Posts

    82
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by bug-or-feature

  1. I had a couple of bets on the Coffee Arabica September contract recently, total position was short £0.88 in the DEMO environment. You can see from the first screenshot that the expiry was 22 August 2023 My positions were rolled at 19.35 on 21 August though, see second screenshot. Can someone from IG tell me why they were rolled 24 hours earlier than expected please? Thanks
  2. Even worse, the REST API /markets/IX.D.AEX.Month2.IP endpoint reports that the market is TRADEABLE. Is anyone from IG going to respond on this please?
  3. There's something wrong with the futures based bets on the Netherlands 25 Index. Its possible to open bets on the August 23 contract, which expires on 16 August. But not possible to open bets on the September 23 contract, which expires on 15 September. There's a message on the dealing ticket that says "Closing only: Contract due to expire". Looks like the trading restriction has been applied to the wrong bet
  4. Yes, it is There is a complex set of constraints for order creation, because of the different order types. Look at the docs here. If you still need help, I would suggest providing details of what values you are setting for which fields; it is impossible to know what is wrong with the information you have supplied so far
  5. You cannot use the APIs with share dealing, ISA or SIPP accounts. The APIs only work with spread betting and CFD accounts. You can use the APIs to trade equities (and view historic prices) with spread betting or CFD accounts.
  6. Yes, and it works fine for both the market info and historic price endpoints: https://demo-api.ig.com/gateway/deal/markets/AA.D.BHP.DAILY.IP https://demo-api.ig.com/gateway/deal/prices/AA.D.BHP.DAILY.IP?resolution=DAY&max=10
  7. The funding charge is built into the spread for futures and forward bets. See here They roll automatically by default. You can control this feature in Settings. See here
  8. I have noticed this too. My app updates the balance every hour or so. I just ignore a balance of zero
  9. There is some sample code for doing this here: https://github.com/ig-python/trading-ig/blob/master/sample/stream_ig.py The code shown gets updates for fields "AVAILABLE_CASH", but could be updated to get others too
  10. Unfortunately, it is not possible. The way IG manage epics for their dated spread bets is extremely unhelpful; they recycle epics. Right now EN.D.NG.Month2.IP represents the JUL-23 contract, and EN.D.NG.Month1.IP represents the AUG-23 contract Most likely, EN.D.NG.Month2.IP will be the SEP-23 contract. But, we cannot know for sure. They may skip a contract, ie skip September and go straight to October. Or, they could use another epic entirely, eg EN.D.NG.MONTH2.IP. Or anything else.
  11. Do you want a daily funded bet (DFB), or a futures based bet? Its important to understand the difference, if you don't, go and read the docs some more. For DFB, the epic is wrong, should be IX.D.SPTRD.DAILY.IP For a futures bet, the expiry is wrong, should be 'JUN-23'. And you should really be using the September (SEP-23) bet, as June expires tomorrow
  12. The epic is correct, although that epic represents the June contract, and it expires very soon. You may prefer to trade the September contract, currently 'IX.D.SPTRD.MONTH2.IP' But that is not the cause of your issues. You haven't provided any details about the code that caused it, so its impossible to give a solution.
  13. Your Epic is wrong, it should be "AA.D.BHP.DAILY.IP". If you are new to the Python library, or to the IG REST API, it would be a good idea to use the IG API companion at first. It is much harder to make mistakes with the companion
  14. No, I understood fine. I think perhaps you minunderstand how spread betting works. The spread is the charge, hence the name. It's not important anyway, the point is there no direct way to get the spread value from the API. You have to sample the bid and ask prices, and work it out yourself. The spread is dynamic, it changes according to market conditions, eg volatility. In my application I sample prices hourly using the Stream API, and calculate an average
  15. Are you sure? The error message in your first message specifically says http://
  16. Have you tried using the secure URL instead? https://api.ig.com/gateway/deal/session instead of http://api.ig.com/gateway/deal/session
  17. That's the wrong API, you want the REST API for orders https://labs.ig.com/rest-trading-api-guide https://labs.ig.com/rest-trading-api-reference/service-detail?id=692 The Streaming API is more useful for fast moving data, eg live prices
  18. Spreads on IG are not fixed, they're dynamic. If you want to get the spread right now, you can sample the prices using either API, and work it out for yourself. But, of course, the value may change at any time after that
  19. The best way to see how to prepare the request is to login with the REST API companion while your developer tools network tab is open, and have a look at the request objects. https://labs.ig.com/sample-apps/api-companion/index.html Alternatively, there's some code in the trading-ig library that does it, and it works https://github.com/ig-python/trading-ig
  20. Sure, you can get data for April and May right now, because April and May are active and tradeable. But you cannot get March or February, or any other month or year. Maybe read my reply again, and make sure you understand the difference.
  21. It is not possible. Unfortunately, the way IG offer futures based spread bets makes it useless for historical data. Instead of having a unique epic for each contract, they recycle them. So, right now the bet for the June expiry FTSE 100 bet is IX.D.FTSE.MONTH1.IP and the September contract is IX.D.FTSE.MONTH2.IP but those are the only two epics. The December one will be back to MONTH1. Some futures have more than 2 epics, but they all recycle. Its very unhelpful. You'd be better off looking at the charts of real futures. Even then it is not easy, as often the price of a spread bet is a multiple of the underlying future. I have moaned about this in the past, but there semms to be no appetite to improve things from IG
  22. There's an answer to your first question here: https://trading-ig.readthedocs.io/en/latest/faq.html#why-do-see-an-error-like-public-api-failure-stockbroking-not-supported For your second, I suggest logging into the web portal. There's probably some T&Cs to acknowledge, or similar. The API can't deal with that
  23. Yes, here's a couple of Python libs for connecting with the IG APIs: https://github.com/ig-python/ig-markets-api-python-library https://github.com/Iceloof/IG-API There's probably more. I'm the maintainer of the first one
×
×
  • Create New...
us