From d9a6ab0c5afbab3ef0ef9c3428b2604b2e48c1a2 Mon Sep 17 00:00:00 2001 From: vslee Date: Wed, 2 Oct 2019 12:13:46 -0700 Subject: [PATCH] HitBTC: set RateLimit - closes #457 --- .../API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ExchangeSharp/API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs b/ExchangeSharp/API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs index b12a6659..fbb6a2bf 100644 --- a/ExchangeSharp/API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs +++ b/ExchangeSharp/API/Exchanges/Hitbtc/ExchangeHitbtcAPI.cs @@ -28,14 +28,15 @@ public sealed partial class ExchangeHitBTCAPI : ExchangeAPI public override string BaseUrl { get; set; } = "https://api.hitbtc.com/api/2"; public override string BaseUrlWebSocket { get; set; } = "wss://api.hitbtc.com/api/2/ws"; - public ExchangeHitBTCAPI() - { - RequestContentType = "application/json"; - NonceStyle = NonceStyle.UnixMillisecondsString; - MarketSymbolSeparator = string.Empty; - } + public ExchangeHitBTCAPI() + { // https://api.hitbtc.com/ + RateLimit = new RateGate(100, TimeSpan.FromSeconds(1)); + RequestContentType = "application/json"; + NonceStyle = NonceStyle.UnixMillisecondsString; + MarketSymbolSeparator = string.Empty; + } - public override string PeriodSecondsToString(int seconds) + public override string PeriodSecondsToString(int seconds) { switch (seconds) {