Zerodha Mock response data - theheapdump/kite-webapp GitHub Wiki
Order
{ "status": "success", "data": [ { "average_price": 310.7, "exchange": "NSE", "exchange_order_id": "1300000001887410", "exchange_timestamp": "2017-12-29 12:02:05", "instrument_token": 779521, "order_id": "171229000724687", "order_timestamp": "12:02:05", "product": "CNC", "quantity": 1, "trade_id": "75894751", "tradingsymbol": "SBIN", "transaction_type": "BUY" } ] }
Java ---
JSONObject order= new JSONObject(); order.put("average_price", "310.7"); order.put("exchange", "NSE"); order.put("exchange_order_id", "1300000001887410"); order.put("exchange_timestamp", "2017-12-29 12:02:05"); order.put("instrument_token", "779521"); order.put("order_id", "171229000724687"); order.put("order_timestamp", "12:02:05"); order.put("product", "CNC"); order.put("quantity", "1"); order.put("trade_id", "75894751"); order.put("tradingsymbol", "SBIN"); order.put("transaction_type", "BUY");
Order Response
{ "status": "success", "data": { "order_id": "151220000000000" } }
# Orders
{ "status": "success", "data": [ { "account_id": "", "placed_by": "DA0017", "order_id": "171228000850038", "exchange_order_id": "211736200053802", "parent_order_id": "", "status": "COMPLETE", "status_message": "", "order_timestamp": "2017-12-28 11:39:14", "exchange_update_timestamp": "", "exchange_timestamp": "2017-12-28 11:39:14", "meta": {}, "rejected_by": "", "variety": "regular", "exchange": "MCX", "tradingsymbol": "GOLDGUINEA17DECFUT", "instrument_token": 53505799, "order_type": "LIMIT", "transaction_type": "SELL", "validity": "DAY", "product": "NRML", "quantity": 3, "disclosed_quantity": 0, "price": 23337, "trigger_price": 0, "average_price": 23337, "filled_quantity": 3, "pending_quantity": 0, "cancelled_quantity": 0 }, { "account_id": "", "placed_by": "DA0017", "order_id": "171228000912853", "exchange_order_id": "1300000002730006", "parent_order_id": "", "status": "COMPLETE", "status_message": "", "order_timestamp": "2017-12-28 12:09:31", "exchange_update_timestamp": "", "exchange_timestamp": "2017-12-28 12:00:28", "meta": {}, "rejected_by": "", "variety": "co", "exchange": "NSE", "tradingsymbol": "SBIN", "instrument_token": 779521, "order_type": "LIMIT", "transaction_type": "BUY", "validity": "DAY", "product": "CO", "quantity": 1, "disclosed_quantity": 0, "price": 311, "trigger_price": 0, "average_price": 311, "filled_quantity": 1, "pending_quantity": 0, "cancelled_quantity": 0 }, { "account_id": "", "placed_by": "DA0017", "order_id": "171228001116651", "exchange_order_id": "211736200111089", "parent_order_id": "", "status": "COMPLETE", "status_message": "", "order_timestamp": "2017-12-28 13:08:49", "exchange_update_timestamp": "", "exchange_timestamp": "2017-12-28 13:08:49", "meta": {}, "rejected_by": "", "variety": "regular", "exchange": "MCX", "tradingsymbol": "GOLDGUINEA17DECFUT", "instrument_token": 53505799, "order_type": "LIMIT", "transaction_type": "BUY", "validity": "DAY", "product": "NRML", "quantity": 1, "disclosed_quantity": 0, "price": 23388, "trigger_price": 0, "average_price": 23388, "filled_quantity": 1, "pending_quantity": 0, "cancelled_quantity": 0 }, { "account_id": "", "placed_by": "DA0017", "order_id": "171228000912854", "exchange_order_id": "1300000002730007", "parent_order_id": "171228000912853", "status": "COMPLETE", "status_message": "", "order_timestamp": "2017-12-28 15:00:40", "exchange_update_timestamp": "", "exchange_timestamp": "2017-12-28 15:00:40", "meta": {}, "rejected_by": "", "variety": "co", "exchange": "NSE", "tradingsymbol": "SBIN", "instrument_token": 779521, "order_type": "LIMIT", "transaction_type": "SELL", "validity": "DAY", "product": "CO", "quantity": 1, "disclosed_quantity": 0, "price": 0, "trigger_price": 309, "average_price": 309, "filled_quantity": 1, "pending_quantity": 0, "cancelled_quantity": 0 } ] }
Java ---
JSONArray orders= new JSONArray(); orders.put("account_id", ""],["account_id", ""]); orders.put("placed_by", "DA0017"],["placed_by", "DA0017"]); orders.put("orders_id", "171228000912853"],["orders_id", "171228000912854"]); orders.put("exchange_orders_id", "1300000002730006"],["exchange_orders_id", "1300000002730007"]); orders.put("parent_orders_id", ""],["parent_orders_id", "171228000912853"]); orders.put("status", "COMPLETE"],["status", "COMPLETE"]); orders.put("status_message", ""],["status_message", ""]); orders.put("orders_timestamp", "2017-12-28 12:09:31"],[ "orders_timestamp", "2017-12-28 15:00:40"]); orders.put("exchange_update_timestamp", ""],[ "exchange_update_timestamp", ""]); orders.put("exchange_timestamp", "2017-12-28 12:00:28"],[ "exchange_timestamp", "2017-12-28 15:00:40"]); orders.put("meta", {}],[ "meta", {}]); orders.put("rejected_by", ""],[ "rejected_by", ""]); orders.put("variety", "co"],[ "variety", "co"]); orders.put("exchange", "NSE"],[ "exchange", "NSE"]); orders.put("tradingsymbol", "SBIN"],[ "tradingsymbol", "SBIN"]); orders.put("instrument_token", "779521"],["instrument_token", "779521"]); orders.put("orders_type", "LIMIT"],["orders_type", "LIMIT"]); orders.put("transaction_type", "BUY"],[ "transaction_type", "SELL"]); orders.put("validity", "DAY"],[ "validity", "DAY"]); orders.put("product", "CO"],[ "product", "CO"]); orders.put("quantity", "1"],[ "quantity", "1"]); orders.put("disclosed_quantity", "0"],[ "disclosed_quantity", "0"]); orders.put("price", "311"],["price", "0"]); orders.put("trigger_price", "0"],["trigger_price", "309"]); orders.put("average_price", "311"],["average_price", "309"]); orders.put("filled_quantity", "1"],["filled_quantity", "1"]); orders.put("pending_quantity", "0"],[ "pending_quantity", "0"]); orders.put("cancelled_quantity", "0"],[ "cancelled_quantity", "0"]);
Positions
{ "status": "success", "data": { "net": [ { "tradingsymbol": "LEADMINI17DECFUT", "exchange": "MCX", "instrument_token": 53496327, "product": "NRML", "quantity": 1, "overnight_quantity": 0, "multiplier": 1000, "average_price": 161.05, "close_price": 0, "last_price": 161.05, "value": -161050, "pnl": 0, "m2m": 0, "unrealised": 0, "realised": 0, "buy_quantity": 1, "buy_price": 161.05, "buy_value": 161050, "buy_m2m": 161050, "sell_quantity": 0, "sell_price": 0, "sell_value": 0, "sell_m2m": 0, "day_buy_quantity": 1, "day_buy_price": 161.05, "day_buy_value": 161050, "day_sell_quantity": 0, "day_sell_price": 0, "day_sell_value": 0 }, { "tradingsymbol": "GOLDGUINEA17DECFUT", "exchange": "MCX", "instrument_token": 53505799, "product": "NRML", "quantity": 0, "overnight_quantity": 3, "multiplier": 1, "average_price": 0, "close_price": 23232, "last_price": 23355, "value": 801, "pnl": 801, "m2m": 276, "unrealised": 801, "realised": 0, "buy_quantity": 4, "buy_price": 23139.75, "buy_value": 92559, "buy_m2m": 93084, "sell_quantity": 4, "sell_price": 23340, "sell_value": 93360, "sell_m2m": 93360, "day_buy_quantity": 1, "day_buy_price": 23388, "day_buy_value": 23388, "day_sell_quantity": 4, "day_sell_price": 23340, "day_sell_value": 93360 }, { "tradingsymbol": "SBIN", "exchange": "NSE", "instrument_token": 779521, "product": "CO", "quantity": 0, "overnight_quantity": 0, "multiplier": 1, "average_price": 0, "close_price": 0, "last_price": 308.4, "value": -2, "pnl": -2, "m2m": -2, "unrealised": -2, "realised": 0, "buy_quantity": 1, "buy_price": 311, "buy_value": 311, "buy_m2m": 311, "sell_quantity": 1, "sell_price": 309, "sell_value": 309, "sell_m2m": 309, "day_buy_quantity": 1, "day_buy_price": 311, "day_buy_value": 311, "day_sell_quantity": 1, "day_sell_price": 309, "day_sell_value": 309 } ], "day": [ { "tradingsymbol": "GOLDGUINEA17DECFUT", "exchange": "MCX", "instrument_token": 53505799, "product": "NRML", "quantity": -3, "overnight_quantity": 0, "multiplier": 1, "average_price": 23340, "close_price": 23232, "last_price": 23355, "value": 69972, "pnl": -93, "m2m": -93, "unrealised": -93, "realised": 0, "buy_quantity": 1, "buy_price": 23388, "buy_value": 23388, "buy_m2m": 23388, "sell_quantity": 4, "sell_price": 23340, "sell_value": 93360, "sell_m2m": 93360, "day_buy_quantity": 1, "day_buy_price": 23388, "day_buy_value": 23388, "day_sell_quantity": 4, "day_sell_price": 23340, "day_sell_value": 93360 }, { "tradingsymbol": "LEADMINI17DECFUT", "exchange": "MCX", "instrument_token": 53496327, "product": "NRML", "quantity": 1, "overnight_quantity": 0, "multiplier": 1000, "average_price": 161.05, "close_price": 0, "last_price": 161.05, "value": -161050, "pnl": 0, "m2m": 0, "unrealised": 0, "realised": 0, "buy_quantity": 1, "buy_price": 161.05, "buy_value": 161050, "buy_m2m": 161050, "sell_quantity": 0, "sell_price": 0, "sell_value": 0, "sell_m2m": 0, "day_buy_quantity": 1, "day_buy_price": 161.05, "day_buy_value": 161050, "day_sell_quantity": 0, "day_sell_price": 0, "day_sell_value": 0 }, { "tradingsymbol": "SBIN", "exchange": "NSE", "instrument_token": 779521, "product": "CO", "quantity": 0, "overnight_quantity": 0, "multiplier": 1, "average_price": 0, "close_price": 0, "last_price": 308.4, "value": -2, "pnl": -2, "m2m": -2, "unrealised": -2, "realised": 0, "buy_quantity": 1, "buy_price": 311, "buy_value": 311, "buy_m2m": 311, "sell_quantity": 1, "sell_price": 309, "sell_value": 309, "sell_m2m": 309, "day_buy_quantity": 1, "day_buy_price": 311, "day_buy_value": 311, "day_sell_quantity": 1, "day_sell_price": 309, "day_sell_value": 309 } ] } }
Java ---
JSONArray positions= new JSONArray(); positions.put(["tradingsymbol", "SBIN"],["tradingsymbol", "GOLDGUINEA17DECFUT"]); positions.put(["exchange", "NSE"],["exchange", "MCX"]); positions.put(["instrument_token", "779521"],["instrument_token", "53505799"]); positions.put(["product", "CO"],["product", "NRML"]); positions.put(["quantity", "0"],["quantity", "0"]); positions.put(["overnight_quantity", "0"],["overnight_quantity", "3"]); positions.put(["multiplier", "1"],["multiplier", "1"]); positions.put(["average_price", "0"],["average_price", "0"]); positions.put(["close_price", "0"],["close_price", "23232"]); positions.put(["last_price", "308.4"],["last_price", "23355"]); positions.put(["value", "-2"],["value", "801"]); positions.put(["pnl", "-2"],["pnl", "801,"]); positions.put(["m2m", "-2"],["m2m", "276"]); positions.put(["unrealised", "-2"],["unrealised", "801"]); positions.put(["realised", "0"],["realised", "0"]); positions.put(["buy_quantity", "1"],["buy_quantity", "4"]); positions.put(["buy_price", "311"],["buy_price", "23139.75"]); positions.put(["buy_value", "311"],["buy_value", "92559"]); positions.put(["buy_m2m", "311"],["buy_m2m", "93084"]); positions.put(["sell_quantity", "1"],["sell_quantity", "4"]); positions.put(["sell_price", "309"],["sell_price", "23340"]); positions.put(["sell_value", "309"],["sell_value", "93360"]); positions.put(["sell_m2m", "309"],["sell_m2m", "93360"]); positions.put(["day_buy_quantity", "1"],["day_buy_quantity", "1"]); positions.put(["day_buy_price", "311"],["day_buy_price", "23388"]); positions.put(["day_buy_value", "311"],["day_buy_value", "23388"]); positions.put(["day_sell_quantity", "1"],["day_sell_quantity", "4"]); positions.put(["day_sell_price", "309"],["day_sell_price", "23340"]); positions.put(["day_sell_value", "309"],["day_sell_value", "93360"]);