Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 15,922 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
download historical data of expired futures with IB #487083
01/12/23 13:09
01/12/23 13:09
Joined: Mar 2022
Posts: 21
Frankfurt am Main
B
BrainSailor Offline OP
Newbie
BrainSailor  Offline OP
Newbie
B

Joined: Mar 2022
Posts: 21
Frankfurt am Main
Hi,
I am currently downloading futures data with IB. This is working very well with existing (live) futures.

Is there any way of downloading a trade history for expired futures ? IB is offering historical futures data for the last two years (also from expired ones).

The function "assetHistory()" is not returning any historical data for expired futures.
Example of an Asset List:

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Market,Multiplier,Commission,Symbol-2023,Centage,Desc
CL_23F,0,0,0,0,0.01,10,-30,0,1000,0,CLF3-FUT-202301-CL-NYMEX,0,Crude Oil
CL_23G,0,0,0,0,0.01,10,-30,0,1000,0,CLG3-FUT-202302-CL-NYMEX,0,Crude Oil
CL_23H,0,0,0,0,0.01,10,-30,0,1000,0,CLH3-FUT-202303-CL-NYMEX,0,Crude Oil

The download is working well for the CLG3 and CLH3 contract but is not returning any data for the CLF3.

Is there any brokerCommand for downloading historical data for expired contracts, or am I missing something?

The script I am using is very basic:

int Mode = 1;
brokerCommand(SET_PRICETYPE,2);

StartDate = EndDate = 2023;

assetList("AssetsIB_Futures");
for(listed_assets)
assetHistory(0,Mode);

Any help is highly appreciated!
BS

Re: download historical data of expired futures with IB [Re: BrainSailor] #487096
01/16/23 13:38
01/16/23 13:38
Joined: Mar 2022
Posts: 21
Frankfurt am Main
B
BrainSailor Offline OP
Newbie
BrainSailor  Offline OP
Newbie
B

Joined: Mar 2022
Posts: 21
Frankfurt am Main
Just a short follow up if somebody has the same question:

Read the manual again and you'll find the answer wink

FUTX and the expiiry including the expiration day did the trick!


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1