Beispiel #1
0
 private ExchangeKuCoinAPI()
 {
     RequestContentType    = "application/json";
     NonceStyle            = NonceStyle.UnixMilliseconds;
     NonceEndPoint         = "/timestamp";
     NonceEndPointField    = "data";
     NonceEndPointStyle    = NonceStyle.UnixMilliseconds;
     MarketSymbolSeparator = "-";
     RateLimit             = new RateGate(20, TimeSpan.FromSeconds(60.0));
 }
 private ExchangeDigifinexAPI()
 {
     MarketSymbolSeparator   = "_";
     MarketSymbolIsReversed  = false;
     MarketSymbolIsUppercase = true;
     WebSocketOrderBookType  = WebSocketOrderBookType.FullBookFirstThenDeltas;
     NonceStyle = NonceStyle.UnixSeconds;
     RateLimit  = new RateGate(240, TimeSpan.FromMinutes(1));
     GetFastestUrl();
 }
        // public override string BaseUrl { get; set; } = "https://api-testnet.bybit.com/";
        // public override string BaseUrlWebSocket { get; set; } = "wss://stream-testnet.bybit.com/realtime";

        private ExchangeBybitAPI()
        {
            NonceStyle  = NonceStyle.UnixMilliseconds;
            NonceOffset = TimeSpan.FromSeconds(1.0);

            MarketSymbolSeparator  = string.Empty;
            RequestContentType     = "application/json";
            WebSocketOrderBookType = WebSocketOrderBookType.FullBookFirstThenDeltas;

            RateLimit = new RateGate(100, TimeSpan.FromMinutes(1));
        }
        public ExchangeBL3PAPI()
        {
            MarketSymbolIsUppercase = true;
            MarketSymbolIsReversed  = true;
            MarketSymbolSeparator   = string.Empty;
            WebSocketOrderBookType  = WebSocketOrderBookType.FullBookAlways;
            RequestContentType      = "application/x-www-form-urlencoded";
            RequestMethod           = "POST";

            RateLimit = new RateGate(600, TimeSpan.FromMinutes(10));

            converterToEight = new FixedIntDecimalConverter(8);
            converterToFive  = new FixedIntDecimalConverter(5);
        }
Beispiel #5
0
        public ExchangeBitMEXAPI()
        {
            RequestWindow = TimeSpan.Zero;
            NonceStyle    = NonceStyle.ExpiresUnixSeconds;

            // make the nonce go 10 seconds into the future (the offset is subtracted)
            // this will give us an api-expires 60 seconds into the future
            NonceOffset = TimeSpan.FromSeconds(-60.0);

            SymbolSeparator    = string.Empty;
            RequestContentType = "application/json";

            RateLimit = new RateGate(1, TimeSpan.FromSeconds(2.0));
        }
Beispiel #6
0
        public ExchangeBitMEXAPI()
        {
            RequestWindow = TimeSpan.Zero;
            NonceStyle    = NonceStyle.ExpiresUnixSeconds;

            // make the nonce go 60 seconds into the future (the offset is subtracted)
            // this will give us an api-expires 60 seconds into the future
            NonceOffset = TimeSpan.FromSeconds(-60.0);

            MarketSymbolSeparator  = string.Empty;
            RequestContentType     = "application/json";
            WebSocketOrderBookType = WebSocketOrderBookType.FullBookFirstThenDeltas;

            RateLimit = new RateGate(300, TimeSpan.FromMinutes(5));
        }
Beispiel #7
0
        private ExchangeCoinbaseAPI()
        {
            RequestContentType     = "application/json";
            NonceStyle             = NonceStyle.UnixSeconds;
            NonceEndPoint          = "/time";
            NonceEndPointField     = "iso";
            NonceEndPointStyle     = NonceStyle.Iso8601;
            WebSocketOrderBookType = WebSocketOrderBookType.FullBookFirstThenDeltas;

            /* Rate limits from Coinbase Pro webpage
             * Public endpoints - We throttle public endpoints by IP: 10 requests per second, up to 15 requests per second in bursts. Some endpoints may have custom rate limits.
             * Private endpoints - We throttle private endpoints by profile ID: 15 requests per second, up to 30 requests per second in bursts. Some endpoints may have custom rate limits.
             * fills endpoint has a custom rate limit of 10 requests per second, up to 20 requests per second in bursts. */
            RateLimit = new RateGate(9, TimeSpan.FromSeconds(1));             // set to 9 to be safe
        }
Beispiel #8
0
        public ExchangeBitfinexAPI()
        {
            NonceStyle = NonceStyle.UnixMillisecondsString;
            RateLimit  = new RateGate(1, TimeSpan.FromSeconds(6.0));

            // List is from "Withdrawal Types" section https://docs.bitfinex.com/v1/reference#rest-auth-withdrawal
            this.DepositMethodLookup = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase)
            {
                ["AID"]   = "aid",
                ["AVT"]   = "aventus",
                ["BAT"]   = "bat",
                ["BCH"]   = "bcash",
                ["BTC"]   = "bitcoin",
                ["BTG"]   = "bgold",
                ["DASH"]  = "dash", // TODO: Bitfinex returns "DSH" as the symbol name in the API but on the site it is "DASH". How to normalize?
                ["EDO"]   = "eidoo",
                ["ELF"]   = "elf",
                ["EOS"]   = "eos",
                ["ETC"]   = "ethereumc",
                ["ETH"]   = "ethereum",
                ["FUN"]   = "fun",
                ["GNT"]   = "golem",
                ["LTC"]   = "litecoin",
                ["MIOTA"] = "iota",
                ["MNA"]   = "mna",
                ["NEO"]   = "neo",
                ["OMG"]   = "omisego",
                ["QASH"]  = "qash",
                ["QTUM"]  = "qtum",
                ["RCN"]   = "rcn",
                ["REP"]   = "rep",
                ["RLC"]   = "rlc",
                ["SAN"]   = "santiment",
                ["SNG"]   = "sng",
                ["SNT"]   = "status",
                ["SPK"]   = "spk",
                ["TNB"]   = "tnb",
                ["TRX"]   = "trx",
                //["?USDTO?"] = "tetheruso", // Tether on OMNI - Don't use until it's clear how this works
                //["?USDTE?"] = "tetheruse", // Tether on Ethereum - Don't use until it's clear how this works
                ["XMR"] = "monero",
                ["XRP"] = "ripple",
                ["YYW"] = "yoyow",
                ["ZEC"] = "zcash",
                ["ZRX"] = "zrx",
            };
        }
Beispiel #9
0
        public ExchangeBitfinexAPI()
        {
            NonceStyle = NonceStyle.UnixMillisecondsString;
            RateLimit  = new RateGate(1, TimeSpan.FromSeconds(6.0));

            // TODO: Bitfinex supports deposits of more than these but the API docs don't specify what nouns to use
            this.DepositMethodLookup = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase)
            {
                ["BCH"]   = "bcash",
                ["BTC"]   = "bitcoin",
                ["ETC"]   = "ethereumc",
                ["ETH"]   = "ethereum",
                ["LTC"]   = "litecoin",
                ["MIOTA"] = "iota",
                ["USDT"]  = "tetheruso", // didn't work for me but my account isn't verified. Docs say this is correct
                ["XMR"]   = "monero",
                ["XRP"]   = "ripple",
                ["ZEC"]   = "zcash",
            };
        }
        public ExchangeBittrexAPI()
        {
            // https://bittrex.github.io/api/v1-1#call-limits (Same counts for the V3 API)
            RateLimit = new RateGate(60, TimeSpan.FromSeconds(60));

            TwoFieldDepositCoinTypes = new HashSet <string>(StringComparer.OrdinalIgnoreCase)
            {
                "BITSHAREX",
                "CRYPTO_NOTE_PAYMENTID",
                "LUMEN",
                "NEM",
                "NXT",
                "NXT_MS",
                "RIPPLE",
                "STEEM"
            };

            OneFieldDepositCoinTypes = new HashSet <string>(StringComparer.OrdinalIgnoreCase)
            {
                "ADA",
                "ANTSHARES",
                "BITCOIN",
                "BITCOIN_PERCENTAGE_FEE",
                "BITCOIN_STEALTH",
                "BITCOINEX",
                "BYTEBALL",
                "COUNTERPARTY",
                "ETH",
                "ETH_CONTRACT",
                "FACTOM",
                "LISK",
                "OMNI",
                "SIA",
                "WAVES",
                "WAVES_ASSET",
            };

            MarketSymbolIsReversed = true;
            WebSocketOrderBookType = WebSocketOrderBookType.DeltasOnly;
        }
 private ExchangeGeminiAPI()
 {
     MarketSymbolIsUppercase = false;
     MarketSymbolSeparator   = string.Empty;
     RateLimit = new RateGate(1, TimeSpan.FromSeconds(0.5));
 }
Beispiel #12
0
 public ExchangeBitfinexAPI()
 {
     NonceStyle = NonceStyle.UnixMillisecondsString;
     RateLimit  = new RateGate(1, TimeSpan.FromSeconds(6.0));
 }
 public ExchangeGateIoAPI()
 {
     MarketSymbolSeparator = "_";
     RateLimit             = new RateGate(300, TimeSpan.FromSeconds(1));
     RequestContentType    = "application/json";
 }
Beispiel #14
0
 private ExchangeOKExAPI()
 {
     RateLimit = new RateGate(20, TimeSpan.FromSeconds(2));
 }