mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
d5d0be5824
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using BTCPayServer.Abstractions.Custodians.Client;
|
|
using BTCPayServer.Client.Models;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer.Abstractions.Custodians;
|
|
|
|
public interface ICanTrade
|
|
{
|
|
/**
|
|
* A list of tradable asset pairs, or NULL if the custodian cannot trade/convert assets. if thr asset pair contains fiat, fiat is always put last. If both assets are a cyrptocode or both are fiat, the pair is written alphabetically. Always in uppercase. Example: ["BTC/EUR","BTC/USD", "EUR/USD", "BTC/ETH",...]
|
|
*/
|
|
public List<AssetPairData> GetTradableAssetPairs();
|
|
|
|
/**
|
|
* Execute a market order right now.
|
|
*/
|
|
public Task<MarketTradeResult> TradeMarketAsync(string fromAsset, string toAsset, decimal qty, JObject config, CancellationToken cancellationToken);
|
|
|
|
/**
|
|
* Get the details about a previous market trade.
|
|
*/
|
|
public Task<MarketTradeResult> GetTradeInfoAsync(string tradeId, JObject config, CancellationToken cancellationToken);
|
|
|
|
public Task<AssetQuoteResult> GetQuoteForAssetAsync(string fromAsset, string toAsset, JObject config, CancellationToken cancellationToken);
|
|
}
|
|
|
|
|
|
|