numberjuani / ibkr-cp-api-client

Rust Client for Interactive Brokers Client Portal API
MIT License
8 stars 2 forks source link

get_security_definition_by_contract_id uses i32 instead of i64 #3

Closed era127 closed 1 year ago

era127 commented 1 year ago

I'm not sure if this was intentional in the design, but the FuturesContract and Contract models uses i64 for the conid field, whereas get_security_definition_by_contract_id accepts a vector of i32. Therefore, if you do a search by futures by symbol search you receive i64, and then have to change it to i32 when looking up the security definition.

pub async fn get_security_definition_by_contract_id(
        &self,
        contract_ids: Vec<i32>,
    )
    ...
pub struct FuturesContract {
    pub conid: i64,
     ...
numberjuani commented 1 year ago

fixed