public async Task <IOffchainOrder> CreateOrder(string clientId, string asset, string assetPair, decimal volume, bool straight) { var entity = OffchainOrder.Create(clientId, asset, assetPair, volume, straight); await _storage.InsertAsync(entity); return(entity); }
public Task UpdatePrice(string orderId, decimal price) { return(_storage.ReplaceAsync(OffchainOrder.GeneratePartitionKey(), orderId, order => { order.Price = price; return order; })); }
public async Task <IOffchainOrder> GetOrder(string id) { return(await _storage.GetDataAsync(OffchainOrder.GeneratePartitionKey(), id)); }