how to place a order in binary.com

edited December 2016 in General

hi team,
The following code successfully placed a order in my account for R_100,

websocket.Send("{""parameters"": {     ""proposal"": ""0.4"",  ""symbol"": ""R_100"",  ""contract_type"": ""PUT"",  ""duration"": ""14"",  ""basis"": ""stake"",  ""currency"": ""USD"",  ""amount"": ""0.5"",  ""duration_unit"": ""m"" },  ""req_id"": 2,  ""price"": 5,  ""buy"": ""1""}")

the same code i have used for EURUSD,but the order is not able to open

websocket.Send("{""parameters"": {     ""proposal"": ""0.4"",  ""symbol"": ""frxEURUSD"",  ""contract_type"": ""PUT"",  ""duration"": ""14"",  ""basis"": ""stake"",  ""currency"": ""USD"",  ""amount"": ""0.5"",  ""duration_unit"": ""m"" },  ""req_id"": 2,  ""price"": 5,  ""buy"": ""1""}")

and also i want to know how to retrieve the result of the contract opened.

Comments

  • @mahendran1992 what error are you getting?

    To get result you can use this call https://developers.binary.com/api/#proposal_open_contract

  • the first line of code successfully opens order in R_100 but the second line of code not able to open order in EURUSD, i am not getting any error

  • I am able to purchase with second one as well

    {
      "buy": {
        "balance_after": "9999.00",
        "buy_price": 0.5,
        "contract_id": "59",
        "longcode": "Win payout if EUR/USD is strictly lower than entry spot at 14 minutes after contract start time.",
        "payout": 0.91,
        "purchase_time": 1483588467,
        "shortcode": "PUT_FRXEURUSD_0.91_1483588467_1483589307_S0P_0",
        "start_time": 1483588467,
        "transaction_id": "159"
      },
      "echo_req": {
        "buy": "1",
        "parameters": {
          "amount": "0.5",
          "app_markup_percentage": "0",
          "basis": "stake",
          "contract_type": "PUT",
          "currency": "USD",
          "duration": "14",
          "duration_unit": "m",
          "proposal": "0.4",
          "symbol": "frxEURUSD"
        },
        "passthrough": {},
        "price": 5,
        "req_id": 2
      },
      "msg_type": "buy",
      "passthrough": {},
      "req_id": 2
    }
    

    There should be error if you are not able to purchase it

  • amount cannot be 0.5 must to be 1 or more for demo and 5 for real

  • @mahendran1992 can you please post your code snippet as well account details like loginid or check your websocket frames for error you are getting

Sign In or Register to comment.