-
Notifications
You must be signed in to change notification settings - Fork 33
CIM: live_trade_table
James Hinton edited this page Dec 18, 2022
·
7 revisions
Captures a live trade for storage in a database.
"strategy": "String defining strategy",
"exchange": "String defining the exchange being used",
"trade_type": "String of the type of trade: BUY / SELL / BUY_STOP / SELL_STOP",
"trade_stage": "Stage of trade: order / position",
"symbol": "String of the symbol",
"volume": "Float of the volume",
"stop_loss": "Float of the stop loss value",
"take_profit": "Float of the take profit value",
"comment": "String of the comment",
"status": "String of the status: CANCELLED / PLACED ",
"price": "Float of the executed price",
"order_id": "String of a unique identifier for the order"
}
## Fields
### strategy
String specifying which strategy initiated trade action
### exchange
String specifying which exchange trade initiated on. Current defined options:
1. *MT5* -> MetaTrader 5 Client
### trade_stage
String specifying the current stage of the order. Options are:
1. order
2. position
### trade_type
String specifying the type of trade initiated. Options available as follows:
#### trade_stage: order
String, including options:
1. *BUY* -> at market buy order initiated
2. *SELL* -> at market sell order initiated
3. *BUY_STOP* -> Buy Stop order initiated
4. *SELL_STOP* -> Sell Stop order initiated
#### trade_stage: position
String including options:
1. *trailing_stop_update* -> trailing stop updated
2. *take_profit_update* -> take profit value updated (applies only when trailing stop not also updated)
### symbol
String of the financial instrument being used. Must comply with relevant trading platform requirements.
### volume
Float of the volume of the financial instrument being purchased. Required for all orders.
### stop_loss
Float of the Stop Loss price for the financial instrument. Required for all orders.
### take_profit
Float of the Take Profit price for the financial instrument. Required for all orders.
### comment
String to include any relevant profits
### status
String of the status of order / position. Options include:
1. placed -> Only applies when order_stage = order
2. canceled -> Applies to all order_stage options
### price
Float of the price being offered. Not used when a MARKET BUY order is executed.
### order_id
String of the unique identifier of the order as used by relevant trading platform.