Permalink
Browse files

Remove Cryptsy + Mintpal

  • Loading branch information...
Infernoman committed Jan 30, 2017
1 parent 75a1f38 commit 596f49f25c5e0db02fdcade4d9dea42b5b2a59fd
Showing with 0 additions and 683 deletions.
  1. +0 −1 CREDITS.md
  2. +0 −1 README.md
  3. +0 −1 config.json.example
  4. +0 −28 libs/apiCoinWarz.js
  5. +0 −204 libs/apiCryptsy.js
  6. +0 −216 libs/apiMintpal.js
  7. +0 −216 libs/profitSwitch.js
  8. +0 −16 multipool/price.sh
View
@@ -9,7 +9,6 @@ To support development of this project feel free to donate :)
* QRK: `QehPDAhzVQWPwDPQvmn7iT3PoFUGT7o8bC`
* DRK: `XcQmhp8ANR7okWAuArcNFZ2bHSB81jpapQ`
* DOGE: `DBGGVtwAAit1NPZpRm5Nz9VUFErcvVvHYW`
-* Cryptsy Trade Key: `254ca13444be14937b36c44ba29160bd8f02ff76`
Credits
-------
View
@@ -310,7 +310,6 @@ Explanation for each field:
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
- "useCryptsy": true,
"useBittrex": true
}
}
View
@@ -113,7 +113,6 @@
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
- "useCryptsy": true,
"useBittrex": true
}
}
View
@@ -11,34 +11,6 @@ module.exports = function() {
PUBLIC_API_URL = 'http://www.coinwarz.com/v1/api/profitability/?apikey=YOUR_API_KEY&algo=all',
USER_AGENT = 'unomp/unified-node-open-mining-portal'
- // Constructor
- function Cryptsy(key, secret){
- // Generate headers signed by this user's key and secret.
- // The secret is encapsulated and never exposed
- this._getPrivateHeaders = function(parameters){
- var paramString, signature;
-
- if (!key || !secret){
- throw 'CoinWarz: Error. API key and secret required';
- }
-
- // Sort parameters alphabetically and convert to `arg1=foo&arg2=bar`
- paramString = Object.keys(parameters).sort().map(function(param){
- return encodeURIComponent(param) + '=' + encodeURIComponent(parameters[param]);
- }).join('&');
-
- signature = crypto.createHmac('sha512', secret).update(paramString).digest('hex');
-
- return {
- Key: key,
- Sign: signature
- };
- };
- }
-
- // If a site uses non-trusted SSL certificates, set this value to false
- Cryptsy.STRICT_SSL = true;
-
// Helper methods
function joinCurrencies(currencyA, currencyB){
return currencyA + '_' + currencyB;
View
@@ -1,204 +0,0 @@
-var request = require('request');
-var nonce = require('nonce');
-
-module.exports = function() {
- 'use strict';
-
- // Module dependencies
-
- // Constants
- var version = '0.1.0',
- PUBLIC_API_URL = 'http://pubapi2.cryptsy.com/api.php',
- PRIVATE_API_URL = 'https://api.cryptsy.com/api',
- USER_AGENT = 'unomp/unified-node-open-mining-portal'
-
- // Constructor
- function Cryptsy(key, secret){
- // Generate headers signed by this user's key and secret.
- // The secret is encapsulated and never exposed
- this._getPrivateHeaders = function(parameters){
- var paramString, signature;
-
- if (!key || !secret){
- throw 'Cryptsy: Error. API key and secret required';
- }
-
- // Sort parameters alphabetically and convert to `arg1=foo&arg2=bar`
- paramString = Object.keys(parameters).sort().map(function(param){
- return encodeURIComponent(param) + '=' + encodeURIComponent(parameters[param]);
- }).join('&');
-
- signature = crypto.createHmac('sha512', secret).update(paramString).digest('hex');
-
- return {
- Key: key,
- Sign: signature
- };
- };
- }
-
- // If a site uses non-trusted SSL certificates, set this value to false
- Cryptsy.STRICT_SSL = true;
-
- // Helper methods
- function joinCurrencies(currencyA, currencyB){
- return currencyA + '_' + currencyB;
- }
-
- // Prototype
- Cryptsy.prototype = {
- constructor: Cryptsy,
-
- // Make an API request
- _request: function(options, callback){
- if (!('headers' in options)){
- options.headers = {};
- }
-
- options.headers['User-Agent'] = USER_AGENT;
- options.json = true;
- options.strictSSL = Cryptsy.STRICT_SSL;
-
- request(options, function(err, response, body) {
- callback(err, body);
- });
-
- return this;
- },
-
- // Make a public API request
- _public: function(parameters, callback){
- var options = {
- method: 'GET',
- url: PUBLIC_API_URL,
- qs: parameters
- };
-
- return this._request(options, callback);
- },
-
- // Make a private API request
- _private: function(parameters, callback){
- var options;
-
- parameters.nonce = nonce();
- options = {
- method: 'POST',
- url: PRIVATE_API_URL,
- form: parameters,
- headers: this._getPrivateHeaders(parameters)
- };
-
- return this._request(options, callback);
- },
-
-
- /////
-
-
- // PUBLIC METHODS
-
- getTicker: function(callback){
- var parameters = {
- method: 'marketdatav2'
- };
-
- return this._public(parameters, callback);
- },
-
- getOrderBook: function(currencyA, currencyB, callback){
- var parameters = {
- command: 'returnOrderBook',
- currencyPair: joinCurrencies(currencyA, currencyB)
- };
-
- return this._public(parameters, callback);
- },
-
- getTradeHistory: function(currencyA, currencyB, callback){
- var parameters = {
- command: 'returnTradeHistory',
- currencyPair: joinCurrencies(currencyA, currencyB)
- };
-
- return this._public(parameters, callback);
- },
-
-
- /////
-
-
- // PRIVATE METHODS
-
- myBalances: function(callback){
- var parameters = {
- command: 'returnBalances'
- };
-
- return this._private(parameters, callback);
- },
-
- myOpenOrders: function(currencyA, currencyB, callback){
- var parameters = {
- command: 'returnOpenOrders',
- currencyPair: joinCurrencies(currencyA, currencyB)
- };
-
- return this._private(parameters, callback);
- },
-
- myTradeHistory: function(currencyA, currencyB, callback){
- var parameters = {
- command: 'returnTradeHistory',
- currencyPair: joinCurrencies(currencyA, currencyB)
- };
-
- return this._private(parameters, callback);
- },
-
- buy: function(currencyA, currencyB, rate, amount, callback){
- var parameters = {
- command: 'buy',
- currencyPair: joinCurrencies(currencyA, currencyB),
- rate: rate,
- amount: amount
- };
-
- return this._private(parameters, callback);
- },
-
- sell: function(currencyA, currencyB, rate, amount, callback){
- var parameters = {
- command: 'sell',
- currencyPair: joinCurrencies(currencyA, currencyB),
- rate: rate,
- amount: amount
- };
-
- return this._private(parameters, callback);
- },
-
- cancelOrder: function(currencyA, currencyB, orderNumber, callback){
- var parameters = {
- command: 'cancelOrder',
- currencyPair: joinCurrencies(currencyA, currencyB),
- orderNumber: orderNumber
- };
-
- return this._private(parameters, callback);
- },
-
- withdraw: function(currency, amount, address, callback){
- var parameters = {
- command: 'withdraw',
- currency: currency,
- amount: amount,
- address: address
- };
-
- return this._private(parameters, callback);
- }
- };
-
- return Cryptsy;
-}();
Oops, something went wrong.

0 comments on commit 596f49f

Please sign in to comment.