Jump to content

bug-or-feature

Community Member
  • Posts

    75
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by bug-or-feature

  1. 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
  2. I have noticed this too. My app updates the balance every hour or so. I just ignore a balance of zero
  3. 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
  4. 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.
  5. 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
  6. 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.
  7. 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
  8. 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
  9. Are you sure? The error message in your first message specifically says http://
  10. Have you tried using the secure URL instead? https://api.ig.com/gateway/deal/session instead of http://api.ig.com/gateway/deal/session
  11. 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
  12. 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
  13. 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
  14. 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.
  15. 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
  16. 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
  17. 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
  18. IG offer a bunch of FTSE 350 sector spread bets under "Indices", eg FTSE350 Chemicals FTSE350 Banks FTSE350 Beverages etc They all offer Cash and Futures markets. Which futures are they based on? Which exchange?
  19. Hi This question is about rollovers for multiple positions in a futures based spread bet market. See the screenshot attached You can see I opened a position in the quarterly Carbon Emissions market on 2021-11-05 at £1.72 per point. I then added £0.83 on 2021-11-19, and then £0.60 more on 2021-11-23, giving a total of £3.15 per point. If I had automatic rollovers enabled for my account, what would my position look like after 2021-12-12? Would still have three positions (and therefore have paid the spread three times), or would I have one position at £3.15 per point? Thanks in advance Andy
  20. Hi What is the margin deposit factor for a spreadbet of £3 per point on US Crude, Dec 21 contract? The info panel on the web platform says 60%. See first screenshot. The REST API also says 60% The margin help page, here https://www.ig.com/uk/charges/margin says 10%. And the dealing ticket implies 10%. 8137 x 3.5 x 0.1 = 2848 ish Why the discrepancy? thanks Andy
×
×
  • Create New...
us