Python API detection

 

HI all, a general question on the python API and more specifically propfirms.

I was wondering if the brokerside is able to see that a Python API is being used to place trades - I'm currently in the process of passing propfirms which do not allow the use of EA's/ require their mql5 source code to be sent. I prefer not to share my proprietary work and would instead be interested to see what sort of metadata the python API leaves behind on the brokerside

Thanks

[Deleted]  

ENUM_DEAL_REASON

Identifier

Description

DEAL_REASON_CLIENT

The deal was executed as a result of activation of an order placed from a desktop terminal

DEAL_REASON_MOBILE

The deal was executed as a result of activation of an order placed from a mobile application

DEAL_REASON_WEB

The deal was executed as a result of activation of an order placed from the web platform

DEAL_REASON_EXPERT

The deal was executed as a result of activation of an order placed from an MQL5 program, i.e. an Expert Advisor or a script

DEAL_REASON_SL

The deal was executed as a result of Stop Loss activation

DEAL_REASON_TP

The deal was executed as a result of Take Profit activation

DEAL_REASON_SO

The deal was executed as a result of the Stop Out event

DEAL_REASON_ROLLOVER

The deal was executed due to a rollover

DEAL_REASON_VMARGIN

The deal was executed after charging the variation margin

DEAL_REASON_SPLIT

The deal was executed after the split (price reduction) of an instrument, which had an open position during split announcement

DEAL_REASON_CORPORATE_ACTION

The deal was executed as a result of a corporate action: merging or renaming a security, transferring a client to another account, etc.


Possibly in your case DEAL_REASON_EXPERT is detected. Anyway my suggestion is printing the DEAL_REASON of the deal sent by the python code(by handling onTradeTransaction event) and print it in the terminal for investigation.

[Deleted]  
Note: They have cleverer methods to detect you cheating. Even they can say you cheated while you did not cheat at all. It depends on whether you are trading well or not. My experience says even if you cheat they won't say anything because you are a customer of their product. However if they find out you are not an easy looser they can say you cheated even if you did not. 
 
I’ve dealt with the same issue running algos on my funded prop accounts. From what I’ve seen, brokers can sometimes tell if orders are coming from an Expert Advisor versus a regular terminal or mobile app, mostly from how the order’s metadata is flagged (like DEAL_REASON_EXPERT). They probably don’t see that it’s Python specifically, but they can usually see if it’s automated unless you really mimic manual trading behavior closely. I’ve had prop firms request source code in the past too, but honestly, I hate sharing any of my proprietary stuff.

 
0719479865 #:
I’ve dealt with the same issue running algos on my funded prop accounts. From what I’ve seen, brokers can sometimes tell if orders are coming from an Expert Advisor versus a regular terminal or mobile app, mostly from how the order’s metadata is flagged (like DEAL_REASON_EXPERT). They probably don’t see that it’s Python specifically, but they can usually see if it’s automated unless you really mimic manual trading behavior closely. I’ve had prop firms request source code in the past too, but honestly, I hate sharing any of my proprietary stuff.

I got around these headaches by looking for an API for prop firm accounts that doesn’t tie you to MQL or run an EA at all. Made my setup way easier without bothering with code disclosures or worrying about being flagged for automation.
 
I would assume automated orders can be detected and not build the setup around hiding it. Python API still sends orders through the MT5 terminal, and the broker or prop firm can also identify automation from order reason, timing and repeated execution pattern. Best is to ask the firm in writing whether Python/API trading is allowed and keep their answer. If their rules ban all automation, changing the connection method does not make it compliant
 
No, the broker cannot see that you’re using Python specifically. They only see the order itself — price, volume, time, magic number, and comment.