mod
Replaces an order
/mod method makes sense only for makers, since taker's orders are processed immediately and a server does not store them.
Please note that in case of replacing a partially filled order the size of a newly replaced order will be less than the specified size by the filled amount (e.g., the size of an initial order was 10; then the order was partially filled and the remaining size was 8; when a user replaces this order, a new size must be 12 if a user wants to have 10 in the order book).
Please also note it is not possible to replace an order by clientOrderId
.
Using /mod
command instead of add/del
is highly recommendable for makers.
POST api/mod
Request parameters
Field name | Type | Description |
---|---|---|
orderId | Efx::OrderId | Id of order to replace |
clientOrderId | Efx::ClientOrderId | Optional user data attached to a new order |
price | Efx::Price | New Price |
size | Efx::Size | Initial size of replace result will be size - (old order initial size - old order remaining size) |
Response description
Field name | Type | Description |
---|---|---|
error | Efx::ErrorCode | Will be returned alongside with |
id | Efx::OrderId | New Order Id |
initialSize | Efx::Size | New Order initial size |
remainingSize | Efx::Size | New Order remaining size (after aggressive deals) |
cancelReason | unsigned int16 | Cancel reason 0 - in place or filled 1 - by client 2 - as non-book order 3 - by self-trade prevention 4 - cancel-on-disconnect |
origId | Efx::OrderId | Original Order Id |
origRemainingSize | Efx::Size | Original Order size on removal |
deals | Array of Deals | Initial (taker) deals |
Deal | Array[6] | |
id | Efx::DealId | Deal Id |
price | Efx::Price | Deal price |
size | Efx::Size | DealSize |
volume | Efx::Size | Deal volume |
delta | Efx::Size | Deal delta in quote (balance) currency |
counterpartyId | Efx::ClientId | Counterparty id |
Last updated