CQG API Documentation 4.0 - Revised
How To Get Real-Time Market Data
Send Feedback

Glossary Item Box

Enablements Required:
CQG API Streaming

  1. Create a new project.
  2. Add COM reference to CQG 4.0 Type Library - Revised.
  3. Create the CQGCEL object.
  4. Configure the CQGCEL object using CQGCEL.APIConfiguration.

    If your application is always available to receive CQGCEL events; set CQGAPIConfig.ReadyStatusCheck to rscOff.
    The ReadyStatusCheck is commonly used if the application has compute-intensive work and will not respond promptly or if it is used from MS Excel. In these cases, set CQGAPIConfig.ReadyStatusCheck to rscOn and handle the CQGCEL.IsReady event.

  5. Start the CQGCEL by calling the CQGCEL.Startup method.
  6. Wait for the CQGCEL.CELStarted event. If CQGIC is not started, a CQGCEL.DataError event will be fired, notifying about that.
  7. Handle the CQGCEL.DataConnectionStatusChanged event.
  8. If the CQGCEL.Environment.DataConnectionStatus is csConnectionUp, subscribe to the instrument you want to place orders on using the CQGCEL.NewInstrument method.
  9. When the instrument subscription succeeds, the CQGCEL.InstrumentSubscribed event is fired and a corresponding CQGInstrument object is created in the CQGInstruments collection.
  10. Whenever an update to the instrument is received, a CQGCEL.InstrumentChanged event will be fired with two collections of the updated quotes and instrument properties respectively.