API
Requests adjustment for an account cash balance.
Administrator use only, trader requests would be ignored.
Account to adjust
Currency
Relative amount to change (could be negative)
Internal functionality of the OECAPI
Reconnect timeout in ms
Events batch interval
Amount of attempts allowed for light-weight reconnect
Owner
Shared with OECClient
Accumulated price events
Collections of API objects
Constructor
OECClient instance
Price host, overrides _priceHosts if exists
connect implementation
Disconnect by user request
pumps messages from the connection
called by winforms timer to make processing and events happen in the main thread
Process the server response, dispatch to handler method by type
response object
Process initialization response
initialization response data
check for delayed price event and raise if necessary
Schedule price event
contract to update
new price data
old price data
update relations (related chat users)
new user list
notify user?
update traders/accounts
traders/accounts array
notify user?
Update pit groups (routes)
new pit groups
notify user?
Creates an order from serializable order data and adds it to collection of orders
serializable order
converts a state and adds it to the order
serializable state
notify user?
Adds a new state to the order
Order to change
New state
notify user?
Converts and adds a fill to order
updates positions
serializable fill
if true, will fire
Recalculate positions
Account to recalculate
Position contract
Stores external position
serializable position
notify user?
Store external previous position
serializable position
Stores external cash balance
serializable cash record
notify user?
Initialize positions with all order fills
Adds a fill to position
notify user?
recalculate avg position?
Store external price to currency or contract
serializable price record
internal list for accumulate changed currency/account pairs.
Update account and position stats
Contract
New Price
Old Price
List to accumulate changed currencies
Store DOM data
serializable DOM record
Update partner user online status
serialized user status record
decode user message and fire an event
serialized message record
decode news message and fire an event
serializable news message
processes server error message
decode ticks and fire an event
serializable ticks
decode tick and fire an event
serializable ticks
process an order, created by someone else
serializable order data
process new order version (possibly created by another user)
serializable version data
processes confirmation response - assign IDs to the order,command and state, set timestamps
sends cancel/modify requests awaiting order confirmation
serializable order id data
Processes command confirmation message - assigns ID to the command
serializable command id data
processes command state and commands
serializable command data
Perform subscription/unsubscription and reference counting for a contract
true=subscribe
Contract to subscribe
Don't unsubscribe (for position subscriptions)
Perform subscription for a currency
Currency to subscribe
Perform subscription/unsubscription for DOM data
contract
true=subscribe
Local unique order ID generator
Send an error report to the OEC server
Optional exception
Format
Parameters
Local unique contract request ID generator
Base class for OEC API exceptions
Exceptions to be thrown if unknown data come from server
Constuctor with support of user defined message
User defined message for exception
Some order comments are prohibited for using by 3rd party applications
Exception that raised at the time of sending order draft with invlid order parts
Exception that passed to event in the case of an error during processing server
messages. for more details about exception
Order extended data.
Clones extended data.
Extended data for iceberg orders.
Show volume for iceberg order.
Clones iceberg data.
Returns a string that represents the current instance.
Trailing-stop extended data.
Reference value.
Delta value.
Clones Trailing Stop data.
Returns a string that represents the current instance.
Trailing-stop extended data.
Delta value.
Indicates if delta is in percent
Trigger type value
Clones Trailing Stop data.
Returns a string that represents the current instance.
Volume-Based Stop extended data.
Trigger volume.
Clones Volume-based stop data.
Returns a string that represents the current instance.
GTX-related extended order data
Partial Fill Restriction: order may only be matched in amounts of at least this quantity of CCY1
Reserve Size: only display this amount of CCY1. Upon any partial fill the amount will be replenished up to this
amount until the full order quantity is exhausted
Partial Fill Restriction: only allow partial fills in multiples of this amount
The scope of the “related to” price of the peg
Identifies which side of the book will trigger a stop order
Treats order quantity as CCY2
If AveragePriceLimit, then partial fills may occur at prices beyond the requested limit price if earlier partial
fills occurred at a better price, as long as the overall average filled price remains better than the requested
limit price
Holds application folders data
Gets Application Data Folder
Gets Application Local Data Folder
Initialize API with profile folders data (Application title, type and company name)
Application Title
Application Type
Company Name
List of configured rules
List of activated signals
Adds a new rule
Deletes an existing rule
Replaces a rule to new one
Allocation block's aggregated position
Checks whether the position is element of detailed position history
or daily position summary
Account of the position
Contract of the position
Contract size. The same as Contract.ContractSize
Bought contracts and avg. buy price.
Sold contracts and avg. sell price.
Net position and avg. price
Previous day position and avg. price
Realized profit/loss in native contract currency.
See also
Realized profit/loss converted to USD
minus commissions.
See also
Theoretical profit/loss of open position agains last market price in native currency.
See also
Theoretical profit/loss of open position against last market price in USD
minus commissions
See also
Total profit/loss (sum of realized and open p/l) in native currency.
See also
Total profit/loss (sum of realized and open p/l) in USD.
See also
Theoretical profit/loss of open position against previous settlement price in native currency.
See also
Theoretical profit/loss of open position against previous settlement price in USD
minus commissions.
See also
Current market value of options position in native currency
Current market value of options position in USD
Cost basis of options position in native currency
Cost basis of options position in USD
Fills of position
Business date of the position
Commissions for fills of closed position
Commissions for fills of open position
Maintenance margin of open position in native currency
Maintenance margin of open position in USD
Initial margin of open position in native currency
Initial margin of open position in native currency
Position timestamp, UTC
Fills placed earlier will not be added to statistics
Display name of contract (single of dual)
Main contract (electronic preferred) of the position
List of aggregated average positions for allocation block by contract - see
AllocationBlock.AvgPositions for details.
AllocationBlockItem element
Item Lots
Item Account
True - if allocation block item has Lots.
Index of item in the allocation block
Represents AllocationBlock items collection
Removes an item from a collection.
Item to remove
Clears the list
Move item up or down one row
Index of item
true if moving up
Index of item in AB
Sort items in AB
IEnumerable implementation
represent AllocationBlock
Constructs Allocation Block instance with given name and rule
New AB name
New AB rule
Allocation Block Rule
Items - Account and Account parameters (Lots etc.)
True - if allocation block has at least one account item and all account items have Lots.
Detailed allocation block/contract items.
In this collection, a list of atomic positions opened and closed during the trading session
is available per each contract. The position list can hold multiple closed positions, open position (if any)
is the last item in the list.
Detailed positions contains bought/sold information and profit/loss information
- realized for closed positions, theoretical per open ones.
Average positions stats per symbol - see .
Average positions stats are calculated for current trading session and stored in AvgPositions - one item per
contract.
items in the list have previous day position,
total contracts bought and sold as well as buy/sell prices, current net position
and profit/loss information.
Account balance and profit/loss data - total for all currencies
Balances and P/L values are converted to USD using convertion rate.
Detailed balances per each currency can be found in property.
Total allocated lots
Sum of allocated for each account in this AB
Balances of accounts
Contains additional information in case the allocation block was created with warnings
Changes name and rule
New name
New rule
Add account to allocation block
Account
Allocated lots
new AB item
Inserts account at given position
Returns a list of aggregated and particular account's average positions
If true, do not include particular account's positions
List of allocation blocks
Default constructor
Creates an allocation block and adds it to list
New AB name
new AB rule
Newly created AB
Adds existing allocation block to list
Existing AB
Customer account
A trader can have one or more accounts. For each of those accounts,
the Account instance holds information about open and closed positions
(see ), position details (see )
cash balance(s) and calculated profit/loss values (see and ).
All trader accounts are available in the . collection.
Account Number
Account number is a unique string representing a customer account.
Clearing house
Type of account
Indicates that account is read only
Average positions stats per symbol - see .
Average positions stats are calculated for current trading session and stored in AvgPositions - one item per
contract.
items in the list have previous day position,
total contracts bought and sold as well as buy/sell prices, current net position
and profit/loss information.
Detailed account/contract items.
In this collection, a list of atomic positions opened and closed during the trading session
is available per each contract. The position list can hold multiple closed positions, open position (if any)
is the last item in the list.
Detailed positions contains bought/sold information and profit/loss information
- realized for closed positions, theoretical per open ones.
who owns this account or null
Account balance and profit/loss data (see ) per each available
for the account.
Balances collection holds balance and p/l data for USD currency and also for any other currency with non-zero
balance or p/l.
Sum of all values for all currencies can be found in property.
Account balance and profit/loss data - total for all currencies
Balances and P/L values are converted to USD using rate.
Detailed balances per each currency can be found in property.
Type of risk limitation for account
Indicates that risk limitation is set because of compliance
List of compound position groups
Post-allocation is allowed and required, if this property is not None
Root account, if this account is a subaccount
List of sub-accounts
Base Currency of account
List of accounts - see OECClient.Accounts.
List indexed by Account.ID and Account.Spec fields.
Clearing house
List of clearing houses - see .
List of average positions for account by contract - see
Account.AvgPositions for details.
Account cash balance and profit/loss summary.
This class used to represent account balance and p/l values, for a given currency, or total converted values
Account P/L information calculated as a sum of P/L per each position.
Account spec, for compatibility
Account, associated with Balance.
Allocation block, associated with Balance.
of this balance part.
Contains null for total (summary) balance.
Profit/Loss gained from all the positions closed during the trading day
Theoretical Profit/Loss of all the open positions.
Calculated using avg. position price versus last trade price.
Settlement Profit/Loss for all the open positions.
Calculated using avg. position price versus current (yesterday) settlement price
Net Liquidating Value calculated as account cash balance +
Net Liq calculated as account Cash + Open P/L + Cost Basis
Cash
Summary Maintenance Margin for all open positions
Summary Initial Margin for all open positions
Portfolio Margining
Futures Profit/Loss
Options Profit/Loss
Equity Profit/Loss
Long Call Options Value
Long Put Options Value
Short Call Options Value
Short Put Options Value
Cost Basis of Options
Convert floating value to text with money format, including currency sign
List of items - see Account.Balances.
The list is indexed by
Describes bar parameters
Bar interval
minutes for bars,
ticks for tickbars,
milliseconds for volumebars
Subscription Type
Creates volume based
volume ber bar
Bar Description
Creates tick based
ticks ber bar
Bar Description
Creates time based
minutes ber bar
Bar Description
Creates day based
days ber bar
Bar Description
Creates second based
seconds ber bar
Bar Description
Creates week based
weeks ber bar
Bar Description
Creates month based
minutes ber bar
Bar Description
Creates momentum
Cuts bars by "Interval" range (>= High-Low) and session breaks
ticks amount
Set to True for continuously build bars. Otherwise bars will be cut off at
session end.
Bar Description
Creates range
Cuts bars by "Interval" range (== High-Low) and session breaks
ticks amount
Set to True for continuously build bars. Otherwise bars will be cut off at
session end.
Bar Description
Creates NLineBreak
Amount of bars are needed to break to start contra bar
base to build over it
Bar Description
BarDescription which can be build continuously or cut-off by session boundaries
True if bars are continuously built and false if bars are cut-off by session boundaries
BarDescription which are build over other BarDescription
base to build over it
Base Contract - parent of contracts with base symbol and different expiration dates.
BaseContract instance holds common parameters shared among the contracts with same symbol
and different month/year.
internal list of underlying contracts
Constructs BaseContract instance based on given contract
Base contract
Contract group
Currency
Exchange
Symbol - ES, SP, FDAX etc
Full name - Mini S&P
Currency of contract
Exchange where contract is traded
Tick size - minimal increment of price value
Contract size - points per currency unit (per dollar for USD)
Price Format
- positive values means number of digits after decimal point (2 = 0.01)
- negative values are divisors of fractional representation (-32 = 1[/32])
Multiplier - power of 10 used for price formatting.
Example: 2 = 100, -2 = 0.01.
Display factor of strike price
This value should be applied to strike prices for displaying purposes
Group where contract belongs to (Currencies, Grains etc)
Commissions
one value per normal contract, multiple values reserved for future usage
Contract type - pit or electronic
Trading session start time, in local time zone
Trading session stop time, in local time zone
Day close, in local time zone
List of underlying contracts ES : (ESH6, ESM6, ESU6, ESZ6, ESH7, ...)
Product Calendar (expiration dates and symbols)
First underlying contract
Initial margin for contract
Maintenance margin for contract
Is the contract a compound contract?
Is the contract an option contract?
Is the contract a future contract?
Kind of a contract
Compound type
Is the contract an option compound?
Is the contract a future-only compound?
Gets list of custom properties of basecontract
Continuous contract creation rule using by default
String representation of the BaseContract
Symbol
Gets nearest N contracts according to month/year mask
number of contracts to return, 0 for all contracts
Allowed months, null for all months
Allowed years, null for all years
Contract list
Gets a list with N nearest contracts
Number of contracts
Gets nearest contract
contract or null
Returns name of Base contract for symbol
List of items. See OECClient.BaseContracts.
The list is indexed by base symbol.
Returns BaseContract instance for symbol
Base class for objects with unique key
type of unique key
initializes the object with key value
Unique key value
Unique key value
This value used as unique key in collections
Cached default comparer
Base class for objects with integer unique key
Initializes the object the integer key value
Unique key value
Hash code overridden to return ID
Base class for collections of unsorted non-keyed objects
type of object
Gets an item from a collection by index
Index
Collection item
Gets the number of elements contained in the collection.
Sorts the internal list
user provided comparison procedure
Base class for ordered collections of objects with unique key
Key type
Item type
Hash table for items
Sorted table for indexed access
Construct the empty collection
Construct the collection with specific key comparer
Ordered list, created on demand
Gets an item from a collection by it's key value
unique key of object
found object or default value (null for reference types)
Gets the number of elements contained in the collection.
Gets a list of keys available in the collection
Gets the list of objects available in the collection
Gets the first item in collection or default value, if no items available
Gets the last item in collection or default value, if no items available
Determines whether the collection contains a specific key.
Key value
true, if object exists
Gets the item by zero-based index
Base class for collections of items that have unique key.
Item type should be descendant of .
Key type
Item type
Constructs an empty collection
Constructs a collection with given comparer
Key comparer
Base class for collections of items with integer unique key
Special case of .
Item type, must be inherited from
Constructs an empty collection
Interface for objects that can provide key value, for sort or search operations
Key type
Key value
Interface for objects that provide name as a string key. See .
Base class for dual-indexed collections
Base class for collections that can be accessed by primary key (ID)
or by secondary key (Name). Also provides a list of items sorted by secondary key.
Primary key type
Secondary key type
Item type, must be inherited from and support
secondary index
Consructs an empty collection
Constructs an empty collection with specified comparer
key comparer used to sort items
Gets an item from a collection by it's secondary key value
Secondary key value
Found item or null
Gets a list of items ordered by secondary key
Base class for objects that have unique integer ID and name.
Special case for with support of
Initializes new object with ID and name
ID value
Name value
Name of object
Gets name of object.
Name of object
Read-only dual indexed collection of any named objects
Special case of for NamedObject descendants.
Item type, must be inherited from
Initializes a new collection.
Initializes a new collection with specified comparer
key comparer used to sort items
Sorted list of objects
type of object
Add item to collection
This namespace contains base types of API objects and containers.
See for API overview
Read-only list of any values
value type
List length
List element
0-based index
element
Read-only list of unsigned ints (32bit)
Read-only list of float values
Read-only list of datetime values
Read-only list of int values
List length
List element
0-based index
element
Read-only list of int values
List length
List element
0-based index
element
News channel. See OECClient.Channels.
List of channels - see OECClient.Channels.
Order command: one of create, modify and cancel command of an
During the lifetime of order, user can control it by sending commands.
Create command is associated with initial of order and created when client sends a new
order.
Modify command also have new version of order, but cancel command does not.
When command is sent to server, it has state. The state then could be
changed to , meaning that command was failed
by the reason found in property, or to -
meaning
that command succeed. in both cases, property will updated with execution/failure
timestamp.
When cancel command succeed, order becomes or
- depending
of number of active fills.
If the modify command succeeds, current order version is replaced, and variable order properties, such as quantity
or price will be updated.
Internal constructor for initial load
Serializable command
Order of command
Internal constructor - for updates
Incoming command
Optional version
Order of command
Internal constructor for creating new commands
'create' commands are created with ID equal to order ID, and state=Executed
other commands - with new generated ID and state "Sent"
new command ID
command creation timestamp
command type
command initial state
Order of command
True if command is a result of manual action, otherwise should be false.
Command creation timestamp, UTC
Command type
Current command state
Comments of (unsuccessful) execution
Timestamp of execution, UTC
Associated version (for create/modify command) or null - for cancel commands
Exchange Order ID or null for cancel commands
Name of 3rd party application that placed this command
True if command is a result of manual action, otherwise should be false.
If this parameter is not specified, servers will treat command as manually initiated.
Gets the verbal interpretation of state depending of type
for example "Created", "Modified", "Cancelling", "Cancel failed" etc
Updates state, usually to one of (executed/failed), and result properties of command
Serialized command
Make serializable command
serializable command
Basic string representation of command
#{ID} {Type}
List of commands of an . See
Order.Commands.
Gets creation command (first one) for an order
Gets first command in the list that was not executed yet
Commission value of certain .
Commissions value, in USD
Type of commission
List of objects indexed by type. See .
Encapsulates low-level network operations using sockets and ObjectStream class.
protected ObjectStream instance used to serialize objects over the network
establish a connection to OECServer, do encryption handshake and send logon request
Returns connection state
Returns secondary connection state
Checks whether there are something in incoming queue
Read pending object from object stream
Clear all incoming data from object stream
Write object to the object stream
Global constants.
Compound or "spread" group of positions that created by "spread" orders
Assigned account
List of legs
Name of group
Type of group
Timestamp of creation
Timestamp of closing
Indicates that compound group is broken
Position of compound leg.
Assigned group
Number of the leg in the group
Ratio of the leg in the group
List of leg positions
First leg
Get leg position by contract
List of compound position groups
User connection settings provided at login
If true, existing user sessions will be disconnected at login.
Default value is true.
If true, lost connections will automatically restore.
Default value is false;
Construct a ConnectionFeatures object with default values
ConnectionFeature Builder
var features = new ConnectionFeatures.Builder()
.SetForceLogin(true)
.SetAutoReconnect(true)
.Build();
Construct a Builder object using ConnectionFeatures' default values
Contruct a Builder object using an existing ConnectionFeatures object
Features to be copied into new Builder object
Sets the ForceLogin feature
If true, existing user sessions will be disconnected at login
ConnectionFeatures Builder
Sets the AutoReconnect feature
If true, connection will automatically restore when disconnected
ConnectionFeatures Builder
Build the ConnectionFeatures object
A ConnectionFeatures object containing the set of features initialized in the Builder
Server addressing information
Host name/address of the server
Port number of the server
Create a ServerInfo object
Host name/address of the server
Port number of the server
The rule by which contracts are spliced to get Continuous Contract
Instantiate user defined rule without bars adjustment
Instantiate user defined rule
Base contract instance. See .
How to adjust bars of one underlying contract relatively another
Returns true if defined by user and false otherwise
Splicing method (SpotMonth, Schedule, etc)
Splicing rule type
A single contract - for example, ESZ4.
Contract instance holds single contract properties. In addition to unique contract properties,
such as , , properties that are shared among
contracts with same also available there.
and data are available if client subscribed for the
price or DOM update. and for details.
Constructs Contract from serializable contract instance
serializable contract
BaseContract instance
Option strike price
Put or Call
put/call and strike price
Last price or 0
Contract ID (non unique).
Pit/Electronic counterparts of the same contract (SP/ZSP) have the same ID value.
Contract symbol. Examples: ESH6, FDAXH6
Base symbol. Example: ES for ESH6
Base contract instance. See .
Full name. Example: "E-Mini S&P", "Crude Oil"
of the contract
of the contract
Tick size - minimal increment of the price value
Contract size - currency unit per point. (dollar value if currency is USD)
Price Format
- positive values means number of digits after decimal point (2 = 0.01)
- negative values are divisors of fractional representation (-32 = 1[/32])
Multiplier - power of 10 used for price formatting.
Example: 2 = 100, -2 = 0.01.
Date of contract expiration
Time of contract expiration, DateTime.MinValue in case if no expiration time available for the contract
Expiration month and year, in YYMM format
Expiration type of equity options (standard, weekly, quarterly)
Expiration month
Expiration month symbol - one of "FGHJKMNQUVXZ"
Expiration year
Expiration month/year = "{MonthChar}{YearLastDigit}". Example: "H6"
Gets tenor of FX FWD contract.
Group where contract belongs to (Currencies, Grains etc)
Commissions
one value per normal contract, multiple values reserved for future usage
Contract type - Pit or Electronic
Is the contract a spread?
Trading session start time, in local time zone
Trading session stop time, in local time zone
Current price data, if subscribed, or null
Current DOM data, if subscribed for DOM, or null
Electronic pair for pit contract, if exists
Pit pair for electronic contract, if exists
Contract for position calculation: Electronic for electronic only or dual, pit for pit only
List of underlying options
Parent contract for an option contract (ESM8 for OESM8C1300)
Is the contract a compound contract?
Is the contract a continuous contract?
Is the contract an option contract?
Is the contract a future contract?
Has the contract an expiration date?
Is the contract a future/forex contract?
Has the contract linked options?
Is the contract a equity, equity index, equity options, mutual fund or bond?
Is the contract a forex contract?
Is the contract an option compound?
Is the contract a future-only compound?
Is the contract a TAS future?
Can the contract be automatically liquidated by the system?
Legs for compound contract
Type of compound contract
Name of contract or dual contracts for position
Example: ZSPH6 (SPH6) for dual pit/electronic contract.
Note: there is only one position for contracts with same ID and different types
Pit or electronic contract
Last copy of traded price histogram
Quote Details
Index Components
Type of risk limitation for contract
Initial margin for contract
Maintenance margin for contract
sets pair contract
contract string representation
contract symbol
Formats price using contract price format, multiplier and tick size
price to format
culture for price format
formatted price
Formats price using contract price format, multiplier and tick size
price to format
formatted price
Parses text price according to contract price format.
Price in text form, such as "108 27.50"
decimal value, 108.859375 for the price above
Checks if dtCheck is inside trading session of the contract
Local time-zone
true, if dtCheck is inside trading session
Composite unique key for contract
ID of contract
true - pit, false - electronic
Compares two contract keys
returns a hashcode
SortKey for contract
Contracts usually are sorted by base symbol/month year
Compares two contracts
Composite key to sort contract lists by symbol and expiration date
Contract base symbol
Contract month/year
Construct sort key object
Contract base symbol
Expiration month year {YYMM}
Additional key. E.g., expiration moth year of second leg of calendar spread
Compare sort keys with another one
another sort key
-1/0/1
returns a hashcode
List of contracts - see OECClient.Contracts
primary index - contract key (id, type)
secondary index - contract sortkey (base symbol, month/year)
additional index - symbol
Default ctor
finds contract by symbol
symbol to search
found contract
Gets a list of contracts ordered by symbol/expiration date
Finds a contract by id and type (pit or electronic)
Contract ID
true = search for pit contract
found Contract
Finds any contract with given ID
first, it checks for electronic contract, then for pit
Contract ID
found Contract
Adds a contract to collection
sets pair contract if found
new contract
clear list
Gets the item by zero-based index
Compound leg
Contract of the leg
Quantity of the leg (can be negative)
Price weight of the leg
List of risk limits by provider ID
List of risk limits by provider ID
Group of contracts
Contracts are grouped by underlying commodity, for example: Grains, Meats, Energies, Indexes.
ContractGroup object contains and instances belonging
to this group.
Constructs a new group
group id
group name
Contracts belonging to this group
BaseContracts belonging to this group
List of contract groups - see OECClient.ContractGroups.
The list is indexed by ID and Name
OEC Error
Trader caused the error or null
This namespace contains all the object and container classes needed to work with OEC API.
See class for API overview
Risk-Free Interest Rate representation.
Compares two currencies
Checks whether the currency is default (USD)
Default currency (USD)
Current Interest Rate
List of currencies - see OECClient.InterestRate
The list is indexed by ID and Name
Currency representation.
The property holds the conversion rate from given currency to
one.
Conversion rate could be updated - see event.
For the default (USD) currency, conversion rate is always 1.
Compares two currencies
Current price (conversion rate to default currency)
Checks whether the currency is default (USD)
Default currency (USD)
List of currencies - see OECClient.Currencies
The list is indexed by ID and Name
The list of custom compound legs
Declaration of custom compound contract. It should be used in conjunction with complex equity options orders
Type of compound
Legs of compound
Adds one more leg
Contract of the leg
Side of the leg
Quantity of the leg. It should be greater than zero
Verifies the compound declaration
Creates contract
Converts to its string representation
Custom compound leg
Side of the leg
Converts the object to its string representation
Details of error in custom compounds
All is OK
The symbols of both legs must either be both calls or both puts. Can't mix. (Spread)
The symbols of both legs must opposites (call and put or put and call). Cannot both be the same.
None of the same symbols can appear more than once (Condor)
All legs should be either "To Open", either "To Close"
The Qty of each leg must be the same.
For Straddle: if both values are:
* Buy to Open, then order must NOT be a credit.
* Sell to Open, then order must NOT be a debit.
Unsupported compound type
Incorrect legs
Order type of custom compound
Unknown
Market
Even
Debit
Credit
Data Feed Entitlement
Some exchanges can require individual data feed entitlements. This class is intended to show what exchange and subscription types are entitled for user
List of data feed entitlements
Side of Deal Quote Subscription.
Target contract to swap.
Gets Quantity.
Gets Quantity2.
Returns text representation of DealQuote instance.
Represents DealQuote data.
List of detailed lists for an . See
.
List contains items indexed by contract.
Each PositionList could contain zero or more closed positions and one open position, if any.
Gets the detailed position list for a given
contract
Detailed position list
Add a position list
Contract
List of detailed positions
Gets an open position from detailed position list for a given
contract of position
detailed position or null for a flat position
Equity and equity options cash balance and profit/loss summary.
Net Liquidating Value calculated as account cash balance without Open P/L
Securities, Stocks
Securities, Options
Securities, Total
Money Market and Cash, Margin Balance
Money Market and Cash, Money Market Funds
Money Market and Cash, Cash Balance
Money Market and Cash, Cash = Cash Balance + Margin Balance
Money Market and Cash, Total
Requirements, Margin Equity %
Requirements, Pending Purchase
Requirements, Options Requirements
Buying Power, Cash Available to Withdraw
Buying Power, Stock
Buying Power, Options
The month in which seller must deliver and buyer must accept an underlying contract.
Base contract instance. See .
Date of contract expiration
Expiration month and year, in YYMM format
String representation of
List of ContractMonths for a BaseContract
General position interface
Position's contract
Checks whether the position is element of detailed position history
or daily position summary
Account of the position
Contract of the position
Contract size. The same as Contract.ContractSize, but depends on account type in the case of FX accounts.
Current market value of options position in native currency
Current market value of options position in USD
Cost basis of options position in native currency
Cost basis of options position in USD
Fills of position
Business date of the position
Commissions for fills of closed position
Commissions for fills of open position
Maintenance margin of open position in native currency
Maintenance margin of open position in USD
Initial margin of open position in native currency
Initial margin of open position in native currency
Position timestamp, UTC
Fills placed earlier will not be added to statistics
Display name of contract (single of dual)
Main contract (electronic preferred) of the position
Bought contracts and avg. buy price.
Sold contracts and avg. sell price.
Net position and avg. price
Previous day position and avg. price
Realized profit/loss in native contract currency.
See also
Realized profit/loss converted to USD
minus commissions.
See also
Theoretical profit/loss of open position against last market price in native currency.
See also
Theoretical profit/loss of open position against last market price in USD
minus commissions
See also
Total profit/loss (sum of realized and open p/l) in native currency.
See also
Total profit/loss (sum of realized and open p/l) in USD.
See also
Theoretical profit/loss of open position against previous settlement price in native currency.
See also
Theoretical profit/loss of open position against previous settlement price in USD
minus commissions
See also
Response of margin calculations
Original request ID
Initial Margin Requirements
Maintenance Margin Requirements
Net Options Value
Cash that would be required to execute
Intraday Initial Margin Requirements
Holds specification of hypothetical margin calculation request
Constructor of empty request
Constructor of empty request
Unique request ID
Account that relates to request
List of positions
List of orders
Checks correctness of request. Throws an exception in the case of incorrect portfolio
Hypothetical position
Position contract
Hypothetical minimum net position
Hypothetical maximum net position
Hypothetical order
Order's contract
Order side
Order quantity
List of hypothetical orders
List of hypothetical positions
Fill of the detailed .
Position fill could be copy of order fill, part of split order fill
or previous session position.
See also
Quantity of fill with a '+' for long fills, '-' for short ones
Fill price
Absolute value for quantity
Fill source of a position fill
Position source of a position fill
Reduce the position to given quantity
new position quantity
remainder
List of PositionFills
Describes an account and its parameters in post-allocation block
True - if allocation block item has Lots.
Item Lots
Item Account
Post-allocate to an external account
Allocation price
Post-allocation block: post-allocation instructions for one of order's contract
Creates new empty post-allocation instructions
Indicates whether post-allocation should use Average Price System method
Indicates whether post-allocation uses Average Price System method
True - if allocation block has at least one account item and all account items have Lots.
Items - Account and Account parameters (Lots etc.)
Total allocated lots
Sum of allocated for each account in this post-allocation block
Add account to post-allocation block
Account
Allocated lots
Allocation price
new AB item
Add account to post-allocation block
Account
Allocated lots
Allocation price
new AB item
Checks post-allocation instructions for specified order and contract (order's contract or one of leg for spread
orders)
Order that will be post-allocated
Contract that will be post-allocated
An enumeration value with result of check
Describes post-allocation instructions
Get an allocation block for particular contract
State of post-allocation
Quote Details
List of optional unformatted properties:
StrongBuy, Hold, ModerateBuy, ModerateSell, StrongSell, AvgRecom, etc.
Company description
List of optional unformatted properties:
DayRange, AvgVolume, EPS, Wk52Range, MarketCap, PEttm, PrimaryEx, OutShares, ContractSize, ExpDate, DaysToExp, etc
List of optional unformatted properties:
Frequency, AnnounceDate, PerShare, ExDividendDate, Annual, RecordDate, Rate, PaymentDate, etc.
List of optional unformatted properties:
LastQuarter, Surprise, NextQuarter, NextEarnings, NextYear, etc
List of optional unformatted properties:
InsideOwnr, HeldByInstitution, Debt, ShortRatio, OperatingMargin, Beta, ROA, NetIncome, FreeCashFlow, ROEpercent,
ContractSize, Tick, ContractMonths, TradingHours, Settlement, InitialMargin, DayTradingMargin, MaintenanceMargin,
FirstNoticeDay, LastTradingDay, etc.
List of optional unformatted properties:
PriceToEarningsTTM, PriceToSales, PriceToEarningsForward, PriceCashFlow, EarningsPerShareEPS, BookValuePerShare,
PEG, PriceToBook, DebtEquity, CashFlowShare, etc.
List of optional unformatted properties:
TodayOptionVolumeDelayed, AvgOptionVolume, OpenInterestDelayed, AvgOpenInterest, AvgPutCallRatio,
HistoricVolatility30Day,
PutCallRatio, ImpliedVolatility, etc.
Optional
Optional
Optional
Optional
Optional
Optional
Optional
///
Account ID. Optional.
Exchange ID. Optional.
Contract ID. Optional.
Trader's category ID. Optional.
Underlying contract. Optional.
Contract kind. Optional.
Account type. Optional.
Limit Type
Override
Risk limit detail
Unique key of risk limit
Current value
Approved value
New value
Risk limit list
Execution route
List of applicable contract kinds
List of routes
Immutable set of unique contract kinds
Gets the number of items contained in the collection
Checks has or has not the list some ContractKind
Returns true, if the list contains ContractKind
Set of unique contract kinds
Adds a collection of items
Collection of items
Adds an element to the collection
An element
Removes an element to the collection
An element
Represents the information for ServerStrategyParam.
Deserializing constructor.
Gets the name of ServerStrategyParam.
Gets the data type of ServerStrategyParam.
Gets the description of ServerStrategyParam.
Gets the category of ServerStrategyParam.
Gets a value indicating the param is optional and may be missing (in this case default value will be used).
Gets the default value of ServerStrategyParam.
Gets a list of available values if the param is of Enum type, or null.
Gets the parent param or null if this param has no parent.
Gets a list of child params.
Gets the full name of this param.
Full name includes the param name with names of all parents.
Creates new ServerStrategyParam instance with default value, including all child params.
Validates the specified param, including all child params.
If the validation failed, an exception is thrown.
Represents a list of Info.ServerStrategyParam instances.
Deserializing constructor.
Gets a sequence of value (that's terminal, not container) params.
The full name of a param can be used to get/set a value without iterating through a param tree.
Returns Info.ServerStrategyParam instance for the specified parameter fullName or null if no parameter found.
Returns Info.ServerStrategyParam instance for the specified paramName or null if no params found.
Gets the number of parameters contained in this list
Returns an enumerator that iterates through this list.
Represents the information for ServerStrategy.
Deserializing constructor.
Gets the type of ServerStrategy.
Gets the description of ServerStrategy.
Gets a list of param informations for server strategy.
Creates new Strategies.ServerStrategyParamList instance containing complete set of the strategy params with default values.
Validates all params in the specified list.
If the validation failed, an exception is thrown.
Represents a list of Info.ServerStrategy instances.
Deserializing constructor.
Returns ServerStrategy instance for the specified strategyType or null if no strategies found.
Gets the number of strategies contained in this list.
Returns an enumerator that iterates through this list.
Represents a server-side strategy.
Held orders initiated by strategy
Gets the type of this ServerStrategy.
Gets the param list of this ServerStrategy.
Gets a root order of this ServerStrategy or null if no root order assigned to the ServerStrategy.
Gets the state of this ServerStrategy.
Gets a list of strategy orders.
Represents a list of ServerStrategy instances.
Represents an abstract child of ServerStrategy.
Initializes new ServerStrategyChild instance.
Initializes new ServerStrategyChild instance.
Gets the parent ServerStrategy for this child.
Represents a ServerStrategy phantom order.
Gets quantity of this strategy order.
Gets price of this strategy order.
Represents a list of ServerStrategyPhantomOrder instances.
Throws InvalidOperationException if an object is read-only.
Represents a parameter of ServerStrategy.
Deserializing constructor.
Gets the name of this ServerStrategyParam.
Gets the data type of this ServerStrategyParam.
Gets the full name of this param.
Full name includes the param name with names of all parents.
Gets the parent param or null if this param has no parent.
Gets a list of child params.
Gets a value indicating this ServerStrategyParam is read-only.
Gets or sets value of this ServerStrategyParam.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Creates new ServerStrategyParam instance.
Returns a copy of this ServerStrategyParam instance.
Returns string representation of this object.
Represents a list of ServerStrategyParam instances.
Returns an enumerator that iterates through this list.
Deserializing constructor.
Initializes new ServerStrategyParamList instance.
Gets a value indicating this ServerStrategyParamList is read-only.
Returns ServerStrategyParam instance for the specified paramName or null if no params found.
Gets the number of params contained in this list.
Sets ServerStrategyParam to this list.
If the param with the same name already exists, it will be overridden.
Returns ServerStrategyParam instance for the specified param fullName or null if no params found.
Removes ServerStrategyParam with the specified paramName.
Removes all params from this list.
Returns string representation of this object.
Represents a manager of ServerStrategy instances.
Gets a list of active strategies.
Gets a list of available strategies and their features.
Starts new ServerStrategy instance.
Stops executing the specified ServerStrategy.
Occurs when ServerStrategy execution started.
Occurs when ServerStrategy execution stopped or ServerStrategy was not accepted by server.
The actual reason of stopping is provided.
Occurs when ServerStrategy is confirmed by server and global ID is assigned.
Initial local ID of the ServerStrategy is provided.
Occurs when anything changed in strategy except its state (orders added, phantom one became actual, etc)
Represents ServerStrategyStarted event handler.
Represents ServerStrategyStopped event handler.
Represents ServerStrategyConfirmed event handler.
Represents ServerStrategyPhantomOrdersChanged event handler.
Represents ServerStrategyChanged event handler.
Portfolio margining
Current portfolio margining for open positions
Hypothetical portfolio margining for open positions and working orders
Initial Margin Risk
Maintenance Margin Risk
OEC Risk Value
Net Option Value
Initial Requirements (Initial Margin Risk less Net Option Value)
Maintenance Requirements (Maintenance Margin Risk less Net Option Value)
Describes a method obtaining historical data
True if there is no end date
Specify Duration by amount to endDate
Load amount by this time
True if need to continuously update and false otherwise
Specify Duration by amount to now
True if need to continuously update and false otherwise
Specify Duration by Start date
Specify Duration by Start and EndDate
Duration can have Start, End date and OpenEnd at the same time
Creates a new copy with new startDate and amount
New startDate
New amount
Updated copy
Simple set of Symbol Lookup criteria
List of contract kinds. Empty list can be used to search everywhere
Default constructor
Optional filter by exchange.
Optional filter by contract group
Filter by contract type
Filter by compound type
If ByBaseContractsOnly is true, searching will be performed inside Base Contracts only.
Results will still contain Contracts and developer should use Contract.BaseContract to obtain actual BaseContract
object
OptionsRequired = true will retrieve only contracts that have related options
Lower bound of strike price range
Upper bound of strike price range
OptionType allows filtering put or call options.
ParentContract allows filtering options for defined contract
BaseContract allows filtering contracts for defined base contract
Admin locking type
Optional additional expression to build complex criteria like "CME or Electronic"
Checks whether the contract satisfies the criteria
Contract
This class describes parameters of symbol lookup
Gets a value indicating that simple (exact) symbol lookup required.
Default constructor
Search Text
Desired number of result contracts
Symbol Lookup Mode
Filters contracts according defined criteria
Original lsit of contracts
Optional additional filter
Take no more than N contracts
Checks whether the contract satisfies the criteria
Contract
Max allowed depth of expressions
SymbolLookupExpression should be used to create complex expressions of lookup criteria
Constructor
Boolean operator
Lookup criteria that should be used additionally to the main criteria
Volume/Price pair with a timestamp
Creates a new Volume/Price pair
New Volume
New Price
Volume
Price
Timestamp
sets new values
clears price if quantity is zero
new volume
new price
set new values from position data
serialized position data
clears values and reset timestamp
This class represents a client connection to the OEC Server
and provides access to all API data and functionality.
Principles of work
The OECClient component serves as a gateway to the OEC Server,
sending client requests and receiving server responses over the internet.
Client session data are represented in form of objects tree available as OECClient instance properties:
OECClient. is an collection of orders, for example. See "Data model" section below for details
Client requests are sent by calling component methods, such as ,
and any changes or additions to session data are visible to client as events (like )
Network transmission is asynchronous (performed in background), so all method calls
do not return immediate results - in most cases client should wait for appropriate event to make sure
that requested action succeeded (or failed).
Data Model
Primary object of OEC Data model is an .
This object contains all information about order lifetime, such as ,
and history,
and order s - remained or canceled. OEC API loads all orders from current trading session on
login.
Accounting information can be accessed by objects. There are open/closed
statistics and account cash
(or several balances for different currencies, if any).
Trading environment objects, such as contracts, currencies, exchanges provided easy access to fundamental data.
Some additional object types, like s and s were introduced
to maintain
structured access.
Dynamic data like currency conversion rate, contract last price and depth of market updates are stored
in corresponding objects - i.e. and .
Theoretical profit/loss for open positions is updated in real-time, when the price feed is available for given
contract.
All objects can be found in their respective collections by ID or name, or retrieved from another object properties
- for example, an order contains references to its account and contract.
Note that any date/time values provided by API are in UTC time zone, except the opening/closing times for contracts
- which are local to contract exchange.
Getting started
To use the OEC system, first thing that client needs to do is to connect to the OEC Server:
OECClient1.Connect(oechost, oecport, "username", "password", false);
After that, client application should need to wait for one of events: or
In cause of successful login, all collections is already populated with session data (order states and fills,
account positions),
so application could display it on the GUI.
If by some reason connection is dropped, event would be fired immediately, notifying
the client
that requests couldn't be processed until connection is restored.
On a successful login system is ready to process client requests: subscriptions to price feeds and order requests.
This code creates and sends an order "Buy 1 ESZ6 MKT"
OrderDraft draft = OECClient1.CreateDraft()();
draft.Account = OECClient1.Accounts.First;
draft.Side = OrderSide.Buy;
draft.Quantity = 1;
draft.Contract = OECClient1.Contracts["ESZ6"];
draft.OrderType = OrderType.Market;
OECClient1.SendOrder(OEC.API.OrderDraft)(draft);
now client can expect events ,
with =
, then
and finally
with =
.
This code subscribes for a price feed using method call
void SomeMethod()
{
...
OECClient1.OnPriceChanged += OECPriceChanged;
...
OECClient1.Subscribe(OECClient1.Contracts["ZSPZ6"]);
...
}
void OECPriceChanged(Contract Contract, Price Price)
{
string price = Contract.FormatPrice( Price.LastPrice );
...
}
client will periodically receive
event every time that market price data is updated, unless
he will call OECClient. method to cancel the subscription.
Occurs when new custom contract are created in response to call
Data feed entitlements
Sends a request to calculate hypothetical portfolio
Unique request ID
Occurs when portfolio margin requirements changed
Send post-allocation instructions for execution. Result of post-allocation can be checked in event
Result of post-allocation
timer used to group events.
Helper object intended for hashing modules loaded into process memory in order to certify calling application
Global OECClient instance
Usually, clients will create one instance of this component,
which will be available using this static property.
However, in is possible to create multiple instances
- in this case client should not use this property.
Signaling start of events batch. See .
Signaling end of events batch. See .
Raised when unexpected error occurs
Raised when connection required data loaded to client and OECClient component is ready to work.
Raised when connection couldn't be establised, credentials are wrong or client API version is invalid
Raised any time when connection to OEC Server is dropped.
Raised when connection has been forcibly closed by administrator.
Occurs when new was confirmed and order id was assigned by server
Occurs when any is changed, for example,
when order become , completed or cancelled.
Occurs when new comes or old fill becomes cancelled.
Occurs when (such as cancel or modify) was either executed or failed
Occurs when one or more average values are changed
Occurs when one or more detailed values are changed
Occurs when one or more position summary () values are changed
Occurs when one or more contract values are changed.
Unlike ,
this event could skip some price updates, if they come too often
Occurs when one or more contract values are changed.
Unlike ,
this event raised every time when price update comes, so it is recommended not to perform any CPU
consuming operations (like GUI updates) in the event handler.
Occurs when price (conversion rate) is changed
Occurs when Depth of Market () data are changed
Occurs when account cash changed
Occurs when some becomes online or offline
Occurs when a chat message is received from some
Occurs when new message is received by some .
Occurs when batch is received in response to
or
Occurs when history Bars are received in response to call.
Occurs when history Bars are received in response to call.
Same as with different collection type
Occurs when history Bars are received in response to
call
Occurs when history Bars are received in response to
call
Same as with different collection type
Occurs when traded price histogram is updated
Occurs when the list of related is updated
Occurs when the list of visible (routes) is updated
Occurs when the list of visible is changed.
Traders are visible only for TraderManager or Admin users.
Occurs when the list of options/compounds is updated
Occurs when OSM broker updates the list of available OSM algorithms.
Occurs when the list of OSM algorithms is loaded.
Occurs when the results of Symbol Lookup is loaded
Occurs when are received in response to
call
Occurs when are received in response to
call
Occurs when Occurs when any compound group or its leg position is changed or a new contract group created
Occurs when the contract properties like tick and contract size are updated
Occurs when continuous contract rule was changed for logged user
Occurs when allocation block list was changed for logged user
Occurs when list of user sessions changed. For example when user connected/disconnected from another location
Occurs when risk limit type is changed for account
Occurs when risk limit type is changed for contract
Occurs when new risk limits received and RiskLimits collection changed
Occurs when a product calendar is updated
Interval for accumulating events to batch, in ms.
Interval for FX balance recalculations, in ms
Checks if unhandled application exceptions should be tracked by OEC. Exception will be considered as a handled one,
if event was specified and successfully processed the exception
Checks is the connection to OEC Server closed
Checks whether connection is established and all data loaded.
See .
Checks whether auto-reconnect is in progress now
encapsulation of internal functionality of the OEC API
Gets ServerStrategyManager instance.
List of available accounts for trade. See .
Usually trader has only one account, but it is possible to control several accounts from one logins.
Trader manager will also have all accounts of underlying s there.
List of allocation blocks
List of orders in current trading session. See .
Note that orders are not deleted from this collection when trading session ends - they
will still be available until client disconnects and connects again.
List of available contract groups. See , .
List of available contracts. See .
List of available base symbols. See .
List of available exchanges.
List of available currencies.
List of available currencies.
List of users available for chat. See .
List of news channels available for writing. See .
List of underlying traders
Available only for TraderManager or Admin users
List of trader categories
Available only for TraderManager or Admin users
List of available PitGroups (routes).
See .
Available only for admins and brokers.
List of available execution routes
See
List of available Clearing houses
Available only for admins.
List of custom user properties
List of news messages for last 24 hours
List of chat messages for last 24 hours.
List of subscriptions
Last server host passed to Connect method
Last username passed to Connect method
Password Expiration Date
Unique Universal IDentifier (UUID)
This value has to be set to identify application when OEC API is being used by 3rd parties.
Remoting connections are required to specify UUID as well.
UUID must be obtained from OEC by contacting support (GFSupport@gaincapital.com).
Obtaining the UUID and connecting your application to OEC with the UUID will enable your users
to leverage a single login to access both your application as well as OEC's Trading platform at the same time.
List of another sessions of current user
List of all available risk limits
Initializes the component. See method.
Initializes the component. See method.
Frees resources
stores batch interval and calls internal implementation
interval in ms
Establishes new connection to the OEC server.
Throws an exception if network connection couldn't be established or if already connected.
Note that OECClient will be ready for operations only when event was received.
Client should also expect event if supplied login information is incorrect.
OEC Server host or address
OEC Server port (usually 9200)
User name - case sensitive
Password - case sensitive
If true, API will automatically restore connection when disconnected
Establishes new connection to the OEC server.
Throws an exception if network connection couldn't be established or if already connected.
Note that OECClient will be ready for operations only when event was received.
Client should also expect event if supplied login information is incorrect.
OEC Server containing the host and port
Username and Password, both are case sensitive
Preferred configuration settings (e.g., AutoReconnect when connection to server is lost)
Sets price server host name
Only this price server will be used if set
Closes the connection to the OEC server.
Note that all objects will still be available for viewing after disconnect,
but no order operations or subscriptions could be performed.
Sends a group of orders as OCO - One cancels other
OCO orders sends as a group of mutually exclusive orders
- when one order is executed (filled), others are canceled.
OCO Orders
Sends an chain of orders
- when main order is filled, linked orders are activated as OCO orders
Main order
Linked OCO orders
Sends an chain of orders
- when main order is filled, linked orders are activated as OCO orders
Main order
Groupig method
Linked OCO orders
Internal, sends an with forced route.
Intended for administrative use, trader's orders could be rejected.
New order parameters
if true, order will be sent to pit, regardless of contract type
New order
Sends a new with parameters supplied by instance.
Order draft could be created using call.
The order will receive event, meaning that server successfully
receives the order and assigns a ticket number to it. Then clint should monitor
event
and/or check when order was accepted or rejected, become working and completed.
to watch how order is filled client need to listen to .
New order parameters
New order
Wash accounts
Used for Allocation blocks
Available for trader managers only.
Creates order, command, version and state for a new order.
Order draft
Creates order, command, version and state for a new order.
Order draft
Flag indicating the created order is added to the Orders list.
Modifies an existing
New order version is taked from created from this order by
call.
The modification will be put in the list and
new order will be placed to the list.
Note that the modification command will be initially in pending state, and the client should monitor
event
and/or to see whether the command was executed or failed.
Order with changed version parameters
Transmits modify command and version
Modifying order id
Modify command
New version
Sends cancel request for an existing .
Cancel will be
added to the list.
Note that the cancel command will be initially in pending state, and the client should monitor
event
and/or to see whether the command was executed or failed. Also order
will become
when cancel command succeed.
Order to cancel
Sends cancel request for an existing .
Cancel will be
added to the list.
Note that the cancel command will be initially in pending state, and the client should monitor
event
and/or to see whether the command was executed or failed. Also order
will become
when cancel command succeed.
Order to cancel
Transmits cancel command to server
Canceling order ID
Cancel command
Accepts an incoming .
This request is intended for broker interface and will be ignored for trader login
Order to be accepted should be in state, and become
after.
Incoming order
Rejects an incoming .
Intended for broker interface - will be ignored for trader login.
to be accepted should be in state, and become
after.
Order to reject
Broker commens
Makes a working completed.
Broker interface - will be ignored for trader login.
Order to be completed should be in state, and will become
or if no fills present.
Order to be completed
optional comments
Accepts incomming or
.
This command is intended for broker interface and will be ignored for trader logins.
Command should be in state and will become
after
Pending command
Rejects incomming or
.
This command is intended for broker interface and will be ignored for trader logins.
Command should be in state and will become
after
Pending command
Broker commens
Adds a new to a working
This command is intended for broker interface and will be ignored for trader logins.
New fill reports will be added to the list. If operation is failed,
fill could be added with cancelled ( = false) or just not be added at all.
createTime.Kind should be DateTimeKind.Utc or it will be converted to UTC
Order to fill
Filled quantity
Fill Price
Fill comments
Time when a fill occurred
Adds a new to a working
This command is intended for broker interface and will be ignored for trader logins.
New fill reports will be added to the list. If operation is failed,
fill could be added with cancelled ( = false) or just not be added at all.
Order to fill
Filled quantity
Fill Price
Fill comments
Cancels existing
This command is intended for broker interface and will be ignored for trader logins.
Fill should becomes cancelled ( = false). As a side effect,
becomes working if it was already completed.
Fill needs to be cancelled
Creates a new blank
Order draft is a placeholder for order parameters. To send an order, client needs to create an order
draft instance, fill its parameters and call method.
It could be also stored (for example, as a template order)
Blank order draft
Creates a new filled from template string.
Order draft can be converted to template string using (string) operator, or template string could be
created manually.
If any order element cannot be parsed, it will be skipped and parsing continues.
If template string couldn't be parsed at all, blank order draft will be returned.
Template string syntax:
;;;
;;;
;;
string with order parameters
New order draft
Creates a for modification request.
Client can change only version-related properties (quantity, order type, price(s))
New draft will not allow to change order properties - exception will be raised.
The draft need to be passed to the method.
Order to be modified
Order draft object
Subscribes for realtime feed.
Multiple subscription will require multiple unsubscription.
Prices for existing (open or closed) position contracts are subscribed automatically and
couldn't be unsubscribed.
Contract instance
Calculate contract greeks, does nothing for non-options
Unsubscribes for realtime price feed
Automatic subscriptions (for example, for existing positions) couldn't be unsubscribed
Subscribes for Depth of Market () data.
Data can be accessed using property.
Note: Multiple subscriptions will require same number of UnsubscribeDOM calls
Contract for DOM subscription
Unsubscribes from DOM data for a given contract
contract to unsubscribe
Sends a text message to a user
whom to send to
Message text
Sends a text message to a user
whom to send to
Message text
Send news message to everybody subscribed for given channel.
User should have rights to send news to the channel.
News channel
Message text
Requests price ticks for given time range
Contract to see ticks
Start of time range
End of time range
Requests price ticks for given end timestamp and amount
Contract to see ticks
End of time range
Amount of ticks
Subscribes for price ticks for given time range
Contract to see ticks
Start of time range
Subscribes for price ticks and loads given amount of ticks
Contract to see ticks
Amount of ticks
Subscribes for tick bars for given time range
Contract to see ticks
Start of time range
Number of ticks per bar
Subscribes for volume bars for given time range
Contract to see ticks
Start of time range
Volume per Bar
Subscribes for range bars for given time range
Contract to see ticks
Start of time range
Range of Bars (tick sizes)
Requests price historical information in form of daily bars.
Contract to request bars
Start of time range
End of time range
Subscribes for price historical information in form of daily bars.
Contract to request bars
Start of time range
Requests price historical information in form of intra-day bars.
Contract to request bars
Start of time range
End of time range
Bar interval
Requests price historical information in form of intra-day bars.
Contract to request bars
Start of time range
End of time range
interval in ticks
Requests price historical information in form of intra-day bars.
Contract to request bars
Start of time range
End of time range
Bar volume
Requests price historical information in form of intra-day bars.
Contract to request bars
Start of time range
End of time range
Bar range (tick sizes)
Subscribes price historical information in form of intra-day bars.
Contract to request bars
Start of time range
Bar interval
Subscribes price historical information in form of various bars.
Contract to request bars
Start of time range
Type of bars
Bar interval
Subscribes price historical information in form of various bars.
Contract to request bars
Start of time range
Type of bars
Bar interval
Don't stop to build a bar at the end of sessions. It works with Range and
Momentum Bars only
Subscribes price historical information in form of various bars.
Contract to request bars
Amount to load from history (Not applicable for Range and Momentum bars when
IgnoreSessionBoundaries = true)
Type of bars
Bar interval
Don't stop to build a bar at the end of sessions. It works with Range and
Momentum Bars only
Requests price historical information in form of various bars.
Contract to request bars
Start of time range
End of time range
Type of bars
Bar interval
Requests price historical information in form of various bars.
Contract to request bars
Start of time range
End of time range
Type of bars
Bar interval
Indicates whether to ignore session boundaries
Requests price historical information in form of various bars.
Contract to request bars
End of time range for bars series
Amount of bars to load (Not applicable for Range and Momentum bars when IgnoreSessionBoundaries =
true)
Type of bars
Bar interval
Indicates whether to ignore session boundaries
Subscribes price historical information in form of price histogram.
Cancels updatable historical subscription
Subscription to cancel
Request additional contracts - options and strategies (compounds)
Base Contract
Calls internal method to process incoming data
Allows remoting access to this instance of OEC API
See .
Creates an instance of OECClient or connects remotely to exposed one, if searchRemoteAtFirst is true
Tries to connect to exposed remote OECClient
Updates a list of OSM algorithms.
This method is called by OSM broker, when it gets connected to or going to disconnect from OEC OrderServer.
A list of OSM algorithms
Loads a list of OSM algorithms.
The list of OSM algorithms.
Creates a draft for OSM child order.
OSM child draft, cloned from OSM root order
Sends symbol lookup request to server. Results will be available via event
Sends strict symbol lookup request to server. Results will be available via event
The result will contains only one contract with name that starts with Symbol
Sends a request to retrieve Quote Details. Quote Details will be available in Contract.QuoteDetails after event
OnQuoteDetailsChanged with defined contract
Requested contract
Sends a request to retrieve Index Components. Index Components will be available in Contract.IndexComponents after
event OnIndexComponentsReceived with defined contract
Requested contract
Creates a new blank
CustomCompound is a placeholder for contract parameters. To send a custom compound order, client needs to create a
custom compound instance,
adds its legs. The result should be used in
Submits a continuous contract rule for logged user. When the rule is applied
will be occurred
Continuous Contract Rule
RequestID
Removes a continuous contract rule for logged user. When the rule is applied
will be occurred
Continuous Contract Rule
RequestID
Submits new allocation block list for logged user. When the list is applied
will be occurred
New allocation block list
Validate allocation block
Disconnects logged user session
Logged user session
Sets logging config of API
Logging level
Request product calendar for certain base contract (Futures only)
Base contract
Loads and/or subscribes bars
Contract to subscribe
Data retrieve parameters such as start\end date or bar amount
Type of bars and bar parameters
Subscription
Push an UUID in the UUIDs stack.
This function is for trader's indicator developers only. Calls from other code will be ignored.
object which should be disposed to restore a previous value
using (client.UsingUUID("218ABC13-B115-4F8B-976E-8E3AAAB378A8"))
{
var order = client.SendOrder(orderDraft);
}
New custom contract created
number of items in the queue
Writes object in the queue
object to write
waits for data available and extract first item
null if no data in the queue and timeout expired
extracts first available item returns immediatelly.
null if no data in the queue
Portfolio margining changed
Affected account
Result of post-allocation
Property names used for Log.ThreadContext
Logger context stack property name for logging level. The following code will get logging level
(OECClient)Log.ThreadContext.Stacks[OECClient.LogSourceClientPropertyName].Peek()
Logger context stack Property name for client instance. The following code will get logging client instance
(LogLevel)Log.ThreadContext.Stacks[OECClient.LogSourceLevelPropertyName].Peek()
API Logging configuration
Level of logging
Gets or sets time interval meaning how often to log data feed messages. Every DataFeedLogIndexNumber messages will
be logged not more often than DataFeedLoggingInterval
Sets or gets index number of data feed message to log. Every DataFeedLogIndexNumber message (1st, 2nd ... etc) will
be logged
API log source layer
Non-application and non-transport activity inside API
Incoming price connection activity (data feed)
Activity between API and servers, all except incoming price connection (data feed)
Calls from application
All logging levels
Is underling option a put (or a call)
Option Strike.
Expiration date and time for the option.
Time until the option expires, in years.
Represents a parameter for an OSM algorithm.
Gets the name of a parameter.
Gets the value of a parameter as signed 32-bit integer.
Gets the value of a parameter as signed 64-bit integer.
Gets the value of a parameter as 64-bit floating-point value.
Gets the value of a parameter as boolean value.
Gets the value of a parameter as string value.
Gets the value of a parameter as date/time value.
Represents an enumerable list of OSM algo parameters.
Gets an OSM algo parameter by name.
The name of OSM algo parameter
Represents a parameter for an OSM algorithm.
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Creates an OSM algo parameter.
Name of a parameter
Value of a parameter
Gets the name of a parameter.
Gets the value of a parameter as signed 32-bit integer.
Gets the value of a parameter as signed 64-bit integer.
Gets the value of a parameter as 64-bit floating-point value.
Gets the value of a parameter as boolean value.
Gets the value of a parameter as string value.
Gets the value of a parameter as date/time value.
Clones OSM algo parameter.
Returns a string that represents the current instance.
Represents an enumerable list of OSM algo parameters.
Gets an OSM algo parameter by name.
The name of OSM algo parameter
Adds OSM algo parameters.
OSM algo parameters
Adds OSM algo parameter.
OSM algo parameter
Removes an OSM algo parameter.
The name of the OSM algo parameter to remove
Clears the list of OSM algo parameters.
Clones a list of OSM algo parameters.
Returns the list of OSM algo parameters as a string.
Returns enumerator.
Represents an OSM root order.
OSM root order is stored as order extended data.
Creates an OSM root order.
The name of OSM algorithm
List of OSM algo parameters
Gets the name of an OSM algorithm.
Gets the tist of OSM algo parameters.
Clones OSM root order.
Returns a string that represents the current instance.
Represents an OSM child order.
OSM child order is stored as order extended data.
Gets the OSM root order, which this child order belongs to.
Clones OSM child order.
Returns a string that represents the current instance.
Represents data domain for a value of OSM algo parameter.
Factory method that creates an instance of class.
Measure units for value
Default value
Minimal value
Maximal value
Data domain for signed 32-bit integer value
Factory method that creates an instance of class.
Measure units for value
Default value
Data domain for signed 32-bit integer value
Factory method that creates an instance of class.
Measure units for value
Default value
Minimal value
Maximal value
Data domain for signed 64-bit integer value
Factory method that creates an instance of class.
Measure units for value
Default value
Data domain for signed 64-bit integer value
Factory method that creates an instance of class.
Measure units for value
Default value
Minimal value
Maximal value
Data domain for 64-bit floating-point value
Factory method that creates an instance of class.
Measure units for value
Default value
Data domain for 64-bit floating-point value
Factory method that creates an instance of class.
Default value
Data domain for boolean value
Factory method that creates an instance of class.
Measure units for value
Default value
Data domain for boolean value
Factory method that creates an instance of class.
Default value
Minimal length of a string
Maximal length of a string
Data domain for string value
Factory method that creates an instance of class.
Default value
Data domain for string value
Factory method that creates an instance of class.
Default value
Minimal value
Maximal value
Data domain for date/time value
Factory method that creates an instance of class.
Default value
Data domain for date/time value
Factory method that creates an instance of class.
Default value
Values of enumeration
Data domain for string-enumeration value
Gets data type for data domain.
Gets OSM algo parameter with default value.
Gets measure units for data domain.
Clones data domain.
Returns a string that represents the current instance.
Validates an OSM algo parameter to this data domain.
Throws an exception if validation failed.
OSM algo parameter to be validated
Represents information about OSM algo parameter.
Creates OSM algo parameter.
The name of OSM algo parameter
Data domain for the OSM algo parameter
Enable/disable the OSM algo parameter
Description of the OSM algo parameter
Creates OSM algo parameter.
The name of OSM algo parameter
Data domain for the OSM algo parameter
Enable/disable the OSM algo parameter
Description of the OSM algo parameter
For internal use only
Creates OSM algo parameter.
The name of OSM algo parameter
Specifies that the value of an OSM algo parameter can be changed in modify command for OSM root order.
Data domain for the OSM algo parameter
Enable/disable the OSM algo parameter
Description of the OSM algo parameter
Creates OSM algo parameter.
The name of OSM algo parameter
Specifies that the value of an OSM algo parameter can be changed in modify command for OSM root order.
Data domain for the OSM algo parameter
Enable/disable the OSM algo parameter
Description of the OSM algo parameter
Flexible part of description
Gets the name of OSM algo parameter.
Gets the flag specifying that the value of OSM algo parameter can be changed in modify commands.
Gets data domain of OSM algo parameter.
Gets description of OSM algo parameter.
Gets enabled/disabled state of OSM algo parameter.
Flexible part of description. For internal use only.
Clones OSM algo parameter.
Represents an enumerable list of OSM algo parameters.
Gets an OSM algo parameter by name.
The name of OSM algo parameter
Represents information about an OSM algorithm.
Gets the name of OSM algorithm.
Gets a list of OSM algo parameters.
Gets an enumerable list of order types, supported by OSM algorithm.
Gets an enumerable list of order flags, supported by OSM algorithm.
Validates an OSM root order to this OSM algo information.
OSM root order to be validated
This method throws an exception if validation failed.
Validates an OSM root draft to this OSM algo information.
OSM root draft to be validated
This method throws an exception if validation failed.
Represents information about an OSM algorithm.
Represents a list of OSM algo parameters.
Adds an OSM algo parameter.
The name of OSM algo parameter
Data domain of OSM algo parameter
Enable/disable the OSM algo parameter
Description of the OSM algo parameter
Adds an OSM algo parameter.
OSM algo parameter to be added
Adds OSM algo parameters.
OSM algo parameters to be added
Clears the list of OSM algo parameters.
Removes an OSM algo parameter by name.
The name of OSM algo parameter to be removed.
Gets an OSM algo parameter by name
The name of OSM algo parameter
Clones list of OSM algo parameters.
Returns enumerator.
Creates OSM algorithm.
The name of OSM algorithm.
List of OSM algo parameters
Flexible part of description
Sets a list of order types.
List of order types.
Sets a list of order flags.
List of order flags.
Gets the name of OSM algorithm.
Gets the list of OSM algo parameters.
Clones OSM algorithm.
Gets the list of order types, supported by OSM algorithm.
Gets the list of order flags, supported by OSM algorithm.
Validates an OSM root order to this OSM algo information.
OSM root order to be validated
This method throws an exception if validation failed.
Validates an OSM root draft to this OSM algo information.
OSM root draft to be validated
This method throws an exception if validation failed.
Represents a list of OSM algorithms.
Gets OSM algorithm by name.
The name of OSM algorithm
Gets an enumerable list of OSM algorithms.
Validates an OSM root order to this list of OSM algorithms.
OSM root order to be validated.
This method throws an exception if validation failed.
Validates an OSM root draft to this list of OSM algorithms.
OSM root draft to be validated.
This method throws an exception if validation failed.
Represents a list of OSM algorithms.
Adds an OSM algorithm.
OSM algorithm to be added
Clears list of OSM algorithms.
Removes OSM algorithm by name.
The name of OSM algorithm to be removed.
Gets OSM algorithm by name.
The name of OSM algorithm
Clones list of OSM algorithms.
Validates an OSM root order to this list of OSM algorithms.
OSM root order to be validated.
This method throws an exception if validation failed.
Validates an OSM root draft to this list of OSM algorithms.
OSM root draft to be validated.
This method throws an exception if validation failed.
Gets an enumerable list of OSM algorithms.
Bitmask representing order properties. See .
This enum represents set of order properties, needs to be filled.
None
Order account
Order side
Order quantity
Order contract
Order type
Order price
Order price 2
Extended Params
Order execution time
Order allocation block
Execution route
Custom Compound
Order flag
Abstract draft.
This class is intended for unified order parameters representation, so same code can be used to set up
order parameters for a new order or existing order modification.
See and for details.
Makes order draft with owner
owner of order draft
client is used to check order's data
Order account
Order side
Order contract
Order quantity
Order type
Limit price or stop price for STP and STPLMT orders
Limit price for STPLMT orders
Price delta for bracket order
Price delta for bracket order
Order execution flags
This property should be used instead of Contract for custom compound orders
Order execution instructions
Trading Session (for equities only)
Order execution route
Order comments - usually specified a way order was entered
Execution start time, UTC. Version.MinimumStart means immediate execution
Execution end time, UTC. Version.MaximumEnd means no premature cancellation.
PIN that must be passed for particular equity contracts
Extended order data.
Order Allocation Block
Gets OSM root order
Clears extended order data
Sets TralingStop parameters.
Usually reference price is the last trade price, and delta is 0.
Reference price
Price change threshold
Sets TralingStop parameters for equity orders
Trailing amount
Indicates that the trailing amount is in percentage
Trailing order trigger price type
Sets volume-based stop parameters
Trigger volume
Sets Iceberg order displayed quantity(volume)
shown volume
Sets GTX-related parameters
Partial Fill Restriction: order may only be matched in amounts of at least this quantity of CCY1
Reserve Size: only display this amount of CCY1. Upon any partial fill the amount will be
replenished up to this amount until the full order quantity is exhausted
Partial Fill Restriction: only allow partial fills in multiples of this amount
The scope of the “related to” price of the peg
Identifies which side of the book will trigger a stop order
Treats order quantity as CCY2
If AveragePriceLimit, then partial fills may occur at prices beyond the requested limit price
if earlier partial fills occurred at a better price, as long as the overall average filled price remains better
than the requested limit price
Validates extended order data
true if validation passed
Checks order draft validity.
This method checks whether order draft properties are filled correctly and draft is ready to send.
Object properties, such as and needs to be assigned,
should be non-zero positive; and should
be set to valid values; and must
be assigned only if given order type requires price(s).
Set of parts that are invalid
Required order prices per type.
Number of price fields required for an order of given type.
Market orders does not require any price,
STPLMT orders require 2 price fields.
order type
0,1,2
Number of price fields required for an order of current type.
See also
0,1,2
Order as text
String representation of order
String representation of order using specified format
Format string
Value
Output
-
G
Generic format
-
S
Order side
-
Q
Order quantity
-
C
Order contract
-
E
Order type, price and flags
-
F
Filled quantity
-
L
Leaves quantity
-
T
Order type
-
P or P1
Order limit/stop price
-
P2 or 2
Current order limit price for STPLMT orders
-
FG
Order execution flags
To change case of output string add one of the following values:
-
U
Upper case
-
L
Lower case
-
T
Title case
String representation of order in accordance with specified format
An draft for a new order.
This order draft intended for creation of a new order.
All properties should be set up before is called.
Construct new instance
owner of order draft
client is used to check order's data
Gets or sets DealQuote for NewOrderDraft.
Checks order draft validity.
Converts the draft to a string.
New order draft can be created from saved or constructed string using
OECClient.CreateDraft method.
Order parameters in the string are in following order:
;;;
;;;
;;
Draft to be serialized
string-serialized draft
draft for modify requests
This order draft intended to set variable orders parameters (qty, type, prices, flags) for modification of an
existing order.
, and
of an existing order could not be modified as well as
.
Constructs an instance of draft for given order
order to be modified
owner of order draft
client is used to check order's data
Returns original order account
Throws an exception if modification attempted
Returns original order side
Throws an exception if modification attempted
Returns original order contract
Throws an exception if modification attempted
Returns original order execution route
Throws an exception if modification attempted
Specifies a custom compound for this order. Modification is not allowed.
Gets the modifying order comments
Event batch begin or end
Error occurred
exception
Occurs when client is logged on and data are loaded
Occurs when connection failed to be established
Failure reason
Occurs when connection is terminated
false if disconnected by user request
Occurs when connection is forcibly closed by administrator
Text message
Order was confirmed by server
Order that was confirmed
Local order id that was replaced
Order state was changed
changed order
Previous order state
Order fill created or changed
changed order
new/changed fill
Command executed or failed
affected order
affected command
Occurs when any position value is changed
changed account
changed position
Occurs when any summary value (p/l or balance related) is changed
changed account
changed currency
Occurs when contract price changed
affected contract
new price values
Currency price (conversion rate) was changed
affected currency
Price values
DOM data updated
affected contract
Cash balance changed
affected account
balance currency
User online status was changed
affected user
Chat message was received
from User
Message text
News message was received
News channel
Message text
Ticks batch received
Subscription
received ticks
History data (bars) received
Subscription
Bar data
History data (bars) received
Subscription
Bar data
History data (bars) received
Subscription
Bar data
History data (bars) received
Subscription
Bar data
Histogram data received
Subscription
Histogram data
Environment data changed
New Contracts(Options) received
Base Contract changed (or null)
Contract info updated
Contract changed
Continuous Contract Rule updated
ID of source request
ContinuousContractRule changed
Allocation blocks updated
New allocation block list
Logged user sessions updated
New logged user sessions list
The list of OSM algorithms is updated.
The list of OSM algorithms is loaded.
The list of OSM algorithms
The list of found symbols for symbol lookup request
QuoteDetails updated
affected contract
IndexComponents updated
affected contract
Occurs when any compound group or its leg position is changed or a new contract group created
changed or created group
changed leg position. null, if all group changed or a new group created
Occurs when account risk limit changed
affected account
Occurs when contract risk limit changed
affected contract
Occurs when risk limit changed
list of changed risk limits
Occurs when a product calendar updated
Base contract of product calendar
Occurs when admin messages dashboard changed
Exchange.
Prices from this exchange require a Data Feed Entitlement
List of items - see OECClient.Exchanges
The list is indexed by ID and Name
fill data.
When order is executed on exchange, it receives one or more fills.
Fill contains and of execution. When amount of fills
of an order is equal to order total quantity, order can considered as 'Filled'.
However, fill could be cancelled by broker - in this situation flag is set to false,
and this fill will not be taken in account in filled quantity
and average filled price calculations.
Each fill causes the of order contract to change. Cancelled fills revert position to
previous value.
Usually, fills are not changed after order gets state.
Decodes fill for given order
Order of fill
serializable fill data
contract
Filled quantity
Fill price
Broker comments
Fill timestamp, UTC
Checks whether fill was not cancelled
Commission taken for this particular fill.
Currency of commission
Commission taken for this particular fill.
Type of fill
Contract of fill
Gets the OSM child that caused this fill.
Fill extended data.
Trade Date
Serializes a fill
serializable fill data
Fill formatted as {qty} @ {price} {state} {comments}
text representation of fill
List of fills - see Order.Fills
Note: average weighted price and total filled quantity
is calculated only for active fills.
Average weighted filled price
Total filled quantity
Adds a fill or updates existing
Calculates total quantity of active fills
total filled quantity
Calculates average price of active fills
Avg.Price
Total Quantity formatted as {total} or {first-leg}-{second-leg}
text representation of total quantity
Total Quantity formatted as {total} or {first-leg}-{second-leg}
text representation of total quantity
Compares fills by timestamp
Histogram for price/volume values
count of histogram levels
Total volume
Weighed Average
Maximum Volume
returns price at given level
returns volume at given level
returns volume for given price
Ticks object - contains array of timestamps and array of prices - one price per one timestamp.
See and
Price values of ticks
Price values of ticks
Exchanges of ticks.
Price values of ticks
Timestamps of ticks
Types of ticks.
Volumes of ticks
Volumes of ticks (32-bit values)
Timestamps as a list
Prices as a list
Bid prices as a list
Ask prices as a list
Volumes as a list
Exchanges as a list
Price bar - Open, High, Low, Close, Volume values and Timestamp.
See
Bar close value
Bar close timestamp, UTC
Number of ticks going down
Volume of ticks going down
Bar high value
Bar low value
Bar open value
Number of ticks
Bar open timestamp, UTC
Number of ticks going up
Volume of ticks going up
Bar volume
Bar volume 64-bit value
Settle Price
Text representation of the Bar
List of Bars
Subscription
Amount of bars/ticks per request
ignored for Price/DOM/Momentum and range bars
Contract
Currency
End of range
ignored for Price/DOM
Ignores session boundaries
Bar interval
0 for Price/DOM/Tick,
minutes for bars,
ticks for tickbars,
volume for volumebars
Start of range
ignored for Price/DOM
Subscription type
Updatable or one-time
Data retrieve parameters such as Start\EndDate or bar amount
BarDescription for the subscription
Bar interval
TimeSpan.Zero for Price/DOM/Tick,
minutes for bars,
ticks for tickbars,
milliseconds for volumebars
Local unique order ID generator
List of subscriptions
A chat message.
Intended for future storage of text messages
User who sent the message
Message text
Timestamp, UTC
True, if message was received and False if sent by current user
List of chat messages in chronological order
List of administrator's dashboard messages
Creates list of dashboard messages
Administrator's dashboard message
Creates empty message
Dashboard message
Message expiration time
A news message.
Intended for future storage of news messages
News channel name
Message text
Timestamp, UTC
List of news messages in chronological order
list of custom properties
A client order.
When order is created, its placed to collection with a local ID (always negative).
As server receives the order, it confirms it and assigns a global unique order ID, then client is notified by
event.
At this point, order current state is , it has one in its
collection,
a create with initial order in and
respectively.
Some orders, especially pit or MOO/
MOC ones, could then change their state to
- this means that
they are not active yet and waiting of activation. MOO/MOC orders
Prior to activation, order can be rejected at different stages by risk system, live broker or electronic execution
system.
In this case it becomes
When order is accepted by system, broker and/or electronic execution system, it becomes
- this means that order is active and could be filled.
orders usually get filled and completed in a few milliseconds, if trading
session is now active for order . Other orders
will wait until order condition is satisfied.
Client can request order cancellation - see , or modification - in this case he
needs to
create a , change values he wants to modify and call
method.
Both of these actions creates a , and modification also creates a new order version.
Finally, order becomes or - note,
that
cancellation of a partially filled order makes the order completed, so client should look at
filled quantity instead of order quantity to
see
whether order was fully completed or not.
Order account
Order Side (Buy/Sell)
Helper property that evaluates Side property
Order contract
Order creation timestamp
Order comments
Trader, to whose account order belongs (for admins) or null (for traders)
Routing group for admins, null for traders
Children orders for allocation block order
Parent order for allocation block child order
Execution route
Custom Compound: detailed declaration of the legs
Represents a specific market trading session
Order allocation block
Order cannot be cancelled or modified
Current state of order
Gets the active server strategy, which the order belongs to,
or null if no active server strategy is associated with the order.
Gets OSM root order. If this property is not null, that means the order is an OSM child order.
Extended data
ID of last active version of order
Total order quantity
Current order type
Current order limit/stop price
Current order limit price for STPLMT orders
Order execution flags of last active version
Gets type and (optionally) price as "MKT", "LMT 1234.0", "STP 123 07.25 LMT 120 31.75"
Post-allocation instructions. See for details how to submit post-allocation
instructions
Order fills, active and cancelled.
Order states history
Each time when order is changed, a new item is added
to states collection.
Order version history
This list contains at least one (initial) version, and can contain versions from modification commands, even
if they are pending or already failed.
Order commands
Contains at least one creation command with initial version, and can contain cancel and replace commands,
even if they still pending or already failed.
constructs an empty order
Constructs a copy of an order
Serializes order
serialized order data
creates a string like "Buy 1 ESH6 LMT 123 GTC"
String representation of an order
Checks whether the order is market
Checks whether order is Completed, Cancelled or Rejected
so no state changes are expected
Checks whether order is fully filled (filled quantity = total quantity)
Link to main OSO order
Link to leg of main OSO order
Link to paired OCO order
Link to parent reference order
Link to children suborders
List of orders - see OECClient.Orders.
The list indexed by order ID
Base type for order sub-items, like state, command, version or fill
Parent order
Routing group - see Order.Group.
Routing groups are visible only to Admin and Broker logins.
List of routing groups - see OECClient.PitGroups
The list is indexed by ID and Name
Position volume/price stats and Profit/Loss values
per and
Position stats are represented by elements. There are four items :
previous session closing position,
contracts bought and sold in the current session,
current position.
Also, there are profit/loss values for closed and open position part
- see and .
Total P/L statistics per are available in
Account.TotalBalance property.
Checks whether the position is element of detailed position history
or daily position summary
Account of the position
Contract of the position
Contract size. The same as Contract.ContractSize, but depends on account type in the case of FX accounts.
Current market value of options position in native currency
Current market value of options position in USD
Cost basis of options position in native currency
Cost basis of options position in USD
Fills of position
Business date of the position
Commissions for fills of closed position
Commissions for fills of open position
Maintenance margin of open position in native currency
Maintenance margin of open position in USD
Initial margin of open position in native currency
Initial margin of open position in native currency
Position timestamp, UTC
Fills placed earlier will not be added to statistics
Display name of contract (single of dual)
Main contract (electronic preferred) of the position
Calculates contract size of contract for account
Calculates contract size of contract for allocation block
Bought contracts and avg. buy price.
Sold contracts and avg. sell price.
Net position and avg. price
True if Position is neither long nor short
Previous day position and avg. price
Realized profit/loss in native contract currency.
See also
Realized profit/loss converted to USD
minus commissions.
See also
Theoretical profit/loss of open position agains last market price in native currency.
See also
Theoretical profit/loss of open position against last market price in USD
minus commissions
See also
Total profit/loss (sum of realized and open p/l) in native currency.
See also
Total profit/loss (sum of realized and open p/l) in USD.
See also
Theoretical profit/loss of open position against previous settlement price in native currency.
See also
Theoretical profit/loss of open position against previous settlement price in USD
minus commissions.
See also
Type of positition depends of its fills
Previous day position
Position contains only electronic fills
Position contains only pit fills
Position contains mixed type fills
List of Positions indexed by . See
List of detailed Positions. See
Real-time price data for a contract
Data from r/t price feed are stored in form of a Price object. It contains momentary values, like
,
and daily stats, such as and .
Subscription for price data is controlled by and
methods.
Client notified of price update by , and
latest update is also available in Contract.CurrentPrice property.
See also for depth of market information.
Last traded price
Volume of last trade
Cumulative volume of last same price trades
Best ask price
Best ask volume
Best bid price
Best bid volume
Total daily volume
Last trade timestamp
Daily open price
Daily high price
Daily lov price
last price - prev.Priorsettlement
price change in percents
Previous price (obsolete)
Settlement of previous day
Settlement of previous day
Settlement of current day
Settlement of current day
Open interest
Flag: Don't update UI
Flag: Don't show price, only for position caluclations.
Greeks, ImpliedVolatility
Greeks, Vega
Greeks, Theta
Greeks, Gamma
Greeks, Delta
Greeks, Rho
Valid fields
Depth of Market data for a . See Contract.DOM.
For ask and bid sides, there are two arrays with same number of items. First one,
named [Ask|Bid]Levels, contains price values of "price ladder". Second, named [Ask|Bid]Sizes,
contains volumes per corresponding level.
To control subscription, client should use /
methods.
List of bid sizes per level.
See also
List of ask sizes per level.
See also .
List of bid price levels.
See also .
List of ask price levels.
See also .
Last update time, UTC
List of ask exchanges.
See also .
List of bid exchanges.
See also .
Update values
serialized DOM data
state history item.
Order has a history of its state changes in collection.
For each state change, there is a and - for example,
for state comments will contain the reason of rejection.
Construct a new state with blank id
State
Parent order
construct state change object from serialized data
serialized data
Order of this state
State of order
Timestamp of state change, UTC
Comments/reason of state change
formats state name and comments if present
verbal state representation
history of an - see Order.States.
property holds most recent state of the order.
Last order state change, containing current order state.
APIAccessPermission controls API code from the Trader application environment.
It is not intended for using by 3rd party developers
Helper class with string transformations and formatting
Full names of order types
Short names of order types with price placeholders
Returns a sign by currency name or currency name, if it is unrecognized
Convert floating value to text with money format, including currency sign
Contract type names
symbol names of contract months F for Jan, G for Feb etc.
Returns a string representing input mask for given format and tick
Price format value
Tick size
format mask, like #.## or # ##.##
Formats price using given format specifiers
Price format value
multiplier (power of ten)
Tick size
Price to format
formatter price
Formats price using given format specifiers
Price format value
multiplier (power of ten)
Tick size
Price to format
Culture for price format
formatter price
Formats price deriving tick size from the price format or by using given ticksize it is less.
Price format
multiplier (power of ten)
Tick size
Price to format
formatted price
Cuts out the part before the first occurence of separator
string to split
Separator string
Cut part or empty string
Cut out the part before the first occurence of separator, if any
string to split
Separator string
remainder or whole string
Formats order execution time (UTC) to normal string presentation.
UTC Time to format
Formats order execution time to normal string presentation.
Local Time to format
Checks whether value is default time
Start/End time
Parses a string to order execution time.
text to parse
value if text cannot be parsed
minimum value
Gets order side string formatted according to contract kind
Contract used for formatting
Side being formatted
Appropriate formatted string
Formatter for big integer values, provides collapsed representation like "300K" or "5.25M".
Formats integer value.
Parses (collapsed) integer value.
Gets order quantity string formatted according to contract kind
Contract used for formatting
Quantity being formatted
Appropriate formatted string
Returns a value indicating that quantity formatting should be used to represent quantity values of the specified
contract.
Gets side formatted for equity options
Side being formatted
Appropriate formatted string
Gets side formatted in short form for Equity Options
Side being formatted
Appropriate formatted string
Gets side formatted in short form for Stocks
Side being formatted
Appropriate formatted string
Gets traiding session short formatted string
Traiding session being formatted
Appropriate formatted string
Utility class for formatting and parsing prices
This class using special notation for price format:
- positive values specifies number of digits after decimal point (2 = 0.00)
- negative - divisor of fraction (-32 = 1/32)
Construct the formatter using given format specifiers, value and min/max value
Multiplier, power of 10
Tick size - mimimal price increment
Price value
Minimum
Maximum
Constructs a formatter using contract format specifiers and given value
Constructs formatter using given format specifiers value and default min/max values (0, 1e9)
Multiplier, power of 10
Tick size - minimal price increment
Price value
Represents underlying trader, his accounts and orders
Underlying traders are available for Admin or TraderManager accounts.
Accounts of trader
Orders of trader
Trader category
Trader properties
List of traders - see OECClient.Traders
The list is indexed by ID and Name
Trader category
List of trader categories
Processes historical requests
Subscibes to some time of data subscription
Unsubscibes to some time of data subscription
Indicates the contract is a fake one and created by this layer
Initiates unsubscribing of all subscriptions
General contract properties
Contract has been created as a fake. No trading is available
Real=Time prices subscribed
Creates the provider as a section of the executing chain
Next execution layer
Processes the response from NextProvider. By default, sends it up
Sends the response up
Executes request
Occurs when response received
pumps messages from the connection
called by winforms timer to make processing and events happen in the main thread
Returns configuration object
Templated version of GetConfiguration(Type ConfigurationType)
Representation of another user in OEC system
This class can be used to check status of another user or
send him a message
decodes data and creates an instance
serialized user data
creates a stub
Checks online status
List of related users - see OECClient.Users.
List is indexed by ID and Name.
List of another sessions of current user
Describes logged user session
Sessions application
Session start time
Session host
Session UUID
version - contains variable parameters of an order.
Order can have multiple versions, if it was modified. Initial version
of order is associated with create , all others - with their modify commands.
Version of last successful modify command, or initial version is an order current version.
All the variable order properties are retrieved from order current version, so
has the same value as Order.Versions..
Order quantity
Order type
Order limit/stop price
Current order limit price for STPLMT orders
Delta for bracket order
Delta for bracket order
Version comments (not used)
Order execution flags
ExecInst: All Or Nothing
Trading Session can be used to represent a specific market trading session
associated create or modify command
Extended data
Gets OSM root order
Execution start time, UTC
if value <= Now, execution starts immediately, otherwise order would be held until specified time.
Execution stop time, UTC
Order will be cancelled at this time. Value later than normal order end time (end of session for day orders or
expiration date for GTC) would be ignored
Minimum execution start time. Flag of default behavior
Maximum execution stop time. Flag of default behavior
constructs version from serialized data
parent order
serialized data
associated command
Create a copy of version (for modification)
Create a copy of version with new Order (for modification)
Create serializable version
serializable data
returns order type, price and flags as string (STP 1 LMT 2 GTC)
string representation version
returns this version string representation in form "Buy 1 ESH6 STP 1 LMT 2 GTC"
order as string
history of an - see Order.Versions
.
Last version that have associated command in executed state is active.
Order has at least one active version
Current (active) version of order
Active version is defined as a version associated with last executed create/modify command.
Pending or failed modification commands do not affect active order version.