LmaxClientLibrary
Contains all of the information about a users account that is received in
in response to a login request.
Create a new object representing the user's account
The unique ID of the account
The username
The base currency of the account
The legal entity the account is based in, e.g. UK, Germany etc
The Locale used for displaying information (i.e. language)
True if the account is enabled for funding
Readonly, the numeric system accountId.
The username used to login to the LMAX Trader platform.
The user's base currency.
The legal entity where the user is located, e.g. UK.
The locale used to display text, mainly used by the UI to handle
internationalisation.
If funding is enabled for the account.
A event that contains all of the top level information about an account's
current state.
Construct an AccountStateEvent, visible for testing
Get the account id that this event pertains to.
Get the accounts current balance.
Get the account's available funds.
Get the amount that this account is available to withdraw.
Get a signed amount that is the account's unrealised profit (or loss)
Get the account's total margin.
Get the account's balances by currency. The Dictionary is keyed by
3 letter currency symbol, e.g. GBP.
A request for the current account state
Common base type for all requests.
Internal: Output this request.
The destination for the request content
Readonly property containing the URI for the request.
Internal: Output this request.
The destination for the content of this request
Subscribe to all requests for account information.
Base subscription request.
Base interface for all subscription requests.
Internal: Output this request.
The destination for the request content
Readonly property containing the URI for the request.
Request a heartbeat event be returned from the server.
Creates a new Heartbeat request
Internal: Output this request.
The destination for the content of this request
Subscribe to all requests for heartbeats.
Constructs an LmaxApiOptions object with default values of:
DefaultConnectionLimit = 5
ClientIdentifier = ""
Constructs an LmaxApiOptions object with default values of:
DefaultConnectionLimit = 5
Identifies the client in HTTP requests for diagnostic purposes (25 characters permitted).
Gets or sets the ClientIdentifier, used to identify the client in HTTP requests for diagnostic purposes (25 characters permitted).
Gets or sets the maximum number of concurrent connections allowed by a System.Net.ServicePoint object per login.
Note: the larger the value, the more resources used by the API (more sockets openened, threads created, etc.)
Contains a of the necessary credential information and product type required
connect to the LMAX Trader platform.
Internal: Output this request.
The destination for the content of this request
The URI for the login request.
Generalised failure response that is produced whenever a request to the API
is made. Indicates the failure response and a descriptive message along with
a flag to indicate if this is a system failure (e.g. connection error) or an
application failure (e.g. invalid price).
Constructs a failure response object with all values.
True if the problem is with the system, e.g. a network problem
Short message of the failure
Readable description of the problem
The captured Exception
Constructs a failure response object
True if the problem is with the system, e.g. a network problem
Short message of the failure
Constructs a failure response object
Readable description of the problem
The captured Exception
A readonly property that indicates that this failure was caused
by some sort of system failure, most likely a connection error.
A readonly property that contains the error message that occured.
A readonly property that a more user friendly description of the error, may be
an empty string.
A readonly property that holds an exception, if this failiure was caused by
an exception. Will be null otherwise.
The main interface for interacting with the Lmax Trader platform. This interface
can be shared across multiple threads.
Subscribe to the events from an OrderBook. This includes Market Data, i.e. changes
to the current best prices and the depth
An indicating the types of events to subscribe to.
An that will be called if the subscription request is
successful.
An that will be called if the request fails, a
will be provided containing the details of the failure.
Place a market order onto the Lmax Trader platform. This will response with an instruction id that can
be used to trace the state of an order. The response to this call will be return before the
order is actually placed on the exchange. The execution reports and order responses will
come back through an asynchronous event.
The specification of the market order to be placed
contains instrumentId, quantity etc.
A called when an order has
been validated and passed onto the broker.
A called if the call to place
the order has failed.
Place a limit order onto the Lmax Trader platform. This will respond with an instruction id that can
be used to trace the state of an order. The response to this call will occur before the
order is actually placed on the exchange. The execution reports and order responses will
come back through an asynchronous event.
The specification of the market order to be placed
contains instrumentId, quantity etc.
A called when an order has
been validated and passed onto the broker.
A called if the call to place
the order has failed.
Close the specified quantity on an instrument position. The response to this call will occur before the
order is actually placed on the exchange. The execution reports and order responses will come back
through an asynchronous event.
The specification containing the details of which position to close and for what quantity
A called when an order has
been validated and passed onto the broker.
A called if the call to close the order has failed.
Place a stop order onto the Lmax Trader platform. This will response with an instruction id that can
be used to trace the state of an order. The response to this call will be return before the
order is actually placed on the exchange. The execution reports and order responses will
come back through an asynchronous event.
The specification of the stop order to be placed
contains instrumentId, quantity etc.
A called when an order has
been validated and passed onto the broker.
A called if the call to place
the order has failed.
Cancel an order that has already be placed in the exchange. This will need the instruction id of
the original order. This request will also have its own instruction id which can be used to
trace an rejections of the cancellation.
An order cancellation request containing the original orders
instruction id
A called when an order has
been validated and passed onto the broker.
A called if the call to place
the order has failed.
Amend the stop loss and/or profit on an existing order.
An amend order request containing a reference
to the original order and the new stop loss/profit offsets
A called when the amendment has
been validated and passed onto the broker.
Will be called when the attempt to amend order fails. For further details
Request an update of the account state. This will get the Lmax Trader platform to push an update
of the account state back down the stream event channel. It will not be returned directly.
Use the AccountStateUpdated event to receive the update.
The request for account state
A called if the call to
request the account state has failed.
Get the historic market data for a specific instrument. Will return a list of URLs that point to
to CSV files that include the months that were requested.
The request for historic market data, will contain an instrument id
and a date range
A called if the request is accepted and is being processed.
A called if the call to
request the historic market data has failed.
Request that the server sends back a heartbeat event with the specified token.
The request for a heartbeat.
A called if the request is accepted and is being processed.
A called if the call to
request the heartbeat has failed.
Request the instruments. The instruments will not returned in this call, but will
cause the system to generate an asynchronous event(s) containing the information.
Instrument information is paged, on the callback will be a boolean value indicating
if there are any more values to be received. The last instrumentId should be used
as the offsetInstrumentId on the subsequent request. The results will be returned
ordered by instrument name.
The request for instruments
Will be called if the request succeeds.
A called if the call to
request the instruments has failed.
Open a data url from the Lmax Trader platform.
The uri of the file to open
Will be called if the request succeeds.
A called if the call fails.
Starts the event processing loop. This method blocks while it is reading events from
asynchronous stream interface. This method should be the very last action from within
the callback. The implementation will prevent this method from
being called more than once. It is not vaild to call this method multiple times from
different threads.
Stops the event processing loop.
Logout from the exchange.
You should stop listening to events first.
Will be called when the logout request suceeds.
Will be called when the logout request fails.
Readonly property contain the details of the users Account, id, locale etc.
Readonly property containing the web session id assigned to this session.
Fired whenever an order book event that represents a change in the market data
occurs. Orderbooks need to be subscribed to before events will be fired.
A market data change includes changes to the best price and the depth.
Fired whenever an order book event that represents a change in the order book
status occurs. Use an OrderBookStatusSubscriptionRequest to subscribe to these
events.
Fired whenever an Exception occurs while reading from the event stream. This could
occur, for example, due to the connection being dropped.
Fired whenever the session was disconnected on the server and the event stream closed.
The session can no longer be used. In order to continue, a new session must be created by logging in again.
Fired whenever a position changes, normally the result of a new order, fill
cancel etc.
Fired when a execution occurs as the result of an action that occurs on
an order, e.g. order filling.
Fired when there is a change to the state of an order
Fired when an instruction id rejected.
Fired when an account state event is received. May be the result of
a request. Use an AccountSubscriptionRequest to subscribe to AccountStateEvents.
Fired when the requested historic market data is received.
Use RequestHistoricMarketData to request historic market data.
Fired when a heartbeat is received.
Use RequestHeartbeat to request a heartbeat be sent.
logout from the exchange.
You should stop listening to events first.
Will be called when the logout request suceeds.
Will be called when the logout request fails.
Internal: Output this request.
The destination for the content of this request
Simple delegate for successful asynchronous call.
Standard failure delegate for asynchronous calls.
Contains the details of the failure
Delegate for a successful login to the LMAX API. Implementations can then use the session to interact with the API.
The session to use when interacting with the API
Delagate for processing OrderBookEvents. Events for all order books that have been subscribed to will be delivered to this delegate.
Details of the order book event fired
Delagate for processing order book status events. Events for status changes of all order books that have been subscribed to will be delivered to this delegate.
Details of the order book status event fired
Delegate to handle Exceptions
The exception that occurred
Delegate for session disconnected. The session can no longer be used. In order to continue, a new session must be created by logging in again.
Delegate to handle a response containing an instructionId - most usually in response to place/cancel/amend order requests
The instructionId returned by the LMAX API
Delegate for processing events on all positions that have been subscribed to
Contains details of the updated position
Delegate to deal with executions - for example, if an order has filled
The information about the execution that occurred
Delegate to process changes in an order.
The updated Order
If an instruction (for example, placing an order) is rejected, this delegate will be called.
An OnRejectionEvent delegate must be registered for the client to process rejections.
Details of why the instruction was rejected
Delegate for dealing with updates to the user's account, for example if the account balance changes.
The updated account state
Delegate that is called when historic market data events are received asynchronously.
Note that the provided URIs require a valid authentication token which can be retrieved
from .
the ID of the instruction that requested this data.
the URIs to the historic market data covering the requested date range.
Empty if there is no data available for the requested date range.
Delegate that is called market data asynchronous request is returned.
Note that the provided URIs require a valid authentication token which can be retrieved
from .
the ID of the instruction that requested this data.
the URIs to the market data covering the requested date range for the requested criteria.
Empty if there is no data available for the requested date range.
Delegate that is called when an asynchronous heartbeat event is received.
the heartbeat token from the request that caused this heartbeat to be sent.
Delegate called when the search for instruments returns. This returns a batch of instruments,
if the full number of search results is bigger than the batch size, the returned list will only
contain a subset of the results, and hasMoreResults will be true.
A batch of search results. If the full list of results is longer than the
batch size, this will be a partial set of results.
Set to true if there are more results to retrieve
Delegate called when the open uri request returns.
The uri requested
The response content
The time in force policy applicable to orders.
An order with this value must fill completely, or it will be cancelled.
An order with this value must fill, but it can partially fill
Represents a limit order, which can be completely unmatched and will not be cancelled until the end of the day
Represents a limit order, which can be completely unmatched and will not be cancelled until manually cancelled
Represent an unknown time in force value. This is a safety value which will be returned if a new time in force
is added to the underlying protocol which the .NET API does not understand.
The Top-Level interface for the Lmax API. Provides the Login entry point, most
of the heavy lifting occurs within Session, so most of the interations with
the Lmax Trader platform happen through the .
Internal: Exposed for testing, use LmaxApi(string urlBase) instead.
Construct an LmaxApi with the specific Lmax Trader platform to connect to.
For testing: 'https://testapi.lmaxtrader.com' and production: 'https://api.lmaxtrader.com'.
A that contains the url of the system to connect to.
Construct an LmaxApi with the specific Lmax Trader platform to connect to.
For testing: 'https://testapi.lmaxtrader.com' and production: 'https://api.lmaxtrader.com'.
A that contains the url of the system to connect to.
Identifies the client in HTTP requests for diagnostic purposes (25 characters permitted).
Construct an LmaxApi with the specific Lmax Trader platform to connect to.
For testing: 'https://testapi.lmaxtrader.com' and production: 'https://api.lmaxtrader.com'.
A that contains the url of the system to connect to.
Allows for configuration of the LmaxApi.
Login to the Lmax Trader platform. The appropriate handler will be called back
on success or failure. The loginCallback should be the main entry point into
your trading application. From that point you should add listeners to the
session, subscribe to resources that you're interested in, e.g. OrderBooks
and call Start on the .
A that contains your login credentials.
A callback, fired when you are successfully logged in.
A callback, fired when there is a login failure.
Contains the necessary credential information and product type required
connect to the LMAX Trader platform.
Construct a login request with the appropriate credential, product type and choose whether or not check the protocol version.
A contains the username.
A contains the password.
A either CFD_DEMO for testapi and CFD_LIVE for
production.
A to ensure that the protocol version used by the client and server are the same.
Setting this to false may cause errors or incorrect behaviour due to protocol changes.
Construct a login request with the appropriate credential and product type.
A contains the username.
A contains the password.
A either CFD_DEMO for testapi and CFD_LIVE for
production.
Construct a login request with the appropriate credential.
Product type will default to CFD_LIVE.
A contains the username.
A contains the password.
Internal: Output this request.
The destination for the content of this request
The URI for the login request.
The product type used to connect to the LMAX Trader platform.
Selected if connecting to the production environment
Selected if connecting to the test environment
A request for market data.
Marker interface for the different types of requests for historic market data.
Request market data for a given instrument, for a given date range and in a given format. The data returned will be for at least the requested date range.
For example, if the user asks for 10 days of data they might get a response containing a whole month, but those 10 days will be contained in the month.
A unique ID to identify this request
The ID of the instrument to return the market data for
The date and time of the start of the range
The date and time for the end of the range
Granularity - e.g. tick/minute/day
Protocol - e.g CSV, ITCH
The type of prices to be returned
Internal: Output this request.
The destination for the content of this request
Defines the different types of data that can be returned.
Bid Prices
Ask Prices
The format the historic market data is returned in.
Comma Separated Values, not a fixed format, the columns will be different according to the different types of data returned.
The time period the data will be aggregated over.
Request historic order book prices and quantities
Request historic prices and quantities for the given order book
Unique ID for this request
The ID of the instrument to return the data for
The date and time of the start of the range
The date and time for the end of the range
Protocol - e.g CSV, ITCH
Internal: Output this request.
The destination for the content of this request
Used when subscribing to the order book status events.
Construct the OrderBookStatusSubscriptionRequest.
A that is the instrument id of the
order book that you are intrested in seeing status events for.
The contents of the event raised whenever there is a change to the
status of a given order book.
Instrument id of the OrderBook. Same as the value used in subscribing.
Current status of the order book.
The product type used to connect to the LMAX Trader platform.
The order book has been newly created.
The order book is accepting orders.
The order book is temporarily not accepting orders.
The order book is closed and waiting to be opened.
The trades on the order book have been settled.
The order book is no longer trading.
Types of historical data that can be requested.
HistoricContentType for requesting historical market depth.
Used when subscribing to the events containing historic market data responses.
Internal: Output this request. Can't use the Abstract Subscription Request because it needs to append two separate subscriptions.
The destination for the request content
Readonly property containing the URI for the request.
Contains the meta-data for an instrument (Security Definition)
Create a new instrument (e.g. security definition)
The unique identifier of the instrument
The readable name of the instrument
The information about the underlying instrument
Contains information about trading dates and times
Details on how to calculate risk for this instrument
Information relating to the order book
The contract information about this instrument
Data to calculate the commercials for this instrument
Determines if this instrument is the same as another one.
An instrument to compare this instance to
true if the given instrument is the same as this instrument
Get the id of the instrument, also used a key for the order book on
order requests, etc.
Get the name of the instrument, this is same value that is displayed
on the Lmax Trader UI.
Get information about the underlying instrument.
Get all date and time related information for the instrument.
Get all of the information relating to risk for this instrument.
Get information relating the behaviour of the order book.
Get information relating to the contract for this instrument.
Get information relating to the commerical aggrements for this instrument.
The underlying asset of the traded instrument, contain information
such as symbol, asset class etc.
Get the text symbol used for the instrument.
Get the ISIN of the underlying instrument.
Get the asset class of the underlying.
Contains all of the information relating to dates and times during
which the instrument is tradeable.
Get the start time of the instrument, this is the time that the instrument
will first be available to trade.
Get the DateTime the instrument will expire, mostly relevant for instruments
like futures that only exist for a limited time.
Get the time of day that the market will open (in time zone specified)
by this object.
Get the time of day that the market will close (in time zone specified)
by this object.
Get the timezone in which this calendar operates.
Get the days of week that the market is open.
Holds the Risk elements for the instrument.
Get the margin rate as a percentage for this instrument.
Get the maxium position that can be held by a retail user on
this instrument.
Holds information related to the behaviour of the order book.
Get the price increment in which orders can be placed, i.e. the
tick size.
Get the quantity increment in which orders can be placed.
Get the retail volatility band for the order book, this limits how
far from the spread an order can be placed.
Holds the information about the contract for this instrument.
Get the currency this instrument is traded in.
Get the price for a single contract unit.
Get the name of the units being traded, e.g. barrels of oil, US dollars
Get the contract size.
Hold information pertaining to the commerical detail of this instrument.
Get the minimum commision applied for a trade on this instrument.
Get the aggressive commission rate, may be null if commission is
charged per contract. The commission charge when the order is
on the aggressive side of the trade.
Get the passive commission rate, may be null if commission is
charged per contract. The commission charge when the order is
on the passive side of the trade.
Get the aggressive commission per contract, may be null if commission is
charged using a rate. The commission charge when the order is
on the aggressive side of the trade.
Get the passive commission per contract, may be null if commission is
charged using a rate. The commission charge when the order is
on the passive side of the trade.
Get the base rate used for funding this instrument.
Get the number of days per year used to calculate the daily
interest charged for funding.
Get the rate used for overnight funding.
Get the percentage premium added to the funding base rate for overnight funding of long positions on non-FX instruments.
Get the percentage reduction applied to the funding base rate for overnight funding of short positions on non-FX instruments.
Get the swap points used to calculate overnight interest swap charges for long positions on FX instruments.
Get the swap points used to calculate overnight interest swap charges for short positions on FX instruments.
The contents of the event raised whenever there is a change to the
market data for a given order book.
Readonly property to determine if this OrderBook has a valuation bid price.
This will only be set if the particalur instrument has been traded.
Readonly property to determine if this OrderBook has a valuation ask price.
This will only be set if the particalur instrument has been traded.
Readonly value of the valuation bid price for the OrderBook
Readonly value of the valuation ask price for the OrderBook
The timestamp as number of milliseconds since unix time epoch (1st January 1970) when the market data was updated
inside of the exchange.
List of all of the bid prices for an order book. The best price
will be at index 0. If there is no liquidity in the market this
list will be empty.
List of all of the bid prices for an order book. The best price
will be at index 0. If there is no liquidity in the market this
list will be empty.
Instrument Id of the OrderBook, same as the value used in subscribing
Indicate if a Last Market Close Price is available
The Market Close Price for the previous trading session.
Timestamp as number of milliseconds since unix time epoch (1st January 1970) of the market close of the previous trading session.
Indicate if a last traded price is available.
The price of the last trade that occured on this OrderBook.
Indicate if a Highest Daily Traded Price is available, could be false
if there have be no trades in the current session.
The highest price at which a trade occured in this trading session.
Indicate if a Lowest Daily Traded Price is available, could be false
if there have be no trades in the current session.
The lowest price at which a trade occured in this trading session.
Used when subscribing to the events for an OrderBook
Construct the OrderBookSubscriptionRequest.
A that is the instrumentId of the
OrderBook that you are intrested in seeing events for.
Representation of that quantity at a particular price. Used in
the to represent market data.
Creates a new PricePoint
The quantity
The price
Compares this PricePoint to another one
The PricePoint to compare this to
True if this PricePoint is equal to the second
Readonly price.
Readonly quantity.
A request to get the system to push out a group of security definitions.
Construct a request for a security definition. Uses a query string that
provides flexible query mechanism. There are 2 main forms of the query string
to find a specific instrument the "id: (instrumentId)" form can be used.
To do a general search, use a term such as "CURRENCY", which will find
all of the currency instruments. A search term like "UK" will find all
of the instruments that have "UK" in the name.
Construct a request for a security definition. Uses a query string that
provides flexible query mechanism. There are 2 main forms of the query string
to find a specific instrument the "id: (instrumentId)" form can be used.
To do a general search, use a term such as "CURRENCY", which will find
all of the currency instruments. A search term like "UK" will find all
of the instruments that have "UK" in the name.
Internal: Output this request.
The destination for the content of this request
Request to amend stop loss/profit on an existing order.
Construct an AmendStopLossProfitRequest using the instrument id and the instruction id
of the original order.
The instrument id that the original order was placed on.
The instruction id used to correlate requests with responses.
The instruction id of the original order we want to amend.
The new stop loss offset, use null to
indicate the value should be removed.
The new stop profit offset, use null to
indicate the value should be removed.
Internal: Output this request.
The destination for the content of this request
Request to cancel an order.
Construction and request to cancel an order.
The instruction id used to correlate requests with responses
The instrument id of the OrderBook that received the original order.
The instruction id of the original order.
Internal: Output this request.
The destination for the content of this request
Closing Order Specification. Allows you to place an order which closes out a given quantity,
either against an instrument position, or against a specific order.
Construct a ClosingOrderSpecification. This allows you to close a quantity of your position on a given instrument by
placing a market order in the opposite direction of your existing position.
The user-defined correlation id
The id of the instrument for the order book to close position on
The quantity to close. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a sell
Construct a ClosingOrderSpecification. This allows you to close a quantity of your position on a given instrument by
placing a market order in the opposite direction of your existing position.
The user-defined correlation id
The id of the instrument for the order book to close position on
the instruction ID of the original order to close
The quantity to close. A signed value, where the sign indicates the side of the
market that order is placed. Positive implies a buy order, where as negative is a sell
Internal: Output this request.
The destination for the content of this request
Get/Set the instruction id use for tracking the order.
Get/Set the instrument id that the order should be placed on.
Get/Set the of the order, the sign infers the side of the order.
A positive value is a buy, negative indicates sell.
Get/Set the original instrument id that this specification refers to
Results of a action on the exchange the affects an order.
Exposed for testing
Get the execution id, which is the key for this execution. It is
unique within an order book.
Get the price at which the execution took place.
Get the size of the execution.
Get the order that this execution affected.
Get quantity of the order that was cancelled in this execution.
Request to subscribe to execution events.
Limit order request. Can be reused, but the instructionID needs to be reset every time it is submitted.
Base class for all order specifications.
Internal: Output this request.
The destination for the content of this request
Get/Set the instruction id use for tracking the order.
Get/Set the instrument id that the order should be placed on.
Get/Set the of the order, the sign infers the side of the order.
A positive value is a buy, negative indicates sell.
Get/Set the stop loss offset for the order, null to indicates that
the order does not have a stop less.
Get/Set the stop profit offset for the order, null to indicates that
the order does not have a stop profit.
Get/Set the for the order.
Construct a Limit Order that contains a stop loss and/or stop profit price offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The price for the order to be placed into the book if not aggressively filled.
The size of the limit order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the behaviour of the order
if not fully filled
The stop loss offset, set this to null to not specify a stop loss.
The stop profit offset, set this to null to not specify a stop profit.
Construct a Limit Order that does not contains a stop loss and/or stop profit price offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The price for the order to be placed into the book if not aggressively filled.
The size of the limit order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the behaviour of the order
if not fully filled
Get/Set the price of the order, allows order instance to be reused.
Market order request. Can be reused, but the instructionID needs to be reset every time it is submitted.
Construct a Market Order that contains a stop profit and/or stop loss offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The size of the market order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the behaviour of the order
if not fully filled
The stop loss offset, set this to null to not specify a stop loss.
The stop profit offset, set this to null to not specify a stop profit.
Construct and Market Order Specification that does not contain a stop profit or stop loss offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The size of the market order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the behaviour of the order
if not fully filled
The order as represented on the exchange
Get the id of the instruction that placed the order. Can be used to
correlate with the original request.
Get the id of the order.
Get the id of the instrument on which the order was placed.
Get the id of the account that placed the order.
Get the type of the order.
Get the quantity of the order.
Get the quantity of this order that has filled.
Get the limit price for this order, will be null if this is not
a limit order.
Get the stop price for this order, will be null if this is not
a stop order.
Get the quantity of this order that has been cancelled.
Get the distance from the StopReferencePrice at which the stop loss order trigger will be placed.
Will be null if no stop loss requested for this order.
Get the distance from the StopReferencePrice at which the stop profit order will be placed.
Will be null if no stop profit requested for this order.
The price relative to which stop loss and stop profit prices will be calculated.
Will be null for unmatched market orders.
The commulative commssion that you have aleady been charged for this order.
The time in force for this order
Request to subscribe to order events.
Stop order request. Can be reused, but the instructionID needs to be reset every time it is submitted.
Construct a Stop order that contains a stop loss and/or stop profit price offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The trigger price which will cause the market order to be placed.
The size of the Market order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the time the stop will remain
valid options, GoodForDay and GoodTilCancelled
The stop loss offset, set this to null to not specify a stop loss.
The stop profit offset, set this to null to not specify a stop profit.
Construct a Stop order that contains a stop loss and/or stop profit price offset.
The client specified instruction id, should be unique for an account.
The instrument id of the OrderBook to place the order on.
The trigger price which will cause the market order to be placed.
The size of the Market order. The side of the order is inferred
from the sign of the quantity. A positive value is a buy, negative is sell.
A that describes the time the stop will remain
valid options, GoodForDay and GoodTilCancelled
Internal: Output this request.
The destination for the content of this request
Represents a position on a instrument, held by the account. A number of
fields refer to the term 'cost'. Cost is price x quantity. A position is
an aggregate view of all of the open and unfilled orders
Create an object that contains the details of the changes that occurred to a position.
The ID of the account that holds the position
The instrument the position is on
The cost of the unfilled sell positions against this instrument
The cost of the unfilled buy positions against this instrument
The filled quantity of this position, signed, e.g. sell is a negative value
The cost accumulated so far for holiding this position
The cost of opening this position
Get the id for the account that the position belongs to.
Get the id for the instrument that the position pertains to.
Get the short unfilled cost for this position. I.e. the cost of sell
orders that have not filled.
Get the long unfilled cost for this position. I.e. the cost of buy
orders that have not filled.
Get the net open quantity for this position.
The total cost incurred over the lifetime of the position.
The cost to establish the current open position.
Request to subscribe to position events.
An event that contains the detail of the rejection of an instruction.
E.g. INSUFFICIENT_LIQUIDITY.
Constructs an event containing the details of why an instruction was rejected
The ID of the instruction that was rejected
The ID of the account that sent the instruction
The ID of the instrument the instruction related to
The description of why the instruction was rejected
Get the id of the instruction that was rejected.
Get the id of the account that placed the instruction.
Get the id of the instrument that the instruction was placed on.
Get the reason for the rejection, e.g. INSUFFICIENT_LIQUIDITY