API Support Forum
OEC API > API Support > Identifying an Exchange
Author Topic: Identifying an Exchange
(3 messages, Page 1 of 1)
Moderators: VPfau
FGingras
Posts: 36
Joined: Oct 15, 2007


Posted: Oct 15, 2007 @ 03:16 PM             Msg. 1 of 3
How do I get a specific exchange ID from the API? (i.e. where can I find an exchange enum with all the Exchange.IDs).

If (oecContract.Exchange.ID == 'the ID for ICE')
//handle ICE orders differently

I would rather use a enum than hard code an exchange string, and I see no such list in the docs anyway.

Thanks,

Francis
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Oct 15, 2007 @ 03:24 PM             Msg. 2 of 3
there is no such enum and there is no guarantee that exchange IDs will not be changed without notice.

You can get current exchange ID using OECClient.Exchanges collection after logging in.
FGingras
Posts: 36
Joined: Oct 15, 2007


Posted: Oct 15, 2007 @ 03:47 PM             Msg. 3 of 3
Hi,

This should be documented somewhere. Please provide me with a list of exchange codes.

Francis