Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 17
Frankfurt am Main
B
BrainSailor Offline OP
Newbie
BrainSailor  Offline OP
Newbie
B

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

Joined: Mar 2022
Posts: 17
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 | chip programmers | 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