memo-padOrders

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:

  1. Server time is 11:05, which means we are trading the 11:00 incomplete bar

  2. The latest signal from the /signals endpoint will have prediction_datetime = 10:00, which represents the lastest complete bar

  3. The signal details in the latest signal (prediction_datetime = 10:00) apply to the end of that bar, so the bar beginning prediction_datetime = 11:00

  4. Therefore the current order data at 11:05 will come from the signal record where prediction_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:

  • direction

  • position_trade_blocks

  • action

Adding to position:

  1. Exchange position is long 12 trade blocks

  2. Latest signal is "position_trade_blocks": 13, "position": "long", "action": "add"

  3. Go long (13 - 12 ) = 1 trade block

Flipping position:

  1. Exchange position is long 12 trade blocks

  2. Latest signal is "position_trade_blocks": 4, "position": "short", "action": "flip"

  3. 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