Пример #1
0
        /*public NewOrderResponse ExecuteBuyOrderBTC(decimal amount, decimal price, OrderExchange exchange, OrderType type)
         * {
         *  return ExecuteOrder(OrderSymbol.BTCUSD, amount, price, exchange, OrderSide.Buy, type);
         * }
         * public NewOrderResponse ExecuteSellOrderBTC(decimal amount, decimal price, OrderExchange exchange, OrderType type)
         * {
         *  return ExecuteOrder(OrderSymbol.BTCUSD, amount, price, exchange, OrderSide.Sell, type);
         * }*/
        public NewOrderResponse ExecuteOrder(OrderSymbol symbol, decimal amount, decimal price, OrderExchange exchange, OrderSide side, OrderType type)
        {
            NewOrderRequest  req      = new NewOrderRequest(Nonce, symbol, amount, price, exchange, side, type);
            string           response = SendRequest(req, "POST");
            NewOrderResponse resp     = NewOrderResponse.FromJSON(response);

            return(resp);
        }
Пример #2
0
        public static NewOrderResponse FromJSON(string response)
        {
            NewOrderResponse resp = JsonConvert.DeserializeObject <NewOrderResponse>(response);

            return(resp);
        }
Пример #3
0
 public OrderNew(string pair, Exchange.Clients.BitFinex.NewOrderResponse or) : base()
 {
     Pair         = pair;
     TransactTime = or.timestamp;
     OrderIds     = new string[] { or.order_id };
 }