forked from DigitalRuby/ExchangeSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderDetailsOption.cs
More file actions
29 lines (22 loc) · 770 Bytes
/
Copy pathOrderDetailsOption.cs
File metadata and controls
29 lines (22 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Threading.Tasks;
using CommandLine;
using ExchangeSharpConsole.Options.Interfaces;
namespace ExchangeSharpConsole.Options
{
[Verb("order-details", HelpText = "Fetch the order details from the exchange.")]
public class OrderDetailsOption : BaseOption, IOptionPerExchange, IOptionPerOrderId, IOptionWithMarketSymbol
{
public override async Task RunCommand()
{
using var api = await GetExchangeInstanceAsync(ExchangeName);
Authenticate(api);
var orderDetails = await api.GetOrderDetailsAsync(OrderId, marketSymbol: MarketSymbol);
Console.WriteLine(orderDetails);
WaitInteractively();
}
public string ExchangeName { get; set; }
public string OrderId { get; set; }
public string MarketSymbol { get; set; }
}
}