This repository was archived by the owner on May 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsettings.rb.sample
More file actions
109 lines (93 loc) · 6.02 KB
/
Copy pathsettings.rb.sample
File metadata and controls
109 lines (93 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File to write log to. The log is rotated every 10.240.000 bytes, 10 oldest logs are kept around.
# If you want to log to stdout you can set 'file' to nil or remove the key.
# How much information to show in the log, valid values are: :debug, :info, :error
log file: 'bitex_bot.log', level: :info
# Seconds to keep an order alive before recalculating the price and replacing it.
# Given the way in which the robot tries to find the safest price to place an order, if the time to live is too long the price is
# not going to be competitive.
# To open market, about 20 seconds is a good number here.
time_to_live 20
# To close market, about 30 seconds is a good number here.
close_time_to_live 30
# Settings for buying on maker and selling on taker.
# amount_to_spend_per_order:
# Dollars to spend on each initial maker bid.
# Should at least be 10.0 which is the current minimum order size on Bitex.
# If it's too large you're taking a higher risk if whatever happens and you cannot re sell it afterwards. Also, higher amounts
# result in your Bitex bid price not being competitive.
# A number between 10.0 and 1000.0 is reccommended.
# profit:
# Your profit when buying on Bitex, 0.5 means 0.5%.
# After calculating the price at which bitcoins can be sold on taker, the robot deduces your profit from that price, and places
# a bid on Bitex paying a lower price.
buying amount_to_spend_per_order: 10.0.to_d, profit: 0.5.to_d
# Settings for selling on maker and buying on taker.
# quantity_to_sell_per_order:
# Quantity to sell on each initial maker ask.
# It should be at least 10 USD worth of BTC at current market prices, a bit more just to be safe. Otherwise Bitex will reject
# your orders for being too small.
# If it's too small then the robot is pointless, and if it's too large you're taking a higher risk if whatever happens ad you
# cannot re buy afterwards.
# Also, higher amounts result in your Bitex bid price not being competitive.
# A number between 0.05 and 2.0 is recommended.
# profit:
# Your profit when selling on Bitex, 0.5 means 0.5%.
# After calculating the price at which bitcoins can be bought on taker, the robot deduces your profit from that price and
# places an ask on Bitex charging a higher price.
selling quantity_to_sell_per_order: 0.1.to_d, profit: 0.5.to_d
# Quote fx rate for selling for order book
selling_foreign_exchange_rate 1.to_d
# Quote fx rate for buying for order book
buying_foreign_exchange_rate 1.to_d
# Price variation for closing flows is calculated using this rate:
# <unsuccessful_close_attempts_count> ** 2 * price_variation_rate
closing_price_variation_rate 0.3.to_d
# This is your maker, at the moment only will operates with bitex
# api_key: it's passed in to the bitex gem: https://github.com/bitex-la/bitex-ruby.
# sandbox: Use sandbox environments instead of live environments.
# order_book: order book with which you will operate.
maker bitex: { api_key: 'your_bitex_api_key', sandbox: false, orderbook_code: 'btc_usd', trading_fee: 0.05 }
# These are the configurations we need for the markets currently supported.
# Turn on and off the chosen Bitex, Bitstamp, Itbit or Kraken market with comments.
# These are passed in to the bitstamp gem: see https://github.com/kojnapp/bitstamp for more info.
# Supported values for order_book: 'btcusd', 'btceur', 'eurusd', 'xrpusd', 'xrpeur', 'xrpbtc', 'ltcusd', 'ltceur', 'ltcbtc',
# 'ethusd', 'etheur', 'ethbtc', 'bchusd', 'bcheur', 'bchbtc'
#
taker bitstamp: { api_key: 'YOUR_API_KEY', secret: 'YOUR_API_SECRET', client_id: 'YOUR_BITSTAMP_USERNAME', order_book: 'btcusd' }
# These are passed in to the itbit gem: see https://github.com/bitex-la/itbit for more info.
# Choices: 'xbtusd', 'xbtsgd', 'xbteur', https://api.itbit.com/docs#market-data-get-order-book-get.
#
# taker itbit: { client_key: 'client-key', secret: 'secret', user_id: 'user-id', default_wallet_id: 'wallet-000', sandbox: false, order_book: 'xbtusd' }
# These are passed in to the kraken gem: see https://github.com/shideneyu/kraken_client for more info.
# Supported values for order_book https://api.kraken.com/0/public/AssetPairs:
# 'bcheur', 'bchusd', 'bchxbt', 'dasheur', 'dashusd', 'dashxbt', 'eoseth', 'eoseur', 'eosusd', 'eosxbt', 'etceth', 'etceur',
# 'etcusd', 'etcxbt', 'ethcad', '"ethcad.d"', 'etheur', '"etheur.d"', 'ethgbp', ''ethgbp.d'', 'ethjpy', ''ethjpy.d'', 'ethusd',
# 'ethusd.d', 'ethxbt', ''ethxbt.d'', 'gnoeth', 'gnoeur', 'gnousd', 'gnoxbt', 'icneth', 'icnxbt', 'ltceur', 'ltcusd', 'ltcxbt',
# 'mlneth', 'mlnxbt', 'repeth', 'repeur', 'repusd', 'repxbt', 'usdtusd', 'xbtcad', ''xbtcad.d'', 'xbteur', ''xbteur.d'', 'xbtgbp',
# 'xbtgbp.d', 'xbtjpy', ''xbtjpy.d'', 'xbtusd', ''xbtusd.d'', 'xdgxbt', 'xlmeur', 'xlmusd', 'xlmxbt', 'xmreur', 'xmrusd',
# 'xmrxbt', 'xrpcad', 'xrpeur', 'xrpjpy', 'xrpusd', 'xrpxbt', 'zeceur', 'zecjpy', 'zecusd', 'zecxbt']
#
# taker kraken: { api_key: 'your_api_key', api_secret: 'your_api_secret', order_book: 'xbtusd' }
# These are passed in to the Bitex gem: see https://github.com/bitex-la/bitex-ruby.
# Supported values for order_book: 'btc_usd', 'bch_usd', 'bct_ars', 'bct_clp', 'bct_pyg', 'btc_uyu'
#
# taker bitex: { api_key: 'your_bitex_api_key', sandbox: false, orderbook_code: 'btc_usd', trading_fee: 0.05 }
# Settings for the ActiveRecord Database to use.
# sqlite is just fine. Check this link for more options:
# http://apidock.com/rails/ActiveRecord/Base/establish_connection/class
database adapter: :sqlite3, database: 'bitex_bot.db'
# The robot sends you emails whenever a problem occurs.
# If you do not want to receive emails just remove this 'mailer' key and everything under it.
# It uses https://github.com/mikel/mail under the hood, so method is any valid delivery_method for teh mail gem.
# Options is the options hash passed in to delivery_method.
mailer from: 'robot@example.com',
to: 'you@example.com',
delivery_method: :smtp,
options: {
address: 'your_smtp_server_address.com',
port: 587,
authentication: 'plain',
enable_starttls_auto: true,
user_name: 'your_user_name',
password: 'your_smtp_password'
}