Jump to content

bug-or-feature

Community Member
  • Posts

    74
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by bug-or-feature

  1. Note that the published limits are for LIVE only. The limits in DEMO can be less, and are subject to change at any time with no notice.
  2. You don't need a calculator, the IG web interface tells you everything you need to know. For any spread bet, before you actually press the Place Deal button, the interface shows you what the margin of your proposed bet would be. For example: This shows that if I were to make a bet of £1 per point selling the Dow at 38300, the margin would be £1914.87. That amount is less than my available balance of £41k, so the bet would be accepted. Conversely In this case I want to make the same bet, but at £100 per point. The margin would be £191k, which is way too much compared to what I have available. If I pressed the Place Deal button here, I'd see the same error message about insufficient balance that you saw. Different markets have different margin rates. You can see the margin rate for a market by clicking on the Info tab It also shows how the margin amount is calculated, and a potential way to reduce it using guaranteed stops. There is more information here: https://www.ig.com/uk/help-and-support/spread-betting-and-cfds/margin/what-is-leverage-and-margin
  3. Please can someone from IG forward this to the correct team? So that the page is updated with the correct version info?
  4. I agree the docs could be better. There are decent docs and code examples associated with this project https://github.com/ig-python/trading-ig BUT - they are all Python specific. (I'm the maintainer)
  5. According to this page, 5.0.3 is correct https://labs.ig.com/lightstreamer-downloads IG has server version 7.3.3. Have you got the demo app working?
  6. 1. Not exactly, there re other non leveraged account types too, see here https://www.ig.com/uk/help-and-support/accounts-and-statements/my-accounts/what-account-type-does-ig-offer 2. Yes
  7. Yes https://www.ig.com/uk/trading-platforms/dma-trading/what-is-dma-in-trading
  8. https://labs.ig.com/rest-trading-api-reference/service-detail?id=669
  9. The IG API does not support equity dealing or price history at all. The IG API can be used to trade spread bets (or CFDs) on equities, indices, FX, commodities, bonds, rates VIX etc. Its important to understand the difference. The error you are seeing is misleading. It seems that in certain cases you can use the API to trade a market, but historic price data is not available for that same market. I came across the same error message when trying to get historic prices for a dated spread bet on the VIX. When queried with support, the response was not very clear. Reading between the lines, my interpretation was that IG's licence for the historic price data does not allow IG to pass it on to us via the API. Regarding your project to "scan a whole market" - can I offer a suggestion? A would find another way to get historic prices. The IG API is not a good resource for this sort of thing. You are limited to 10,000 data points of historic prices per week. I would imagine you would need at least hourly data for your price scanner. So, 8 hours a day, 5 days a week, 200 shares in the ASX, 500 in the S&P, 100 in the FTSE, and 2000 in the Russell. You're going to be about 100,000 datapoints short, every week. Even daily prices is too many
  10. The way you do it is to create a POST, and a header named "_method" with value "DELETE"
  11. Sounds similar to this issue: https://community.ig.com/forums/topic/24800-demo-account-position-closed-at-a-non-existing-price/
  12. That shows the account that is logged into the REST API companion. What is important is the credentials you are using in the trading-ig library. Check the file trading_ig_config.py in your project, and make sure it is using the correct account details
  13. @BCC are you logging in to a Spread bet or CFD demo account? To stream a CFD epic, you will need to log in with a CFD account. User name, password and API key will be the same as with a spreadbet account - but account ID will be different. Its the 'acc-number' param in trading-ig. The sample works fine for me with the epic IX.D.NASDAQ.IFD.IP in a CFD demo account, but fails like your snippet when logged into a spread bet account
  14. Ask a question here: https://github.com/Lightstreamer/Lightstreamer-lib-client-haxe/issues The Lightstreamer guys are really helpful in my experience
  15. Hi @KoketsoIG - in my account all the positions have reappeared. Thanks for resolving
  16. There is a serious problem with the DEMO spread bet environment. Over the weekend 7 of my 12 open spreadbet positions disappeared. There is nothing in the history or activity views to say why. There are no closing transactions. On the My IG Dashboard view, my balance and P&L shows as if all the positions still exist; but on the platform view, the balance and P&L is valid for only the visible positions. My problem sounds like @Ravager's issue here. But I know that it is nothing to do with the app, or any browser or caching issue, as the REST API reports the same position list, missing the the same bets. Is anyone from IG looking into this, or know what is going on?
  17. UPDATE: I told the Web API team about this issue via their email address webapisupport@ig.com. Their reponse was: we know about this, it's not a bug. The excuse was and then My interpretation is: it has been like that since the API was released. They know its wrong, but to change it now would admit the mistake. So for now, the laborious workaround mentioned above is the only solution. Maybe if enough people make a noise about it, they will fix it. But I doubt it
  18. There's a section in the FAQ about the API limits https://labs.ig.com/faq Note that the limits described there are for the LIVE environment. The limits in DEMO are different, less, and variable. In my experience though, you still get 10,000 price points per week for historical data
  19. Price data is paged, and the default page size is 20. It is all in the docs https://labs.ig.com/rest-trading-api-reference/service-detail?id=682
  20. I've done a bit more digging - I think there is a bug. And now I understand the issue as described by @SZZ It looks to me like the /confirms endpoint returns the wrong dealId when closing a position. The Streaming API also reports the wrong dealId from the TRADE Subscription. They both respond with the dealId of the opening trade instead of the closing trade. The correct closing trade dealId is reported by the /history/activity endpoint, and by the /history/transactions endpoint. So there is a workaround for your issue right now @SZZ . Once your trade is closed, look at the response of the /history/activity endpoint. Find the dealId where the affectedDealId is the ID of the opening trade, and description is "Positions/s closed: XXXXXXXX". Then lookup that dealId in the response of the /history/transactions endpoint, with field name reference. I have reported this to the webapi team, will post any updates here
  21. Hmm not sure what is going on. My previous examples were market orders. I just tried a working order, and the transaction response contained the full 15 character reference field, eg DIAAAANXXXXXXXX Maybe someone from IG can explain. Why does the reference field in the /history/transactions response sometimes contain the full dealId, and sometimes just the portion after DIAAAAN?
  22. @ColinAgbabiaka I'm not sure about any DEMO env bug - my example responses were from DEMO too. My responses were from futures based spread bets, dated. Yours looks like an undated CFD, is that correct?
  23. INFO:trading_ig.rest:GET '/history/activity/', resp 200 date marketName epic period level direction dealId 0 2023-11-10T05:45:05 Oil - Brent Crude EN.D.LCO.Month6.IP JAN-24 8034.5 SELL DIAAAANP68C8YAQ 1 2023-11-09T05:45:11 10-Year T-Note Decimalised IR.D.10YEAR100.Month2.IP DEC-23 10845 BUY DIAAAANPPY34SAG INFO:trading_ig.rest:GET '/history/transactions', resp 200 openDateUtc dateUtc instrumentName period openLevel closeLevel size reference profitAndLoss 0 2023-10-27T18:59:23 2023-11-10T05:45:05 Oil - Brent Crude JAN-24 8923 8034.5 +0.53 DIAAAANP68C8YAQ £-470.91 1 2023-09-26T17:17:04 2023-11-09T05:45:11 10-Year T-Note Decimalised DEC-23 10814.4 10845 -0.62 DIAAAANPPY34SAG £-18.97 The dealId field from the activities endpoint (/history/activity) matches the reference field from the transactions endpoint (/history/transactions)
  24. Ah, well firstly "all the indices on IG" is a lot less than "all the pricing data". It's still a lot. Spread bets, CFDs, something else? A lot depends what your hypothesis is. Are you investigating spread values? If so, you could get the prices from somewhere else, and sample the IG spread using the Streaming API. With that API you can be subscribed to 40 instruments concurrently. See here Platform choice is a big subject, probably not a question for this forum - I'm sure you have great Google skills being a researcher. But you could start with Yahoo Finance, Google Finance or AlphaVantage
×
×
  • Create New...
us