Voyz / ibind

IBind is a REST and WebSocket client library for Interactive Brokers Client Portal Web API.
Apache License 2.0
116 stars 14 forks source link

Where to find the Market Data fields? #23

Closed Tsopic closed 3 months ago

Tsopic commented 3 months ago
subscription_data = {
    'conid': gc_futures[0]['conid'],
    'fields': [
        FIELD_BID_PRICE,
        FIELD_ASK_PRICE,
        FIELD_BID_SIZE,
        FIELD_ASK_SIZE,
        FIELD_LAST_PRICE,
        FIELD_VOLUME,
    ]
}

Saw this example in one of the issues, I've been digging in docs and unable to understand how to bind correct market data fields for the subscription request

Where do I find these values for fields?

Voyz commented 3 months ago

Hey @Tsopic thanks for describing your issue 👍

You can find these here:

https://www.interactivebrokers.com/campus/ibkr-api-page/cpapi-v1/#market-data-fields

Or indirectly in IBind, in ibkr_definitions.py (though note that these are manually typed in and may become out of date at some point):

https://github.com/Voyz/ibind/blob/master/ibind/client/ibkr_definitions.py

Let me know if that helps 👍