public CancelOrdersResponse CancelAll(TradeLevel tradeLevel) { return this.CallMethod<CancelOrdersResponse>( new RequestBuilder(RequestType.POST, "order/cancel/all") .AddUrlSegment(tradeLevel)); }
public CancelOrdersResponse CancelMany(TradeLevel tradeLevel, string[] orderIds) { return this.CallMethod<CancelOrdersResponse>( new RequestBuilder(RequestType.POST, "order/cancel/many") .AddUrlSegment(tradeLevel) .AddUrlSegment(orderIds)); }
public GetBalanceResponse GetAccountBalance(string symbol, TradeLevel tradeLevel) { return this.CallMethod<GetBalanceResponse>( new RequestBuilder(RequestType.GET, "account/balance") .AddUrlSegment(symbol) .AddUrlSegment(tradeLevel)); }
private GetSessionTokenResponse GetSessionToken(string hashedSignInKey, TradeLevel tradeLevel) { return this.CallMethod<GetSessionTokenResponse>( new RequestBuilder(RequestType.GET, "session/new") .AddUrlSegment(tradeLevel) .AddQueryStringParameter("hashedSignInKey", hashedSignInKey)); }
public GetTradeBookResponse Get(string fromCoin, string toCoin, TradeLevel tradeLevel, int count = 50) { return this.CallMethod<GetTradeBookResponse>( new RequestBuilder(RequestType.GET, "book") .AddUrlSegment(new CoinsPairSegment(fromCoin, toCoin)) .AddUrlSegment(tradeLevel) .AddQueryStringParameter("count", count.ToString())); }
public GetOrdersResponse Get(string fromCoin, string toCoin, TradeStatus tradeStatus, TradeLevel tradeLevel) { return this.CallMethod<GetOrdersResponse>( new RequestBuilder(RequestType.GET, "trades") .AddUrlSegment(new CoinsPairSegment(fromCoin, toCoin)) .AddUrlSegment(tradeStatus) .AddUrlSegment(tradeLevel)); }
public GetTickerResponse GetTicker(string fromCoin, string toCoin, TradeLevel tradeLevel) { return this.CallMethod<GetTickerResponse>( new RequestBuilder(RequestType.GET, "ticker") .AddUrlSegment(new CoinsPairSegment(fromCoin, toCoin)) .AddUrlSegment(tradeLevel)); }
public void SignIn(TradeLevel tradeLevel) { var getSignInKeyResponse = this.GetSignInKey(); var result = CryptoHelper.Decrypt(getSignInKeyResponse.Key, apiSecret, false); var hasedSignedKey = CryptoHelper.CreateSHA2512Hash(String.Concat(result, this.apiSecondaryKey)); hasedSignedKey = WebUtility.UrlEncode(hasedSignedKey); var getNewSessionResonse = this.GetSessionToken(hasedSignedKey, tradeLevel); this.SessionToken = getNewSessionResonse.SessionToken; }
public TradeCoinRequest(string fromCoin, string toCoin, TradeType tradeType, TradeSide tradeSide, decimal tradePrice, decimal units, TradeLevel tradeLevel) { this.FromCoinSymbol = fromCoin; this.ToCoinSymbol = toCoin; this.TradeType = (int)tradeType; this.TradeSide = (int)tradeSide; this.TradePrice = tradePrice; this.Units = units; this.TradeLevel = (int)tradeLevel; }
public TradeCoinResponse New(string fromCoin, string toCoin, TradeType tradeType, TradeSide tradeSide, decimal tradePrice, decimal units, TradeLevel tradeLevel) { return this.CallMethod<TradeCoinResponse>( new RequestBuilder(RequestType.POST, "order/new") .AddUrlSegment(new CoinsPairSegment(fromCoin, toCoin)) .AddUrlSegment(tradeType) .AddUrlSegment(tradeSide) .AddUrlSegment(tradePrice) .AddUrlSegment(units) .AddUrlSegment(tradeLevel)); }
public GetBalancesResponse GetAccountBalances(TradeLevel tradeLevel) { return this.CallMethod<GetBalancesResponse>(new RequestBuilder(RequestType.GET, "account/balances") .AddUrlSegment(tradeLevel)); }