Proposal
TradingNo AuthGet contract pricing and proposals with major changes to parameter structure and response format.
10 Breaking Changes
symbol parameter renamed to underlying_symbol, multiple request parameters removed, and response fields reduced.Quick comparison
Breaking changes
1. Symbol parameter renamed
The symbol parameter has been renamed to underlying_symbol.
Required change: Update all requests to use underlying_symbol instead of symbol.
2. LoginID parameter removed
The loginid parameter used for multi-token authorization scenarios has been removed.
3. Multiple request parameters removed
The following parameters have been removed from the request:
barrier_range,product_type,date_start,trade_risk_profile,trading_period_start(removed)
4. Response proposal object now required
The proposal object in the response is now required. Previously it was optional.
5. Proposal required fields reduced
The proposal object now only requires the id field. Previously, 8 fields were required.
Required change: Add null/undefined checks for fields other than id as they may not always be present.
6. Response field types changed
Several response fields now accept both numbers and strings: ask_price, payout, and commission.
Required change: Update parsing logic to handle both number and string values for these fields.
Request structure
{
"proposal": 1,
"amount": 10,
"contract_type": "CALL",
"currency": "USD",
"symbol": "frxEURUSD", // ❌ Renamed in New
"loginid": "CR123456", // ❌ Removed in New
"barrier_range": "middle" // ❌ Removed in New
}{
"proposal": 1,
"amount": 10,
"contract_type": "CALL",
"currency": "USD",
"underlying_symbol": "frxEURUSD", // ✅ Renamed from symbol
"subscribe": 1
}Response structure
{
"proposal": {
"ask_price": 10.50, // type: number
"id": "proposal-id-123",
"payout": 20.00, // type: number
"spot": 1.0850
},
"msg_type": "proposal"
}{
"proposal": {
"ask_price": "10.50", // type: number | string
"id": "proposal-id-123", // ✅ Only required field
"payout": "20.00", // type: number | string
"spot": 1.0850
},
"msg_type": "proposal"
}Code examples
async function getProposal() {
const request = {
proposal: 1,
amount: 10,
contract_type: "CALL",
currency: "USD",
symbol: "frxEURUSD",
loginid: "CR123456"
};
ws.send(JSON.stringify(request));
ws.onmessage = (event) => {
const response = JSON.parse(event.data);
if (response.msg_type === "proposal") {
console.log("Price:", response.proposal.ask_price);
}
};
}Any other questions? Get in touch