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:

SAMPLE REQUEST ADD ORDER

{“type”:”addorder”,”security”:”BTCUSD”,”side”:”B”,”price”:1.01,”qty”:0.1,”userid”:”ID1”}

SAMPLE RESPONSES ADD ORDER

{“clientorderid”:”ID1”,”result”:”OK”,”refno”:”5FS8TX5EDN0WA0”,”price”:
1.01,”side”:”B”,”qty”:0.1,”security”:”BTCUSD”,”type”:”addorder”}
{“clientorderid”:”ID1”,”result”:”not enough fund”,”price”:
1.01,”side”:”B”,”qty”:0.1,”security”:”BTCUSD”,”type”:”addorder”}

SAMPLE ADD ORDER WITH FIRM

{"type":"addorder","security":"AAPL","side":"B","price":99.99,"qty":1,"userid":
"supportua@finteractions.com","firm":"FINT","tif":"GTC","ordertype":"LMT",
"commission":"10|10"}

CANCEL ORDER

Here is an example to cancel order, you must provide “refno” field, which is FI assigned order id.

SAMPLE REQUEST CANCEL ORDER

{“type”:”cancelorder”,”security”:”BTCUSD”,”refno”:”5FSDIAGCE768A0”}

SAMPLE RESPONSES CANCEL ORDER

{“result”:”OK”,”refno”:”5FSDIAGCE768A0”,”security”:”BTCUSD”,”type”:”cancelorder”}
{“result”:”order not
found”,”refno”:”5FSDIAGCE768A0”,”security”:”BTCUSD”,”type”:”cancelorder”}

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

{“liveqty”:”1000”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty
“:”0”,”price”:”30.5”,”execamount”:”0”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”MSFT”,
“type”:”order”}
{“liveqty”:”500”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty”
:”500”,”price”:”30.5”,”execamount”:”15250”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”
MSFT”,”type”:”order”}
{“liveqty”:”0”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty”:”
500”,”price”:”30.5”,”execamount”:”15250”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”MS
FT”,”type”:”order”}

NEGOTIATED ORDER

To send an negotiated order (if system allows)

{"type":"addorder","clientorderid":"ID2", ”price":
100,"side":"B","negotiate":true,"qty":0.1,"security":"BTCUSD”,
"brokers":"LEHM,NITE"}

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

{“type”:”declineorder”,”security”:”BTCUSD”,”refno”:”5FSDIAGCE768A0”}

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

{"type":"counterorder",”refno":"5OLOCZ06XT5DA0","price":200,"side":"S","qty":0
.1,"security":"BTCUSD”}

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

{"type":"executeorder",”refno":"5OLOCZ06XT5DA0","price":200,"side":"S","qty":0
.1,"security":"BTCUSD”}

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

{“liveqty”:”1000”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty
“:”0”,”price”:”30.5”,”execamount”:”0”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”MSFT”,
“type”:”order”}
{“liveqty”:”500”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty”
:”500”,”price”:”30.5”,”execamount”:”15250”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”
MSFT”,”type”:”order”}
{“liveqty”:”0”,”refno”:”5FS7WOXHHU4WA3”,”category”:”STAGE”,”execqty”:”
500”,”price”:”30.5”,”execamount”:”15250”,”qty”:”1000”,”clientorderid”:”ID123”,”security”:”MS
FT”,”type”:”order”}

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

{“refno”:”5FS7WOXHHU4WA3”,”category”:”CROX”,”execqty”:”30.5”,”execpric
e”:”30.5”,”traderefno”:”5FS7WOXHHU4WA32_5FS7WOXHHU4Y”,”clientorderid”:”ID123”,”secu
rity”:”MSFT”,”type”:”sale”}

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