Smart Trade Copier REST API Description

REST API allows to sent signal to any number of Licenses (Follower accounts) by using web, and in case when you can`t run Leader EA in your Metatrader. It supports the following formats: JSON and POST.

URL
Your control panel URL.

Methods
POST – ProcessSignalPost (example: http://panel.easy-copier.com/CommonApi/ProcessSignalPost)
JSON – ProcessSignalJson (example: http://panel.easy-copier.com/CommonApi/ProcessSignalJson)

Variables

  • key – signal source key, you can find it at Signal Sources menu item of Control Panel.
  • signal – enumeration, which includes the following possible values:
    • open – open position or place pending order
    • close – close order by ticket
    • modify – modify order by ticket
    • info – information message, which user sees on chart
    • close_all – close all orders on follower account. This command processes orders which was copied and does not apply to opened by another EA or manually opened orders.
  • type – order operation type. Possible values:
    • buy
    • sell
    • sellstop
    • selllimit
    • buystop
    • buylimit
  • price – order open price, set it to 0 or skip to open order at market price
  • lots – lots volume
  • symbol – name of the financial instrument
  • sl – stoploss option
  • tp – takeprofit option
  • ticket – ticket number
  • diff – price range in pips to open order. If price on Follower account is in range from ( price – diff) to (price + diff), then order is processed
  • message – message which will be displayed on chart. Can be used with ‘info’ signals only.

Error codes
200 – successfully processed
404 – key for signal source is not found
400 – wrong signal format or missed some options

Examples
1.Signal to open buy order at market price for 0.2 lots on EURUSD
POST
key=demo_key&signal=open&type=buy&lots=0.2&symbol=eurusd&ticket=1212
JSON
{
“key”: demo_key,
“signal”: “open”,
“type”: “buy”,
“lots”: 0.2,
“symbol”: “eurusd”,
“ticket”: 1212
}

2. Signal to open sell order at market price for 0.2 lots on GBPUSD on specified price range
POST
key=demo_key&signal=open&type=sell&price=1.5000&lots=0.2&symbol=gbpusd&diff=10&ticket=1212
JSON
{
“key”: demo_key,
“signal”: “open”,
“type”: “sell”,
“lots”: 0.2,
“price”: 1.5000,
“diff”: 10
“symbol”: “gbpusd”,
“ticket”: 1212
}

3. Signal to modify existing order by ticket
POST
key=demo_key&signal=modify&sl=1.4000&tp=1.3000&ticket=1212
JSON
{
“key”: demo_key,
“signal”: “modify”,
“ticket”: 1212
“sl”: 1.4000,
“tp”: 1.3000
}

4. Signal to close all working orders
POST
key=demo_key&signal=close_all
JSON
{
“key”: demo_key,
“signal”: “close_all”
}

5. Signal to show message on chart
POST
key=demo_key&signal=info&message=test message
JSON
{
“key”: demo_key,
“signal”: “info”,
“message”: “test message”
}

Similar Posts