Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Poloniex Markets #368

Closed
Atroci opened this issue Jul 5, 2016 · 9 comments
Closed

Poloniex Markets #368

Atroci opened this issue Jul 5, 2016 · 9 comments

Comments

@Atroci
Copy link

Atroci commented Jul 5, 2016

// Monitor the live market
config.watch = {
exchange: 'poloniex',
currency: 'USDT',
asset: 'BTC',
}

Am I doing this wrong? Non of the USDT markets are working.

// Monitor the live market
config.watch = {
exchange: 'poloniex',
currency: 'BTC',
asset: 'BTC', 'XMR', 'ETH', 'FCT', 'MAID', 'DASH', 'XVC', 'GRC'
}

This also causes a syntax error on the second ",".

Didn't finished setting up, any suggestions here?

@askmike
Copy link
Owner

askmike commented Jul 5, 2016

Hey! Unfortunately Gekko currently only supports watching a single market (like BTC-ETH). In this case Gekko calls BTC the currency and ETH the asset. The only markets at Poloniex currently supported are:

  • BTC-ETH
  • BTC-XMR
  • BTC-FCT
  • BTC-MAID
  • BTC-DASH
  • BTC-XVC
  • BTC-GRC

If you want to watch / trade a market not in this list, let me know which one.

Also: what is USDT?

@Atroci
Copy link
Author

Atroci commented Jul 5, 2016

Oh, I see. Well I would like to trade in USDT. I thought It was working because it's listed here:

{
name: 'Poloniex',
slug: 'poloniex',
direct: false,
infinityOrder: false,
currencies: ['BTC', 'XMR', 'USDT'],
assets: ['BTC', 'XMR', 'ETH', 'FCT', 'MAID', 'DASH', 'XVC', 'GRC'],

Poloniex allows you to trade BTC, NXT, ETH and other currencies with USD Tether, I'm not really that expert to give you a full explanation, but, you will find out more here:

https://poloniex.com/exchange#usdt_btc
https://tether.to/
https://coinmarketcap.com/assets/tether

@askmike
Copy link
Owner

askmike commented Jul 5, 2016

Awesome, for now I added:

  • USDT-BTC
  • USDT-ETH

I tested watching those markets, but not real trading (no reason why this would not work, but not tested either).

Could you please download the develop branch and if you have problems / want more markets please let me know!

@Atroci
Copy link
Author

Atroci commented Jul 5, 2016

Awesome, gonna try it!

@askmike
Copy link
Owner

askmike commented Jul 5, 2016

If something is up or you need more markets, just comment here and reopen :)

@askmike askmike closed this as completed Jul 5, 2016
@Atroci
Copy link
Author

Atroci commented Jul 5, 2016

After setting and enabling automated trader I got this error message(#337), it was working with autotrader disabled. After installing/updating lodash, async, bufferutil. I tried to run again, now doesn't work with autotrader disabled.

I guess that this have something to do with me updating/removing old lodash and async, so I'm gonna start all over and see what happens. Anyway, prob still gonna get the first error message.

> > $ node gekko
> 2016-07-05 20:45:08 (INFO):     Gekko v0.2.6 started
> 2016-07-05 20:45:08 (INFO):     I'm gonna make you rich, Bud Fox.
> 
> 
> C:\gekko\gekko-develop\core\exchangeChecker.js:30
>   if(!_.contains(exchange.currencies, conf.currency))
>         ^
> 
> TypeError: _.contains is not a function
>     at Checker.cantMonitor (C:\gekko\gekko-develop\core\exchangeChecker.js:30:9)
> 
>     at Object.<anonymous> (C:\gekko\gekko-develop\core\markets\realtime.js:18:29
> )
>     at Module._compile (module.js:541:32)
>     at Object.Module._extensions..js (module.js:550:10)
>     at Module.load (module.js:456:32)
>     at tryModuleLoad (module.js:415:12)
>     at Function.Module._load (module.js:407:3)
>     at Module.require (module.js:466:17)
>     at require (internal/module.js:20:19)
>     at pipeline (C:\gekko\gekko-develop\core\pipeline.js:27:16)
> 

Config

`// Everything is explained here:
// @link https://github.com/askmike/gekko/blob/stable/docs/Configuring_gekko.md

var config = {};

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// GENERAL SETTINGS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

config.debug = true; // for additional logging / debugging

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// WATCHING A MARKET
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Monitor the live market
config.watch = {
exchange: 'poloniex',
currency: 'USDT',
asset: 'BTC',
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING TRADING ADVICE
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

config.tradingAdvisor = {
enabled: true,
method: 'RSI',
candleSize: 5,
historySize: 7,
adapter: 'sqlite',
talib: {
enabled: false,
version: '1.0.2'
}
}

// Exponential Moving Averages settings:
config.DEMA = {
// EMA weight (?)
// the higher the weight, the more smooth (and delayed) the line
short: 10,
long: 21,
// amount of candles to remember and base initial EMAs on
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -0.025,
up: 0.025
}
};

// MACD settings:
config.MACD = {
// EMA weight (?)
// the higher the weight, the more smooth (and delayed) the line
short: 13,
long: 27,
signal: 9,
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -0.025,
up: 0.025,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 1
}
};

// PPO settings:
config.PPO = {
// EMA weight (?)
// the higher the weight, the more smooth (and delayed) the line
short: 12,
long: 26,
signal: 9,
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -0.025,
up: 0.025,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 2
}
};

// RSI settings:
config.RSI = {
interval: 7,
thresholds: {
low: 30,
high: 70,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 1
}
};

// CCI Settings
config.CCI = {
constant: 0.015, // constant multiplier. 0.015 gets to around 70% fit
history: 90, // history size, make same or smaller than history
thresholds: {
up: 100, // fixed values for overbuy upward trajectory
down: -100, // fixed value for downward trajectory
persistence: 0 // filter spikes by adding extra filters candles
}
};

// StochRSI settings
config.StochRSI = {
interval: 3,
thresholds: {
low: 20,
high: 80,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 3
}
};

// custom settings:
config.custom = {
my_custom_setting: 10,
}

config['talib-macd'] = {
// FastPeriod, SlowPeriod, SignalPeriod
parameters: [10, 21, 9],
thresholds: {
down: -0.025,
up: 0.025,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 1
}
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING PLUGINS
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Want Gekko to perform real trades on buy or sell advice?
// Enabling this will activate trades for the market being
// watched by config.watch.
config.trader = {
enabled: false,
key: ' ',
secret: '',
username: '' // your username, only required for specific exchanges.
}

config.adviceLogger = {
enabled: true
}

// do you want Gekko to calculate the profit of its own advice?
config.profitSimulator = {
enabled: true,
// report the profit in the currency or the asset?
reportInCurrency: true,
// start balance, on what the current balance is compared with
simulationBalance: {
// these are in the unit types configured in the watcher.
asset: 0.0341012,
currency: 0,
},
// only want report after a sell? set to false.
verbose: true,
// how much fee in % does each trade cost?
fee: 0.25,
// how much slippage should Gekko assume per trade?
slippage: 0.1
}

// want Gekko to send a mail on buy or sell advice?
config.mailer = {
enabled: false, // Send Emails if true, false to turn off
sendMailOnStart: true, // Send 'Gekko starting' message if true, not if false

email: '', // Your Gmail address

// You don't have to set your password here, if you leave it blank we will ask it
// when Gekko's starts.
//
// NOTE: Gekko is an open source project < https://github.com/askmike/gekko >,
// make sure you looked at the code or trust the maintainer of this bot when you
// fill in your email and password.
//
// WARNING: If you have NOT downloaded Gekko from the github page above we CANNOT
// guarantuee that your email address & password are safe!

password: '', // Your Gmail Password - if not supplied Gekko will prompt on startup.

tag: '[GEKKO] ', // Prefix all email subject lines with this

        //       ADVANCED MAIL SETTINGS
        // you can leave those as is if you 
        // just want to use Gmail

server: 'smtp.gmail.com', // The name of YOUR outbound (SMTP) mail server.
smtpauth: true, // Does SMTP server require authentication (true for Gmail)
// The following 3 values default to the Email (above) if left blank
user: '', // Your Email server user name - usually your full Email address 'me@mydomain.com'
from: '', // 'me@mydomain.com'
to: '', // 'me@somedomain.com, me@someotherdomain.com'
ssl: true, // Use SSL (true for Gmail)
port: '', // Set if you don't want to use the default port
tls: false // Use TLS if true
}

config.ircbot = {
enabled: false,
emitUpdats: false,
channel: '#your-channel',
server: 'irc.freenode.net',
botName: 'gekkobot'
}

config.xmppbot = {
enabled: false,
emitUpdats: false,
client_id: 'jabber_id',
client_pwd: 'jabber_pw',
client_host: 'jabber_server',
client_port: 5222,
status_msg: 'I'm online',
receiver: 'jabber_id_for_updates'
}

config.campfire = {
enabled: false,
emitUpdates: false,
nickname: 'Gordon',
roomId: null,
apiKey: '',
account: ''
}

config.redisBeacon = {
enabled: false,
port: 6379, // redis default
host: '127.0.0.1', // localhost
// On default Gekko broadcasts
// events in the channel with
// the name of the event, set
// an optional prefix to the
// channel name.
channelPrefix: '',
broadcast: [
'candle'
]
}

config.candleWriter = {
adapter: 'sqlite',
enabled: true
}

config.webserver = {
enabled: false,
http: {
port: 8080,
host: 'localhost'
},
ws: {
port: 8081,
host: 'localhost'
}
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING ADAPTER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

config.adapters = {
sqlite: {
path: 'plugins/sqlite',

dataDirectory: './history',
version: 0.1,

dependencies: [{
  module: 'sqlite3',
  version: '3.1.4'
}]

}
}

var moment = require('moment');
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING BACKTESTING
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Note that these settings are only used in backtesting mode, see here:
// @link: https://github.com/askmike/gekko/blob/stable/docs/Backtesting.md

config.backtest = {
adapter: 'sqlite',
daterange: {
from: moment.utc("2016-07-05 18:51:00"),
to: moment.utc("2016-07-05 23:00:00")
},
batchSize: 50
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING IMPORTING
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

config.importer = {
daterange: {
// NOTE: these dates are in UTC
from: "2016-07-04 12:00:00",
to: "2016-07-05 19:00:00"
}
}

// set this to true if you understand that Gekko will
// invest according to how you configured the indicators.
// None of the advice in the output is Gekko telling you
// to take a certain position. Instead it is the result
// of running the indicators you configured automatically.
//
// In other words: Gekko automates your trading strategies,
// it doesn't advice on itself, only set to true if you truly
// understand this.
//
// Not sure? Read this first: #201
config['I understand that Gekko only automates MY OWN trading strategies'] = true;

module.exports = config;

`

@Atroci
Copy link
Author

Atroci commented Jul 6, 2016

Copied the node_modules from stable version to develop and it's working again for papertrading, autotrade still nor working.

C:\gekko\gekko-develop\core\portfolioManager.js:109
return this.getFund(fund).amount;
^

TypeError: Cannot read property 'amount' of undefined
at Manager.getBalance (C:\gekko\gekko-develop\core\portfolioManager.js:109:28)
at bound as getBalance
at act (C:\gekko\gekko-develop\core\portfolioManager.js:153:23)
at bound (C:\gekko\gekko-develop\node_modules\lodash\dist\lodash.js:729:21)
at C:\gekko\gekko-develop\node_modules\async\lib\async.js:232:13
at C:\gekko\gekko-develop\node_modules\async\lib\async.js:142:25
at C:\gekko\gekko-develop\node_modules\async\lib\async.js:229:17
at C:\gekko\gekko-develop\node_modules\async\lib\async.js:556:34
at . (C:\gekko\gekko-develop\core\portfolioManager.js:75:7)
at . (C:\gekko\gekko-develop\exchanges\poloniex.js:63:5)

@Atroci
Copy link
Author

Atroci commented Jul 6, 2016

So, poloniex creates an extra space after your api key, and I forgot to remove. That was pretty much the issue. It's working fine now

@askmike
Copy link
Owner

askmike commented Jul 6, 2016

good to hear!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants