<commit_before>console.log(__dirname)
const config = require(__dirname + '/../config/api_key.json')[cermai.mode]
const bittrex = require('node-bittrex-api')
bittrex.options({
	apikey : config.api_key,
	apisecret : config.api_secret
})

let buyCoinIfPercentageUpBy = 0.03
let buyCoinIfPercentageUpOverXTimeUnits = 6
let buyIfPriceUpOverLastWTimeUnits = 3
let dontBuyIfPercentageDownBy = 0.1
let dontBuyIfPercentageDownOverYTimeUnits = 5
let dontBuyIfPriceDownOverLastZTimeUnits = 3

exports.getmarket = () => {
	// getmarketCalculate((result) => {
	// 	console.log(result)
	// })
	buyCalculate(console.log)
}
let getmarketCalculate = (callback) => {
	bittrex.getmarketsummaries((data, error) => {
		if (error) return console.error(error)
		data.result.forEach((dataMarket) => {<commit_msg>change getMarket<commit_after>console.log(__dirname)
const config = require(__dirname + '/../config/api_key.json')[cermai.mode]
const bittrex = require('node-bittrex-api')
bittrex.options({
	apikey : config.api_key,
	apisecret : config.api_secret
})

let buyCoinIfPercentageUpBy = 0.03
let buyCoinIfPercentageUpOverXTimeUnits = 6
let buyIfPriceUpOverLastWTimeUnits = 3
let dontBuyIfPercentageDownBy = 0.1
let dontBuyIfPercentageDownOverYTimeUnits = 5
let dontBuyIfPriceDownOverLastZTimeUnits = 3

exports.getmarket = () => {
	getmarketCalculate((result) => {
		console.log(result)
	})
	// buyCalculate(console.log)
}
let getmarketCalculate = (callback) => {
	bittrex.getmarketsummaries((data, error) => {
		if (error) return console.error(error)
		data.result.forEach((dataMarket) => {
{'fraction_non_alphanumeric': 0.1258741258741259, 'fraction_numerical': 0.01144310235219326, 'mean_word_length': 5.9035087719298245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5954889', 'n_tokens_mistral': 588, 'n_tokens_neox': 548, 'n_words': 91}