mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-15 23:50:54 +00:00
40 lines
1.7 KiB
C#
40 lines
1.7 KiB
C#
using CryptoExchange.Net.Objects;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CryptoExchange.Net.SharedApis
|
|
{
|
|
/// <summary>
|
|
/// Operation for retrieving an order book snapshot for a symbol on an exchange.
|
|
/// </summary>
|
|
public interface IGetOrderBook : ISharedApiCapability
|
|
{
|
|
/// <summary>
|
|
/// Order book request options.<br />
|
|
/// Use <see cref="CapabilityOptions.RequiredRequestParameters"/>, <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
|
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
|
/// </summary>
|
|
GetOrderBookOptions GetOrderBookOptions { get; }
|
|
|
|
/// <summary>
|
|
/// Get the order book for a symbol, see <see cref="GetOrderBookOptions"/> for request options and exchange specific required/optional parameters. <br />
|
|
/// </summary>
|
|
/// <param name="request">Request info</param>
|
|
/// <param name="ct">Cancellation token</param>
|
|
/// <returns></returns>
|
|
Task<ICallResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Operation for retrieving an order book snapshot for a symbol on an exchange via the REST API.
|
|
/// </summary>
|
|
public interface IGetOrderBookRest : IGetOrderBook, ISharedRest
|
|
{
|
|
/// <inheritdoc />
|
|
new Task<HttpResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
|
}
|
|
}
|