Buy Contract without proposal
I'm trying to buy a contract without calling proposal first to avoid additional call.
Here's my request:
{ "buy": "1", "price": 0, "parameters": { "amount": "1", "basis": "stake", "contract_type": "PUT", "currency": "USD", "date_expiry": "1461110100", "symbol": "frxEURUSD" } }
And here's what I get:
{ "echo_req": { "parameters": { "currency": "USD", "symbol": "frxEURUSD", "amount": "1", "basis": "stake", "date_expiry": "1461110100", "contract_type": "PUT" }, "req_id": 2, "price": 0, "buy": "1", "error": { "details": { "buy": "does not match the regex pattern ^[\\w-]{32,128}$" }, "message": "Input validation failed: buy, The property parameters is not defined in the schema and the schema does not allow additional properties", "code": "InputValidationFailed" }, "msg_type": "buy" } }
From API playground:
buy string /^(?:[\w-]{32,128}|1)$/
The id received from a Price Proposal call or 1 if contract buy parameters are passed in parameters field
What am I doing wrong?
I don't care about price movements between proposal and buying contract, always the maket.
Error messages suggests that "buy" format is not as stated in API playground as it doesn't allow "1".
Any help?
Comments
@lukaszkn this has been fixed, you can pass 1 now as
buy
valueI was able to successfully purchase
Request
Response
Please note that you can not pass price as
0
as you need to specify price at which you want to buyI have the same problem.
I tried:
and got:
Please Help!!!!
A fix has been released to our testing environment, it will go live on Monday.