powered by
Enumerated types are used in few places across the API. These are types that can have only a limited set of named constant values.
These functions facilitate the conversion between integer value and string representation.
map_enum2int(enum, name)map_int2enum(enum, value)
map_int2enum(enum, value)
map_enum2int returns the corresponding value.
map_enum2int
value
map_int2enum returns the corresponding name.
map_int2enum
name
name of the enumeration type: e.g. "Condition", "FaDataType", "MarketData", "PriceTrigger".
"Condition"
"FaDataType"
"MarketData"
"PriceTrigger"
string representation of value.
integer representation of name.
map_enum2int("MarketData", "DELAYED") # -> 3 map_int2enum("MarketData", 3) # -> "DELAYED"
Run the code above in your browser using DataLab