Price Proposal: Open Contracts (proposal_open_contract)¶
Get latest price (and other information) for a contract in the user’s portfolio
Auth Scope(s): read
, trading_information
-
proposal_open_contract
(contract_id: Optional[int] = None, subscribe: Optional[Union[bool, int]] = None, passthrough: Optional[Any] = None, req_id: Optional[int] = None) → int¶ Parameters: - contract_id (Optional[int]) – [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts.
- subscribe (Optional[Union[bool, int]]) – [Optional] 1 to stream.
- passthrough (Optional[Any]) – [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field.
- req_id (Optional[int]) – [Optional] Used to map request to response.
Returns: req_id
Return type: int
Example¶
binary.api.proposal_open_contract(
contract_id=11111111
subscribe=1
)