6.4 Orders Messages
Available message types:
6.4.1 order: an order has been placed or updated
This is sent when a new order has been placed, either by the current customer, or by another customer in the current MollyBet group (only if spy_on_group
is enabled). It is also sent whenever any of the fields of the order, such as status, changes value.
The message consists of an order structure in the same format as order-structure, except that the bets field is omitted (since a separate bet async message is provided, see async_bet).
An exchange_order
field will be present if the order has any stake allocated to the MollyBet exchange subject
to an in-running delay; this is analogous to a bet in placing
status. At the end of the delay, this stake will be
matched against other orders on the exchange and you will be notified of any resulting bets (from the "molly" bookie)
as usual via the async_bet message. This field has the following structure:
want_price [ float ]:
The price requested from the exchange.
want_stake [ list[string, float] ]:
The stake requested to match on the exchange, in [currency code, amount] format.
execution_time [ ISO 8601 datetime string ]:
The date and time at which matching will take place.
Example:
{
"want_price": 2.085,
"want_stake": ["EUR", 14.50],
"execution_time": "2016-09-27T14:16:19.719478+00:00"
}
6.4.2 bet: bet placed or updated
Either a new bet has been placed, for the specified order, or the data of a bet already existing in the order is being replaced with new data.
Properties of a bet that may be updated include the status
(for example, if a pending bet fails to land), got_stake
(if the bookie gives us less stake than we originally requested), profit_loss
when the bet becomes settled or reconciled, etc.
The fields of this message are the same as in bet-structure.