Beispiel #1
0
def process(config_file):
    config = ConfigParser.RawConfigParser()
    config.read(config_file)

    exchange = mybittrex.make_bittrex(config)

    calc_profits(exchange, config)
Beispiel #2
0
def main(ini):

    config_file = ini
    config = ConfigParser.RawConfigParser()
    config.read(config_file)

    b = mybittrex.make_bittrex(config)
    sellall(b)
Beispiel #3
0
def main(ini, dry_run=False):

    config_file = ini
    config = ConfigParser.RawConfigParser()
    config.read(config_file)

    b = mybittrex.make_bittrex(config)
    percent = int(config.get('takeprofit', 'percent'))
    takeprofit(percent)
Beispiel #4
0
def main(ini, my_btc=False, buy=0, min_volume=1):

    config_file = ini
    config = ConfigParser.RawConfigParser()
    config.read(config_file)

    b = mybittrex.make_bittrex(config)

    if my_btc:
        report_btc_balance()
    elif buy:
        buycoin(config, b, buy, min_volume)
    else:
        analyze_gain(min_volume)
        available_btc()
Beispiel #5
0
def main(ini):

    config_file = ini
    config = ConfigParser.RawConfigParser()
    config.read(config_file)

    b = mybittrex.make_bittrex(config)

    print "Getting market summaries"
    markets = b.get_market_summaries()

    with open("markets.json", "w") as markets_file:
        markets_file.write(pprint.pformat(markets['result']))

    print "Populating database"
    for market in markets['result']:

        db.market.insert(name=market['MarketName'],
                         ask=market['Ask'],
                         timestamp=datetime.now())

    db.commit()
Beispiel #6
0
#!/usr/bin/env python

import argh
import collections
import logging
import pprint
from retry import retry
from db import db
import mybittrex
from bittrex.bittrex import SELL_ORDERBOOK

logger = logging.getLogger(__name__)
b = mybittrex.make_bittrex()

ignore_by_in = 'USDT-BTC BTC-ZEC BTC-ETH BTC-ETH BTC-MTR BTC-UTC BTC-XRP'
ignore_by_find = 'ETH-'
max_orders_per_market = 2


def percent_gain(new, old):
    increase = (new - old)
    if increase:
        percent_gain = increase / old
    else:
        percent_gain = 0
    return percent_gain


def number_of_open_orders_in(market):
    orders = list()
    oo = b.get_open_orders(market)['result']