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

{“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

Was this helpful?