IB's New automated trading system questionnaire


 

I logged on to my account and found a must complete questionnaire about how I'm monitoring my automated api.  It wanted to know
 
1) Did I write it or is it commercial and if so the vendor?
2) Is the API completely automated?  If not to what extent it is manual?
3) How are critical errors handled (audible alert, email, text)?
4) Is it constantly monitored?
5) and more
 
Apparently it is now being required by regulators.
 
Given that, can anyone point to code that will allow me to send email/texts now that Google and Yahoo are requiring two factor authentication?  I used to send emails and texts when single factor was good enough.
 
Frank


 

Forgot to mention, C++ (2nd choice C#) two factor code for Google or Yahoo sample is preferred.


 

This doesn't exactly answer your question.. but to satisfy those requirements I'm sending a message to a slack channel then have configured that channel to alert me on any new messages. It's free and easy.


 

nullmailer can still work with Gmail "app passwords" if you aren't running a full MTA on your system.


 

There are many ways you can handle this. @wordd already mentioned sending messages to slack channels, for example. All large cloud providers have services that are called something like "Simple Message Service" or so, that allow you to send messages through simple API calls.

If you want to stick with email, check how your email provider supports "SMTP for outgoing messages" and look for an SMTP library for your preferred environment. Your service provider may place various restrictions on email delivered to them by SMTP (such as SSH/TLS encryption or certificates), but generally I would expect that those do not need two-factor authentication.

For Java, for example, you'd use "JavaMail" directly or through higher level libraries such as "Apache Commons Email".

Jürgen

 

On Tue, Dec 17, 2024 at 11:31 PM, Frank Bell wrote:

I logged on to my account and found a must complete questionnaire about how I'm monitoring my automated api.  It wanted to know
 
1) Did I write it or is it commercial and if so the vendor?
2) Is the API completely automated?  If not to what extent it is manual?
3) How are critical errors handled (audible alert, email, text)?
4) Is it constantly monitored?
5) and more
 
Apparently it is now being required by regulators.
 
Given that, can anyone point to code that will allow me to send email/texts now that Google and Yahoo are requiring two factor authentication?  I used to send emails and texts when single factor was good enough.
 
Frank


 

Another option is Telegram. I wouldn't trust too much on email as it's very difficult these days to have your mail accepted by the receiving end as non-spam or not get blocked.

For instant notification, Telegram has been a great option for me. It has  good api documentation. Start here: https://core.telegram.org/

Greetings,
Raoul





On 18-12-2024 18:10, Jürgen Reinold via groups.io wrote:

There are many ways you can handle this. @wordd already mentioned sending messages to slack channels, for example. All large cloud providers have services that are called something like "Simple Message Service" or so, that allow you to send messages through simple API calls.

If you want to stick with email, check how your email provider supports "SMTP for outgoing messages" and look for an SMTP library for your preferred environment. Your service provider may place various restrictions on email delivered to them by SMTP (such as SSH/TLS encryption or certificates), but generally I would expect that those do not need two-factor authentication.

For Java, for example, you'd use "JavaMail" directly or through higher level libraries such as "Apache Commons Email".

Jürgen

 

On Tue, Dec 17, 2024 at 11:31 PM, Frank Bell wrote:
I logged on to my account and found a must complete questionnaire about how I'm monitoring my automated api.  It wanted to know
 
1) Did I write it or is it commercial and if so the vendor?
2) Is the API completely automated?  If not to what extent it is manual?
3) How are critical errors handled (audible alert, email, text)?
4) Is it constantly monitored?
5) and more
 
Apparently it is now being required by regulators.
 
Given that, can anyone point to code that will allow me to send email/texts now that Google and Yahoo are requiring two factor authentication?  I used to send emails and texts when single factor was good enough.
 
Frank


 

 
Once you've set up the appropriate Telegram bot on your Telegram account, sending a message programmatically is pretty easy.  Here's my (redacted) code for that:
 
#!/usr/bin/env python3

import requests


def send_message(text, parse_mode=None):
bf_token = "YOUR_TOKEN_HERE" # replace this your Bot's token
user_id = 1234567890 # replace this with your user id

assert parse_mode in (None, "HTML", "MarkdownV2")

# from BotFather
url = f"https://api.telegram.org/bot{bf_token}/sendMessage"

params = {"chat_id": user_id, "text": text}
if parse_mode:
params["parse_mode"] = parse_mode
resp = requests.get(url, params=params, timeout=3)

# Throw exception if Telegram API fails
resp.raise_for_status()


if __name__ == "__main__":
from sys import argv

if len(argv) <= 1:
i = 50 // 3
MESSAGE = "```\n" + (f"{3 * i}." * i) + "\n```"
else:
MESSAGE = " ".join(argv[1:])

send_message(MESSAGE, parse_mode="MarkdownV2")


 

Thanks to everyone for their suggestions.  I flailed around for longer than I would like to admit before finding a send email solution that works for me.

1) I found out gmail offers something called an "app password" that requires you to use 2-factor authentication and then you can create a password that works with SMTP over port 465.
2) I installed MSVC 2010, changed my email program to use the new password and rebuilt.  (It was easier to use MSVC 2010 than to build with MSVC 2019 which had various complaints.)

Voila, I'm once again able to send emails.  The only ongoing cost will be dealing with gmail's two factor log ins.

Frank


 

I send push notifications to my mobile using an app called pushover. This works great and IB was fine with this solution.