Help need to intergtate api with windows form or wpf appication
I try to integrate api with a windows application. Need some sample code how authorization can done using c#
I try to integrate api with a windows application. Need some sample code how authorization can done using c#
Comments
Hello. You simply need to integrate websocket to your application then you go to API playground and check how to deal with the API.
Regards
Thank you tarja,
I am able to create ClientWebSocket and able to get the ticker values in my application.
can you suggest me how to performe "buy contract" which is an authenticated call. I have generated an token from setting -->API Token setting.
Hello Basically You just need to do this:
Conect to WebSocket Endpoint. (Try to keep connection Alive Otherwise you will need to authorize again.)
Send Authorize request as API playground describes.
https://developers.binary.com/api/#authorize
Then Buy a contract: Check This topic about buying a Contract.
https://binary.vanillacommunity.com/discussion/comment/300/#Comment_300
Regards
Thank you for your prompt reply,
A ping message will help to keep connection Alive. Right?Let me know how much approximate time span to keep the system authorized
Regards,
Jobin
All depend of the library that you use. I use WebSocketsharp and I send ping every minute if I'm not using any stream request. BUt if you use WebSocket4Net it send ping automatically.
Regards
Thank you Tarja, for this tips. WebSocket4Net class make my job easer. Before i was using core webclientsocket.
You're welcome.
Regards