How to use the node.bittrex.api.options function in node

To help you get started, we’ve selected a few node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kevinflo / twitchplayscrypto / app / server.js View on Github external
var secrets = require('../config/secrets.json');
var config = require('../config/chatConfig.js');
var bittrex = require('node.bittrex.api');

// express stuff
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var lessMiddleware = require('less-middleware');
var _ = require('lodash');
var fs = require('fs');

bittrex.options({
    'apikey': secrets.bittrex.API_KEY,
    'apisecret': secrets.bittrex.API_SECRET,
});

fs.writeFile('logs/votes.txt', "", { flag: 'wx' }, function (err) {
    if (err) console.log(err);
    console.log("votes saved!");
});

fs.writeFile('logs/orders.txt', "", { flag: 'wx' }, function (err) {
    if (err) console.log(err);
    console.log("orders saved!");
});

fs.writeFile('logs/balances.txt', "", { flag: 'wx' }, function (err) {
    if (err) console.log(err);
github askmike / gekko / exchange / wrappers / bittrex.js View on Github external
// dummy key, otherwise the Bittrex module
    // will not work even for public requests.
    this.key = 'dummyApiKey';
    this.secret = 'dummyApiKey';
  } else {
    this.key = config.key;
    this.secret = config.secret;
  }

  this.name = 'Bittrex';
  this.balance;
  this.price;

  this.pair = [this.currency, this.asset].join('-');

  Bittrex.options({
    apikey:  this.key,
    apisecret: this.secret,
    stream: false,
    verbose: false,
    cleartext: false,
    inverse_callback_arguments: true
  });

  this.bittrexApi = Bittrex;
}
github redcap3000 / crypto-socket / index.js View on Github external
//'XRPBTC',
                //"POTBTC",
                'LTCBTC',
                //'XEMBTC',
                //'DASHBTC',
                //'BTSBTC',
                //'DOGEBTC',
                //'XMRBTC',
                //"XLMBTC",
                "BTCUSD",
                'LTCUSD'
                //'BTCNEO',
                //'ETHNEO'
            ];

        bittrex.options({ 'stream': true });

        bittrexMarketFilter.filter(function(o,i){
            bittrex.getticker( {market :o},function( response ) {
                if(typeof response != 'undefined' && typeof response.Last != 'undefined'){
                    if(typeof bittrexMarketFilterRelation[i] != "undefined"){
                    // for the record :
                        var relation = bittrexMarketFilterRelation[i]
                        if(typeof Exchanges.bittrex[relation] == "undefined"){
                            Exchanges.bittrex[relation] = true
                        }

                        if(typeof  response.Last == "undefined"){
                            return false
                        }

                        if (Exchanges.bittrex[relation] !=  response.Last) {
github zjasonshen / BittrexArbitrageBot / arbitrageBot.js View on Github external
const bittrex = require('node.bittrex.api');
bittrex.options({
    'apikey': 'APIKEY',
    'apisecret': 'APISECRET',
    'verbose': false,
    'cleartext': false,
});

class ArbPrices {
    constructor(name) {
        this._name = name;
        this._prices = [];
        this._markets = [`BTC-${name}`, `ETH-${name}`, `BTC-ETH`];
        this._arbConst = 0.0;
    }

    get name() {
        return this._name;
github DOKKA / bttrxr / lib / bittrex-promise.js View on Github external
var bittrex = require('node.bittrex.api');
var Promise = require("bluebird");
var request = Promise.promisify(require("request"));

var apiKey = process.env.BITTREX_API_KEY;
var secret = process.env.BITTREX_API_SECRET;

bittrex.options({
    apikey: apiKey,
    apisecret: secret
});


module.exports = {
    getBitcoinUSDPrice: getBitcoinUSDPrice,
    getBalances: getBalances,
    getMarketSummaries: getMarketSummaries,
    getTicker: getTicker,
    sellLimit: sellLimit,
    buyLimit: buyLimit,
    getOpenOrders: getOpenOrders,
    cancel: cancel
};