Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (22 loc) · 1.17 KB

README.md

File metadata and controls

30 lines (22 loc) · 1.17 KB

C# client example

This is a simple example on how to connect to the Binck realtime update platform for news, quotes and order execution.

The platform is written using SignalR

After cloning or downloading this repo, make sure you add an active Bearer token in Program.cs, together with the account number:

private const string AccessToken = "YOUR-ACCESS-TOKEN";
private const string AccountNumber = "YOUR-ACCOUNT-NUMBER";

To obtain an access token to the platform please refer to the documentation here

The example will subscribe to the news feed for the country to which the account number belongs and to the last quotes for the DAX index as an example.

// Start the connection to the streamer
await hubConnection.StartAsync();

// Subscribe to the news feed
await hubConnection.InvokeAsync("SubscribeNews", 
   AccountNumber);

// Subscribe to an instrument quotes 
await hubConnection.InvokeAsync("SubscribeQuotes", 
   AccountNumber, 
   new[] { DaxIndex }, 
   "TopOfBook");