Orders
Learn how to turn a signal into an order
Understanding Signal Bars
Bars begin at prediction_datetime and the signal information associated with that bar applies to the order for the live/incomplete bar prediction_datetime + 1. The signal information associated with the prediction_datetime bar applies to the end of the bar i.e. the bar beginning prediction_datetime + 1
Example workflow:
Server time is
11:05, which means we are trading the11:00incomplete barThe latest signal from the
/signalsendpoint will haveprediction_datetime = 10:00, which represents the lastest complete barThe signal details in the latest signal (
prediction_datetime = 10:00)apply to the end of that bar, so the bar beginningprediction_datetime = 11:00Therefore the current order data at
11:05will come from the signal record whereprediction_datetime = 10:00
Constructing an Order
Order size should be constructed as the delta between exchange-realized position and the following fields returned by signals endpoint:
directionposition_trade_blocksaction
Adding to position:
Exchange position is long 12 trade blocks
Latest signal is
"position_trade_blocks": 13, "position": "long", "action": "add"Go long (13 - 12 ) = 1 trade block
Flipping position:
Exchange position is long 12 trade blocks
Latest signal is
"position_trade_blocks": 4, "position": "short", "action": "flip"Go short (12 + 4) = 16 trade blocks
Recording Orders
We ask that you POST back your exchange order so that we have an audit trail for your trades:
Please update fill information like price and success .
Stop Loss/Take Profit
We recommend setting stop loss of -10% and take profit of 10% on your orders, scaled by leverage level.
Last updated