Options
Creating contracts for Boom and Crash indexes
Hello, is the API able to create contracts for boom and crash?. I'm using the examples from the documentation but trying to use a boom and crash symbols.
Get proposal
proposal = await api.proposal(
{"proposal": 1, "amount": 1, "basis": "stake", "multiplier":1, "duration_type":"minutes", "contract_type": "PUT", "currency": "USD", "duration": 1, "symbol": "BOOM300N"}
)
print(proposal)
Buy
response = await api.buy({"buy": proposal.get('proposal').get('id'), "price": 1})
print(response)
print(response.get('buy').get('buy_price'))
print(response.get('buy').get('contract_id'))
print(response.get('buy').get('longcode'))
await asyncio.sleep(1) # wait 1 second
print("after buy")
Tagged:
Answers
binary.api.proposal(
amount=1,
#barrier='+0.1',
#basis='payout',
basis='stake',
multiplier = 1,
contract_type='MULTUP',
currency='USD',
duration=1,
duration_unit='m',
symbol='BOOM300N',
)
can someone advice what other parameters are required for symbol='BOOM300N' in case it is supported by the API?
thanks
I tried a couple of contract types already but seems is not supported:
2024-03-19 10:27:24,845 {"echo_req":{"amount":1,"barrier":"+0.1","basis":"stake","contract_type":"ONETOUCH","currency":"USD","duration":1,"duration_unit":"m","product_type":"basic","proposal":1,"req_id":27,"symbol":"BOOM300N"},"error":{"code":"OfferingsValidationError","details":{"field":"contract_category"},"message":"Trading is not offered for this asset."},"msg_type":"proposal","req_id":27}