Documentation

Proposal

TradingNo Auth

Get the price of a contract. symbol is renamed to underlying_symbol, request parameters and contract types are removed, and display_value and Snowball fields are no longer returned. Only streaming proposals can be bought.

Quick comparison

AspectLegacy APINew APIAction
EndpointproposalproposalNone
Auth RequiredNoNoNone
symbol parametersymbolunderlying_symbolRename in requests
loginid parameterOptionalRemovedRemove from requests
Five request parametersOptionalRemovedRemove from requests
contract_type valuesIncludes spreads, lookbacks and SnowballAdds HIGHER and LOWERUpdate your requests
Buying with the proposal IDAny proposal IDStreaming proposal IDs onlySend subscribe as 1
display_valueReturnedRemovedFormat ask_price yourself

Breaking changes

1. symbol renamed to underlying_symbol

The required symbol parameter is renamed to underlying_symbol.

Required change: Send underlying_symbol instead of symbol.

2. loginid parameter removed

In the Legacy API, loginid selected the account when you authorised several accounts. The New API does not accept it.

Required change: Remove loginid from your proposal requests.

3. Request parameters removed

The request no longer accepts barrier_range, date_start, product_type, trade_risk_profile or trading_period_start.

Required change: Remove these parameters from your proposal requests.

4. contract_type values changed

contract_type no longer accepts CALLSPREAD, PUTSPREAD, LBFLOATCALL, LBFLOATPUT, LBHIGHLOW, SNOWUP or SNOWDOWN, and adds HIGHER and LOWER.

Required change: Stop requesting prices for the contract types the New API no longer accepts.

5. display_value removed from the response

The Legacy API returned display_value, the formatted price, in every proposal. The New API does not return it. ask_price, date_start, id, longcode, payout, spot and spot_time are still always returned.

Required change: Format ask_price yourself if you showed display_value.

6. Snowball contract details removed

contract_details no longer returns caution_price, coupon_rate, num_of_coupons, profit_price or trade_risk_profile, which described Snowball contracts.

Required change: Stop reading these fields.

7. Only streaming proposal IDs can be bought

In the Legacy API, you could pass the id of any proposal response to buy. In the New API, only the id of a streaming proposal, sent with subscribe as 1, can be passed to buy or forget. The id of a one-time proposal is informational, so buy cannot use it.

Required change: Send subscribe as 1 in the proposal request that you plan to buy from, and use the id from its response.

Request structure

Legacy APIrequest example
{
  "proposal": 1,
  "amount": 10,
  "basis": "stake",
  "contract_type": "CALL",
  "currency": "USD",
  "duration": 5,
  "duration_unit": "m",
  "product_type": "basic",
  "symbol": "R_100",
  "loginid": "CR123456",
  "req_id": 1
}
New APIrequest example
{
  "proposal": 1,
  "amount": 10,
  "basis": "stake",
  "contract_type": "CALL",
  "currency": "USD",
  "duration": 5,
  "duration_unit": "m",
  "subscribe": 1,
  "underlying_symbol": "R_100",
  "req_id": 1
}

Response structure

Legacy APIresponse example
{
  "echo_req": {
    "proposal": 1,
    "amount": 10,
    "basis": "stake",
    "contract_type": "CALL",
    "currency": "USD",
    "duration": 5,
    "duration_unit": "m",
    "product_type": "basic",
    "symbol": "R_100",
    "loginid": "CR123456",
    "req_id": 1
  },
  "msg_type": "proposal",
  "proposal": {
    "ask_price": 10,
    "date_expiry": 1760000300,
    "date_start": 1760000000,
    "id": "c84a793b-8a87-7999-ce10-9b22f7ceead3",
    "longcode": "Win payout if Volatility 100 Index is strictly higher than entry spot at 5 minutes after contract start time.",
    "payout": 19.55,
    "spot": 1234.56,
    "spot_time": 1760000000,
    "display_value": "10.00"
  },
  "req_id": 1
}
New APIresponse example
{
  "echo_req": {
    "proposal": 1,
    "amount": 10,
    "basis": "stake",
    "contract_type": "CALL",
    "currency": "USD",
    "duration": 5,
    "duration_unit": "m",
    "subscribe": 1,
    "underlying_symbol": "R_100",
    "req_id": 1
  },
  "msg_type": "proposal",
  "proposal": {
    "ask_price": 10,
    "date_expiry": 1760000300,
    "date_start": 1760000000,
    "id": "c84a793b-8a87-7999-ce10-9b22f7ceead3",
    "longcode": "Win payout if Volatility 100 Index is strictly higher than entry spot at 5 minutes after contract start time.",
    "payout": 19.55,
    "spot": 1234.56,
    "spot_time": 1760000000
  },
  "req_id": 1,
  "subscription": {
    "id": "c84a793b-8a87-7999-ce10-9b22f7ceead3"
  }
}

Code examples

function getPrice(loginId) {
  ws.send(JSON.stringify({
    proposal: 1,
    amount: 10,
    basis: "stake",
    contract_type: "CALL",
    currency: "USD",
    duration: 5,
    duration_unit: "m",
    symbol: "R_100",
    loginid: loginId
  }));

  ws.onmessage = (event) => {
    const response = JSON.parse(event.data);
    if (response.msg_type !== "proposal" || !response.proposal) return;

    console.log("Price:", response.proposal.display_value);
    console.log("Payout:", response.proposal.payout);
  };
}
Click to open live chat support. Get instant help from our support team.