NAV Navbar
Logo
Json

DASSET API

WebSocket API

The WebSocket protocol provides full-duplex communications channels over a single persistent TCP connection.

For real-time exchange data or high frequency activity we recommend using our WebSockets API.

WebSocket URI: wss://api.dassetx.com/WSGateway/

All WebSocket requests require the trailing “/” in the URI

Background Information

This section provides important information about the Dasset Exchange Platform.

Message Frame

Wrap all calls to the Dasset software in a JSON-formatted frame object. Responses from the software are similarly wrapped.

{ 
"m":0, 
"i":0, 
"n":"function_name", 
"o":"payload" 
}

String Value
m message type integer. The type of the message:
0 request
1 reply
2 subscribe to event
3 event
4 unsubscribe from event
5 error
i sequence number long integer. The sequence number identifies an individual request, or requestand- response pair, to your application.
A non-zero sequence number is required, but the numbering scheme you use is up to you. No arbitrary sequence numbering scheme is enforced by Dasset.
Best practices: A client-generated API call (of message types 0, 2, and 4) should:
Carry an even sequence number.
Begin at the start of each user session.
Be unique within each user session.
Begin with 2 (2, 4, 6, 8).
Message types 1 (reply), 3 (event), and 5 (error) are generated by the server. These messages echo the sequence number of the message to which they respond. See Example, below..
n function name string. The function name is the name of the function that you are calling or that the server responds to. The server echoes your call. See Example, below.
o payload Payload is a JSON-formatted string containing the data being sent with the message. Payload may consist of request parameters (string-value pairs) or response parameters.

When sending a request in the frame to the software using JavaScript, a call looks like:

var frame = 
{
"m":0,
"i":0,
"n":"function name",
"o":""
};
var requestPayload = 
{ 
"Parameter1":"Value", 
"Parameter2":0
};
frame.o = json.Stringify(requestPayload);
//Stringify escapes the payload's quotation marks automatically.
WS.Send(json.Stringify(frame)); //WS.Send escapes the frame.

When receiving a frame from the software, use the frame to determine the context, and then unwrap the content:

var frame = json.Parse(wsMessage);
if (frame.m == 1) //message of type reply
{ 
//This is a Reply 
if (frame.n == "WebAuthenticateUser") 
{ 
var LoginReply = json.Parse(frame.o); 
if (LoginReply.Authenticated) 
{ 
var user = LoginReply.User; 
} 
}
}

Standard Response Object and Common Error Codes

A response to an API call usually consists of a specific response object (as documented in this guide), but both successful and unsuccessful responses may consist of a generic response object that verifies that the call was received; the response to an unsuccessful call provides an error code. A generic response looks like:

{ 
"result": true, 
"errormsg": "", 
"errorcode": 0, 
"detail": ""
}

Where:

String Value
result Boolean. If the call has been successfully received by the Order Management System, result is true; otherwise, it is false.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the call returns 0. An unsuccessful receipt of the call returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. The content of this parameter is usually null.

Authenticated and Public Calls

All API calls require that the user be logged-in and authenticated — with the following exceptions that can be called without prior authentication:

Authenticate2FA GetTickerHistory
WebAuthenticateUser SubscribeLevel1
LogOut SubscribeLevel2
GetInstrument SubscribeTicker
GetInstruments UnsubscribeLevel1
GetProduct UnsubscribeLevel2
GetProducts UnsubscribeTicker

Registration and Authentication

WebAuthenticateUser

Request

Request

[

  {
"UserName": "UserName",
"Password": "Password"

  }

]

WebAuthenticateUser authenticates a user (logs in a user) for the current websocket session. You must call WebAuthenticateUser in order to use the calls in this document not otherwise shown as “No authentication required.”

String Value
UserName string. The name of the user, for example, jsmith.
Password string. The user password. The user logs into a specific Order Management System via Secure Socket Layer (SSL and HTTPS).





Response

Unsuccessful response:

Unsuccessful response:

[
  { 
"Authenticated": false 

  }
]

Where:

String Value
Authenticated Boolean. The default response is false for an unsuccessful authentication.









Successful response:

A successful response returns the following (with UserId and SessionToken simulated):

[
{
"Authenticated": true,
"SessionToken": "7d0ccf3a-ae63-44f5-a409-2301d80228bc",
"UserId": 1
}
]

Where:

String Value
Authenticated Boolean. The response is true for a successful authentication.
SessionToken string. SessionToken uniquely identifies the session on the OMS. By returning the SessionToken in the response, the user can log in again if the session is interrupted without going through two-factor authentication.
UserId integer. Returns the user ID of the authenticated user.

Authenticate2FA

Completes the second part of a two-factor authentication by sending the authentication token from the non-Dasset authentication system to the Order Management System. The call returns a verification that the user logging in has been authenticated, and a token.

Here is how the two-factor authentication process works:

  1. Call AuthenticateUser. The response includes values for TwoFAType and TwoFAToken. For example, TwoFAType may return “Google,” and the TwoFAToken then returns a Google- appropriate token (which in this case would be a QR code).

  2. Enter the TwoFAToken into the two-factor authentication program, for example, Google Authenticator. The authentication program returns a di erent token.

  3. Call Authenticate2FA with the token you received from the two-factor authentication program (shown as YourCode in the request example below).

Request

Request

[
{
"Code": "YourCode"
}
]

Where:

String Value
Code string. Code holds the token obtained from the other authentication source.

Response

Response

[
{
"Authenticated": true,
"SessionToken": "YourSessionToken"
}
]

Where:

String Value
Authenticated Boolean. A successful authentication returns true. Unsuccessful returns false.
SessionToken string. The SessionToken is valid during the current session for connections from the same IP address. If the connection is interrupted during the session, you can sign back in using the SessionToken instead of repeating the full two-factor authentication process. A session lasts one hour after last-detected activity or until logout.

Authenticate2FA

To send a session token to re-establish an interrupted session, send:

[
{
"SessionToken": "YourSessionToken"
}
]

LogOut

Logout ends the current websocket session.

Request

There is no payload for a Logout request.

Request

{ }

Response

Response

[
{
"Result":true,
"errormsg":null,
"errorcode":0,
"detail":null
}
]

Where:

String Value
result Boolean. A successful logout returns true; and unsuccessful logout (an error condition) returns false.
errormsg string. A successful logout returns null; the errormsg parameter for an unsuccessful logout returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
Not Authorized and Resource Not Found are unlikely errors for a LogOut.
errorcode integer. A successful logout returns 0. An unsuccessful logout returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null.

ResetPassword

ResetPassword is a two-step process. The rst step calls ResetPassword with the user’s username. The Order Management System then sends an email to the user’s registered email address. The email contains a reset link. Clicking the link sends the user to a web page where he can enter a new password.

Request

Request

[
{
"UserName": "UserName"
}
]

Where:

String Value
UserName string. The name of the user, for example, jsmith

Response

Response

[
{
"Result": true,
"errormsg": null,
"errocode": 0,
"detail": null
}
]

Where:

String Value
result Boolean. Returns true if the UserName is valid; false if not.

Order-Handling Calls

CancelAllOrders

Cancels all open matching orders for the specified instrument, account, user or a combination of them.

User 37 Acc’t 14 Instr Cancels all orders for..
X X X Account #14 belonging to user #37 for instrument #25.
X X Account #14 belonging to user #37 for all instruments.
X X All accounts belonging to user #37 for instrument #25.
X All accounts belonging to user #37 for all instruments.
X X All users of account #14 for instrument #25.
X All users of account #14 for all instruments.
X All accounts of all users for instrument #25. (requires special permission)
All accounts of all users for all instruments (requires special permission)

Request

Request

[
{ 
"AccountId": 0, 
"UserId":0, 
"OMSId": 0,
"InstrumentId": 0
}
]

Where:

String Value
AccountId integer. The account for which all orders are being canceled. Conditionally optional.
UserId integer. The ID of the user whose orders are being canceled. Conditionally optional.
OMSId integer. The Order Management System under which the account operates. Required.
InstrumentId long integer. The ID of the instrument for which all orders are being cancelled. Conditionally optional.

Response

Response

[
{ 
"result": true,
"error msg": "",
"errorcode": 0,
"detail": ""
}
]
String Value
result Boolean. If the call has been successfully received by the Order ManagementSystem, result is true; otherwise, it is false.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the call returns 0. An unsuccessful receipt of the call returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. The content of this parameter is usually null.

CancelOrder

Cancels an open order that has been placed but has not yet been executed. Only Dasset can cancel orders for another user or account.

Request

The OMS ID and the Order ID precisely identify the order you wish to cancel. The Order ID is unique across an OMS.

If you specify the OMS ID and the Account ID, you must also specify at least the Client Order ID. The OMS is unable to identify the order using only the OMS ID and the Client Order ID, as the Client Order ID may not be unique.

Request

[
{ 
"OMSId": 0,
"AccountId": 0,     
"ClientOrderId": 0, 
"OderId": 0     
}
]

Where:

String Value
OMSId integer. The Order Management System on which the order exists. Required.
AccountId integer. The ID of account under which the order was placed. Conditionally optional.
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0. Conditionally optional.
OrderId long integer. The order to be cancelled. Conditionally optional.

Response

The response to CancelOrder verifies that the call was received, not that the order has been canceled successfully. Individual event updates to the user show order cancellation. To verify that an order has been canceled, call GetOrderStatus or GetOpenOrders.

Response

{ 
"result": true, 
"errormsg": "", 
"errorcode": 0, 
"detail": ""
}

Where:

String Value
result Boolean. Returns true if the call to cancel the order has been successfully received, otherwise returns false.
errormsg string. A successful receipt of a call to cancel an order returns null; the errormsg parameter for an unsuccessful call to cancel an order returns one of the following messages
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successfully received call to cancel an order returns 0. An unsuccessfully recieved call to cancel an order returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. The contents of this parameter are usually null.

CancelReplaceOrder

CancelReplaceOrder is single API call that both cancels an existing order and replaces it with a new order. Canceling one order and replacing it with another also cancels the order’s priority in the order book. You can use ModifyOrder to preserve priority in the book; but ModifyOrder only allows a reduction in order quantity.

Request

Request

{ 
"OMSId": 0, 
"OrderIdToReplace": 0, 
"ClientOrdId": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown", 
] 
}, 
"AccountId": 0, 
"InstrumentId": 0, 
"TrailingAmount": 0, 
"LimitOffset": 0, 
"DisplayQuantity": 0, 
"LimitPrice": 0, 
"StopPrice": 0, 
"PegPriceType": { 
"Options": [ 
"Unknown", 
"Last", 
"Bid", 
"Ask", 
"Midpoint" 
] 
}, 
"TimeInForce": { 
"Options": [ 
"Unknown", 
"GTC", 
"IOC", 
"FOK", 
] 
},
"OrderIdOCO": 0, 
"Quantity": 0
}

Where

String Value
OMSId integer. The ID of the Order Management System on which the order is being canceled and replaced by another order.
OrderIdToReplace long integer. The ID of the order to replace with this order.
ClientOrderId long integer. A user-assigned ID for the new, replacement order (like a purchase-order number assigned by a company). This ID is useful for recognizing future states related to this order. ClientOrderId defaults to 0.
OrderType string. The type of the replacement order: See Order Types in “Contents common to many API calls.
0 Unknown
1 Market
2 Limit
3 StopMarket
4 StopLimit
5 TrailingStopMarket
6 TrailingStopLimit
7 BlockTrade
Side string. The side of the replacement order:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
AccountId integer. The ID of the account under which the original order was placed and the new order will be placed.
InstrumentId integer. The ID of the instrument being traded.
TrailingAmount real. The offset by which to trail the market in one of the trailing order types. Set this to the current price of the market to ensure that the trailing offset is the amount intended in a fast-moving market.
LimitPrice real. The price at which to execute the new order, if the order is a Limit order.
StopPrice real. The price at which to execute the new order, if the order is a Stop order (either buy or sell).
PegPriceType string. When entering a stop/trailing order, set PegPriceType to the type of price that pegs the stop.
1 Last
2 Bid
3 Ask
4 Midpoint
TimeInForce string.The period during which the new order is executable.
0 Unknown (error condition)
1 GTC good ’til canceled
3 IOC immediate or canceled
4 FOK fill or kill — fill the order immediately, or cancel it immediately
There may be other settings for TimeInForce depending on the trading venue.
OrderIdOCO integer. One Cancels the Other — If the order being canceled in this call is order
A, and the order replacing order A in this call is order B, then OrderIdOCO refers to an order C that is currently open. If order C executes, then order
Quantity real. The amount of the order (buy or sell).

Response

The response returns the new replacement order ID and echoes back any replacement client ID you have supplied, along with the original order ID and the original client order ID.

Response

[
{ 
"ReplacementOrderId": 1234, 
"ReplacementClOrdId": 1561, 
"OrigOrderId": 5678, 
"OrigClOrdId": 91011
}
]

Where:

String Value
ReplacementOrderId integer. The order ID assigned to the replacement order by the server.
ReplacementClOrdId long integer. Echoes the contents of the ClientOrderId value from the request.
OrigOrderId integer. Echoes OrderIdToReplace, which is the original order you are replacing
OrigClOrdId long integer. Provides the client order ID of the original order (not specified in the requesting call).

GetAccountInfo

Returns detailed information about one specific account belonging to the authenticated user and existing on a specific Order Management System.

Request

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"AccountHandle": "" 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the account exists.
AccountId integer. The ID of the account on the Order Management System for which information will be returned.
AccountHandle string. AccountHandle is a unique user-assigned name that is checked at create time by the Order Management System. Alternate to Account ID.

Response

Response

{ 
"OMSID": 0, 
"AccountId": 0, 
"AccountName": "", 
"AccountHandle": "", 
"FirmId": "", 
"FirmName": "", 
"AccountType": { 
"Options": [ 
"Asset", 
"Liability", 
"ProfitLoss" 
] 
}, 
"FeeGroupID": 0, 
"ParentID": 0, 
"RiskType": { 
"Options": [ 
"Unknown", 
"Normal", 
"NoRiskCheck", 
"NoTrading" 
] 
}, 
"VerificationLevel": 0, 
"FeeProductType": { 
"Options": [ 
"BaseProduct", 
"SingleProduct"
] 
}, 
"FeeProduct": 0, 
"RefererId": 0, 
"SupportedVenueIds": [ 
0 
]
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the account resides.
AccountId integer. The ID of the account for which information was requested.
AccountName string. A non-unique name for the account assigned by the user.
AccountHandle string. AccountHandle is a unique user-assigned name that is checked at create time by the Order Management System to assure its uniqueness.
FirmId string. An arbitrary identifier assigned by Dasset to a trading firm as part of the initial company, user, and account set up process. For example, Smith Financial Partners might have the ID SMFP.
FirmName string. A longer, non-unique version of the trading firm’s name; for example, Smith Financial Partners.
AccountType string. The type of the account for which information is being returned. One of:
Asset
Liability
ProfitLoss
Responses for this string/value pair for Market Participants are almost exclusively Asset.
FeeGroupID integer. Defines account attributes relating to how fees are calculated and assessed. Set by Dasset.
ParentID integer. Reserved for future development.
RiskType string. One of:
Unkown (an error condition)
Normal
NoRiskCheck
NoTrading
Returns Normal for virtually all market participants. Other types indicate account configurations assignable by Dasset.
VerificationLevel integer. Verification level ID (how much verification does this account require) defined by and set by Dasset for this account.
FeeProductType string. One of:
BaseProduct
SingleProduct
Trading fees may be charged by Dasset. This value shows whether fees for this account’s trades are charged in the product being traded (BaseProduct, for example Bitcoin ) or whether the account has a preferred fee-paying product (SingleProduct, for example NZD) to use in all cases and regardless of product being traded.
FeeProduct integer. The ID of the preferred fee product, if any. Defaults to 0.
RefererId integer. Captures the ID of the person who referred this account to the trading venue, usually for marketing purposes.
SupportedVenueIds integer array. Comma-separated array. Reserved for future expansion

GetAccountPositions

Retrieves a list of positions (balances) for a specific user account running under a specific Order Management System. The trading day runs from UTC Midnight to UTC Midnight.

Request

Request

{ 
"AccountId":4, 
"OMSId": 1 
}

Where:

String Value
AccountId integer. The ID of the authenticated user’s account on the Order Management System for which positions will be returned.
OMSId integer. The ID of the Order Management System to which the user belongs. A user will belong only to one OMS.

Response

The response returns an array of one or more positions for the account. This example response has returned two positions:

Response

[ 
{ 
"OMSId":1, 
"AccountId":4, 
"ProductSymbol":"BTC", 
"ProductId": 1, 
"Amount":0, 
"Hold":0, 
"PendingDeposits":0, 
"PendingWithdraws":0, 
"TotalDayDeposits":0, 
"TotalDayWithdraws":0, 
"TotalMonthWithdraws":0 
}, 
{ 
"OMSId":1, 
"AccountId":4, 
"ProductSymbol":"NZD", 
"ProductId":2, 
"Amount":0, 
"Hold":0, 
"PendingDeposits":0, 
"PendingWithdraws":0, 
"TotalDayDeposits":0, 
"TotalDayWithdraws":0, 
"TotalMonthWithdraws":0 
} 
]

Where:

String Value
OMSId integer. The ID of the Order Management System (OMS) to which the user belongs. A user will only ever belong to one Order Management System.
AccountId integer. Returns the ID of the user’s account to which the positions belong.
ProductSymbol string. The symbol of the product on this account’s side of the trade. For example:
BTC — Bitcoin
NZD — New Zealand Dollar
ProductId integer. The ID of the product being traded. The system assigns product IDs as they are entered into the system.
Amount real. Unit amount of the product; for example, 10 or 138.5.
Hold real. Amount of currency held and not available for trade. A pending trade of 100 units at $1 each will reduce the amount in the account available for trading by $100. Amounts on hold cannot be withdrawn while a trade is pending.
PendingDeposits real. Deposits accepted but not yet cleared for trade.
PendingWithdraws real. Withdrawals acknowledged but not yet cleared from the account. Amounts in PendingWithdraws are not available for trade.
TotalDayDeposits real. Total deposits on today’s date. The trading day runs between UTC Midnight and UTC Midnight.
TotalDayWithdraws real. Total withdrawals on today’s date. The trading day runs between UTC Midnight and UTC Midnight.
TotalMonthWithdraws real. Total withdrawals during this month to date. The trading day runs between UTC Midnight and UTC Midnight — likewise a month begins at UTC Midnight on the first day of the month.

GetAccountTrades

Requests the details on up to 200 past trade executions for a single specific user account and its Order Management System, starting at index i, where i is an integer identifying a specific execution in reverse order; that is, the most recent execution has an index of 0, and increments by one as trade executions recede into the past. The operator of the trading venue determines how long to retain an accessible trading history before archiving.

Request

Request

{ 
"AccountId":4, 
"OMSId": 1, 
"StartIndex":0, 
"Count":2 
}

Where:

String Value
AccountId integer. The ID of the authenticated user’s account.
OMSId integer. The ID of the Order Management System to which the user belongs. A user will belong only to one OMS.
StartIndex integer. The starting index into the history of trades, from 0 (the most recent trade).
Count integer. The number of trades to return. The system can return up to 200 trades.

Response

The response is an array of objects, each of which represents the account’s side of a trade (either buy or sell). The example shows an array of two buy executions

Response

[ 
{ 
"TradeTimeMS": -62135446664520, 
"Fee": 0, 
"FeeProductId": 0, 
"OrderOriginator": 1, 
"OMSId": 1, 
"ExecutionId": 1, 
"TradeId": 1, 
"OrderId": 1, 
"AccountId": 4, 
"SubAccountId": 0, 
"ClientOrderId": 0, 
"InstrumentId": 1, 
"Side": "Buy", 
"Quantity": 1, 
"RemainingQuantity": 0, 
"Price": 100, 
"Value": 100, 
"TradeTime": 1501354796406, 
"CounterParty": null, 
"OrderTradeRevision": 1, 
"Direction": "NoChange", 
"IsBlockTrade": false 
}, 
{ 
"TradeTimeMS": -62135446664520, 
"Fee": 0, 
"FeeProductId": 0, 
"OrderOriginator": 1, 
"OMSId": 1, 
"ExecutionId": 3, 
"TradeId": 2, 
"OrderId": 3, 
"AccountId": 4, 
"SubAccountId": 0, 
"ClientOrderId": 0, 
"InstrumentId": 1, 
"Side": "Buy", 
"Quantity": 1, 
"RemainingQuantity": 0, 
"Price": 1, 
"Value": 1, 
"TradeTime": 1501354796418, 
"CounterParty": null, 
"OrderTradeRevision": 1, 
"Direction": "NoChange", 
"IsBlockTrade": false 
}
]

Where:

String Value
TradeTimeMS long integer. The date and time stamp of the trade in Microsoft tick format and UTC time zone.
Fee real. The fee for this trade in units and fractions of units (a $10 NZD fee would be 10.00, a .5-Bitcoinfee would be 0.5).
FeeProductId integer. The ID of the product that denominates the fee. Product types will vary on each trading venue.
OrderOriginator integer. The user ID of the user who entered the order that caused the trade for this account. (Multiple users can have access to an account.)
OMSId integer. The ID of the Order Management System to which the user belongs. A user will belong only to one OMS.
ExecutionId integer. The ID of this account’s side of the trade. Every trade has two sides.
TradeId integer. The ID of the overall trade.
OrderId long integer. The ID of the order causing the trade.
AccountId integer. The Account ID that made the trade.
SubAccountId integer. Not currently used.
InstrumentId long integer. The ID of the instrument being traded. Buy or Sell
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
Quantity real. The unit quantity of the trade.
RemainingQuantity integer. The number of units remaining to be traded by the order after this execution. This number is not revealed to the other party in the trade.This value is also known as “leave size” or “leave quantity.”
Price real. The unit price at which the instrument traded.
Value real. The total value of the deal. The system calculates this as: unit price X quantity executed.
TradeTime integer. The time at which the trade took place, in POSIX format and UTC time zone.
CounterParty long integer. Shows 0.
OrderTradeRevision integer. This value increments if the trade has changed. Default is 1. For example, if the trade busts (fails to conclude), the trade will need to be modified and a revision number then will apply.
Direction string. Shows if this trade has moved the book price up, down, or no change.
Values:
NoChange
UpTick
DownTick
IsBlockTrade Boolean. Returns true if the trade was a reported trade; false otherwise.

GetAccountTransactions

Returns a list of transactions for a specific account on an Order Management System. The owner of the trading venue determines how long to retain order history before archiving.

Request

Request

{ 
"OMSId": 1, 
"AccountId": 1, 
"Depth": 200 
}

Where:

String Value
OMSId integer. The ID of the Order Management System from which the account’s transactions will be returned.
AccountId integer. The ID of the account for which transactions will be returned. If not specified, the call returns transactions for the default account for the logged-in user.
Depth integer. The number of transactions that will be returned, starting with the most recent transaction.

Response

The response returns an array of transaction objects.

Response

[ 
{ 
"TransactionId": 0, 
"OMSId": 0, 
"AccountId": 0, 
"CR": 0, 
"DR": 0, 
"Counterparty": 0, 
"TransactionType": { 
"Options": [ 
"Fee", 
"Trade", 
"Other", 
"Reverse", 
"Hold" 
] 
}, 
"ReferenceId": 0, 
"ReferenceType": { 
"Options": [ 
"Trade", 
"Deposit", 
"Withdraw", 
"Transfer", 
"OrderHold", 
"WithdrawHold", 
"DepositHold", 
"MarginHold" 
] 
}, 
"ProductId": 0, 
"Balance": 0, 
"TimeStamp": 0
}
]

Where:

String Value
TransactionId integer. The ID of the transaction.
OMSId Integer. The ID of the Order Management System under which the requested transactions took place.
AccountId Integer. The single account under which the transactions took place.
CR real. Credit entry for the account on the order book. Funds entering an account.
DR real. Debit entry for the account on the order book. Funds leaving an account.
Counterparty long integer. Shows 0.
TransactionType string. One of:
Fee — transaction is payment of a fee
Trade — transaction is a trade (most usual entry)
Other — non-trading transactions such as deposits and withdrawals
Reverse — a hold has been reversed by this transaction
Hold — funds are held while a transaction closes
ReferenceId long integer. The ID of the action or event that triggered this transaction.
ReferenceType string. The type of action or event that triggered this transaction. One of:
Trade
Deposit
Withdraw
Transfer
OrderHold
WithdrawHold
DepositHold
MarginHold
ProductId integer. The ID of the product on this account’s side of the transaction. For example, in a dollars-for-Bitcointransaction, one side will have the product Dollar and the other side will have the product Bitcoin. Use GetProduct to return information about a product based on its ID.
Balance real. The balance in the account after the transaction.
TimeStamp long integer. Time at which the transaction took place, in POSIX format and UTC time zone.

GetInstruments

Retrieves an array of instrument objects describing all instruments available on a trading venue to the user. An instrument is a pair of exchanged products (or fractions of them) such as NZ dollars and ounces of gold. See “Products and Instruments”

Request

Request

{ 
"OMSId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the instruments are available.

Response

The response for GetInstruments is an array of objects describing all the instruments available to the authenticated user on the Order Management System.

Response

[ 
{ 
"OMSId": 0, 
"InstrumentId": 0, 
"Symbol": "", 
"Product1": 0, 
"Product1Symbol": "", 
"Product2": 0, 
"Product2Symbol": "", 
"InstrumentType": { 
"Options": [ 
"Unknown", 
"Standard" 
] 
}, 
"VenueInstrumentId": 0, 
"VenueId": 0, 
"SortIndex": 0, 
"SessionStatus": { 
"Options": [ 
"Unknown", 
"Running", 
"Paused", 
"Stopped", 
"Starting" 
] 
}, 
"PreviousSessionStatus": { 
"Options": [ 
"Unknown", 
"Running", 
"Paused", 
"Stopped", 
"Starting" 
] 
}, 
"SessionStatusDateTime": "0001-01-01T05:00:00Z", 
"SelfTradePrevention": false, 
"QuantityIncrement": 0
} 
]

Where:

String Value
OMSId integer. The ID of the Order Management System on which the instrument is traded.
InstrumentId long integer. The ID of the instrument.
Symbol string. Trading symbol of the instrument.
Product1 integer. The first product comprising the instrument. For example, NZD in a NZD/Bitcoininstrument.
Product1Symbol string. The symbol for Product 1 on the trading venue. For example, NZD.
Product2 integer. The second product comprising the instrument. For example, Bitcoinin a NZD/Bitcoininstrument.
Product2Symbol string. The symbol for Product 2 on the trading venue. For example, BTC.
InstrumentType string. The type of the instrument. All instrument types currently are standard, an exchange of one product for another (or unknown, an error condition), but this may expand to new types in the future.
Unknown
Standard
VenueInstrumentId long integer. If the instrument trades on another trading venue to which the user has access, this value is the instrument ID on that other venue.
VenueId integer. The ID of the trading venue on which the instrument trades, if not this venue. See VenueInstrumentId.
SortIndex integer. The numerical position in which to sort the returned list of instruments on a visual display.
SessionStatus string. Is the market for this instrument currently open and operational? Returns one of:
Unknown
Running
Paused
Stopped
Starting
PreviousSessionStatus string. What was the previous session status for this instrument? One of:
Unknown
Running
Paused
Stopped
Starting
SessionStatusDateTime string. The time and date at which the session status was reported, in ISO 8601 format. See “Time– and Date-Stamp Formats”
SelfTradePrevention Boolean. An account trading with itself still incurs fees. If this instrument prevents an account from trading the instrument with itself, the value returns true; otherwise defaults to false.
QuantityIncrement integer. The number of decimal places for the smallest quantity of the instrument that can trade (analogous to smallest lot size). For example, the smallest increment of a NZ Dollar that can trade is 0.01 (one cent, or 2 decimal places). Current maximum is 8 decimal places. The default is 0.

GetOpenOrders

Returns an array of 0 or more orders that have not yet been filled (open orders) for a single account for a given user on a specific Order Management System. The call returns an empty array if a user has no open orders.

Request

Request

{ 
"AccountId":4, 
"OMSId": 1 
}

Where:

String Value
AccountId integer. The ID of the authenticated user’s account.
OMSId integer. The ID of the Order Management System to which the user belongs. A user will belong only to one OMS.

Response

This example response for GetOpenOrders returns an array containing both a buy-side and a sell-side order. The call returns an empty array if there are no open orders for the account.

Response

[ 
{ 
"Side": "Buy", 
"OrderId": 1, 
"Price": 100, 
"Quantity": 1, 
"DisplayQuantity": 1, 
"Instrument": 1, 
"Account": 4, 
"OrderType": "Limit", 
"ClientOrderId": 0, 
"OrderState": "Working", 
"ReceiveTime": 1501354241987, 
"ReceiveTimeTicks": 636369510419870950, 
"OrigQuantity": 1, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": "NewInputAccepted", 
"OrigOrderId": 1, 
"OrigClOrdId": 0, 
"EnteredBy": 1, 
"IsQuote": false, 
"InsideAsk": 9223372036.854775807, 
"InsideAskSize": 0, 
"InsideBid": 100, 
"InsideBidSize": 1, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false,
"OMSId": 1 
}, 
{ 
"Side": "Sell", 
"OrderId": 2, 
"Price": 150, 
"Quantity": 1, 
"DisplayQuantity": 1, 
"Instrument": 1, 
"Account": 4, 
"OrderType": "Limit", 
"ClientOrderId": 0, 
"OrderState": "Working", 
"ReceiveTime": 1501354246718, 
"ReceiveTimeTicks": 636369510467182396, 
"OrigQuantity": 1, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": "NewInputAccepted", 
"OrigOrderId": 2, 
"OrigClOrdId": 0, 
"EnteredBy": 1, 
"IsQuote": false, 
"InsideAsk": 150, 
"InsideAskSize": 1, 
"InsideBid": 100, 
"InsideBidSize": 1, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 1 
}
]

Where:

String Value
Side string. The open order can be Buy or Sell.
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
OrderId long integer. The ID of the open order. The OrderID is unique in each Order Management Systsem.
Price real. The price at which the buy or sell has been ordered.
Quantity real. The quantity to be bought or sold.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve.
Instrument integer. ID of the instrument being traded. See GetInstruments.
Account integer. The ID of the account that placed the order.
OrderType string. There are currently seven types of order. See “Order Types”
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0
OrderState string. The current condition of the order. There are five order states:
Working
Rejected
Canceled
Expired
FullyExecuted
ReceiveTime long integer. The time at which the system received the order, in POSIX format and UTC time zone. See “Time– and Date-Stamp Formats”.
ReceiveTimeTicks long integer. The time stamp of the received order in Microsoft Tick format, and UTC time zone. See “Time– and Date-Stamp Formats” .
OrigQuantity integer. Original quantity of the order. The quantity of the actual execution may be lower than this number, but OrigQuantity shows the quantity in the order as placed.
QuantityExecuted Integer. The number of units executed in this trade.
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. The reason that an order has been changed. Values:
1 NewInputAccepted
2 NewInputRejected
3 OtherRejected
4 Expired
5 Trade
6 SystemCanceled_NoMoreMarket
7 SystemCanceled_BelowMinimum
8 NoChange
100 UserModified
OrigOrderId long. ID of the original order. This number is also appended to CancelReplaceOrder. See CancelReplaceOrder.
EnteredBy integer. User ID of the person who entered the order. IsQuote Boolean. True if the open order is a quote; false if not. See “Quotes and Orders”
InsideAsk/InsideBid real. Best price available at time of entry (for ask or bid, respectively).
InsideAskSize/InsideBidSize real. Quantity available at the best inside ask (or bid) price.
LastTradePrice real. Last trade price for this product before this order was entered.
RejectReason string. If this order was rejected, RejectReason holds the reason for the rejection.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. ID of the Order Management System on which the order was placed.

GetOpenQuotes

Returns the current bid and ask quotes for a given instrument ID and account ID.

Request

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"InstrumentId": 0 
}

Where:

String Value
OMSId integer. The ID of the Order Management System where the instrument is traded whose quote may be open.
AccountId integer. The ID of the account whose open quotes will be returned.
InstrumentId long integer. The ID of the instrument being quoted

Response

Returns a response object comprising a bid and an ask object.

Response

{ 
"Bid": { 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": { 
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": { 
"Options": [ 
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0 
}, 
"Ask": { 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": {
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": { 
"Options": [ 
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0
} 

Where:

String Value
Bid Bid object (see below)
Ask Ask object (see below)

Bid and Ask objects differ only in the values for the strings.

String Value
Side string. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
OrderId long integer. The ID of this quote. Quotes and orders are both executable.
Price real. Price of the Bid/Ask quote.
Quantity real. Quantity of the Bid/Ask quote.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve. See “Display Quantity”.
Instrument integer. The ID of the instrument being quoted.
Account integer. The ID of the account quoting the instrument.
OrderType string. One of:
Unknown
Market
Limit
StopMarket
StopLimit
TrailingStopMarket
TrailingStopLimit
BlockTrade
ClientOrderId long integer. A user-assigned ID for the quote (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OrderState string. One of:
Unknown
Working
Rejected
Canceled
Expired
FullyExecuted
An open quote will probably have an OrderState of Working.
ReceiveTime long integer. The time at which the system received the quote, in POSIX format and UTC time zone. See “Time– and Date-Stamp Formats” .
ReceiveTimeTicks long integer. The time stamp of the received quote in Microsoft Ticks format and UTC time zone. See “Time– and Date-Stamp Formats”.
OrigQuantity real. If the quote has been changed, this value shows the original quantity of the quote.
QuantityExecuted real. This value states the quantity that was executed. It may be the same as the quantity of the quote; it may be different.
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. If the quote has been changed, this value shows the reason. One of:
Unknown
NewInputAccepted
NewInputRejected
OtherRejected
Expired
Trade
SystemCanceled_NoMoreMarket
SystemCanceled_BelowMinimum
NoChange
UserModified
OrigOrderId integer. If the quote has been changed, shows the original order ID. (Quotes and orders are in some ways interchangeable. See “Quotes and Orders”.
OrigClOrdId long integer. If the quote has been changed, shows the original client order ID, a value that the client can create (much like a purchase order).
EnteredBy integer. The ID of the user who entered the quote.
IsQuote Boolean. If this order is a quote (rather than an order), returns true, otherwise false. Default is false.
InsideAsk real. Best Ask price available at time of entry (generally available to market makers).
InsideAskSize real. Quantity available at the best inside ask price (generally available to market makers).
InsideBid real. Best Bid price available at time of entry (generally available to market makers).
InsideBidSize real. Quantity available at the best inside Bid price (generally available to market makers)..
LastTradePrice real. The price at which the instrument last traded.
RejectReason string. If the quote was rejected, this string value holds the reason.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. The ID of the Order Management System on which the quote was created.

GetOrderFree

Returns an estimate of the fee for a specific order and order type. Fees are set and calculated by the operator of the trading venue.

Request

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"InstrumentId": 0, 
"ProductId": 0, 
"Amount": 0, 
"Price": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"MakerTaker": { 
"Options": [ 
"Unknown", 
"Maker", 
"Taker" 
] 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the trade would take place.
AccountId integer. The ID of the account requesting the fee estimate.
InstrumentId integer. The proposed instrument against which a trading fee would be charged.
ProductId integer. The ID of the product (currency) in which the fee will be denominated.
Amount real. The quantity of the proposed trade for which the Order Management System would charge a fee.
Price real. The price at which the proposed trade would take place. Supply your price for a limit order; the exact price is difficult to know before execution.
OrderType string. The type of the proposed order. One of:
0 Unknown
1 Market
2 Limit
3 StopMarket
4 StopLimit
5 TrailingStopMarket
6 TrailingStopLimit
7 BlockTrade
MakerTaker string. Depending on the venue, there may be different fees for a maker (the order remains on the books for a period) or taker (the order executes directly). If the user places a large order that is only partially filled, he is a partial maker.
0 Unknown
1 Maker
2 Taker

Response

Response

{ 
"OrderFee": 0.01, 
"ProductId": 1 
}

Where:

String Value
OrderFee real. The estimated fee for the trade as described. The minimum value is 0.01.
ProductId integer. The ID of the product (currency) in which the fee is denominated

GetOrderHistory

Returns a complete list of all orders, both open and executed, for a specific account on the specified Order Management System.

Request

Request

{ 
"OMSId": 1, 
"AccountId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System where the orders were placed.
AccountId integer. The ID of the account whose orders will be returned

Response

The response returns an array of 1 or more order objects.

Response

[  
{ 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": { 
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": { 
"Options": [ 
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0  
}
]

Where:

String Value
Side string. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition).
OrderId long integer. The ID of this order.
Price real. Price of the order.
Quantity real. Quantity of the order.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve. See “Display Quantity”
Instrument integer. The ID of the instrument being ordered.
Account integer. The ID of the account ordering the instrument.
OrderType string. One of:
Unknown
Market
Limit
StopMarket
StopLimit
TrailingStopMarket
TrailingStopLimit
BlockTrade
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OrderState string. One of:
Unknown
Working
Rejected
Canceled
Expired
FullyExecuted
An open order will probably not yet be fully executed.
ReceiveTime long integer. The time at which the system received the quote, in POSIX format.
ReceiveTimeTicks long integer. The time stamp of the received quote in Microsoft Ticks format.
OrigQuantity real. If the order has been changed, this value shows the original quantity.
QuantityExecuted real. This value states the quantity that was executed in the order. It may be the same as the quantity of the order; it may be different.
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. If the order has been changed, this value shows the reason. One of:
Unknown
NewInputAccepted
NewInputRejected
OtherRejected
Expired
Trade
SystemCanceled_NoMoreMarket
SystemCanceled_BelowMinimum
NoChange
UserModified
OrigOrderId integer. If the order has been changed, shows the original order ID.
OrigClOrdId long integer. If the order has been changed, shows the original client order ID, a value that the client can create (much like a purchase order).
EnteredBy integer. The ID of the user who entered the order in this account.
IsQuote Boolean. If this order is a quote (rather than an order), returns true, otherwise false. Default is false.
InsideAsk real. Best Ask price available at time of entry (generally available to market makers).
InsideAskSize real. Quantity available at the best inside ask price (generally available to market makers).
InsideBid real. Best Bid price available at time of entry (generally available to market makers).
InsideBidSize real. Quantity available at the best inside Bid price (generally available to market makers).
LastTradePrice real. The price at which the instrument last traded.
RejectReason string. If the order was rejected, this string value holds the reason.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. The ID of the Order Management System on which the order was created.

GetOrderHistoryByOrderId

Retrieves the full order history of a specific order by its order ID, including any changes.

Request

Request

{ 
"OMSId": 0, 
"OrderId": 0 
}

Where:

String Value
OMSId integer. The ID of the Order Management System where the orders were placed.
OrderId integer. The ID of the order on the Order Management System.

Response

The response returns an array of 1 or more order objects.

Response

[ 
{ 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": { 
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": { 
"Options": [ 
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0
} 
]

Where:

String Value
Side string. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
OrderId long integer. The ID of this order.
Price real. Price of the order.
Quantity real. Quantity of the order.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve.
Instrument integer. The ID of the instrument being ordered.
Account integer. The ID of the account ordering the instrument.
OrderType string. One of:
Unknown
Market
Limit
StopMarket
StopLimit
TrailingStopMarket
TrailingStopLimit
BlockTrade
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OrderState string. One of:
Unknown
Working
Rejected
Canceled
Expired
FullyExecuted
An open order will probably not yet be fully executed.
ReceiveTime long integer. The time at which the system received the quote, in POSIX format.
ReceiveTimeTicks long integer. The time stamp of the received quote in Microsoft Ticks format.
OrigQuantity real. If the order has been changed, this value shows the original quantity.
QuantityExecuted real. This value states the quantity that was executed in the order. It may be the same as the quantity of the order; it may be different.
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. If the order has been changed, this value shows the reason. One of:
Unknown
NewInputAccepted
NewInputRejected
OtherRejected
Expired
Trade
SystemCanceled_NoMoreMarket
SystemCanceled_BelowMinimum
NoChange
UserModified
OrigOrderId integer. If the order has been changed, shows the original order ID.
OrigClOrdId long integer. If the order has been changed, shows the original client order ID, a value that the client can create (much like a purchase order).
EnteredBy integer. The ID of the user who entered the order in this account.
IsQuote Boolean. If this order is a quote (rather than an order), returns true, otherwise false. Default is false.
InsideAsk real. Best Ask price available at time of entry (generally available to market makers).
InsideAskSize real. Quantity available at the best inside ask price (generally available to market makers).
InsideBid real. Best Bid price available at time of entry (generally available to market makers).
IndisdeBidSize real. Quantity available at the best inside Bid price (generally available to market makers)..
LastTradePrice real. The price at which the instrument last traded.
RejectReason string. If the order was rejected, this string value holds the reason.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. The ID of the Order Management System on which the order was created.

GetOrdersHistory

Retrieves a history of multiple orders (hence, GetOrdersHistory with plural Orders) for the specified account, order ID, user, instrument, or time stamp, starting at index i, where i is an integer identifying a specific order in reverse order; that is, the most recent order has an index of 0. “Depth” is the count of trades to report backwards from StartIndex. All values in the call other than

OMSId are optional. The owner of the trading venue determines how long to retain order history before archiving.

Request

All values other than OMSId are optional.

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"ClientOrderId": 0, 
"OriginalOrderId": 0, 
"OriginalClientOrderId": 0, 
"UserId": 0, 
"InstrumentId": 0, 
"StartTimestamp": 0, 
"EndTimestamp": 0, 
"Depth": 0, 
"StartIndex": 0
}

Where:

String Value
OMSId Integer. The ID of the Order Management System on which the orders took place. Required. If no other values are specified, returns the orders associated with the default account for the logged-in user on this Order Management System.
AccountId Integer. The account ID that made the trades. The logged-in user must be associated with this account, although other users also can be associated with the account. If no account ID is supplied, the system assumes the default account for the logged-in user.
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OriginalOrderId integer. The original ID of the order. If specified, the call returns changed orders associated with this order ID.
UserId integer. The ID of the user whose account orders will be returned. If not specified, the call returns the orders of the logged-in user.
InstrumentId long integer. The ID of the instrument named in the order. If not specified, the call returns orders for all instruments for this account.
StartTimestamp long integer. Date and time at which to begin the orders history, in POSIX format, and UTC time zone. If not specified, reverts to the start date of this account on the trading venue.
EndTimestamp long integer. Date and time at which to end the orders report, in POSIX format, and UTC time zone. If not specified, uses the current time.
Depth integer. In this case, the count of orders to return, counting from the StartIndex. If not specified, returns all orders between BeginTimeStamp and EndTimeStamp, beginning at StartIndex and working backwards.
StartIndex integer. The starting index into the order history, from 0 (the most recent trade) and moving backwards in time. If not specified, defaults to 0.

Response

The response returns an array of order objects.

Response

[ 
{ 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [, 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": { 
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason" :{
"Options": [
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0
} 

]

Where:

String Value
Side string. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
OrderId long integer. The ID of this order.
Price real. The unit price of the order.
Quantity real. The quantity of the order.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve.
Instrument integer. The ID of the instrument being ordered.
Account integer. The ID of the account ordering the instrument.
OrderType string. One of:
Unknown
Market
Limit
StopMarket
StopLimit
TrailingStopMarket
TrailingStopLimit
BlockTrade
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OrderState string. One of:
Unknown
Working
Rejected
Canceled
Expired
FullyExecuted
An open order will not be fully executed.
ReceiveTime long integer. The time and date that the order was received, in POSIX format and UTC time zone. See “Time– and Date-Stamp Formats”
ReceiveTimeTicks long integer. Identifies the time and date that the order was received in Microsoft ticks format, and UTC time zone. See “Time– and Date-Stamp Formats”
OrigQuantity real. The original quantity in the order (may be different from the amount executed).
QuantityExecuted real. This value states the quantity that was executed in the order (may be different from Quantity or OrigQuantity.
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. If the order has been changed, this value shows the reason. One of:
Unknown
NewInputAccepted
NewInputRejected
OtherRejected
Expired
Trade
SystemCanceled_NoMoreMarket
SystemCanceled_BelowMinimum
NoChange
UserModified
OrigOrderId integer. If the order has been changed, shows the original order ID.
OrigClOrdId long integer. If the order has been changed, shows the original client order ID, a value that the client can create (much like a purchase order).
EnteredBy integer. The ID of the user who entered the order in this account.
IsQuote Boolean. If this order is a quote (rather than an order), returns true, otherwise false. Default is false.
InsideAsk real. Best Ask price available at time of entry (generally available to market makers).
InsideAskSize real. Quantity available at the best inside ask price (generally available to market makers).
InsideBid real. Best Bid price available at time of entry (generally available to market makers).
IndisdeBidSize real. Quantity available at the best inside Bid price (generally available to market makers)..
LastTradePrice real. The price at which the instrument last traded.
RejectReason string. If the order was rejected, this string value holds the reason.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. The ID of the Order Management System on which the order was created.

GetOrderStatus

Retrieves the status information for a single order.

Request

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"OrderId": 0
}

Where:

String Value
OMSId Integer. The ID of the Order Management System on which the order was placed.
AccountId integer. The ID of the account under which the order was placed.
OrderId integer. The ID of the order whose status will be returned.

Response

The response returns a single order object.

Response

{ 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"OrderId": 0, 
"Price": 0, 
"Quantity": 0, 
"DisplayQuantity": 0, 
"Instrument": 0, 
"Account": 0, 
"OrderType": { 
"Options": [ 
"Unknown", 
"Market", 
"Limit", 
"StopMarket", 
"StopLimit", 
"TrailingStopMarket", 
"TrailingStopLimit", 
"BlockTrade" 
] 
}, 
"ClientOrderId": 0, 
"OrderState": { 
"Options": [ 
"Unknown", 
"Working", 
"Rejected", 
"Canceled", 
"Expired", 
"FullyExecuted" 
] 
}, 
"ReceiveTime": 0, 
"ReceiveTimeTicks": 0, 
"OrigQuantity": 0, 
"QuantityExecuted": 0, 
"AvgPrice": 0, 
"CounterPartyId": 0, 
"ChangeReason": { 
"Options": [ 
"Unknown", 
"NewInputAccepted", 
"NewInputRejected", 
"OtherRejected", 
"Expired", 
"Trade", 
"SystemCanceled_NoMoreMarket", 
"SystemCanceled_BelowMinimum", 
"NoChange", 
"UserModified" 
] 
}, 
"OrigOrderId": 0, 
"OrigClOrdId": 0, 
"EnteredBy": 0, 
"IsQuote": false, 
"InsideAsk": 0, 
"InsideAskSize": 0, 
"InsideBid": 0, 
"InsideBidSize": 0, 
"LastTradePrice": 0, 
"RejectReason": "", 
"IsLockedIn": false, 
"OMSId": 0
}

Where:

String Value
Side string. The side of this order. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
OrderId long integer. The ID of the order. The response echoes the order ID from the request.
Price real. The price at which the order was placed.
Quantity real. The quantity of the instrument being ordered.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve. See “Display Quantity”
Instrument integer. The ID of the instrument traded in the order.
Account integer. The ID of the account that placed the order.
OrderType string. One of:
Unknown
Market
Limit
StopMarket
StopLimit
TrailingStopMarket
TrailingStopLimit
BlockTrade
ClientOrderID long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
OrderState string. One of:
0 Unknown
2 Working
3 Rejected
4 Canceled
5 Expired
6 FullyExecuted
ReceiveTime long integer. The time and date that the order was received, in POSIX format and UTC time zone. See “Time– and Date-Stamp Formats”
ReceiveTimeTicks long integer. Identifies the time and date that the order was received in Microsoft ticks format, and UTC time zone. See “Time– and Date-Stamp Formats”
OrigQuantity real. The original quantity of the order. The actual amount traded may be different.
QuantityExecuted real. The quantity executed in this order. May be different from the amount ordered (Quantity).
AvgPrice real. Not currently used.
CounterPartyId long integer. Shows 0.
ChangeReason string. The reason that the order may have been changed from the original. One of:
0 Unknown
1 NewInputAccepted
2 NewInputRejected
3 OtherRejected
4 Expired
5 Trade
6 SystemCanceled_NoMoreMarket
7 SystemCanceled_BelowMinimum
8 NoChange
9 UserModified
OrigOrderID integer. The ID of the original order, if it has been changed.
OrigClOrId long integer. If the order has been changed, shows the original client order ID, a value that the client can create (much like a purchase order). The default value is 0.
EnteredBy integer. The ID of the user who originally entered the order.
IsQuote Boolean. Returns true if the order is a quote, else returns false. Default is false. See “Quotes and Orders”
InsideAsk real. Ask price among market makers.
InsideAskSize real. Ask quantity among market makers.
InsideBid real. Bid price among market makers.
InsideBidSize real. Bid quantity among market makers.
LastTradePrice real. The price at which the instrument traded immediately before this trade.
RejectReason string. If the trade was rejected, this string holds the reason.
IsLockedIn Boolean. True if both parties to a block trade agree that one party will report the trade for both. Otherwise false.
OMSId integer. ID of the Order Management System on which the trades being reported on occurred.

GetProduct

Retrieves the details about a specific product on the trading venue. A product is an asset that is tradable or paid out.

Request

Request

{ 
"OMSId": 1, 
"ProductId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System that includes the product.
ProductId long integer. The ID of the product (often a currency) on the specified Order Management System.

Response

Unsuccessful response:

Response

{ 
"OMSId": 0, 
"ProductId": 0, 
"Product": "", 
"ProductFullName": "", 
"ProductType": { 
"Options": [ 
"Unknown", 
"NationalCurrency", 
"CryptoCurrency", 
"Contract" 
] 
}, 
"DecimalPlaces": 0, 
"TickSize": 0, 
"NoFees": false 
}

Where:

String Value
OMSId integer. The ID of the Order Management System that offers the product.
ProductId long integer. The ID of the product
Product string. “Nickname” or shortened name of the product. For example, NZD (New Zealand Dollar).
ProductFullName string. Full and official name of the product. For example, New Zealand Dollar.
ProductType string. The nature of the product. One of:
0 Unknown (an error condition)
1 NationalCurrency
2 CryptoCurrency
3 Contract
DecimalPlaces integer. The number of decimal places in which the product is divided. For example, NZ Dollars are divided into 100 units, or 2 decimal places. Other products may be different. Burundi Francs use 0 decimal places and the Rial Omani uses 3.
TickSize integer. Minimum tradable quantity of the product. See also GetInstrument, where this value is called QuantityIncrement. For example, with a NZ Dollar, the minimal tradable quantity is $0.01.
NoFees Boolean. Shows whether trading the product incurs fees. The default is false; that is, if NoFees is false, fees will be incurred. If NoFees is true, no fees are incurred.

GetProducts

Returns an array of products available on the trading venue. A product is an asset that is tradable or paid out. For more information about the difference between products and instruments, see “Products and Instruments”

Request

Request

{ 
"OMSId": 1
}

Where:

String Value
OMSId integer. The ID of the Order Management System for which the array of available products and currencies will be returned

Response

The response returns an array of objects, one object for each product available on the Order Management System.

Response

[ 
{ 
"OMSId": 0, 
"ProductId": 0, 
"Product": "", 
"ProductFullName": "", 
"ProductType": { 
"Options": [ 
"Unknown", 
"NationalCurrency", 
"CryptoCurrency", 
"Contract" 
] 
}, 
"DecimalPlaces": 0, 
"TickSize": 0, 
"NoFees": false 
} 
]

Where:

String Value
OMSId integer. The ID of the Order Management System that offers the product.
ProductId long integer. The ID of the product.
Product string. “Nickname” or shortened name of the product. For example, NZD (New Zealand Dollar).
ProductFullName string. Full and official name of the product. For example, New Zealand Dollar.
ProductType string. The nature of the product. One of:
0 Unknown (an error condition)
1 NationalCurrency
2 CryptoCurrency
3 Contract
DecimalPlaces integer. The number of decimal places in which the product is divided. For example, NZ Dollars are divided into 100 units, or 2 decimal places. Other products may be different. Burundi Francs use 0 decimal places and the Rial Omani uses 3.
TickSize integer. Minimum tradable quantity of the product. See also GetInstrument, where this value is called QuantityIncrement. For example, with a NZ Dollar, the minimal tradable quantity is $0.01.
NoFees Boolean. Shows whether trading the product incurs fees. The default is false; that is, if NoFees is false, fees will be incurred. If NoFees is true, no fees are incurred.

GetUserAccounts

Returns a list of account IDs for a given user. More than one user may be associated with a given account.

Request

Request

{ 
"OMSId": 0, 
"UserId": 0, 
"UserName": "" 
}

Where:

String Value
OMSId integer. The Order Management System on which the user has one ore more accounts.
UserId integer. The ID of the user whose accounts you want to return.
UserName string. The name of the user.

Response

The response returns list of comma-separated account IDs.

Response

{ 
0 
}

GetUserAccountsInfos

Returns a list of account information for all accounts belonging to the specified user.

Request

Request

{ 
"OMSId": 0, 
"UserId": 0, 
"UserName": ""
}

Where:

String Value
OMSId integer. The Order Management System on which the user has one ore more accounts.
UserId integer. The ID of the user whose accounts you want to return.
UserName string. The name of the user.

Response

Returns a JSON list of account objects one for each account associated with the user.

Response

{ 
"OMSID": 0, 
"AccountId": 0, 
"AccountName": "", 
"AccountHandle": "", 
"FirmId": "", 
"FirmName": "", 
"AccountType": { 
"Options":[ 
"Asset", 
"Liability", 
"ProfitLoss" 
] 
}, 
"FeeGroupID": 0, 
"ParentID": 0, 
"RiskType": { 
"Options": [ 
"Unknown", 
"Normal", 
"NoRiskCheck", 
"NoTrading" 
] 
}, 
"VerificationLevel": 0, 
"FeeProductType": { 
"Options": [ 
"BaseProduct", 
"SingleProduct" 
] 
}, 
"FeeProduct": 0, 
"RefererId": 0, 
"SupportedVenueIds": [ 
0 
]
}

Where:

String Value
OMSID integer. The ID of the Order Management System on which the account resides.
AccountId integer. The ID of the account for which information was requested.
AccountName string. A non-unique name for the account assigned by the user.
AccountHandle string. AccountHandle is a unique user-assigned name that is checked at create time by the Order Management System.
FirmId string. An arbitrary identifier assigned by Dasset to a trading firm as part of the initial company, user, and account set up process. For example, Smith Financial Partners might have the ID SMFP.
FirmName string. A longer, non-unique version of the trading firm’s name; for example, Smith Financial Partners.
FeeGroupID integer. Defines account attributes relating to how fees are calculated and assessed. Set by trading venue operator.
ParentID integer. Reserved for future development.
FeeProductType string. One of:
BaseProduct
SingleProduct
Trading fees may be charged by Dasset. This value shows whether fees for this account’s trades are charged in the product being traded (BaseProduct, for example Bitcoin) or whether the account has a preferred fee-paying product (SingleProduct, for example NZD) to use in all cases and regardless of product being traded.
FeeProduct integer. The ID of the preferred fee product, if SingleProduct is the value of FeeProductType.
RefererId integer. Captures the ID of the person who referred this account to the trading venue, usually for marketing purposes.
SupportedVenueIds integer array. Comma-separated array. Reserved for future expansion.

ModifyOrder

Reduces an order’s quantity without losing priority in the order book. An order’s quantity can only be reduced. The other call that can modify an order — CancelReplaceOrder — resets order book priority, but you can use it to increase an order.

Request

Request

{ 
"OMSId": 0, 
"OrderId": 0, 
"InstrumentId": 0, 
"PreviousOrderRevision": 0, 
"Quantity": 0 
}

Where:

String Value
OMSId integer. The ID of the Order Management System where the original order was placed.
OrderId long integer. The ID of the order to be modified. The ID was supplied by the server when the order was created.
InstrumentId integer. The ID of the instrument traded in the order.
PreviousOrderRevision integer. The order revision number at the time you make the modification order.This ensures that you have the latest order state at the time you make the request.
Quantity real. The new quantity of the order. This value can only be reduced from a previous quantity.

Response

Response

{ 
"result": false, 
"errormsg": "", 
"errorcode": 0, 
"detail": ""
}

Where:

String Value
result Boolean. The successful receipt of a modify request returns true; otherwise, returns false. This is the acknowledgement of receipt of the request to modify, not a confirmation that the modification has taken place. Monitor the modification with GetOpenOrders or GetOrderHistory.
errormsg string. A successful receipt of a modify request returns null; the errormsg parameter for an unsuccessful request returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. The receipt of a successful request to modify returns 0. An unsuccessful request returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null.

SendOrder

Creates an order. Anyone submitting an order should also subscribe to the various market data and event feeds, or call GetOpenOrders or GetOrderStatus to monitor the status of the order. If the order is not in a state to be executed, GetOpenOrders will not return it.

Request

Request

{ 
"AccountId": 5, 
"ClientOrderId": 99, 
"Quantity": 1, 
"DisplayQuantity": 0, 
"UseDisplayQuantity": true, 
"LimitPrice": 95, 
"OrderIdOCO": 0, 
"OrderType": 2, 
"PegPriceType": 1, 
"InstrumentId": 1, 
"TrailingAmount": 1.0, 
"LimitOffset": 2.0, 
"Side": 0, 
"StopPrice": 96, 
"TimeInForce": 1, 
"OMSId": 1
}

Where:

String Value
AccountId integer. The ID of the account placing the order.
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). This ID is useful for recognizing future states related to this order. ClientOrderId defaults to 0.
Quantity real. The quantity of the instrument being ordered.
DisplayQuantity real. The quantity available to buy or sell that is publicly displayed to the market. To display a DisplayQuantity value, an order must be a Limit order with a reserve.
UseDisplayQuantity (Boolean. If you enter a Limit order with a reserve, you must set UseDisplayQuantity to true. See “Display Quantity” information about how the system users the DisplayQuantity value.
LimitPrice real. The price at which to execute the order, if the order is a Limit order.
OrderIdOCO integer. One Cancels the Other — If this order is order A, OrderIdOCO refers to the order ID of an order B (which is not the order being created by this call). If order B executes, then order A created by this call is canceled. You can also set up order B to watch order A in the same way, but that may require an update to order B to make it watch this one, which could have implications for priority in the order book. See CancelReplaceOrder and ModifyOrder.
OrderType integer. The type of this order, as expressed in integer format.
1 Market
2 Limit
3 StopMarket
4 StopLimit
5 TrailingStopMarket
6 TrailingStopLimit
7 BlockTrade.
PegPriceType integer. When entering a stop/trailing order, set PegPriceType to an integer that corresponds to the type of price that pegs the stop:
1 Last
2 Bid
3 Ask
4 Midpoint
InstrumentId long integer. The ID of the instrument being traded in the order.
TrailingAmount real. The offset by which to trail the market in one of the trailing order types. Set this to the current price of the market to ensure that the trailing offset is the amount intended in a fast-moving market.
LimitOffset real. The amount by which a trailing limit order is offset from the activation price.
Side integer. The side of the trade represented by this order. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
StopPrice real. The price at which to execute the order, if the order is a Stop order (either buy or sell).
TimeInForce integer. The period during which the order is executable.
0 Unknown (error condition)
1 GTC good ’til canceled
3 IOC immediate or cancelled
4 FOK fill or kill — fill the order immediately, or cancel it immediately There may be other settings for TimeInForce depending on the trading venue.
OMSId integer The ID of the Order Management System on which the order is being placed.

Response

Response

{ 
"status":"Accepted", 
"errormsg":"", 
"OrderId": 123
}

Where:

String Value
status string. If the order is accepted by the system, it returns 0.
0 Accepted
1 Rejected
errormsg string. Any error message the server returns.
OrderId long integer. The ID assigned to the order by the server. This allows you to track the order.

Reports

CancelUserReport

You can generate or schedule a variety of reports through this API on demand. This call cancels a scheduled report by its report ID.

Request

GetUserReportTickets can provide a list of GUIDs for scheduled reports.

Request

{ 
"UserReportId": guid-as-a-string
}

Where:

String Value
UserReport string. The GUID is a globally unique ID string that identifies the user report to be cancelled. The Order Management System provides this ID when you create a report.

Response

The response to CancelUserReport verifies that the call was received, not that the user report has been canceled successfully. Individual event updates to the user show cancellations. To verify that a report has been canceled, call GetUserReportTickets or GetUserReportWriterResultRecords.

Response

{ 
"result": true, 
"errormsg": "", 
"errorcode": 0, 
"detail": ""
}

Where:

String Value
result Boolean. A successful receipt of the cancellation returns true; and unsuccessful receipt of the cancellation (an error condition) returns false.
errormsg string. A successful receipt of the cancellation returns null; the errormsg parameter for an unsuccessful receipt returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the cancellation returns 0. An unsuccessful receipt returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null.

GenerateTradeActivityReport

Creates an immediate report on historical trade activity on a specific Order Management System for a list of accounts during a specified time interval. The accounts listed in the request must all be associated with the logged-in user on the specified OMS (the logged-in user may not be the only user of each account). The Trade Activity Report is delivered as a comma-separated (CSV) file.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"startTime": "0001-01-01T05:00:00Z",
"endTime": "0001-01-01T05:00:00Z" 
}

Where:

String Value
accountIdList integer array. A comma-delimited array of one ore more account IDs, each valid on a single Order Management System for the authenticated user. The account user may not be the only user of the account.
omsId integer. The ID of the Order Management System on which the array of account IDs exist.
startTime string. startTime identifies the time and date for the historic beginning of the trade activity report in ISO 8601 format and UTC time zone.
endTime string. endTime identifies the time and date for the historic end of the trade activity report in ISO 8601 format and UTC time zone.

Response

Similar objects are returned for Generate~Report and Schedule~Report calls. As a result, for an on-demand Generate~Report call, some string-value pairs such as initialRunTime may return the current time and ReportFrequency will always return OnDemand because the report is only generated once and on demand

Response

{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury", 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the trade activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response.
OMSId integer. The ID of the Order Management System on which the trade activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the trade activity report was made, in ISO 8601 format and the UTC time zone.
initialRunTime string. The time and date at which the trade activity report was first run, in ISO 8601 format and the UTC time zone. Returns the current time for a Generate~Report call.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format.
requestStatus string. The status of the request for the trade activity report. A Generate~Report request will always return Submitted. request returns one of:
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs. For a Generate~Report call, this is always OnDemand.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date, expressed in Microsoft ticks format. The Generate~Report call requires a start time and an end time. The Dasset software calculates the difference between them as intervalDuration. For example, say that you specify a 90-day start-date-to-end-date window for a report. The intervalDuration value returns a value equivalent to 90 days. If you have called Generate~Report, that value simply confirms the length of time that the on-demand report covers.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management Systsem.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report. Will be null for a Generate~Report call, because generated reports are on-demand.
accountId integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

GenerateTransactionActivityReport

Generates an immediate report on account transaction activity for a list of accounts under a single Order Management System during a specified time. A logged-in and authenticated user can only generate a transaction activity report for accounts associated with the user. There can be multiple users associated with an account however. The Transaction Activity Report is delivered as a comma-separated (CSV) file.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"startTime": "0001-01-01T05:00:00Z", 
"endTime": "0001-01-01T05:00:00Z" 
}

Where:

String Value
accountIdList integer array. A comma-deliminted array of one ore more account IDs, each valid on the same Order Management System on which the user is authenticated.
omsId integer. The ID of the Order Management System on which the array of account IDs exist. startTime string. startTime identifies the time and date for the beginning of the transaction activity report, in ISO 8601 format.
endTime string. endTime identifies the time and date for the end of the transaction activity report, in ISO 8601 format.

Response

Similar objects are returned for Generate~Report and Schedule~Report calls. As a result, for an on-demand Generate~Report call, some string-value pairs such as initialRunTime may return the current time and ReportFrequency will always return OnDemand because the report is only generated once and on demand.

Response

{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury" 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the transaction activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response..
OMSId integer. The ID of the Order Management System on which the transaction activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the trade activity report was made, in ISO 8601 format and the UTC time zone.
initialRunTime string. The time and date at which the trade activity report was first run, in ISO 8601 format and the UTC time zone. Returns the current time for a Generate~Report call.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format.
requestStatus string. The status of the request for the trade activity report. A Generate~Report request will always return Submitted. request returns one of:
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs. For a Generate~Report call, this is always
OnDemand.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date, expressed in Microsoft ticks format. The Generate~Report call requires a start time and an end time. The Dasset software calculates the difference between them as intervalDuration. example, say that you specify a 90-day start-date-to-end-date window for a report. The intervalDuration value returns a value equivalent to 90 days. If you have called Generate~Report, that value simply confirms the length of time that the on-demand report covers.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report. Will be null for a Generate~Report call, because generated reports are on-demand.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

GenerateTreasuryActivityReport

Generates an immediate report on all company treasury activities related to the trading venue — withdrawals, transfers, and funds movements unrelated to trading — over a specified period. A logged-in and authenticated user can only generate a transaction activity report for accounts associated with the user. There can be multiple users associated with an account; The Trade Activity Report is delivered as a comma-separated (CSV) file.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"startTime": "0001-01-01T05:00:00Z", 
"endTime": "0001-01-01T05:00:00Z"
}

Where:

String Value
accountIdList integer array. A comma-delimited array of one ore more account IDs, each valid on a single Order Management System for the authenticated user. The account user may not be the only user of the account.
omsId integer. The ID of the Order Management System on which the array of account IDs exist.
startTime string. startTime identifies the time and date for the historic beginning of the trade activity report in ISO 8601 format and UTC time zone.
endTime string. endTime identifies the time and date for the historic end of the trade activity report in ISO 8601 format and UTC time zone.

Response

Similar objects are returned for Generate~Report and Schedule~Report calls. As a result, for an on-demand Generate~Report call, some string-value pairs such as initialRunTime may return the current time and ReportFrequency will always return OnDemand because the report is only generated once and on demand.

Response

{ 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury" 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the treasury activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response.
OMSId integer. The ID of the Order Management System on which the transaction activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the trade activity report was made, in ISO 8601 format and the UTC time zone.
initialRunTime string. The time and date at which the trade activity report was first run, in ISO 8601 format and the UTC time zone. Returns the current time for a Generate~Report call.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format.
requestStatus string. The status of the request for the trade activity report. A Generate~Reportrequest will always return Submitted. Each request returns one of:
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPendin
ReportFrequency string. When the report runs. For a Generate~Report call, this is always
OnDemand.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date, expressed in Microsoft ticks format. The Generate~Report call requires a start time and an end time. The Dasset software calculates the difference between them as intervalDuration. example, say that you specify a 90-day start-date-to-end-date window for a report. The intervalDuration value returns a value equivalent to 90 days. If you have called Generate~Report, that value simply confirms the length of time that the on-demand report covers.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report. Will be null for a Generate~Report call, because generated reports are on-demand.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

GetUserReportTickets

Returns an array of user report tickets for a specific user ID. A user report ticket identifies a reportrequested or subscribed to by a user. Reports can run once or periodically.

Request

Request

{ 
"UserId": 1 
}

Where:

String Value
UserId integer. The ID of the user whose user report tickets will be returned.

Response

The response returns an array of tickets, each ticket representing a report.

Response

[ 
{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury", 
]
},
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually"
] 
},
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
] 
}
]

Where:

String Value
RequestingUser integer. The User ID of the person requesting the report.
OMSId integer. The ID of the Order Management System on which the report was run.
reportFlavor string. The type of report. One of:
TradeActivity
Transaction
Treasury
createTime string. The time and date on which the request for the report was made, in ISO 8601 format, and UTC time zone.
initialRunTime string. The time and date at which the report was first run, in ISO 8601 format, and UTC time zone.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format, and UTC time zone.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format, and UTC time zone.
requestStatus string. The status of the request for the report Each status returns one of:
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report looks backward relative to the run date. The system calculates intervalDuration between intervalStartTime and intervalEndTime and reports it in the form of Microsoft ticks. For example, say that you specify a 90-day start-date-to-end-date window for a report. The intervalDuration value returns a value equivalent to 90 days and represents the backward-looking period of the report. Say that you have set a weekly report to look back 90 days. When it runs again in a week’s time, it again looks back 90 days — but now those 90 days are offset by a week from the first report.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report. Will be null for a Generate~Report call, because generated reports are on-demand.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report

GetUserReportWriterResultRecords

The call returns an array of user report writer results. The results are the details of when reports have been run, and the status of each report run. Did the report complete? Did the report not start? The call requires no details. The call uses the default information from the logged-in and authenticated user

Request

Requires no details.

Request

{
// no request details are needed
}

Response

Response

[ 
{ 
"RequestingUser": 0, 
"urtTicketId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"descriptorId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"resultStatus": { 
"Options": [ 
"NotStarted", 
"NotComplete", 
"ErrorComplete", 
"SuccessComplete", 
"Cancelled" 
] 
}, 
"reportExecutionStartTime": "0001-01-01T05:00:00Z", 
"reportExecutionCompleteTime": "0001-01-01T05:00:00Z", 
"reportDescriptiveHeader": ""
}, 
]

Where:

String Value
RequestingUser Integer. ID of the logged-in user requesting the report.
urtTicketId string. An alphanumeric string containing the unique report ID of the report. descriptorId string. A GUID (globally-unique identifier) that describes the report separately from the report ticket.
resultStatus string. The status of each run of the reports. One of:
0 NotStarted
1 NotComplete
2 ErrorComplete
3 SuccessComplete
4 Cancelled
reportExecutionStartTime long integer. The time that the report writer began execution, in ISO 8601 format and UTC time zone.
reportExecution-CompleteTime long integer. The time that the report writer completed the report, in ISO 8601 format and UTC time zone.
reportDescriptiveHeader string. A string describing the report.

ScheduleTradeActivityReport

Schedules a series of trade activity reports to run for a list of accounts on a single Order Management System, starting at a specific date/time, and covering a specific time duration. The reports will run periodically until canceled. Trade Activity Reports are delivered in comma-separated-value (CSV) format.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"beginTime": "0001-01-01T05:00:00Z", 
"intervalDuration": 0, 
"frequency": { 
"Options": [ 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annual" 
] 
}
}

Where:

String Value
AccountIdList integer array. Comma-separated integers; each element an account ID on the Order Management System whose trade activity will be reported on. All accounts must be from the same OMS and be associated with the logged-in user.
OMSId integer. The Order Management System on which the accounts named in the list reside.
beginTime string. The time from which the trade activities will be reported, in ISO 8601 format and UTC time zone.
intervalDuration integer. The length of time prior to the run time that the report covers, in Microsoft ticks format. For example, 90 days. Whenever the report runs, it looks back 90 days.
frequency string. How often the report will run. One of:
0 OnDemand
1 Hourly
2 Daily
3 Weekly
4 Monthly
5 Annually

Response

The response returns an object confirming the settings in the call.

Response

{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury" 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the trade activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response.
OMSId integer. The ID of the Order Management System on which the trade activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the trade activity report was made, in ISO 8601 format and UTC time zone.
initialRunTime string. The time and date at which the trade activity report was first run, in ISO 8601 format and UTC time zone.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format and UTC time zone.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format and UTC time zone.
requestStatus string. The status of the request for the trade activity report. Each request returns one of:
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date. The call specifies a start time and an intervalDuration in the form of Microsoft ticks. For example, say that you schedule a weekly report with a 90-day intervalDuration value. intervalDuration represents the backward-looking period of the report. When the report runs again in a week’s time, it again looks back 90 days — but now those 90 days are offset by a week from the first report.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

ScheduleTransactionActivityReport

Schedules a series of transaction activity reports for a list of accounts on a single Order Management System, starting at a specific date/time, and covering a specific time interval (90 days, for example). The reports will run periodically until canceled. Transaction Activity Reports are delivered in comma-separated-value (CSV) format.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"beginTime": "0001-01-01T05:00:00Z", 
"intervalDuration": 0, 
"frequency": { 
"Options": [ 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annual" 
] 
} 
}

Where:

String Value
AccountIdList integer array. Comma-separated integers; each element is an account ID whose transaction activity will be reported on. All accounts must be from the same OMS.
OMSId integer. The Order Management System on which the accounts named in the list reside. beginTime string. The time from which the transaction activities will be reported, in ISO 8601 format and UTC time zone.
intervalDuration integer. The length of time prior to the run time that the report covers, in Microsoft ticks format. For example, 90 days. Whenever the report runs, it looks back 90 days. frequency string. How often the report will run. One of:
0 OnDemand
1 Hourly
2 Daily
3 Weekly
4 Monthly
5 Annually

Response

Similar objects are returned for Generate~Report and Schedule~Report calls

Response

{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury" 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the transaction activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response.
OMSId integer. The ID of the Order Management System on which the transaction activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the transaction activity report was made, in ISO 8601 format and UTC time zone.
initialRunTime string. The time and date at which the transaction activity report was first run, in ISO 8601 format and UTC time zone.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format and UTC time zone.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format and UTC time zone.
requestStatus string. The status of the request for the transaction activity report.
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date. The call specifies a start time and an intervalDuration in the form of Microsoft ticks. For example, say that you schedule a weekly report with a 90-day intervalDuration value. intervalDuration represents the backward-looking period of the report. When the report runs again in a week’s time, it again looks back 90 days — but now those 90 days are offset by a week from the first report.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

ScheduleTreasuryActivityReport

Schedules a series of treasury activity reports for a list of accounts on a single Order Management System, starting at a specific date/time, and covering a specific time interval. The reports will run periodically until canceled. The Treasury Activity Report itself is delivered as a comma-separated-value (CSV) file.

Request

Request

{ 
"accountIdList": [ 
0 
], 
"omsId": 0, 
"beginTime": "0001-01-01T05:00:00Z", 
"intervalDuration": 0, 
"frequency": { 
"Options": [ 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annual" 
] 
} 
}

Where:

String Value
AccountIdList integer array. Comma-separated integers; each element is an account ID whose treasury activity will be reported on. All accounts must be from the same OMS.
OMSId integer. The Order Management System on which the accounts named in the list reside.
beginTime string. The time from which the treasury activities will be reported, in ISO 8601 format and UTC time zone.
intervalDuration integer. The length of time prior to the run time that the report covers, in Microsoft ticks format. For example, 90 days. Whenever the report runs, it looks back 90 days. frequency string. How often the report will run. One of:
0 OnDemand
1 Hourly
2 Daily
3 Weekly
4 Monthly
5 Annually

Response

Similar objects are returned for Generate~Report and Schedule~Report calls.

Response

{ 
"RequestingUser": 0, 
"OMSId": 0, 
"reportFlavor": { 
"Options": [ 
"TradeActivity", 
"Transaction", 
"Treasury" 
] 
}, 
"createTime": "0001-01-01T05:00:00Z", 
"initialRunTime": "0001-01-01T05:00:00Z", 
"intervalStartTime": "0001-01-01T05:00:00Z", 
"intervalEndTime": "0001-01-01T05:00:00Z", 
"RequestStatus": { 
"Options": [ 
"Submitted", 
"Validating", 
"Scheduled", 
"InProgress", 
"Completed", 
"Aborting", 
"Aborted", 
"UserCancelled", 
"SysRetired", 
"UserCancelledPending" 
] 
}, 
"ReportFrequency": { 
"Options": [ 
"onDemand", 
"Hourly", 
"Daily", 
"Weekly", 
"Monthly", 
"Annually" 
] 
}, 
"intervalDuration": 0, 
"RequestId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"lastInstanceId": "AAAAAAAAAAAAAAAAAAAAAA==", 
"accountIds": [ 
0 
]
}

Where:

String Value
RequestingUser integer. The User ID of the person requesting the treasury activity report. This confirms the ID of the authenticated user who made the request by returning it as part of the response.
OMSId integer. The ID of the Order Management System on which the treasury activity report will be run.
reportFlavor string. The type of report to be generated. One of:
TradeActivity
Transaction
Treasury
The reportFlavor string confirms the nature of the call.
createTime string. The time and date on which the request for the treasury activity report was made, in ISO 8601 format and UTC time zone.
initialRunTime string. The time and date at which the treasury activity report was first run, in ISO 8601 format and UTC time zone.
intervalStartTime string. The start of the period that the report will cover, in ISO 8601 format and UTC time zone.
intervalEndTime string. The end of the period that the report will cover, in ISO 8601 format and UTC time zone.
requestStatus string. The status of the request for the treasury activity report.
Submitted
Validating
Scheduled
InProgress
Completed
Aborting
Aborted
UserCancelled
SysRetired
UserCancelledPending
ReportFrequency string. When the report runs.
OnDemand
Hourly
Daily
Weekly
Monthly
Annually
intervalDuration long integer. The period that the report covers relative to the run date. The call specifies a start time and an intervalDuration in the form of Microsoft ticks. For example, say that you schedule a weekly report with a 90-day intervalDuration value. intervalDuration represents the backward-looking period of the report. When the report runs again in a week’s time, it again looks back 90 days — but now those 90 days are offset by a week from the first report.
RequestId string. The ID of the original request. Request IDs are long strings unique within the Order Management System.
lastInstanceId string. For scheduled reports, the report ID of the most recent previously run report.
accountIds integer array. A comma-delimited array of account IDs whose trades are reported in the trade activity report.

Tickers and Feeds

GetL2Snapshot

Provides a current Level 2 snapshot of a specific instrument trading on an Order Management System to a user-determined market depth. For more information on Level 1 and Level 2 information. The Level 2 snapshot allows the user to specify the level of market depth information on either side of the bid and ask.

Request

Request

{ 
"OMSId": 1, 
"InstrumentId": 1, 
"Depth": 100 
}

Where:

String Value
OMSId integer. The ID of the Order Management System where the instrument is traded.
InstrumentId integer. The ID of the instrument that is the subject of the snapshot.
Depth integer. Depth of the market — the number of buyers and sellers at greater or lesser prices in the order book for the instrument. Defaults to 100

Response

The response is a single object for one specific instrument. The Level2UpdateEvent contains the same data, but is sent by the OMS when trades occur. A user must subscribe to Level2UpdateEvents.

Response

{ 
"MDUpdateID": 0, 
"Accounts": 0, 
"ActionDateTime": 635872032000000000, 
"ActionType": { 
"Options": [ 
"New", 
"Update", 
"Delete" 
], 
"LastTradePrice": 0, 
"Orders": 0, 
"Price": 0, 
"ProductPairCode": 0, 
"Quantity": 0, 
"Side": 0 
}

Where:

String Value
MDUpdateID integer. Market Data Update ID. This sequential ID identifies the order in which the update was created.
Accounts integer. The number of accounts that have orders at this price level.
ActionDateTime string. ActionDateTime identifies the time and date that the snapshot was taken or the event occurred, in POSIX format X 1000 (milliseconds since 1 January 1970).
ActionType string. L2 information provides price data. This value shows whether this data is new, an update, or a deletion. One of:
New
Update
Delete
LastTradePrice real. The price at which the instrument was last traded.
Orders integer. The number of orders at this price point. Whether it is a Buy or Sell order is shown by Side, below.
Price real. Bid or Ask price for the Quantity (see Quantity below).
ProductPairCode integer. ProductPairCode is the same number and used for the same purpose as InstrumentID. The two are completely equivalent in value. InstrumentId 47 = ProductPairCode 47.
Quantity real. Quantity available at a given Bid or Ask price (see Price above).
Side integer. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)

GetTickerHistory

Requests a ticker history (high, low, open, close, volume, bid, ask, ID) of a specific instrument from a given date forward to the present. You will need to format the returned data per your requirements.

Request

Request

{ 
"InstrumentId": 1, 
"FromDate": 
}

Where:

String Value
InstrumentId long integer. The ID of a specific instrument. The Order Management System and the default Account ID of the logged-in user are assumed.
FromDate long integer. Oldest date from which the ticker history will start, in POSIX format and UTC time zone. The report moves toward the present from this point.

Response

The response returns an array of arrays dating from the FromDate value of the request. The data are returned oldest-date first. The data returned in the arrays are not labeled. For example, asingle returned array element might look like this. And with comments applied to identify the data being returned (comments are not part of the response).

Response

[
1501604532000,
2792.73,
2667.95,
2687.01,
2700.81,
242.61340767,
0,
2871,
0
]

[ 
1501604532000, 
2792.73, 
2667.95, 
2687.01,  
2700.81, 
242.61340767, 
0, 
2871, 
0 
]

GetTradesHistory

Retrieves a list of trades for the specified account, order ID, user, instrument, or starting and ending time stamp. The returned list begins at start index i, where i is an integer identifying a specific trade in reverse order; that is, the most recent trade has an index of 0. “Depth” is the count of trades to report backwards from StartIndex.

image

Caution: You must coordinate StartIndex, Depth, StartTimeStamp, and EndTimeStamp to retrieve the historical information you need. As the diagram shows, it is possible to specify values (for example, EndTimeStamp and Depth) that can exclude information you may want (the red areas).

Request

All values in the call other than OMSId are optional.

Request

{ 
"OMSId": 0, 
"AccountId": 0, 
"InstrumentId": 0, 
"TradeId": 0, 
"OrderId": 0, 
"UserId": 0, 
"StartTimestamp": 0, 
"EndTimestamp": 0, 
"Depth": 0, 
"StartIndex": 0, 
"ExecutionId": 0 
}

Where:

String Value
OMSId Integer. The ID of the Order Management System on which the trades took place. If no other values are specified, returns the trades associated with the default account for the logged-in user on this Order Management System.
AccountId Integer. The account ID that made the trades. The logged-in user must be associated with this account, although other users also can be associated with the account. If no account ID is supplied, the system assumes the default account for the logged-in user.
InstrumentId long integer. The ID of the instrument whose history is reported. If no instrument ID is included, the system returns trades for all instruments associated with the account and OMS.
TradeId integer. The ID of a specific trade. If specified, the call can return multiple states for a single trade.
OrderId integer. The ID of the order resulting in the trade. If specified, the call returns all trades associated with the order.
UserId integer. The ID of the logged-in user. If not specified, the call returns trades associated with the users belonging to the default account for the logged-in user of this OMS.
StartTimeStamp long integer. The historical date and time at which to begin the trade report, in POSIX format and UTC time zone. If not specified, reverts to the start date of this account on the trading venue.
EndTimeStamp long integer. Date at which to end the trade report, in POSIX format and UTC time zone. If not specified, uses the current time.
Depth integer. In this case, the count of trades to return, counting from the StartIndex. If not specified, returns all trades between BeginTimeStamp and EndTimeStamp, beginning at StartIndex.
StartIndex integer. The starting index into the history of trades, from 0 (the most recent trade) and moving backwards in time. If not specified, defaults to 0.
ExecutionId integer. The ID of the individual buy or sell execution. If not specified, returns all.

Response

The response returns an array, one element for each trade.

Response

[ 
{ 
"TradeTimeMS": 0, 
"Fee": 0, 
"FeeProductId": 0, 
"OrderOriginator": 0, 
"OMSId": 0, 
"ExecutionId": 0, 
"TradeId": 0, 
"OrderId": 0, 
"AccountId": 0, 
"SubAccountId": 0, 
"ClientOrderId": 0, 
"InstrumentId": 0, 
"Side": { 
"Options": [ 
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"Quantity": 0, 
"RemainingQuantity": 0, 
"Price": 0, 
"Value": 0, 
"TradeTime": 0, 
"CounterParty": "", 
"OrderTradeRevision": 0, 
"Direction": { 
"Options": [ 
"NoChange", 
"UpTick", 
"DownTick" 
] 
}, 
"IsBlockTrade": false 
}
]

Where:

String Value
TradeTimeMS long integer. The time at which the trade took place, reported in Microsoft ticks format and UTC time zone.
Fee real. The fee that applied to this trade, if any.
FeeProductId integer. The ID of the product in which the fee is denominated.
OrderOriginator integer. The ID of the user who entered the order on your side of the trade.
OMSId
ExecutionId integer. The ID of your sell or buy side portion of the execution, individually.
TradeId integer. The ID of the overall trade.
OrderId integer. The ID of the order that resulted in the trade.
AccountId integer. The ID of the account under which the trade was executed.
SubAccountId integer. Not currently used.
ClientOrderId long integer. A user-assigned ID for the order (like a purchase-order number assigned by a company). ClientOrderId defaults to 0.
InstrumentId long integer. The ID of the instrument being traded. Side string. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
Quantity real. The quantity of the instrument being traded.
RemainingQuantity real. Any quantity remaining in the order after this trade.
Price real. The unit price of the order.
Value real. The overall value of the trade — price X quantity.
TradeTime long integer. Time at which the trade took place, in POSIX format and UTC time zone.
CounterParty long integer. Shows 0.
OrderTradeRevision integer. The ID of any trade revision that took place for the trade.
Direction string. Effect of this trade on the market. One of:
Nochange
UpTick
DownTick
IsBlockTrade Boolean. Returns true if the trade was a reported trade; false otherwise

SubscribeAccountEvents

Subscribes the user to notifications about the status of account-level events: orders, trades, position updates, deposits, and withdrawals for a specific account on the Order Management System (OMS). The subscription reports all events associated with a given account; there is no filter at the call level to subscribe to some events and not others. Account event information is supplied in comma-separated-value (CSV) format.

Request

Request

{ 
"AccountId": 1, 
"OMSId": 1 
}

Where:

String Value
AccountId integer. The ID of the account for the logged-in user.
OMSId integer. The ID of the Order Management System to which the account belongs.

Response

Response

{
"Subscribe": true 
}

Where:

String Value
Subscribe Boolean. A successful subscription returns true; otherwise, false.

The Events

When you call SubscribeAccountEvents, you subscribe to the following list of events. The Order Management System may supply them at irregular intervals; software must listen for these events. The system sends each of these events in a message frame.

AccountPositionEvent

Trigger: The balance in your account changes.

{ 
"OMSId":4, //The OMSId. [Integer]
"AccountId":4, // account id number. [Integer]
"ProductSymbol":"BTC", 
//The Product Symbol for this balance message. [String] 
"ProductId":1, 
//The Product Id for this balance message. [Integer] 
"Amount":10499.1, 
//The total balance in the account for the specified product. [Dec] 
"Hold": 2.1, 
//The total amount of the balance that is on hold. Your available //balance for trading and withdraw is (Amount - Hold). [Decimal] 
"PendingDeposits":0, 
//Total Deposits Pending for the specified product. [Decimal] 
"PendingWithdraws":0, 
//Total Withdrawals Pending for the specified product. [Decimal] 
"TotalDayDeposits":0, 
//The total 24-hour deposits for the specified product. UTC. [Dec] 
"TotalDayWithdraws":0 
//The total 24-hour withdraws for the specified product. UTC [Dec]
}

CancelAllOrdersRejectEvent

Trigger: All orders for your account are rejected.

{ 
"OMSId": 1, // OMS ID [Integer] 
"AccountId": 4, // ID of the account being tracked [Integer]
"InstrumentId": 0, 
// ID of the instrument in the order [Long Integer]
"Status": "Rejected", // Accepted/Rejected [String] 
"RejectReason": "Instrument not found." 
// Reason for rejection [String]
}

{ 
"OMSId": 1, // OMS ID [Integer] 
"AccountId": 4, // ID of the account being tracked [Integer] 
"InstrumentId": 0, 
// ID of the instrument in the order [Long Integer] 
"Status": "Rejected", // Accepted/Rejected [String]. 
"RejectReason": "Instrument not found." 
// Reason for rejection [String].
}

CancelOrderRejectEvent

Trigger: Your order is canceled.

{ 
"OMSId": 1, //OMS Id [Integer] Always 1 
"AccountId": 4, //Your Account ID. [Integer] 
"OrderId": 1, 
//The Order ID from your Cancel request. [64 Bit Integer] 
"OrderRevision": 0, 
//The Revision of the Order, if any was found. [64 Bit Integer] 
"OrderType": "Unknown", 
"InstrumentId": 1, 
// The InstrumentId from your Cancel request. [Integer] 
"Status": "Rejected", //Always "Rejected" [String] 
"RejectReason": "Order Not Found" 
//A message describing the reason for the rejection. [String]
//=> {unicorn: 'cake'}
}

CancelReplaceOrderRejectEvent

Trigger: Your order is rejected even if a cancel-replace order was placed.

{ 
"OMSId": 1, // ID of the OMS [integer] 
"AccountId": 4, // ID of the account [integer] 
"OrderId": 9342, // The ID of the rejected order [integer] 
"ClientOrderId": 1234, // The client-supplied order ID [long integer] 
"LimitPrice": 99.1, // The limit price of the order. 
"OrderIdOCO": 0, // The ID of the other ordre to cancel if this is executed. 
"OrderType": "Limit", 
"PegPriceType": "Bid", // Where to peg the stop/trailing order. 
"OrderIdToReplace": 9333, 
// The ID of the order being cancelled and replaced. 
"InstrumentId": 1, // ID of the instrument traded in the order. 
"ReferencePrice": 99.1, // used internally. 
"Quantity": 1.0, // Quantity of the replacement order 
"Side": "Buy", // Side of the order: Buy, Sell, Short (future) 
"StopPrice":0, // The price at which to execute the new order. 
"TimeInForce":"GTC", // Period when new order can be executed. 
"Status":"Rejected", // Status of the order - always "rejected" 
"RejectReason":"Order Not Found" // Reason the order was rejected. 
}

MarketStateUpdate

Trigger: The market state is altered administratively.

{ 
"ExchangeId":1, // Exchange Id [Integer] 
"VenueAdapterId":1, // Internal [Integer] 
"VenueInstrumentId":1, // Instrument Id on a specific venue [Integer] 
"Action":"ReOpen", // Market State Action [String] Values are 
// "Pause", "Resume", "Halt", "ReOpen" 
"PreviousStatus":"Stopped", 
// Previous Market Status for Instrument [String] Values are 
// "Running", "Paused", "Stopped", "Starting" 
"NewStatus":"Running", 
// Market Status for Instrument [String] Values are 
// "Running", "Paused", "Stopped", "Starting" 
"ExchangeDateTime":"2016-04-21T21:48:22Z" 
// ISO 8601 format UTC time zone 
}

NewOrderRejectEvent

Trigger: An order associated with your account is rejected.

{ 
"OMSId": 1, //OMS Id [Integer] Always 1 
"AccountId": 4, //Your Account Id [Integer] 
"ClientOrderId": 1234, //Your Client Order Id [64 Bit Integer] 
"Status": "Rejected", //Always "Rejected" 
"RejectReason": "No More Market" 
//A message describing the reason for the reject. 
}

OrderStateEvent

Trigger: The status changes for an order associated with your account.

{ 
"Side":"Sell", 
// The side of your order. [String] Values are "Sell", 
// "Buy", "Short" 
"OrderId": 9849, //The Server-Assigned Order Id. [64-bit Integer] 
"Price": 97, //The Price of your order. [Decimal]
"Quantity":1, 
// The Quantity (Remaining if partially or fully executed) of 
// your order. [Decimal] 
"Instrument":1, // The InstrumentId your order is for. [Integer] 
"Account":4, // Your AccountId [Integer] 
"OrderType":"Limit", 
// The type of order. [String] Values are "Market", "Limit", 
// "StopMarket", "StopLimit", "TrailingStopMarket", and 
// "TrailingStopLimit" 
"ClientOrderId":0, // Your client order id. [64-bit Integer] 
"OrderState":"Working", // The current state of the order. [String] // Values are "Working", "Rejected", "FullyExecuted", "Canceled", 
// "Expired" 
"ReceiveTime":0, // Timestamp in POSIX format 
"OrigQuantity":1, // The original quantity of your order. [Decimal] 
"QuantityExecuted":0, // The total executed quantity. [Decimal] 
"AvgPrice":0, // Avergage executed price. [Decimal] 
"ChangeReason":"NewInputAccepted" // The reason for the order state change. [String] Values are 
// "NewInputAccepted", "NewInputRejected", "OtherRejected", 
// "Expired", "Trade", SystemCanceled BelowMinimum", 
// "SystemCanceled NoMoreMarket", "UserModified

OrderTradeEvent

Trigger: An order associated with your account results in a trade.

{ 
"OMSId":1, //OMS Id [Integer] 
"TradeId":213, /Trade Id [64-bit Integer] 
"OrderId":9848, //Order Id [64-bit Integer] 
"AccountId":4, //Your Account Id [Integer] 
"ClientOrderId":0, //Your client order id. [64-bit Integer] 
"InstrumentId":1, //Instrument Id [Integer] 
"Side":"Buy", 
//[String] Values are "Buy", "Sell", "Short" (future) 
"Quantity":0.01, //Quantity [Decimal] 
"Price":95, //Price [Decimal] 
"Value":0.95, //Value [Decimal] 
"TradeTime":635978008210426109, // TimeStamp in Microsoft ticks format 
"ContraAcctId":3, 
// The Counterparty of the trade. The counterparty is always 
// the clearing account. [Integer] 
"OrderTradeRevision":1, //Usually 1 
"Direction":"NoChange" //"Uptick", "Downtick", "NoChange"
}

PendingDepositUpdate

Trigger: Deposit pending on your account.

{ 
"AccountId": 4, // Your account id number. [Integer] 
"AssetId": 1, // The ProductId of the pending deposit. [Integer] 
"TotalPendingDepositValue": 0.01 
//The value of the pending deposit. [Decimal]
} 
"Requires2FA": false, 
"TwoFAType": "", 
"TwoFAToken": "",
}

SubscribeLevel1

Retrieves the latest Level 1 Ticker information and then subscribes the user to ongoing Level 1 market data event updates for one specific instrument. The SubscribeLevel1 call responds with the Level 1 response shown below. The OMS then periodically sends Leve1UpdateEvent information when best bid/best offer issues in the same format as this response, until you send the UnsubscribeLevel1 call.

Request

You can identify the instrument with its ID or with its market symbol (string).

Request

{ 
"OMSId": 1, 
"InstrumentId": 0 
}
{ 
"OMSId": 1, 
"Symbol": "BTCNZD"}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the instrument trades.
InstrumentId integer. The ID of the instrument you’re tracking. Conditionally optional.
Symbol string. The symbol of the instrument you’re tracking. Conditionally optional.

Response

The SubscribeLevel1 response and Level1UpdateEvent both provide the same information.

Response

{ 
"OMSId": 1, 
"InstrumentId": 1, 
"BestBid": 0.00, 
"BestOffer": 0.00, 
"LastTradedPx": 0.00, 
"LastTradedQty": 0.00, 
"LastTradeTime": 635872032000000000, 
"SessionOpen": 0.00, 
"SessionHigh": 0.00, 
"SessionLow": 0.00, 
"SessionClose": 0.00, 
"Volume": 0.00, 
"CurrentDayVolume": 0.00, 
"CurrentDayNumTrades": 0, 
"CurrentDayPxChange": 0.0, 
"Rolling24HrVolume": 0.0, 
"Rolling24NumTrades": 0.0, 
"Rolling24HrPxChange": 0.0, 
"TimeStamp": 635872032000000000
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the instrument trades.
InstrumentId integer. The ID of the instrument being tracked.
BestBid real. The current best bid for the instrument.
BestOffer real. The current best offer for the instrument.
LastTradedPx real. The last-traded price for the instrument.
LastTradedQty real. The last-traded quantity for the instrument.
LastTradeTime long integer. The time of the last trade in POSIX format X 1000 (milliseconds since 1 January 1970).
SessionOpen real. Opening price. In markets with openings and closings, this is the opening price for the current session; in 24-hour markets, it is the price as of UTC Midnight.
SessionHigh real. Highest price during the trading day, either during a true session (with opening and closing prices) or UTC midnight to UTC midnight.
SessionLow real. Lowest price during the trading day, either during a true session (with opening and closing prices) or UTC midnight to UTC midnight.
SessionClose real. The closing price. In markets with openings and closings, this is the closing price for the current session; in 24-hour markets, it is the price as of UTC Midnight.
Volume real. The unit volume of the instrument traded, either during a true session (with openings and closings) or in 24-hour markets, the period from UTC Midnight to UTC Midnight.
CurrentDayVolume real. The unit volume of the instrument traded either during a true session (with openings and closings) or in 24-hour markets, the period from UTC Midnight to UTC Midnight.
CurrentDayNumTrades integer. The number of trades during the current day, either during a true session (with openings and closings) or in 24-hour markets, the period from UTC Midnight to UTC Midnight.
CurrentDayPxChange real. Current day price change, either during a true trading session or UTC Midnight to UTC midnight.
Rolling24HrVolume real. Unit volume of the instrument during the past 24 hours, regardless of time zone. Recalculates continuously.
Rolling24HrNumTrades integer. Number of trades during the past 24 hours, regardless of time zone. Recalculates continuously.
Rolling24HrPxChange real. Price change during the past 24 hours, regardless of time zone. Recalculates continuously.
TimeStamp long integer. The time this information was provided, in POSIX format X 1000 (milliseconds since 1 January 1970)

SubscribeTicker

Subscribes a user to a Ticker Market Data Feed for a specific instrument and interval. SubscribeTicker sends a response object as described below, and then periodically returns a TickerDataUpdateEvent that matches the content of the response object.

Request

Request

{ "OMSId": 1, 
"InstrumentId": 1, 
"Interval": 60, 
"IncludeLastCount": 100 
}

Where:

String Value
OMSId integer. The ID of the Order Management System
InstrumentId long integer. The ID of the instrument whose information you want to track.
Interval integer. Specifies in seconds how frequently to obtain ticker updates. Default is 60 — one minute.
IncludeLastCount integer. The limit of records returned in the ticker history. The default is 100.

Response

The response returns an array of objects, each object an unlabeled, comma-delimited set of numbers. The Open price and Close price are those at the beginning of the tick — the Interval time subscribed to in the request.

A typical response might look like this: [[1510719222970.21,6943.51,6890.27,6898.41,6891.16,0,6890.98,6891.98,1, 1510718681956.34]]

Response

[ 
{ 
"EndDateTime": 0,  
"HighPX": 0, 
"LowPX": 0, 
"OpenPX": 0, 
"ClosePX": 0, 
"Volume": 0, 
"Bid": 0, 
"Ask": 0, 
"InstrumentId": 1, 
"BeginDateTime": 0 
} 
]

SubscribeTrades

Subscribes an authenticated user to the Trades Market Data Feed for a specific instrument. Each trade has two sides: Buy and Sell. SubscribeTrades returns the response documented here for your immediate information, then periodically sends the OrderTradeEvent documented in SubscribeAccountEvents.

Request

Request

{ 
"OMSId": 1, 
"InstrumentId": 1, 
"IncludeLastCount": 100 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the instrument is traded.
InstrumentId long integer. The ID of the instrument whose trades will be reported.
IncludeLastCount integer. Specifies the number of previous trades to retrieve in the immediate snapshot. Default is 100.

Response

The response returns an array of trades. Both sides of each trade are described.

Response

[  
{ 
"OMSId": 0, 
"TradeID": 0, 
"ProductPairCode": 0, 
"Quantity": 0, 
"Price": 0, 
"Order1": 0, 
"Order2": 0, 
"TradeTime": "0001-01-01T05:00:00Z", 
"Direction": { 
"Options": [ 
"NoChange", 
"UpTick", 
"DownTick" 
] 
}, 
"TakerSide": 0, 
"Side1AccountId": 0, 
"Side2AccountId": 0, 
"Order1Side": { 
"Options": [ ,
"Buy", 
"Sell", 
"Short", 
"Unknown" 
] 
}, 
"Order2Side": { 
"Options": [, 
"Buy", 
"Sell", 
"Short", 
"Unknown" ,
] 
},
"BlockTrade": false, 
"Order1ClientId": 0, 
"Order2ClientId": 0 
}
]

Where:

String Value
OMSId integer. The ID of the Order Management System where the instrument to be tracked is traded.
TradeID integer. The ID of this trade.
ProductPairCode integer. ProductPairCode is the same number and used for the same purpose as InstrumentID. The two are completely equivalent in value. InstrumentId 47 = ProductPairCode 47.
Quantity real. The quantity of the instrument traded.
Price real. The price at which the instrument traded.
Order1 integer. The ID of one of the orders that resulted in the trade.
Order2 integer. The ID of the other order that resulted in the trade.
TradeTime long integer. The time at which the trade took place. UTC time.
Direction string. Effect of the trade on the instrument’s market price. One of:
0 NoChange
1 UpTick
2 DownTick
TakerSide integer. Which side of the trade took liquidity? One of:
0 Buy
1 Sell
The maker side of the trade provides liquidity by placing the order on the book (this can be a buy or a sell order). The other side takes the liquidity. It, too, can be buy-side or sell-side.
Side1AccountId integer. The account ID of the 1-side of the trade.
Side2AccountId integer. The account ID of the 2-side of the trade.
Order1Side string. The side taken by order 1 of the trade. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
Order2Side string. The side taken by order 2 of the trade. One of:
0 Buy
1 Sell
2 Short (reserved for future use)
3 Unknown (error condition)
BlockTrade Boolean. Was this a privately negotiated trade that was reported to the OMS? A private trade returns true; otherwise false. Default is false.
Order1ClientId long integer. The client-supplied order ID of the 1-side client.
Order2ClientId long integer. The client-supplied order ID of the 2-side client.

UnsubscribeLevel1

Unsubscribes the user from a Level 1 Market Data Feed subscription.

Request

Request

{ 
"OMSId": 1, 
"InstrumentId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the user has subscribed to a Level 1 market data feed.
InstrumentId long integer. The ID of the instrument being tracked by the Level 1 market data feed.

Response

Response

{ 
"result": true, 
"errormsg": null, 
"errorcode":0, 
"detail": null 
}

Where:

String Value
result Boolean. A successful receipt of the unsubscribe request returns true; and unsuccessful receipt (an error condition) returns false.
errormsg string. A successful receipt of the unsubscribe request returns null; the errormsg parameter for an unsuccessful request returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the unsubscribe request returns 0. An unsuccessful receipt returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null

UnsubscribeTicker

Unsubscribes a user from a Ticker Market Data Feed

Request

Request

{ 
"OMSId": 1, 
"InstrumentId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the user has subscribed to a ticker market data feed.
InstrumentId long integer. The ID of the instrument being tracked by the ticker market data feed.

Response

Response

{ 
"result": true, 
"errormsg": null, 
"errorcode":0, 
"detail": null 
}

Where:

String Value
result Boolean. A successful receipt of the unsubscribe request returns true; and unsuccessful receipt (an error condition) returns false.
errormsg string. A successful receipt of the unsubscribe request returns null; the errormsg parameter for an unsuccessful request returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the unsubscribe request returns 0. An unsuccessful receipt returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null.

UnsubscribeTrades

Unsubscribes a user from the Trades Market Data Feed.

Request

Request

{
"OMSId": 1, 
"InstrumentId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the user has subscribed to a trades market data feed.
InstrumentId long integer. The ID of the instrument being tracked by the trades market data feed.

Response

Response

{ 
"result": true, 
"errormsg": null, 
"errorcode":0, 
"detail": null 
}

Where:

String Value
result Boolean. A successful receipt of the unsubscribe request returns true; and unsuccessful receipt (an error condition) returns false.
errormsg string. A successful receipt of the unsubscribe request returns null; the errormsg parameter for an unsuccessful request returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
errorcode integer. A successful receipt of the unsubscribe request returns 0. An unsuccessful receipt returns one of the errorcodes shown in the errormsg list.
detail string. Message text that the system may send. Usually null.

Deposits and Withdrawals

GetAllDepositRequestInfoTemplates

Certain account providers require specific information (deposit request info) for deposits. For example, a deposit via credit card might require the credit card number, first, and last name. Other payment providers will require other sets of information.

A call to GetAllDepositRequestInfoTemplates returns an array of template objects applicable to the product (asset).

Request

Request

{ 
"OMSId": 1, 
"ProductId": 1 
}

Where:

String Value
OMSId integer. The ID of the Order Management System.
ProductId integer. The ID of the product (asset) that determines the template information.

Response

The response is an array of available template objects and response information that confirms whether the call was successful. Within each template is the depositTemplate object and within that, a JSON string (called Template) that holds specific data in string/value pairs. Two Templates objects are returned in this example response.

Response

{ 
"Templates": [ 
{ 
"providerId": 10, 
"providerName": "Nigerian Naira", 
"depositTemplate": { 
"ProviderType": "QuickTeller", 
"Template": { 
"FirstName": null, 
"LastName": null, 
"Amount":0 
}, 
"ProcessInfo": " ", 
"UseGetDepositWorkflow": true, 
"DepositWorkflow": "CryptoWallet" 
} 
}, 
{ 
"providerId": 7, 
"providerName": "Nigerian Naira", 
"depositTemplate": { 
"ProviderType": "WebPay", 
"Template": { 
"FirstName": null, 
"LastName": null, 
"Amount" :null 
}, 
"ProcessInfo": " ", 
"UseGetDepositWorkflow": true, 
"DepositWorkflow": "MerchantRedirect" 
} 
} 
], 
"result": false, 
"errormsg": null, 
"statuscode":0 
}

Where:

String Value
Templates Array of Objects. See Templates object, following.
result Boolean. Returns true if the call has been successfully received by the Order Management System; otherwise false.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following strings:
NotAuthorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
statuscode integer. A value for statuscode is returned by this call, but is not used.

Templates object. The code sample shows an example array of Templates objects. They vary according to the asset being deposited and the account provider.

Where:

String Value
providerId integer. The ID of the account provider, an external third party that handles funds and crypto-currencies being deposited and withdrawn.
providerName string. The name of the account provider.
depositTemplate object. An account provider-specific set of string/value pairs that hold deposit information. The depositTemplate includes a JSON string object called Template that may hold additional information such as name and amount of the deposit.
ProcessInfo string. The ProcessInfo string also varies with the provider and the asset being deposited. In a generic deposit template, this string/value pair will be empty; in other cases it will be an address for processing the deposit.
UseGetDepositWorkflow Boolean. A true value causes the deposit to use DepositWorkflow; a false value causes the deposit not to use DepostWorkflow.
DepositWorkflow string. A set of enumerated values that describe the deposit workflow for this template. One of:
CryptoWallet
ManualDeposit
MerchantForm
MerchantRedirect
Custom

Template JSON object. Within the depositTemplate object is the Template JSON stringify object. In this example case, it holds the name of the depositor and the amount being deposited. Other templates may hold other information.

String Value
FirstName string. First name of the depositor.
LastName string. Last name of the depositor.
Amount real. Amount being deposited.

GetDepositInfo

Returns an array of cryptographic deposit addresses that the user will use to send crypto-currency funds to the trading venue.

Request

The request always returns a set of cryptographic keys that each act as an address for sending coins from a crypto-currency wallet. GenerateNewKey generates a new set of cryptographic keys

Request

{ 
"OMSId": 1, 
"AccountId": 4, 
"ProductId": 1, 
"GenerateNewKey": true 
}

Where:

String Value
OMSId integer. The ID of the Order Management System into which the deposits were made.
AccountId integer. The ID of the account into which the deposits were made.
ProductId integer. The ID of the product or asset in which the deposits were made. Product ID and Asset ID are equivalent.
GenerateNewKey Boolean. A true value means that the system will generate a new (never before seen) cryptographic key for use with deposits. The new key will be returned as the first element of the set of keys. A value of false provides the set of keys previously used.

Response

The response returns a set of cryptographic keys for use in making deposits from a cryptocurrency wallet, along with any error message and confirmation of asset manager module, account, account provider, and asset (product). Select one of the keys for use with making the transfer from the crypto-currency wallet.

Response

{ 
"AssetManagerId": 1, 
"AccountId": 4, 
"AssetId": 1, 
"ProviderId": 1, 
"DepositInfo": [ 
"mkqpdfHecor7QCd53sEyWE1TL4UupE8L9z", 
"muTJjY6411MmRTccvyHxJmET3t3b8EeCNT", 
"mjN4bJJotcCRRiiGpWXyiE4vdRpVMQf5Wa", 
"mivkpkPBKm5sXFGiySgVbhxQ2Keb9fKGiR", 
"mvAKe9ZoNLWALYuc2TK9HVK9dt5oLsbAAZ", 
"myCP69kfd3eu1MvW8DKXjfFsEJns2mK3K5", 
"mubnHGgBqBunjGSsx25bbBA4n2eBpJGJKC", 
"mxV5wizeS2r6j8jiUWUsTrMimda3fSqx8f", 
"mr5L1qb4cJTsvJPnU4zMD95snXdNsJpd6L", 
"mqt2NgUrhYQWixcNdU76u5uAa3u34tqvmr", 
"mgySiizawpSMeJhz3Q7K1w9zgEwE4JQ4fD" 
], 
"result": true, 
"errormsg": null, 
"statuscode": 0
}

Where:

String Value
AssetManagerId integer. The ID of the asset manager module for this Dasset installation.
AccountId integer. The ID of the account into which the deposit will be made (and for which the set of cryptographic keys will be valid).
AssetId integer. The ID of the asset in which the deposit is denominated, for example, NZ Dollars or Bitcoin. AssetId is numerically equivalent to ProductId.
ProviderId integer. The ID of the third-party Account Provider who makes the conversion between national currency and crypto-currency.
DepositInfo string. The response returns a set of cryptographic keys for use in making deposits from a crypto-currency wallet.
Note: Do not confuse this DepositInfo, which returns cryptographic keys, with the DepositInfo string/value pairs created as part of a deposit ticket or returned by GetDepositTicket or GetAllDepositTickets.
result Boolean. Returns true if the request for deposit info was received correctly; returns false if the request was not received correctly.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
statuscode integer. If result is false, statuscode can return:
32 Not_Authorized
33 AssetManager_Not_Found
If no account provider is located, statuscode returns null.

GetDepositRequestInfoTemplate

This call returns the single most appropriate deposit template available to you for a given set of product (asset), account, and account provider (the third-party organization that handles your deposits and withdrawals). In this case, the template provides the specific information that an account provider requires to make a deposit.

Request

Request

{ 
"OMSId": 1, 
"ProductId": 8, 
"AccountId": 4, 
"AccountProviderId": 10 
}

Where:

String Value
OMSId integer. The ID of the Order Management System.
ProductId integer. The ID of the product or asset that determines the template information.
AccountId integer. The ID of the account that returns the deposit request info.
AccountProviderId integer. Optional. The ID of the account provider that handles the deposit. You must include this if there are multiple account providers

Response

The response returns the deposit template appropriate to the set of product (asset) being deposited, the account into which the deposit is being made, and the account provider. The template shown here is just an example. There is a wide variety of templates and information they require.

Response

{ 
"Template": { 
"ProviderType": "BitcoinRpc", 
"Template": "{}", 
"ProcessInfo": "", 
"UseGetDepositWorkflow": true, 
"DepositWorkflow": "CryptoWallet" 
}, 
"result": true, 
"errormsg": null, 
"statuscode": 0 
}

Where:

String Value
Template Object. See Template object, following.
result Boolean. Returns true if the call has been successfully received by the Order Management System; otherwise false.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following strings:
NotAuthorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
statuscode integer. A value for statuscode is returned by this call, but is not used.

Template object. The Template object returns a set of string/value pairs that contain information for the deposit; among those string/value pairs is a JSON string object (also called Template) that may contain additional string/values pairs required by the account provider. This example does not include any — the brackets are empty — but they may include items such as first name and last name of the depositor.

Where:

String Value
ProviderType string. The type of asset handled by the account provider; in this example, Bitcoin.
Template JSON object. An account provider-specific set of string/value pairs that will vary from account provider to account provider.
ProcessInfo string. The ProcessInfo string also varies with the provider and the asset being deposited. In a generic deposit template, the ProcessInfo string/value pair will be empty; in other cases it will be an address for processing the deposit.
UseGetDepositWorkflow Boolean. A true value causes the deposit to use DepositWorkflow; a false value causes the deposit not to use DepostWorkflow.
DepositWorkflow tring. A set of enumerated values that describe the deposit workflow for this template. One of:
CryptoWallet
ManualDeposit
MerchantForm
MerchantRedirect
Custom

GetWithdrawTemplate

Returns the text of the withdraw template that you name. You can obtain the name of an asset– and account-provider-appropriate template by using GetWithdrawTemplateTypes.

Request

Request

{ 
"OMSId": 1, 
"AccountId": 4, 
"ProductId": 2, 
"templateType": "Standard" 
}

Where:

String Value
OMSId integer. The ID of the Order Management System on which the withdrawal will be made.
AccountId integer. The ID of the account from which the withdrawal will be made.
ProductId integer. The ID of the product (asset) that will be withdrawn. AssetId and ProductId are numerically equivalent. You must use ProductId here.
templateType string. The name of the withdraw template whose text you want to return.

Response

The response returns the string/value pairs of the template, along with any error messages about the call.

Response

{ 
"Template": { 
"FullName": null, 
"Language": null, 
"Comment": null, 
"BankAddress": null, 
"BankAccountNumber": null, 
"BankAccountName": null, 
"SwiftCode": null }, 
"result": true, 
"errormsg": null, 
"statuscode": 0 
}

Where:

String Value
Template object. The text of the template that the call returns will vary with the account, asset (product), and account provider handling the withdrawal.
result Boolean. If the call has been successfully received by the Order Management System, the result is true; otherwise, it is false.
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
statuscode integer. If result is false, statuscode can return:
32 Not_Authorized
33 AssetManager_Not_Found
If no account provider is located, statuscode returns null.

Template Object. A template object is a string containing a set of string/value pairs. The template returned by GetWithdrawTemplate will vary with the account, asset (product), and account provider. This example is taken from the “Standard” template.

Where:

String Value
FullName string. Name of the person making the withdrawal.
Lanugage string. A two-character abbreviation of the language of the withdrawal information, for example, En for English, Sp for Spanish, or Ru for Russian. The values for this string are not enumerated, to allow for variation and expansion.
Comment string. A comment entered by the withdrawer.
BankAddress string. The physical address of the bank or account provider — 123 Fourth St., for example.
BankAccountNumber string. The account at the bank or other account provider that received the funds withdrawn from the OMS and trading venue account.
BankAccountName string. The name associated with the account at the bank or other account provider that will receive the funds withdrawn from the OMS and trading venue account.
SwiftCode string. An international bank code that uniquely identifies a specific bank internationally. It is also known as a Bank Identifier Code, or BIC. The Swift Code consists of 8 or 11 alphanumeric characters.

GetWithdrawTemplateTypes

Returns an array of names of withdrawal template that are appropriate to the asset (product) you want to withdraw from the account. Obtain the withdrawal template itself by calling GetWithdrawTemplate with the correct name.

Request

Request

{ 
"OMSId": 1, 
"AccountId": 4, 
"ProductId": 2 
}

Where:

String Value
OMSId integer. The ID of the Order Management System.
AccountId integer. The ID of the account from which you want to make the withdrawal.
ProductId integer. The ID of the product (asset) that you want to withdraw. ProductId and AssetId are identical in value, but this call uses ProductId..

Response

The response returns an array of template names, and a success code.

Response

{ 
"TemplateTypes": [ 
"Standard" 
], 
"result": true, 
"errormsg": null, 
"statuscode": 0 
}

Where:

String Value
TemplateTypes array of strings. The templates that are appropriate to the withdrawal of your asset, account, and Order Management System. If the call was unsuccessful, TemplateTypes may return an empty array.
result Boolean. If the call has been successfully received by the Order Management System, result is true; otherwise, it’s false
errormsg string. A successful receipt of the call returns null; the errormsg parameter for an unsuccessful call returns one of the following messages:
Not Authorized (errorcode 20)
Invalid Request (errorcode 100)
Operation Failed (errorcode 101)
Server Error (errorcode 102)
Resource Not Found (errorcode 104)
statuscode integer. If result is false, statuscode can return:
32 Not_Authorized
33 AssetManager_Not_Found
If no account provider is located, statuscode returns null..