Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Send order to MT5 server

Code Block
POST /odata/TradePlatforms({Id})/NS.MT5DealerSend

Request body should have form:

Code Block
languagejs
{
  "request": {
    "ID": 0,
    "Login": 0,
    "Group": "string",
    "Symbol": "string",
    "Digits": 0,
    "Action": 0,
    "TimeExpiration": 0,
    "Type": 0,
    "TypeFill": 0,
    "TypeTime": 0,
    "Flags": 0,
    "Volume": 0,
    "Order": 0,
    "OrderExternalID": "string",
    "PriceOrder": 0,
    "PriceTrigger": 0,
    "PriceSL": 0,
    "PriceTP": 0,
    "PriceDeviation": 0,
    "PriceDeviationTop": 0,
    "PriceDeviationBottom": 0,
    "Comment": "string",
    "ResultRetcode": 0,
    "ResultDealer": 0,
    "ResultDeal": 0,
    "ResultOrder": 0,
    "ResultVolume": 0,
    "ResultPrice": 0,
    "ResultDealerBid": 0,
    "ResultDealerAsk": 0,
    "ResultDealerLast": 0,
    "ResultMarketBid": 0,
    "ResultMarketAsk": 0,
    "ResultMarketLast": 0,
    "ResultComment": "string",
    "ExternalAccount": "string",
    "IDClient": 0,
    "IP": "string",
    "SourceLogin": 0,
    "Position": 0,
    "PositionBy": 0,
    "PositionExternalID": "string",
    "PositionByExternalID": "string"
  }
}
Code Block
titleEnumerables
-=[ EnTradeActions ]=-
int     string
0       TA_PRICE
0       TA_CLIENT_FIRST
0       TA_FIRST
1       TA_REQUEST
2       TA_INSTANT
3       TA_MARKET
4       TA_EXCHANGE
5       TA_PENDING
6       TA_SLTP
7       TA_MODIFY
8       TA_REMOVE
9       TA_TRANSFER
10      TA_CLOSE_BY
10      TA_CLIENT_LAST
100     TA_SERVER_FIRST
100     TA_ACTIVATE
101     TA_ACTIVATE_SL
102     TA_ACTIVATE_TP
103     TA_ACTIVATE_STOPLIMIT
104     TA_STOPOUT_ORDER
105     TA_STOPOUT_POSITION
106     TA_EXPIRATION
106     TA_SERVER_LAST
200     TA_DEALER_POS_EXECUTE
200     TA_DEALER_FIRST
201     TA_DEALER_ORD_PENDING
202     TA_DEALER_POS_MODIFY
203     TA_DEALER_ORD_MODIFY
204     TA_DEALER_ORD_REMOVE
205     TA_DEALER_ORD_ACTIVATE
206     TA_DEALER_BALANCE
207     TA_DEALER_ORD_SLIMIT
208     TA_DEALER_LAST
208     TA_LAST
208     TA_DEALER_CLOSE_BY
255     TA_END
 
-=[ EnOrderType ]=-
int     string
0       OP_FIRST
0       OP_BUY
1       OP_SELL
2       OP_BUY_LIMIT
3       OP_SELL_LIMIT
4       OP_BUY_STOP
5       OP_SELL_STOP
6       OP_BUY_STOP_LIMIT
7       OP_SELL_STOP_LIMIT
8       OP_CLOSE_BY
8       OP_LAST
 
-=[ EnOrderFilling ]=-
int     string
0       ORDER_FILL_FOK
0       ORDER_FILL_FIRST
1       ORDER_FILL_IOC
2       ORDER_FILL_RETURN
2       ORDER_FILL_LAST
 
-=[ EnOrderTime ]=-
int     string
0       ORDER_TIME_GTC
0       ORDER_TIME_FIRST
1       ORDER_TIME_DAY
2       ORDER_TIME_SPECIFIED
3       ORDER_TIME_SPECIFIED_DAY
3       ORDER_TIME_LAST
 
-=[ EnTradeActionFlags ]=-
int     string
0       TA_FLAG_NONE
1       TA_FLAG_CLOSE
2       TA_FLAG_MARKET
4       TA_FLAG_CHANGED_PRICE
8       TA_FLAG_CHANGED_TRIGGER
16      TA_FLAG_CHANGED_SL
32      TA_FLAG_CHANGED_TP
64      TA_FLAG_CHANGED_EXP_TYPE
128     TA_FLAG_CHANGED_EXP_TIME
256     TA_FLAG_EXPERT
512     TA_FLAG_SIGNAL
1024    TA_FLAG_SKIP_MARGIN_CHECK
2047    TA_FLAG_ALL
 
 

There is nothing to explain at the moment.