Jump to content
  • 0

Bid Offer data missing in API response


NickCrusher

Question

Hi,

This is on a Demo account.  I don't see any bid/offer data, its always null.

 

"snapshot": {
        "marketStatus": "TRADEABLE",
        "netChange": -4.1,
        "percentageChange": -2.28,
        "updateTime": "08:24:54",
        "delayTime": 0,
        "bid": null,
        "offer": null,
        "high": 177.96,
        "low": 174.98,
        "binaryOdds": null,
        "decimalPlacesFactor": 2,
        "scalingFactor": 1,
        "controlledRiskExtraSpread": 0

Just a note, this only affects SHARES.  INDICES seem to be fine.
Can tech support have a look please?  Or if I'm doing something wrong, let me know.  Thanks!

Link to comment

15 answers to this question

Recommended Posts

  • 0

This only affects the CFD account type it seems, spread bet account receives the pricing information.

"snapshot": {
        "marketStatus": "TRADEABLE",
        "netChange": 1.5,
        "percentageChange": 0.11,
        "updateTime": "09:08:36",
        "delayTime": 0,
        "bid": 1325.2,
        "offer": 1329.3,
        "high": 1336.3,
        "low": 1313.7,
        "binaryOdds": null,
        "decimalPlacesFactor": 1,
        "scalingFactor": 1,
        "controlledRiskExtraSpread": 0
    }

I can add in some account switching logic when it comes to position management but that's a dirty workaround...
Link to comment
  • 0
12 hours ago, NickCrusher said:

*sigh* still no response... seeing as IG aren't the only ones offering an API based retail trading platform, I would've thought they'd pay a little more attention to things like this.

I'll give it another week before jumping over to Alpaca...

Since this post thread is not going to produce any result and will get ignored I wanted to ask you about Alpaca. I checked them and it seems to be only for Usaians. They ask for 30K to be a member of the club and if you are not a USA citizen they will ask you to send a form that  might or might not be valid to join. 
They seem to have all the goodies available, I wish we had something similar at this side of the pond. Why are you around here and not with them? What made you join the British? 

  • Sad 1
Link to comment
  • 0

Sorry, looks like my account is locked for some reason.. so created a backup

Hi jlz, I read alpaca had no minimum deposit for live personal accounts but you're right that its not available for UK citizens... which answers the last question, I'm actually in the UK.

Sadly this does mean alpaca won't be a suitable alternative.  There's still Interactive Brokers and TD Ameritrade but I've already developed my system for IG's API so I'd rather not move if a fix was on its way.

I've bugged a bunch of their devs via LinkedIn, hopefully someone fixes the problem.  I did find a workaround that works but its very ugly involving switching back and forth between the spreadbet and CFD account...

Link to comment
  • 0

I was involved this week in getting IB to work, they use a local java server that you have to run to create the gateway against their API so things are a bit more complex. Their docs are not clear and there aren't much examples to get started apart from what other devs have done on github. 

I will be sending what I have completed to:

https://github.com/oneangrytrader/brokerapiclients

They seem to have a much cheaper deal if you want to trade shares and they are available through the API so it is worth the effort to get it done.

  • Sad 1
Link to comment
  • 0

Actually it is more secure. Since you have to run the server yourself you won't need to store credentials or API keys anywhere. Not many can run a java server, you need to install the jdk and run specific commands. That creates an extra layer of security that will trust only the device you were able to set up.  You won't be able to access to your account from anywhere that is not running that server, meaning that only a device of your trust will be able to query they API. It is a 2FA for software developers. 

  • Great! 1
Link to comment
  • 0

Thanks for that jlz!  I think I'll explore the option this week.  Mind if I ask what fees you'd have to pay eg do you pay a fee for real time market access data?  I know IB has an inactivity fee but its manageable and to be honest, not too bad for what they offer.

Thanks again!

Link to comment
  • 0
1 hour ago, Crusher1 said:

Thanks for that jlz!  I think I'll explore the option this week.  Mind if I ask what fees you'd have to pay eg do you pay a fee for real time market access data?  I know IB has an inactivity fee but its manageable and to be honest, not too bad for what they offer.

Thanks again!

I am right now trying to get the API to work so I didn't look into the fees yet. I always consider that a second step, if I can't automate it I won't be able to use it so first I must get it to work. I think the benefit will come when buying shares, my plan is to keep using IG for Spread Betting and IB for shares. They offer the option to deal with shares through the API so that is something we don't get here. I don't understand why IG don't offer an API for share dealing, that would be a game changer for me. 

  • Like 1
  • Thought provoking 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Posts

    • Sainsburys full year earnings and Unilever’s first quarter trading update both say the same thing, UK consumers are in for higher prices. The war in Ukraine, supply chain issues and the effects of ongoing Covid all to blame.      
    • US Dollar (DXY) Daily Price and Analysis US Q1 GDP may stall the greenback’s advance. A 20-year high nears for the US dollar. The multi-month US dollar rally continues with the greenback printing a fresh high today ahead of the first look at US Q1 GDP at 12.30 GMT. The US dollar basket (DXY) has been boosted by renewed weakness in the Euro and the Japanese Yen, as investors move from lower-yielding to higher-yielding currencies, while safe-haven flows continue to benefit the greenback. The US growth release later in the session is expected to show a sharp slowdown from the robust Q4 figure of 6.9%. The markets are currently pricing in growth of just 1% for the first three months of this year, with the slowdown mainly due to a reduction in inventory accrual over the quarter. This release is unlikely to move the greenback, unless there is a large miss or beat, as the Fed believe that 2022 US growth will be robust enough to let them tighten monetary policy sharply without damaging the economy. The latest US Core PCE data – the Fed’s preferred inflation reading – is released on Friday and this may have more effect on the US dollar than today’s GDP data. For all market moving economic data and events, see the DailyFX Calendar. The ongoing US dollar rally has been aided by weakness across a range of G7 currencies including the Euro, the Japanese Yen, and the British Pound. The Euro continues to battle with lowly growth expectations, exacerbated by energy concerns, the British Pound is mired by weak economic data, while the Japanese Yen is in freefall as the BoJ continues with its ultra-loose monetary policy.   The US dollar continues to press higher and looks set to break above 103.96, the March 2020 high. Above here the US dollar would be back at levels last seen nearly two decades ago. The March resistance will likely hold in the short-term, especially with month-end portfolio rebalancing at the end of the week, but US dollar strength is set to continue in the months ahead. USDOLLAR (DXY) WEEKLY PRICE CHART – APRIL 28, 2022 {{THE_FUNDAMENTALS_OF_BREAKOUT_TRADING}} What is your view on the US Dollar – bullish or bearish?   Apr 28, 2022 | DailyFX Nick Cawley, Strategist
    • While Tesla has nothing directly to do with Elon Musk buying Twitter - TSLA stock closed down 12% on news that Musk may have to sell stock and use other holdings to stand against the loan to finalise the purchase of the social media giant.        
×
×
  • Create New...