Upcoming API changes for contract barrier handling
Currently, the proposal
and proposal_array
API calls accept 0
as the barrier input. Internally, this is mapped to a valid barrier.
We plan to remove this internal mapping and all 0
absolute barrier will be rejected with the error Barrier cannot be zero.
The API still supports zero relative barriers (E.g.+0.00
or -0.00
) as input.
Before the change, this request will be accepted:
{ "proposal": 1, "amount": "100", "basis": "payout", "contract_type": "CALL", "currency": "USD", "duration": "60", "duration_unit": "s", "barrier": "0", "symbol": "R_100" }
After the change, this request will be rejected with the following error:
{ "echo_req": { "amount": "100", "barrier": "0", "basis": "payout", "contract_type": "CALL", "currency": "USD", "duration": "60", "duration_unit": "s", "product_type": "basic", "proposal": 1, "symbol": "R_100" }, "error": { "code": "ContractCreationFailure", "details": { "field": "barrier" }, "message": "Barrier cannot be zero." }, "msg_type": "proposal" }
These changes will be effective after 27th of May 2019.