You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is it that when I run the function 'fetch_historical_prices_by_epic_and_date_range()' I sometimes get a return that looks like this:
MultiIndex([( 'bid', 'Open'),
( 'bid', 'High'),
( 'bid', 'Low'),
( 'bid', 'Close'),
( 'ask', 'Open'),
( 'ask', 'High'),
( 'ask', 'Low'),
( 'ask', 'Close'),
('last', 'Open'),
('last', 'High'),
('last', 'Low'),
('last', 'Close'),
('last', 'Volume')],
)
And sometimes like this:
MultiIndex([('bid', 'Open'),
('bid', 'High'),
('bid', 'Low'),
('bid', 'Close'),
('ask', 'Open'),
('ask', 'High'),
('ask', 'Low'),
('ask', 'Close')],
)
I always call this function the same way in my code. It seems to be a random principle. What could be the reason for this?
This example doesn't provide Volume. I have tried version=1 and version=2. epic = 'IX.D.DAX.IFMM.IP' resolution = '30MIN' current_date_str = '2024-02-23T22:30:00' next_date_str = '2024-02-26T17:30:00' response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic=epic, resolution=resolution, start_date=current_date_str, end_date=next_date_str, version='1')
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all!
Why is it that when I run the function 'fetch_historical_prices_by_epic_and_date_range()' I sometimes get a return that looks like this:
MultiIndex([( 'bid', 'Open'),
( 'bid', 'High'),
( 'bid', 'Low'),
( 'bid', 'Close'),
( 'ask', 'Open'),
( 'ask', 'High'),
( 'ask', 'Low'),
( 'ask', 'Close'),
('last', 'Open'),
('last', 'High'),
('last', 'Low'),
('last', 'Close'),
('last', 'Volume')],
)
And sometimes like this:
MultiIndex([('bid', 'Open'),
('bid', 'High'),
('bid', 'Low'),
('bid', 'Close'),
('ask', 'Open'),
('ask', 'High'),
('ask', 'Low'),
('ask', 'Close')],
)
I always call this function the same way in my code. It seems to be a random principle. What could be the reason for this?
This example doesn't provide Volume. I have tried version=1 and version=2.
epic = 'IX.D.DAX.IFMM.IP' resolution = '30MIN' current_date_str = '2024-02-23T22:30:00' next_date_str = '2024-02-26T17:30:00' response = ig_service.fetch_historical_prices_by_epic_and_date_range(epic=epic, resolution=resolution, start_date=current_date_str, end_date=next_date_str, version='1')
But when i try the same request with https://labs.ig.com/sample-apps/api-companion/index.html, the response is correct.
Many thanks for any help :-)
Best regards
Dominik
Beta Was this translation helpful? Give feedback.
All reactions