• Documentation
  • Api Reference
Show / Hide Table of Contents
  • EzBtc.Api
    • EzBtcClient
  • EzBtc.Api.Models
    • OrderBook
    • OrderBookEntry
    • Ticker
    • Transaction

Class EzBtcClient

Inheritance
System.Object
EzBtcClient
Implements
System.IDisposable
Namespace: EzBtc.Api
Assembly: EzBtc.Api.dll
Syntax
public class EzBtcClient : IDisposable

Constructors

| Improve this Doc View Source

EzBtcClient()

Initializes a new instance of the EzBtcClient class.

Declaration
public EzBtcClient()

Methods

| Improve this Doc View Source

Dispose()

Releases the unmanaged resources and disposes of the managed resources used by the underlying System.Net.Http.HttpClient.

Declaration
public void Dispose()
| Improve this Doc View Source

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 Bids and Asks each containing the top 50 OrderBookEntrys sorted by Rate (descending for bid, ascending for ask).

| Improve this Doc View Source

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 pair.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

requestUrl is null.

System.Net.Http.HttpRequestException

There was a problem with the HTTP request.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX