public interface IOrderComponent
IOrder
components.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Sends a request to cancel order.
|
double |
getAmount()
Returns amount of the order.
|
java.lang.String |
getComment()
Returns comment for the order.
|
long |
getCreationTime()
Returns creation time.
|
long |
getGoodTillTime()
Returns time when order will be cancelled or 0 if order is "good till cancel".
|
java.lang.String |
getId()
Returns order ID.
|
IEngine.OrderCommand |
getOrderCommand()
Returns
IEngine.OrderCommand of the order. |
void |
setComment(java.lang.String comment)
Sets comment for the order.
|
void |
setGoodTillTime(long goodTillTime)
Sets "good till time" for order.
|
void |
waitForUpdate(long timeoutMills)
Blocks strategy thread (with exception of
IStrategy.onMessage(IMessage) )
until the order changes it's state or any order value gets updated. |
IMessage |
waitForUpdate(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks strategy thread (with exception of
IStrategy.onMessage(IMessage) )
until the order changes it's state or any order value gets updated. |
java.lang.String getId()
long getCreationTime()
IEngine.OrderCommand getOrderCommand()
IEngine.OrderCommand
of the order.double getAmount()
long getGoodTillTime()
void setGoodTillTime(long goodTillTime) throws JFException
By default, may not be called on the same order more often than once per second (exact value of max order update per second is sent by server).
goodTillTime
- time when order should be canceledJFException
- when method fails for some reasonjava.lang.String getComment()
void setComment(java.lang.String comment) throws JFException
By default, may not be called on the same order more often than once per second (exact value of max order update per second is sent by server).
comment
- comment textJFException
- when method fails for some reasonvoid cancel() throws JFException
JFException
- when method fails for some reasonvoid waitForUpdate(long timeoutMills)
IStrategy.onMessage(IMessage)
)
until the order changes it's state or any order value gets updated.
All the ticks, bars and other feed elements that platform receives while waiting get dropped.timeoutMills
- timeout to wait for order state changeIOrder.waitForUpdate(long)
IMessage waitForUpdate(long timeout, java.util.concurrent.TimeUnit unit)
IStrategy.onMessage(IMessage)
)
until the order changes it's state or any order value gets updated.
All the ticks, bars and other feed elements that platform receives while waiting get dropped.timeout
- how long to wait before giving up, in units of unit
unit
- a TimeUnit
determining how to interpret the timeout
parameterIOrder.waitForUpdate(long, TimeUnit)
Copyright © 2024. All rights reserved.