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

Zenbot Bitstamp extension #266

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
94d836f
Add files via upload
tuxitor Jun 5, 2017
87613b0
Delete exchanges.md
tuxitor Jun 5, 2017
ef20364
Create exchanges.md
tuxitor Jun 5, 2017
009f885
Delete exchanges.md
tuxitor Jun 5, 2017
8571b6e
Create developers.md
tuxitor Jun 5, 2017
2eddac8
Update developers.md
tuxitor Jun 6, 2017
4f86032
Update developers.md
tuxitor Jun 7, 2017
e3f4482
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 8, 2017
4b54f3f
New command "zenbot balance <selector>"
tuxitor Jun 8, 2017
b23a912
New command "zenbot balance <selector>"
tuxitor Jun 8, 2017
671459a
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 11, 2017
eee2986
The increase in traffic on the exhanges we have seen lately can be qu…
Jun 11, 2017
685ec0a
Resolved merge conflict by incorporating both suggestions.
Jun 11, 2017
c2a94e3
Merge branch 'master' into master
tuxitor Jun 11, 2017
386130d
Merge branch 'master' of https://github.com/eigilb/zenbot
Jun 12, 2017
0f6602c
Updated conf-sample.js
Jun 12, 2017
4d87e08
Small changes in exchange.js
Jun 12, 2017
4f0000f
Small change in conf-sample.js
Jun 12, 2017
c9dbeec
Small insert a LF in gront of error messages
Jun 12, 2017
fc1dc4e
Done some cosmetic changes
Jun 12, 2017
338be24
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 12, 2017
5ebc788
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 17, 2017
a03a13d
Prpare buy/sell for using market order and make it suitable for excha…
Jun 17, 2017
c2e5140
Prepare buy/sell for using market order and make it suitable for exch…
Jun 17, 2017
b8ac748
Small changes
Jun 20, 2017
4c4b000
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 20, 2017
1c60673
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 21, 2017
6099841
Changes to package.json and exchange.js
Jun 21, 2017
ad42640
Delete syncfromCarlos.sh
tuxitor Jun 21, 2017
8919ca4
Fixed indenting
Jun 21, 2017
13bb7f6
Fix for communication hiccups
Jun 22, 2017
d319c1c
Fix the 5 figures issue in Bitfinex
Jun 23, 2017
2b93e48
Fix the fix for the Bitfinex 5 figure limit issue
Jun 23, 2017
9670841
Merge branch 'master' of https://github.com/carlos8f/zenbot
Jun 30, 2017
503f4dd
Overview of a Zenbot websocket agent
tuxitor Jun 30, 2017
5b0c01e
Adding program and some file updates for the Zentalk concept
Jun 30, 2017
568ba50
Removed port setting from cmd line options in favor of auto grab
Jul 2, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions commands/balance.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = function container (get, set, clear) {
.command('balance [selector]')
.allowUnknownOption()
.description('get asset and currency balance from the exchange')
//.option('--all', 'output all balances')
.option('-c, --calculate_currency <calculate_currency>', 'show the full balance in another currency')
.option('--debug', 'output detailed debug info')
.action(function (selector, cmd) {
Expand Down Expand Up @@ -59,8 +58,8 @@ module.exports = function container (get, set, clear) {
})
})
}

balance()
})
}
}

8 changes: 6 additions & 2 deletions commands/buy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ module.exports = function container (get, set, clear) {
var order_types = ['maker', 'taker']
if (!so.order_type in order_types || !so.order_type) {
so.order_type = 'maker'
}
} else {
so.order_type = so.taker ? 'taker' : 'maker'
so.order_type === 'taker' ? delete so.taker : delete so.maker
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indenting issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. Have tabstops set to 2 without filling with spaces. Expands in other environments

s.options.order_type = so.order_type
so.mode = 'live'
so.strategy = c.strategy
so.stats = true
Expand All @@ -56,7 +60,7 @@ module.exports = function container (get, set, clear) {
})
}
else {
console.log('placing order...')
console.log('placing ' + so.order_type + ' sell order...')
}
}
setInterval(checkOrder, c.order_poll_time)
Expand Down
8 changes: 6 additions & 2 deletions commands/sell.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ module.exports = function container (get, set, clear) {
var order_types = ['maker', 'taker']
if (!so.order_type in order_types || !so.order_type) {
so.order_type = 'maker'
}
} else {
so.order_type = so.taker ? 'taker' : 'maker'
so.order_type === 'taker' ? delete so.taker : delete so.maker
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indenting issue

s.options.order_type = so.order_type
so.mode = 'live'
so.strategy = c.strategy
so.stats = true
Expand All @@ -56,7 +60,7 @@ module.exports = function container (get, set, clear) {
})
}
else {
console.log('placing order...')
console.log('placing ' + so.order_type + ' sell order...')
}
}
setInterval(checkOrder, c.order_poll_time)
Expand Down
7 changes: 7 additions & 0 deletions conf-sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ c.bitfinex.secret = 'YOUR-SECRET'
// May use 'exchange' or 'trading' wallet balances. However margin trading may not work...read the API documentation.
c.bitfinex.wallet = 'exchange'

// to enable Bitfinex trading, enter your API credentials:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bitfinex => Bitstamp

c.bitstamp = {}
c.bitstamp.key = 'YOUR-API-KEY'
c.bitstamp.secret = 'YOUR-SECRET'
// A client ID is required on Bitstamp
c.bitstamp.client_id = 'YOUR-CLIENT-ID'

// Optional stop-order triggers:

// sell if price drops below this % of bought price (0 to disable)
Expand Down
7 changes: 7 additions & 0 deletions extensions/exchanges/bitstamp/_codemap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
_ns: 'zenbot',
_name: 'bitstamp',

'exchanges.bitstamp': require('./exchange'),
'exchanges.list[]': '#exchanges.bitstamp'
}
Loading