Jump to content
  • 0

Cannot get DAY_OPEN_MID from REST API


SCROTCH

Question

Hi

Using the streaming API, it's possible to get DAY_OPEN_MID for the current trading session using a CHART:TICK subscription. The same value can also be obtained from MID_OPEN using a MARKET subscription. Lastly, it can also be calculated for the current trading session using the /markets endpoint of the REST API using the "bid", "offer" and "netChange" attributes.

Note that all of these options apply to the current trading session only, and there doesn't seem to be any way to fetch or calculate the same value for previous sessions. I would like this info as part of my backtesting strategy. Is there any way to fetch or calculate it using the REST API?

Link to comment

2 answers to this question

Recommended Posts

  • 0
7 hours ago, Bopperz said:

Hi,

Get the price history. This will give you the candle opening bid/ask, then find the mid point.

'https://api.ig.com/gateway/deal/prices/'+epic+'?resolution='+freq+'&from='+d1+'&to='+d2+'&pageSize='+str(5000)

 

You need to add epic, freq, d1, d2

Hi

Thanks for responding but I should have made clear that it's impossible to determine the Monday morning gap up/down from the candle data.

eg DAY_OPEN_MID on Monday for IX.D.DOW.IFA.IP was 30195.4 whereas the candle from the open returns 

"openPrice": {
    "bid": 30401.5,
    "ask": 30406.3,
    "lastTraded": null
}

 

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
  • image.png

  • Posts

    • If someone is interested, 2,4% for staking USDT  https://wizerpeople.com/?aff=Jowich  
    • Wizerpeople is a platform, which allows users to invest in private online and offline startups. Nowdays, there are more and more people who want to get into the investments market and make profits by investing in promising projects, but most of them do not have sufficient capital for large investments, so these investments remain risky. Wizerpeople solves this problem by providing an opportunity for small and intermediate investors to invest in private startups. Each user of the platform have an opportunity to register and invest in any provided type of business without huge investing xperience, signing documents or any special requirements. Investment and funding of private companies became so simple as never before with Wizerpeople. https://wizerpeople.com/?aff=Jowich
    • Another offers of a unique crypto loan service that stands out in the market due to several key features is already catching the attention of many. One of the primary unique aspects of Bitget's crypto loan service is its flexible borrowing options, allowing users to borrow various cryptocurrencies with different terms and interest rates based on their individual needs. This flexibility provides users with more control and customization over their borrowing experience. Additionally, the exchange crypto loan service is known for its competitive interest rates, which are often lower than traditional financial institutions. This cost-effectiveness makes it an attractive option for users looking to leverage their cryptocurrency assets without incurring high borrowing costs. Moreover,  platform is designed to provide a seamless and user-friendly experience, making it easy for users to manage their loans, track their borrowing history, and make repayments efficiently. The intuitive interface and comprehensive dashboard enable users to monitor their loan status and manage their assets effectively. Another unique feature of the exchange crypto loan service is its security measures, including robust encryption protocols and secure storage systems to safeguard users' assets and personal information. This commitment to security helps instill trust and confidence among users, ensuring a safe borrowing experience. I like to ask veterans PF in the community on what percentage of your collateral do you loan?
×
×
  • Create New...
us