27 lines
561 B
C#
27 lines
561 B
C#
|
using System;
|
|||
|
using sharp.json;
|
|||
|
namespace sharp.trading.bittrex
|
|||
|
{
|
|||
|
public class BittrexHistoricTrade : HistoricTrade
|
|||
|
{
|
|||
|
public BittrexHistoricTrade(JSON json)
|
|||
|
{
|
|||
|
UniqueID = json["Id"].Integer;
|
|||
|
TimeStamp = DateTime.Parse(json["TimeStamp"].String);
|
|||
|
Price = json["Price"].Double;
|
|||
|
TotalPrice = json["Total"].Double;
|
|||
|
Volume = json["Quantity"].Double;
|
|||
|
|
|||
|
string ot = json["OrderType"].String;
|
|||
|
switch (ot){
|
|||
|
case "BUY":
|
|||
|
OrderType = OrderType.BUY;
|
|||
|
break;
|
|||
|
case "SELL":
|
|||
|
OrderType = OrderType.SELL;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|