• Ask a question
  • Spaces
    • TT® Platform
    • X_TRADER® Platform
    • TT Mobile
    • Charting & Analytics
    • ADL®
    • Autospreader®
    • Autotrader™
    • TT Algo SDK
    • FIX
      • Certification
      • FIX Rules Engine
      • Migrating from 7x
    • Markets & Exchanges
    • MiFID II
    • Options
    • RTD
    • TT API & XT API
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Sign in
  • Home /
  • TT API & XT API /
avatar image
1
Question by danielnaiman · Mar 15, 2017 at 07:05 PM · tt api

TTAPI product instrument lookup code not working

I am trying to get the sample C# code on this page to work:

https://online-help.tradingtechnologies.com/TT_API...

But am getting these two error messages:

No overload for 'pls_Update' matches delegate 'System.EventHandler'

and

No overload for 'ics_InstrumentsUpdated' matches delegate 'System.EventHandler'

I suspect I am missing something very simple. Please advise.

Comment
Add comment
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Zack · Mar 15, 2017 at 07:25 PM

Hello Daniel,

Worry not, the solution is small but it isn't exactly what I would call simple. When assigning a delegate to an API event, you need to pass in a type parameter of the specific type of event args for the event handler.


pls.Update += new EventHandler<ProductLookupSubscriptionEventArgs>(pls_Update);
. . .
ics.InstrumentsUpdated += new EventHandler <InstrumentCatalogUpdatedEventArgs>(ics_InstrumentsUpdated);



Thank you for drawing attention to this. The documentation's code as is does provide code that produces this error. I will reach out about fixing it.


Thanks,
Zack
Comment
Add comment Show 2 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image danielnaiman · Mar 15, 2017 at 07:55 PM 0
Share

That solved it.

Many thanks Zack!

Dan

avatar image Zack ♦ danielnaiman · Mar 15, 2017 at 08:00 PM 0
Share

Glad to hear that that helped. I should have also mentioned that you can see all functionality in action if you download our C# Samples and checkout the 12_MarketExplorer sample.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Community

Ask questions and share ideas about the TT® and X_TRADER® platforms.

First time here? See our Getting Started Guide and FAQs.

Follow

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

XTrader orders in the TTAPI 1 Answer

Correlating InstrumentLookupSubscription with InstrumentLookupSubscriptionEventArgs 2 Answers

Is there a way to pull account PnL/balances with the TT API or XT API 2 Answers

TTAPI OrderFeed Declaration 1 Answer

Underlying instrument for option contracts 1 Answer

Trading Technologies Home - Legal - Privacy - Contact

© 2017 Trading Technologies International, Inc. All rights reserved.

Powered by AnswerHub

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Post an idea
  • Create an article
  • Spaces
  • TT® Platform
  • X_TRADER® Platform
  • TT Mobile
  • Charting & Analytics
  • ADL®
  • Autospreader®
  • Autotrader™
  • TT Algo SDK
  • FIX
    • Certification
    • FIX Rules Engine
    • Migrating from 7x
  • Markets & Exchanges
  • MiFID II
  • Options
  • RTD
  • TT API & XT API
  • Explore
  • Topics
  • Questions
  • Ideas
  • Articles
  • Users
  • Badges