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

Tweaked XRP increments for Bitstamp & fixed invalid date messages #976

Merged
merged 2 commits into from
Dec 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion extensions/exchanges/bitstamp/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ module.exports = function container (get, set, clear) {
// 'In Queue', 'Open', 'Finished'
body.status = 'done'
}
if(body.datetime) body.done_at = body.created_at = body.datetime;

orders['~' + body.id] = body
cb(null, body)
Expand Down Expand Up @@ -338,7 +339,9 @@ module.exports = function container (get, set, clear) {
} else if(body.status === 'Finished')
body.status = 'done';

if(body.datetime) body.time = body.datetime;
if(body.status === 'done'){
if(body.transactions && body.transactions[0].datetime) body.done_at = body.transactions[0].datetime;
}

cb(null, body)
})
Expand Down
8 changes: 4 additions & 4 deletions extensions/exchanges/bitstamp/products.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@
"id": "XRPUSD",
"asset": "XRP",
"currency": "USD",
"min_size": "0.01",
"min_size": "5",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think min_size refers to the minimum quantity of the asset that you can order at one time. If someone else can confirm that, then my next question is, wouldn't a min_size of 5 mean you had to order a minimum of 5 at once? Possible, but doesn't sound right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, your statement is correct. I've made this change because bitstamp requires a minimum trade amount of 5 euros - see end of page:
https://www.bitstamp.net/fee_schedule/

It's somewhat hard to set for a currency that's fluctuating at prices below 1 euro, but this alleviates the issue that zenbot currently tries to trade at smaller amounts, repeatedly. I don't really use the USD amount, but thought increasing the bar on that might avoid others some pain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quote for convenience

The minimum allowable trade is 5 Euro for Euro denominated trading pairs. The minimum allowable trade is 0.001 BTC for BTC denominated trading pairs. The value of minimum trades in other trading pairs will be denominated in the fiat currency of the particular trading pair and limited to 5 whole units of that currency (example: $5, £5, etc.).

"max_size": "1000000",
"increment": "0.01",
"increment": "0.00001",
"label": "XRP/USD"
},
{
"id": "XRPEUR",
"asset": "XRP",
"currency": "EUR",
"min_size": "0.01",
"min_size": "5",
"max_size": "1000000",
"increment": "0.01",
"increment": "0.00001",
"label": "XRP/EUR"
},
{
Expand Down