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?


  • @amin All these details are present in transaction record that we return in statement, transaction_time is purchase_time in case action_type is buy and its sell_time in case action_type is sell. Price is amount and you get longcode also. As of now statement call does not accept contract_id or transaction_id and return list. We can update statement call to accept id rather than adding a new call

  • @Raunak Great!

    I also need symbol.

    I need both of sell_time and purchase_time (this is important)
    Or just purchase_time and contract_duration = /* 1t, 2s, 3m, 4h, 5d *.

    and i need both of buy_price and sell_price. (if there is a sell_price).

  • @Raunak i also need symbol and symbol_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 *?

  • edited January 2016

    @Raunak i want to be able to calculate end_time and exit_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 call for getting contract details, it has been updated to give you information about expired contract as well

This discussion has been closed.