ORDER ENTRY
Clients entering orders into the market center
ADD ORDER
Ordinary account can place orders from his own account. Alternatively, the user can pass his own order-id in “clientorderid”
, which will be echoed back in corresponding “order”,” sale” update.
If order is successfully placed, the response will contain an FI assigned “refno”
. The corresponding “refno”
is also echoed in corresponding “order”
/” sale”
update. If a client needs to cancel an existing order, they must provide “refno” field in cancel request.
Available Options:
Field Name
Definition
Side
Required, possible values “B”/“S”
Security
Required, instrument to trade, such as “BTCUSD”, “ETHEUR”, instruments that are allowed in exchange, must set
Price
Required for most, price to trade, must set for limit order
Qty
Required for most, amount of qty to trade, must set unless it is a market order, where you can set “amount” instead.
Alo
Optional, true/false, default is false, if set to true, it means the order is for Adding Liquidity Only
Dest
Optional, where this order should go.
Tif
Optional, “IOC”/”GTC”/”GTT”/”FOK”, default is “GTC”, if “GTT” if “GTT”, must set “exptime” field
Negotiate
Optional, default is false, if set to true, the order is a negotiated order, you must also specify “brokers” field where to send. For negotiated order, only send limit order.
IOI
Optional, default is false, if set to true, the order is an IOI for quote, the order itself cannot
be executed.
Brokers
Optional, default is not set. Only used when “negotiate” is set to true, it has format of “FIRM1,FIRM2,FIRM3…”. Note if you send same order to multiple firms, and if all firms try to execute your order, the maximum execqty is the your order qty.
Displayqty
Optional, default is not set. If set, it is for reserve order, which will shows display qty of your order
Ordertype
Optional, “LMT”/”MKT”, default is “LMT” and “price” field is required for limited order. For “MKT” order, specify “amount” field for corresponding currency amount, or if it is sell market order, you can still use “qty” field instead of “amount” field
Stoptype
Optional, “TSTOP”/”STOP”, default is not set, “STOP” is for stop order, “TSTOP” is for tailing stop order. For “STOP”, need to specify “stopprice”, for “TSTOP”, need to specify “traildelta”.
Pegtype
optional, “MID”/”PRI”, default is not set, “MID” is to set midpoint peg order, “PRI” is to set primary peg order
Capacity
“capacity”, “P”,”A”,”R” for principal, agency, riskless
SAMPLE REQUEST ADD ORDER
SAMPLE RESPONSES ADD ORDER
SAMPLE ADD ORDER WITH FIRM
CANCEL ORDER
Here is an example to cancel order, you must provide “refno” field, which is FI assigned order id.
SAMPLE REQUEST CANCEL ORDER
SAMPLE RESPONSES CANCEL ORDER
ORDER
“liveqty”
field tells you much quantity is still open, if "liveqty"
is 0, that means is the order is done.
If client provides “clientorderid”
in “addorder”
, it will be echoed back in “order” update. Message shows that order is open, second message shows that order has 500 shares executed. The third messages show that order is canceled.
SAMPLE MESSAGES ORDER FIRST
NEGOTIATED ORDER
To send an negotiated order (if system allows)
DECLINE NEGOTIATED ORDER
Here is an example to decline an incoming negotiated order, you must provide “refno”
field, which is FI assigned order id.
SAMPLE REQUEST DECLINE ORDER
COUNTER ORDER
To counter an incoming negotiated order, you must provide “refno” field, which is FI assigned order id from the incoming negotiated order, you also must provide side, qty, price from your side of view.
Once new counter is accepted, the original negotiated order is cancelled, the original initiator will receive an incoming negotiated order and you will get an new outgoing negotiated order message.
SAMPLE REQUEST COUNTER ORDER
EXECUTE ORDER
To execute an incoming negotiated order, you must provide “refno”
field, which is FI assigned order id from the incoming negotiated order, you also must provide side, qty, price from your side of view.
If your execute request is accepted, both sides of negotiated order will receive trade update, just as normal order execution be would.
SAMPLE REQUEST EXECUTE ORDER
ORDER
“liveqty”
field tells you much quantity is still open, if liveqty is 0, that means is the order is done.
If client provides “clientorderid”
in “addorder”
, it will be echoed back in “order” update. Message shows that order is open, second message shows that order has 500 shares executed. The third messages show that order is canceled.
“inbound”, true:false, only for negotiated order. True means someone send you an order, false means you sends someone an order.
SAMPLE MESSAGES ORDER FIRST
SALE
“refno”
is a unique key for each trade,“ismaker”
, true/false, if true, if liquidity provider“commsecurity”,
optional, if there is commission charged and commision is charged on the receiving side of crypto pair, this field will contain corresponding instrument, say you buy BTCUSD and is charged a commission,“commsecurity”
will be set to “BTC”, if sell BTCUSD, “commsecurity”
will be set to “USD”.“comm”
, optional, indicate corresponding commission charged related to“commsecurity”
.
If client provides “clientorderid”
in “addorder”
, it will be echoed back in “sale” update.
SAMPLE TRADE UPDATES
ADD ORDER COMMISSIONS
“commission”
, can be one value or two value, in bps
If one value, then taker/maker has same rate
If two value, it should be set as “makerrate”
|”takerrate”
For example “100|200”, means maker pays 1 percent fee, taker pays 2 percent fee. It is for crypto currency only for now. And it is payable with corresponding receiving tokens.
Last updated
Was this helpful?