The opinions expressed in these forums do not represent those of C2, and any discussion of profit/loss is not indicative of future performance or success. There is a substantial risk of loss in trading. You should therefore carefully consider whether such trading is suitable for you in light of your financial condition. You should read, understand, and consider the Risk Disclosure Statement that is provided by your broker before you consider trading. Most people who trade lose money.

Webhook to C2 API Signal

Aloha!
I am considering publishing a trade strategy on C2. My strategies are quantitative. My current trading system uses a custom algorithm built on a 3rd party platform that transmits buy/sell signals via webhook. Currently I have this setup to just submit market orders via a relay software I have on AWS server. I can modify the webhook body/message and url for the alert, but the platform only communicates one way (can’t receive a response or do anything with a response).

My question is: Can I use this webhook signal function to hit the submitSignal API call and place trades on a trade manager account? (Collective2 API Documentation - version 3) It looks like I would just need to send a systemid and apikey for authentication in the webhook body along with some data, and a trade would be placed. But, was hoping someone would lean in that is familiar with using the API?

I understand I would essentially still only be placing market orders, and I would have to track positions / manage money in my existing alert software (which is already the case today). However, if it is possible to relay the trades via a webhook to the Collective2 API, it would remove some of the existing moving pieces and reduce the risk involved in my multiple-server-relay system that is placing the trades today. I would also be able to spin-down the AWS server, just relay to my own account through Collective2, and would be TOS certified because of it. If it is possible, seems like it would be a win-win. I was hoping that someone with experience using the API could let me know if this setup is possible or if I am missing something?

I’m not sure that I understand what you’re saying.

Are you saying:

I have a trading system that already places trades into my real-life brokerage account. Can I use that real-life brokerage account to create a Collective2 track record, and have people subscribe to my strategy? If this is your question, then the answer is: yes (if your account is at a compatible broker, such as IB.) To do this, you would use BrokerTransmit.

Now, if you are saying:

I am a software programmer. Can I use the C2 API to send trade signals into C2, in order to build a track record? If this is your question, then the answer is yes. But you need to be able to change your software, or write new software, such that you make correct C2 API calls, as documented.

I apologize if I’m missing entirely your question. Please feel free to re-ask it, or to redirect me.

Hi Matthew,

Thanks for responding. The basis of the question is really if I can have a webhook from a 3rd party platform post a signal to the submitSignal API function and have it create a trade via C2, if the 3rd party platform only communicates one-way (out), and I can only control the URL & body/message of the webhook (trying to get 2 existing softwares to talk to eachother without developing additional software).

My current trade relay path: ChartingPlatform Automated/Coded Strategy → Webhook Signal → AWS Server / Trade Relay Software → InteractiveBrokers IB Gateway API (local program on cloud) → InteractiveBrokers Server → Trade is placed

Path if using broker-transmit: ChartingPlatform Automated/Coded Strategy → Webhook Signal → AWS Server / Trade Relay Software → InteractiveBrokers IB Gateway API (local program on cloud) → InteractiveBrokers Server → Trade is placed → Collective2 Detects Trade → Trade is Relayed (works but not ideal due to quantity of potential break points)

Is this possible? : ChartingPlatform Automated/Coded Strategy → Webhook Signal to Collective2 API → Collective2 Places/Relays Trade

I understand since the communication is one-way, it would have to be market orders. I wanted to know if someone familiar with the API could weigh in on if this was a possible/workable solution (before I consulted with someone that is more familiar with API integrations and I am.)

Yes, this should work:

Of course the devil is in the details. Not sure what you are using for “webhook signal to C2 API” – but presumably whatever you use should be able to generate a custom payload containing your signal (plus API key). The signal will then be published to your C2 strategy.

Back to C2 Platform