Getting contract information/fields via contract_id ?
I want to be able to get these fields with a given contract_id:
purchase_time, sell_time, buy_price, sell_price & longcode.
I am implementing view transaction button in statement dialog and these fields are not present in the result of #statement call.
Is it possible to have a {contract: contract_id} call which returns the above fields?
This discussion has been closed.
Comments
@amin All these details are present in transaction record that we return in statement,
transaction_time
is purchase_time in caseaction_type
isbuy
and itssell_time
in caseaction_type
is sell. Price isamount
and you getlongcode
also. As of nowstatement
call does not acceptcontract_id
ortransaction_id
and return list. We can updatestatement
call to acceptid
rather than adding a new call@Raunak Great!
I also need
symbol
.I need both of
sell_time
andpurchase_time
(this is important)Or just
purchase_time
andcontract_duration = /* 1t, 2s, 3m, 4h, 5d *
.and i need both of
buy_price
andsell_price
. (if there is a sell_price).@Raunak i also need
symbol
andsymbol_name
. currently there is no (easy) way to get the symbol and symbol_name for a given contract_id.@amin why you need
contract_duration = /* 1t, 2s, 3m, 4h, 5d *
?@Raunak i want to be able to calculate
end_time
andexit_spot
for view transaction dialog.I also use the letters
t,s,m,h,d
to find out the trade type (trade type is needed for tick trades).@amin Please use https://developers.binary.com/api/#proposal_open_contract call for getting contract details, it has been updated to give you information about expired contract as well