diff --git a/README.md b/README.md index 00649ce..a35bbb9 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,25 @@ The library is targeting both `.NET Standard 2.0` and `.NET Standard 2.1` for op dotnet add package Bitfinex.Net ## How to use -* REST Endpoints - ```csharp - // Get the ETH/USDT ticker via rest request - var restClient = new BitfinexRestClient(); - var tickerResult = await restClient.SpotApi.ExchangeData.GetTickerAsync("tETHUST"); - var lastPrice = tickerResult.Data.LastPrice; - ``` -* Websocket streams - ```csharp - // Subscribe to ETH/USDT ticker updates via the websocket API - var socketClient = new BitfinexSocketClient(); - var tickerSubscriptionResult = socketClient.SpotApi.SubscribeToTickerUpdatesAsync("tETHUST", (update) => - { - var lastPrice = update.Data.LastPrice; - }); - ``` +*REST Endpoints* + +```csharp +// Get the ETH/USDT ticker via rest request +var restClient = new BitfinexRestClient(); +var tickerResult = await restClient.SpotApi.ExchangeData.GetTickerAsync("tETHUST"); +var lastPrice = tickerResult.Data.LastPrice; +``` + +*Websocket streams* + +```csharp +// Subscribe to ETH/USDT ticker updates via the websocket API +var socketClient = new BitfinexSocketClient(); +var tickerSubscriptionResult = socketClient.SpotApi.SubscribeToTickerUpdatesAsync("tETHUST", (update) => +{ + var lastPrice = update.Data.LastPrice; +}); +``` For information on the clients, dependency injection, response processing and more see the [documentation](https://jkorf.github.io/CryptoExchange.Net), or have a look at the examples [here](https://github.com/JKorf/CryptoExchange.Net/tree/master/Examples).