Guest User

Untitled

a guest
May 1st, 2018
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.59 KB | None | 0 0
  1. var c = module.exports = {}
  2.  
  3. // mongo configuration
  4. c.mongo = {}
  5. c.mongo.db = ‘zenbot4’
  6.  
  7. // Must provide EITHER c.mongo.connectionString OR c.mongo.host,port,username,password
  8. // c.mongo.connectionString = ‘mongodb://u:p@host/db?params’
  9.  
  10. // The following is not needed when c.mongo.connectionString is provided:
  11. c.mongo.host = process.env.MONGODB_PORT_27017_TCP_ADDR || ‘localhost’
  12. c.mongo.port = 27017
  13. c.mongo.username = null
  14. c.mongo.password = null
  15. // when using mongodb replication, i.e. when running a mongodb cluster, you can define your replication set here; when you are not using replication (most of the users), just set it to `null` (default).
  16. c.mongo.replicaSet = null
  17. c.mongo.authMechanism = null
  18.  
  19. // default selector. only used if omitting [selector] argument from a command.
  20. c.selector = ‘binance.BTC-USDT’
  21. // name of default trade strategy
  22. c.strategy = ‘stddev’
  23.  
  24. // Exchange API keys:
  25.  
  26. // to enable GDAX trading, enter your API credentials:
  27. c.gdax = {}
  28. c.gdax.key = ‘YOUR-API-KEY’
  29. c.gdax.b64secret = ‘YOUR-BASE64-SECRET’
  30. c.gdax.passphrase = ‘YOUR-PASSPHRASE’
  31.  
  32. // to enable Poloniex trading, enter your API credentials:
  33. c.poloniex = {}
  34. c.poloniex.key = ‘YOUR-API-KEY’
  35. c.poloniex.secret = ‘YOUR-SECRET’
  36. // please note: poloniex does not support market orders via the API
  37.  
  38. // to enable Kraken trading, enter your API credentials:
  39. c.kraken = {}
  40. c.kraken.key = ‘YOUR-API-KEY’
  41. c.kraken.secret = ‘YOUR-SECRET’
  42. // Please read API TOS on https://www.kraken.com/u/settings/api
  43. c.kraken.tosagree = ‘disagree’
  44.  
  45. // to enable Binance trading, enter your API credentials:
  46. c.binance = {}
  47. c.binance.key = ‘YOUR-API-KEY’
  48. c.binance.secret = ‘YOUR-SECRET’
  49.  
  50. // to enable Bittrex trading, enter your API credentials:
  51. c.bittrex = {}
  52. c.bittrex.key = ‘YOUR-API-KEY’
  53. c.bittrex.secret = ‘YOUR-SECRET’
  54. // make sure to give your API key access to only: “Trade Limit” and “Read Info”,
  55. // please note that this might change in the future.
  56. // please note that bittrex API is limited, you cannot use backfills or sims (paper/live trading only)
  57.  
  58. // to enable Bitfinex trading, enter your API credentials:
  59. c.bitfinex = {}
  60. c.bitfinex.key = ‘YOUR-API-KEY’
  61. c.bitfinex.secret = ‘YOUR-SECRET’
  62. // May use ‘exchange’ or ‘margin’ wallet balances
  63. c.bitfinex.wallet = ‘exchange’
  64.  
  65. // to enable Bitstamp trading, enter your API credentials:
  66. c.bitstamp = {}
  67. c.bitstamp.key = ‘YOUR-API-KEY’
  68. c.bitstamp.secret = ‘YOUR-SECRET’
  69. // A client ID is required on Bitstamp
  70. c.bitstamp.client_id = ‘YOUR-CLIENT-ID’
  71.  
  72. // to enable CEX.IO trading, enter your API credentials:
  73. c.cexio = {}
  74. c.cexio.username = ‘YOUR-CLIENT-ID’
  75. c.cexio.key = ‘YOUR-API-KEY’
  76. c.cexio.secret = ‘YOUR-SECRET’
  77.  
  78. // to enable QuadrigaCX tranding, enter your API credentials:
  79. c.quadriga = {}
  80. c.quadriga.key = ‘YOUR-API-KEY’
  81. // this is the manual secret key entered by editing the API access
  82. // and NOT the md5 hash you see in the summary
  83. c.quadriga.secret = ‘YOUR-SECRET’
  84. // replace with the client id used at login, as a string, not number
  85. c.quadriga.client_id = ‘YOUR-CLIENT-ID’
  86.  
  87. // to enable WEX.NZ trading, enter your API credentials:
  88. // Note: WexNZ only supports backfilling the last ~1/4 day ATM.
  89. c.wexnz = {}
  90. c.wexnz.key = ‘YOUR-API-KEY’
  91. c.wexnz.secret = ‘YOUR-SECRET’
  92.  
  93. // to enable Gemini trading, enter your API credentials:
  94. c.gemini = {}
  95. c.gemini.key = ‘YOUR-API-KEY’
  96. c.gemini.secret = ‘YOUR-SECRET’
  97. // set to false to trade on the live platform API
  98. c.gemini.sandbox = true
  99.  
  100. // to enable hitBTC trading, enter your API credentials:
  101. c.hitbtc = {}
  102. c.hitbtc.key = ‘YOUR-API-KEY’
  103. c.hitbtc.secret = ‘YOUR-SECRET’
  104.  
  105. // to enable therock trading, enter your API credentials:
  106. c.therock = {}
  107. c.therock.key = ‘YOUR-API-KEY’
  108. c.therock.secret = ‘YOUR-SECRET’
  109.  
  110. // Optional stop-order triggers:
  111.  
  112. // sell if price drops below this % of bought price (0 to disable)
  113. c.sell_stop_pct = 0
  114. // buy if price surges above this % of sold price (0 to disable)
  115. c.buy_stop_pct = 0
  116. // enable trailing sell stop when reaching this % profit (0 to disable)
  117. c.profit_stop_enable_pct = 0
  118. // maintain a trailing stop this % below the high-water mark of profit
  119. c.profit_stop_pct = 1
  120.  
  121. // Order execution rules:
  122.  
  123. // avoid trading at a slippage above this pct
  124. c.max_slippage_pct = 5
  125. // buy with this % of currency balance (WARNING : sim won’t work properly if you set this value to 100)
  126. c.buy_pct = 50
  127. // sell with this % of asset balance (WARNING : sim won’t work properly if you set this value to 100)
  128. c.sell_pct = 50
  129. // ms to adjust non-filled order after
  130. c.order_adjust_time = 15000
  131. // avoid selling at a loss below this pct set to 0 to ensure selling at a higher price...
  132. c.max_sell_loss_pct = 25
  133. // avoid buying at a loss above this pct set to 0 to ensure buying at a lower price...
  134. c.max_buy_loss_pct = 25
  135. // ms to poll order status
  136. c.order_poll_time = 15000
  137. // ms to wait for settlement (after an order cancel)
  138. c.wait_for_settlement = 5000
  139. // % to mark down buy price for orders
  140. c.markdown_buy_pct = 0.5
  141. // % to mark up sell price for orders
  142. c.markup_sell_pct = 0.5
  143. // become a market taker (high fees) or a market maker (low fees)
  144. c.order_type = ‘maker’
  145. // when supported by the exchange, use post only type orders.
  146. c.post_only = true
  147. // use separated fee currency such as binance’s BNB.
  148. c.use_fee_asset = false
  149.  
  150. // Misc options:
  151.  
  152. // default # days for backfill and sim commands
  153. c.days = 14
  154. // defaults to a high number of lookback periods
  155. c.keep_lookback_periods = 50000
  156. // ms to poll new trades at
  157. c.poll_trades = 30000
  158. // amount of currency to start simulations with
  159. c.currency_capital = 1
  160. // amount of asset to start simulations with
  161. c.asset_capital = 0
  162. // for sim, reverse time at the end of the graph, normalizing buy/hold to 0
  163. c.symmetrical = false
  164. // number of periods to calculate RSI at
  165. c.rsi_periods = 14
  166. // period to record balances for stats
  167. c.balance_snapshot_period = ‘15m’
  168. // avg. amount of slippage to apply to sim trades
  169. c.avg_slippage_pct = 0.045
  170. // time to leave an order open, default to 1 day (this feature is not supported on all exchanges, currently: GDAX)
  171. c.cancel_after = ‘day’
  172. // load and use previous trades for stop-order triggers and loss protection (live/paper mode only)
  173. c.use_prev_trades = false
  174. // minimum number of previous trades to load if use_prev_trades is enabled, set to 0 to disable and use trade time instead
  175. c.min_prev_trades = 0
  176.  
  177. // Notifiers:
  178. c.notifiers = {}
  179.  
  180. // xmpp config
  181. c.notifiers.xmpp = {}
  182. c.notifiers.xmpp.on = false // false xmpp disabled; true xmpp enabled (credentials should be correct)
  183. c.notifiers.xmpp.jid = ‘trader@domain.com’
  184. c.notifiers.xmpp.password = ‘Password’
  185. c.notifiers.xmpp.host = ‘domain.com’
  186. c.notifiers.xmpp.port = 5222
  187. c.notifiers.xmpp.to = ‘MeMyselfAndI@domain.com’
  188. // end xmpp configs
  189.  
  190. // pushbullets configs
  191. c.notifiers.pushbullet = {}
  192. c.notifiers.pushbullet.on = false // false pushbullets disabled; true pushbullets enabled (key should be correct)
  193. c.notifiers.pushbullet.key = ‘YOUR-API-KEY’
  194. c.notifiers.pushbullet.deviceID = ‘YOUR-DEVICE-ID’
  195. // end pushbullets configs
  196.  
  197. // ifttt configs
  198. c.notifiers.ifttt = {}
  199. c.notifiers.ifttt.on = false // false ifttt disabled; true ifttt enabled (key should be correct)
  200. c.notifiers.ifttt.makerKey = ‘YOUR-API-KEY’
  201. c.notifiers.ifttt.eventName = ‘zenbot’
  202. // end ifttt configs
  203.  
  204. // slack config
  205. c.notifiers.slack = {}
  206. c.notifiers.slack.on = false
  207. c.notifiers.slack.webhook_url = ‘’
  208. // end slack config
  209.  
  210. // discord configs
  211. c.notifiers.discord = {}
  212. c.notifiers.discord.on = true // false discord disabled; true discord enabled (key should be correct)
  213. c.notifiers.discord.id = ‘[SNIP]’
  214. c.notifiers.discord.token = ‘[SNIP]’
  215. c.notifiers.discord.username = ‘BTC-USDT (Bitcoin/U.S. Dollar)’ // default “Zenbot”
  216. c.notifiers.discord.avatar_url = ‘https://bitcoin.org/img/icons/opengraph.png’
  217. c.notifiers.discord.color = null // color as a decimal
  218. // end discord configs
  219.  
  220. // prowl configs
  221. c.notifiers.prowl = {}
  222. c.notifiers.prowl.on = false // false prowl disabled; true prowl enabled (key should be correct)
  223. c.notifiers.prowl.key = ‘YOUR-API-KEY’
  224. // end prowl configs
  225.  
  226. // textbelt configs
  227. c.notifiers.textbelt = {}
  228. c.notifiers.textbelt.on = false // false textbelt disabled; true textbelt enabled (key should be correct)
  229. c.notifiers.textbelt.phone = ‘3121234567’
  230. c.notifiers.textbelt.key = ‘textbelt’
  231. // end textbelt configs
  232.  
  233. // pushover configs
  234. c.notifiers.pushover = {}
  235. c.notifiers.pushover.on = false // false pushover disabled; true pushover enabled (keys should be correct)
  236. c.notifiers.pushover.token = ‘YOUR-API-TOKEN’ // create application and supply the token here
  237. c.notifiers.pushover.user = ‘YOUR-USER-KEY’ // this is your own user’s key (not application related)
  238. c.notifiers.pushover.priority = ‘0’ // choose a priority to send zenbot messages with, see https://pushover.net/api#priority
  239. // end pushover configs
  240.  
  241. // telegram configs
  242. c.notifiers.telegram = {}
  243. c.notifiers.telegram.on = false // false telegram disabled; true telegram enabled (key should be correct)
  244. c.notifiers.telegram.bot_token = '’
  245. c.notifiers.telegram.chat_id = ‘’ // the id of the chat the messages should be send in
  246. // end telegram configs
  247.  
  248. // output
  249. c.output = {}
  250.  
  251. // REST API
  252. c.output.api = {}
  253. c.output.api.on = true
  254. c.output.api.ip = ‘’ // IPv4 or IPv6 address to listen on, uses all available interfaces if omitted
  255. c.output.api.port = 3001 // 0 = random port
Add Comment
Please, Sign In to add comment