Best Of
Re: Help with buy/sell contract
The API isn't easy, but it is relatively complete. People aren't going to spoon-feed you, so you need to read the docs and cross reference the info for yourself. For example, you ask about valid contract types... there is an API call called Contracts For Symbol. You ought to have been able to find that on your own.
I said we wouldn't spoon-feed you, but you seem to need a boost so here is roughly what I do...
- Call Active Symbols to get the list of active symbols.
- Call Contracts For Symbol to see what sort of contracts I can buy for the symbol I am interested in.
- Call Price Proposal to get the current payout level for the contract I am interested in. Setting "subscribe": 1 gives me regular updates.
- Call Buy Contract to open a trade. Note the contract_id from the response.
- Call Price Proposal - Open Contract with "subscribe": 1 in order to receive updates on the status of the trade. Some contracts can be resold before their expiration, others can't. Either way this call is the fastest way of finding out whether the trade has been won - check the responses for exit_tick and compare it to entry_tick.
Another way of finding out whether a contract has been won is to subscribe to the Transactions stream, but there is always a delay between the contract expiry and the resulting payout being added to your account. Sometimes this delay can be several minutes long. The Sell expired contracts call can be used to speed this up when necessary.
@Raunak I assume you are talking about the ask_price of the contract, not the spot price of the underlying market. In which case, your comment isn't relevant, because with basis=stake the ask_price is never going to change. Besides the price you send in the buy request is the maximum you are willing to pay, so sending 1 when the contract only accepts .98 would not be a problem. But maybe I have totally misunderstood your rather cryptic comment.
Maybe someone could write up an API walkthrough explaining (much like I did here) which parts of the API to use, and in what order, in order to place a trade etc.
Re: Some question abount mark up
- What day of month mark up will be sent to developer account?
15 th
- Does mark up require minimum amount ? Example: accumulated amount must be at least 5$
No can be as little as 0.01
- What is the formula to calculate markup amount from stake
Since the markup is applied to the payout and it is dynamically calculated there is no way to predetermine the markup until you have the payout value.
Re: How to get authorize token using new Oauth2 Url
Hey @vimanga,
You may use the passed token in the authorize
request. Please see this page for more information:
Regards,
Aaron
Re: How to transform time
Most of the date/ times we return are epoch format, If you check your programming language there is normally a Library that can achieve this. For example in javascript moment.js can be used moment.unix(1293683278).format('YYYY-MM-DD HH:mm:ss');
Re: Set up a binary bot
Duplicate of https://binary.vanillacommunity.com/discussion/632/binary-bot-set-up
Closed.
Re: How to authorize WebSocket session in C #?
You just need to call the Authorize https://developers.binary.com/api/#authorize call before using the calls that require authorization.
Here are some changes to the Main()
routine of our sample code https://developers.binary.com/demos/ that does that. First it Authorizes using a token then it uses the get_limits
call which requires read token access https://developers.binary.com/api/#get_limits.
If you are not aware you or your users create tokens after logging into binary.com here https://www.binary.com/en/user/security/api_tokenws.html
static void Main(string[] args) { var bws = new BinaryWS(); bws.Connect().Wait(); string auth = "{\"authorize\" : \"replace with your token \" }"; bws.SendRequest(auth).Wait(); bws.StartListen(); string data = "{\"get_limits\": 1}"; bws.SendRequest(data).Wait(); Console.ReadLine(); }
Welcome
This is a public community forum intended to help any developer to be successfully implement Binary.com API in their projects.
Useful links to get you started:
Our Developer's Portal
Binary API Guide
binary-live-api library
Our own projects using Websocket API:
binary-static
binary-next-gen
webtrader
binary-mobile
Re: binary-live-api NodeJS error
Hi,
You'll need to pass an application ID:
new LiveApi({ websocket, appId: your_id })
Applications can be registered here:
https://developers.binary.com/applications/
cheers,
Tom
Re: How to activate "Allow equals" bay API call ?
There is a new "contract_category": "callputequal"
in the contracts_for
API response, which has the contract_type
CALLE
and PUTE
. You can use these as your contract type in proposal to convey call equals (higher than or equal to) and put equals (lower than or equal to) options.
Re: 3 consecutive ticks upwards/downwards
many of them.. and most of them are free.. it was a simple logic..
just compare spot[now] with spot [now-1], if larger == up, lower == down.. keep on array.. if array same as u wish.. then go for proposal