Show / Hide Table of Contents

Class BTCApiClient

Provides access to Binance market data. This is a single-use object. It disposes itself when the connection drops.

Inheritance
System.Object
BTCApiClient
Implements
IAsyncDisposable
Namespace: FFT.BTCMarkets
Assembly: FFT.BTCMarkets.dll
Syntax
public sealed class BTCApiClient : AsyncDisposeBase, IAsyncDisposable

Constructors

| Improve this Doc View Source

BTCApiClient(Nullable<BTCApiClientOptions>)

Initializes a new instance of the BTCApiClient class and triggers immediate connection to the streaming websocket.

Declaration
public BTCApiClient(BTCApiClientOptions? options)
Parameters
Type Name Description
System.Nullable<BTCApiClientOptions> options

Configures the client, particularly for authentication. Can be left null if you are only accessing functions that do not require authentication.

Properties

| Improve this Doc View Source

Options

Configures this BTCApiClient instance. May be null if this instance is not intended for use with functions that require authentication.

Declaration
public BTCApiClientOptions? Options { get; }
Property Value
Type Description
System.Nullable<BTCApiClientOptions>

Methods

| Improve this Doc View Source

CustomDisposeAsync()

Declaration
protected override ValueTask CustomDisposeAsync()
Returns
Type Description
ValueTask
| Improve this Doc View Source

GetActiveMarkets()

Retrieves list of active markets including configuration for each market.

Declaration
public Task<List<ActiveMarket>> GetActiveMarkets()
Returns
Type Description
Task<List<ActiveMarket>>
| Improve this Doc View Source

GetOrderBook(String)

Declaration
public Task<Book> GetOrderBook(string marketId)
Parameters
Type Name Description
System.String marketId
Returns
Type Description
Task<Book>
| Improve this Doc View Source

GetServerTime()

Gets the current time on the BTC Markets api server.

Declaration
public Task<ServerTime> GetServerTime()
Returns
Type Description
Task<ServerTime>
| Improve this Doc View Source

GetTicker(String)

Retrieves ticker for the given marketId.

Declaration
public Task<Ticker> GetTicker(string marketId)
Parameters
Type Name Description
System.String marketId
Returns
Type Description
Task<Ticker>
| Improve this Doc View Source

GetTickers(IEnumerable<String>)

Retrieves tickers for the given marketIds.

Declaration
public Task<List<Ticker>> GetTickers(IEnumerable<string> marketIds)
Parameters
Type Name Description
IEnumerable<System.String> marketIds
Returns
Type Description
Task<List<Ticker>>
| Improve this Doc View Source

GetTickers(String[])

Retrieves tickers for the given marketIds.

Declaration
public Task<List<Ticker>> GetTickers(params string[] marketIds)
Parameters
Type Name Description
System.String[] marketIds
Returns
Type Description
Task<List<Ticker>>
| Improve this Doc View Source

Subscribe(StreamInfo)

Gets a subscription to the given streamInfo.

Declaration
public ValueTask<ISubscription> Subscribe(StreamInfo streamInfo)
Parameters
Type Name Description
StreamInfo streamInfo
Returns
Type Description
ValueTask<ISubscription>

Implements

IAsyncDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX