Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 08/17/26 19:28
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 15,200 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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: 22
Frankfurt am Main
B
BrainSailor Offline OP
Newbie
BrainSailor  Offline OP
Newbie
B

Joined: Mar 2022
Posts: 22
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: 22
Frankfurt am Main
B
BrainSailor Offline OP
Newbie
BrainSailor  Offline OP
Newbie
B

Joined: Mar 2022
Posts: 22
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