It's possible to send mail into MyTrader from outside the platform, from any environment which can make HTTP requests. If you are sending to a mobile device this also generates an iOS/Android push notification, and so you can receive alerts on your phone (or tablet) from external sources.
For example, you can send messages into MyTrader from a huge range of sources, covering everything from a financial model in Microsoft Excel to an EA in the MT4 or MT5 trading platforms.
The examples in this guide use the general-purpose command-line tool
All mail in MyTrader is sent to devices (not to people, or to trading accounts). You need three pieces of information in order to send mail into MyTrader:
The mail ID of your device, which will be an 8-character code such as DMZLXCVG. You can see this by opening the new-mail window in MyTrader, from the Mailbox widget.
Your sender password, which is a long alphanumeric string. You can see this by doing a long tap/click over your ID in the new-mail window. This expands the new-mail window to show extra information.
Your message server. This is also shown when you do the long-tap/click over the ID.
You send mail by making a POST request to the messaging server, with the request body being a block of JSON describing the message. For example, using
curl --url "https://mytrader-messaging.fxbluelabs.com/send?DMZLXCVG" --request "POST" --data-raw "{'password':'C9753B5FA8E5417BA064618AF65E2520', 'subject':'Test message'}"
To confirm, what this example is doing is making a POST request to a URL which consists of three parts:
The message server, such as
The path
Your device ID as the request's querystring:
The body of the POST is then a block of JSON data. As a minimum, it must contain your sender password and a subject line for the message.
The values which you can include in the JSON body, describing the message, are as follows. The
| Property | Description |
| password | The sending password for your device, as described above |
| subject | A subject line for the message (max 200 characters) |
| body | An optional body for the message (max 4KB) |
| to | Recipient ID, if sending a message to another device. If there is no |
| priority | Priority for the message |
| attachment | Attachment data |
| noPush | Turns off any iOS/Android push notification |
You can send mail to other people's devices as well as your own, by setting the
Messages to your own device can have priority. This is ignored if you use the
| Priority | Description |
| 0 | Normal priority |
| 1 | Message is marked in red in the MyTrader mailbox |
| 2 | MyTrader displays a red new-mail icon in its banner until the message has been read |
| 3 | Message is forced to open in the platform (after next log-in, if MyTrader is not currently running) |
The optional message body can be any of three things:
Plain text
HTML - a full HTML document with
The URL of a web page. This must be an https:// page, not http://, and the page must not set the X-Frame-Options header.
For example, the following sends a priority 2 message with the www.fxblue.com website as the content:
curl --url "https://mytrader-messaging.fxbluelabs.com/send?DMZLXCVG" --request "POST" --data-raw "{'password':'C9753B5FA8E5417BA064618AF65E2520', 'subject':'Test message', 'body':'https://www.fxblue.com', 'priority': 2}"
If you are sending to a mobile phone (or tablet), then MyTrader mail generates iOS/Android push notifications by default. You can turn this off by setting
Mail into MyTrader is subject to a quota - for example, a maximum of 60 requests per hour. Messages will be rejected if you try to send too many (including invalid requests such as those missing a subject line, or with a non-existent recipient).
The HTTP status code of the response from the server will be 200 if the message succeeds. If the message fails for any reason, then the status code will be 400. The body of the response from the server is JSON consisting of either one or two values:
| Property | Description |
| success | True/false, indicating whether the message succeeded (duplicating the 200/400 status code of the response) |
| error | If |
Like with messages sent from inside the MyTrader platform in its new-mail window, you can also add attachment data. This works as follows:
You use the Data Transfer widget in MyTrader to download an attachment (a
You open the
You add the attachment data (beginning