Namaskara,
For order equity order placement the following fields are required (from example):
–data ‘{
“quantity”: 1,
“product”: “D”,
“validity”: “DAY”,
“price”: 14.05,
“tag”: “string”,
“instrument_token”: “NSE_EQ|INE669E01016”,
“order_type”: “SL”,
“transaction_type”: “BUY”,
“disclosed_quantity”: 0,
“trigger_price”: 13,
“is_amo”: false
}’
From complete.json:
{
“segment”:“NSE_EQ”,
“name”:“VODAFONE IDEA LIMITED”,
“exchange”:“NSE”,
“isin”:“INE669E01016”,
“instrument_type”:“EQ”,
“instrument_key”:“NSE_EQ|INE669E01016”,
“lot_size”:1,
“freeze_quantity”:100000.0,
“exchange_token”:“14366”,
“tick_size”:1.0,
“trading_symbol”:“IDEA”,
“short_name”:“Vodafone Idea”,
“qty_multiplier”:1.0,
“security_type”:“NORMAL”
}
The critical information for homing onto the required trade-able instrument is : instrument_key
it would wonderful if there is a harmony between the names in the JSON information in the complete instrument dump and order related APIs.
Here we see that the same key in order API is : instrument_token
whereas in the complete instrument file: instrument_key
Yes, programatically I can map …but what I suggesting is that for sake of professional excellence and elegance, it both key values are exactly same.
Instrument_key is technically correct. As its the key to index in the set of symbols. That calls for modifications to the order related API.
In future, kindly harmonize the keys and values between the API and complete dump, even though they are independent entities.
Regards
Rathnadhar KV