Class EzBtcClient
Inheritance
Implements
Namespace: EzBtc.Api
Assembly: EzBtc.Api.dll
Syntax
public class EzBtcClient : IDisposable
Constructors
| Improve this Doc View SourceEzBtcClient()
Initializes a new instance of the EzBtcClient class.
Declaration
public EzBtcClient()
Methods
| Improve this Doc View SourceDispose()
Releases the unmanaged resources and disposes of the managed resources used by the underlying System.Net.Http.HttpClient.
Declaration
public void Dispose()
GetOrderBookAsync(String)
Get open orders.
Declaration
public Task<OrderBook> GetOrderBookAsync(string pair = "xbtcad")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | pair | The currency pair to return the order book for (optional). |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<OrderBook> | A list of |
GetTickerAsync(String)
Get current trading information.
Declaration
public Task<Ticker> GetTickerAsync(string pair = "xbtcad")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | pair | The currency pair to return the ticker for (optional). |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Ticker> | Trading information from the specified |
GetTransactionsAsync(String)
Get completed trades.
Declaration
public Task<Transaction[]> GetTransactionsAsync(string pair = "xbtcad")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | pair | The currency pair to return the ticker for (optional). |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Transaction[]> | A list of the last 50 completed trades, sorted by the most recent trade first. |
QueryPublicAsync<T>(String, Dictionary<String, String>)
Sends a public GET request to the ezBtc API as an asynchronous operation.
Declaration
public Task<T> QueryPublicAsync<T>(string requestUrl, Dictionary<string, string> args = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | requestUrl | The relative URL the request is sent to. |
| System.Collections.Generic.Dictionary<System.String, System.String> | args | Optional arguments passed as querystring parameters. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The task object representing the asynchronous operation. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of data contained in the response. |
Remarks
The requestUrl is relative to https://www.ezbtc.ca/api/
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.Net.Http.HttpRequestException | There was a problem with the HTTP request. |