Proposal Multicontract
some body help me to solve to our code with proposal multiple contract.
we write code like :
{
"proposal": 1,
"amount": "1",
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"symbol": "R_100",
"barriers":[{"barrier":1},{"barrier":2}]
}
But response code is
"error": {
"code": "InputValidationFailed",
"details": {},
"message": "Input validation failed: The property barriers is not defined in the schema and the schema does not allow additional properties"
},
Whats wrong with our code.
Comments
The problem is that
barriers
is not defined as key herehttps://developers.binary.com/api/#proposal
you need to usebarrier
andbarrier2
for contract DIGITDIFF only one barrier, so what value for barrier2 because it is not yet.
@kazaoo then you don't need to pass it,
barrier2
is only used when it's two barrier contractyes, i have try entry code with only one barrier us our coding at first question above. but still error. can you give me sample for digit contract.
This is our code :
{
"proposal": 1,
"amount": "1",
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"symbol": "R_100",
"barriers":[{"barrier":1},{"barrier":2}]
}
What wrong the code ?
I have solved the code, at the api playground have miss sample code.
The true code is :
{
"proposal_array": 1,
"amount": "0.5",
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"symbol": "R_100",
"barriers":[{"barrier":1},{"barrier":2}]
}
So, for BUY the contract, what code is used ?
Buy_Contract
or
Buy_Multiple_Account
Please help me.
@Raunak please help me to explain.
Please use
Buy_Contract
for purchasing single contract.Buy_Multiple_Account
is used to purchase same contract for multiple accounts@Raunak
not so mean, I ask is if I use proposal_array, what command should I use to buy the contract.
We use request proposal_array
{
"proposal_array": 1,
"amount": "0.5",
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"symbol": "R_100",
"barriers":[{"barrier":1},{"barrier":2}]
}
So, what command the buy that proposal ?
@kazaoo sorry in previous examples it was proposal so guessed that.
When you send proposal array you get something like this
you can pass the
id
("id": "ae1c6c9f-00fc-e4a1-1363-48cefb5e94bc",
) inbuy
call.Buy multiple contract is used for purchasing contracts for multiple clients
Hello @Raunak
We have try to make case.
**1. Step One request proposal array **
{
"proposal_array": 1,
"amount": "0.5",
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"symbol": "R_100",
"barriers": [
{
"barrier": 1
},
{
"barrier": 2
}
]
}
2. Request Have Response
{
"echo_req": {
"amount": "0.5",
"barriers": [
{
"barrier": 1
},
{
"barrier": 2
}
],
"basis": "stake",
"contract_type": "DIGITDIFF",
"currency": "USD",
"duration": "5",
"duration_unit": "t",
"proposal_array": 1,
"symbol": "R_100"
},
"msg_type": "proposal_array",
"passthrough": {},
"proposal_array": {
"id": "861fcd2c-994f-19a9-3021-4bdff8f8cb12",
"proposals": [
{
"ask_price": "0.50",
"barrier": 1,
"date_start": "1490344063",
"display_value": "0.50",
"longcode": "Win payout if the last digit of Volatility 100 Index is not 1 after 5 ticks.",
"payout": "0.53",
"spot": "14024.06",
"spot_time": "1490344062"
},
{
"ask_price": "0.50",
"barrier": 2,
"date_start": "1490344063",
"display_value": "0.50",
"longcode": "Win payout if the last digit of Volatility 100 Index is not 2 after 5 ticks.",
"payout": "0.53",
"spot": "14024.06",
"spot_time": "1490344062"
}
]
}
}
3. Make Buy Proposal Request
{
"buy": "861fcd2c-994f-19a9-3021-4bdff8f8cb12",
"price": 0.5
4. NO respon for this request. Command not have response like transaction id or other. please you try at api playground.
Regards
@Raunak can you have test at api playgorund and fixed it ?
@kazaoo thanks for pointing this out. We have fix for this and we will release it in coming week. Sorry for the inconvenience.
@Raunak hallo, have you finished buy multiple contract function ?... please update info to me..
Sorry to inform that its still under development as its major architecture change so its taking time