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

Kraken: XLM: NOT creating order! Reason: Amount is too small #2558

Closed
g1tt opened this issue Sep 23, 2018 · 8 comments
Closed

Kraken: XLM: NOT creating order! Reason: Amount is too small #2558

g1tt opened this issue Sep 23, 2018 · 8 comments

Comments

@g1tt
Copy link
Contributor

g1tt commented Sep 23, 2018

I'm submitting a ...
[ ] bug report

Action taken (what you did)
Started off a tradebot using Kraken trading XLM.

Expected result (what you hoped would happen)
I expected the tradebot to purchase about 90 XLM

Actual result (unexpected outcome)
The tradebot does not purchase anything.
When the tradebot tries to buy the debug states -
2018-09-23 19:50:08 (INFO): Trader Received advice to go long. Buying XLM
2018-09-23 19:50:08 (WARN): NOT creating order! Reason: Amount is too small

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
Appears to be the same as issue #1259. I posted there but it's closed so posting a new issue here!
The minimum order qty for XLM is 30 and I have sufficient EUR in the account to purchase 90.
I have tradebots working with 11 other currencies on kraken and this is the only currency I've encountered this issue with.

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

I was asked for logs in the other post.

The tradebot log doesn't have any more info... just this -

2018-09-23 19:50:08 (DEBUG): Calculated DEMA and SMA properties for candle:
2018-09-23 19:50:08 (DEBUG): Inner EMA: 0.23837300
2018-09-23 19:50:08 (DEBUG): Outer EMA: 0.23844536
2018-09-23 19:50:08 (DEBUG): DEMA: 0.23830
2018-09-23 19:50:08 (DEBUG): SMA: 0.23848
2018-09-23 19:50:08 (DEBUG): DEMA age: 109 candles
2018-09-23 19:50:08 (INFO): Trader Received advice to go long. Buying XLM
2018-09-23 19:50:08 (WARN): NOT creating order! Reason: Amount is too small
2018-09-23 19:50:18 (DEBUG): syncing private data
2018-09-23 19:51:08 (DEBUG): Calculated DEMA and SMA properties for candle:
2018-09-23 19:51:08 (DEBUG): Inner EMA: 0.23839364
2018-09-23 19:51:08 (DEBUG): Outer EMA: 0.23844066
2018-09-23 19:51:08 (DEBUG): DEMA: 0.23835
2018-09-23 19:51:08 (DEBUG): SMA: 0.23849
2018-09-23 19:51:08 (DEBUG): DEMA age: 110 candles

Would the API log be any use?

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

Actually, this might be it! From the API log -

23T19:01:00.000Z","indicators":{"dema":0.23756358671741892,"sma":0.23797214285714302,"sma5":0.2374079999999999}},"portfolioChange":{"asset":null,"currency":20.8438},"portfolioValueChange":{"balance":null},"advice":{"id":"advice-1","recommendation":"long","date":"2018-09-23T18:49:00.000Z"},"tradeAborted":{"id":"trade-1","adviceId":"advice-1","action":"buy","portfolio":{"currency":20.8438,"asset":null},"balance":null,"reason":"Amount is too small"}},"advice":[{"id":"advice-1","recommendation":"long","date":"2018-09-23T18:49:00.000Z"}]},"start":"2018-09-23T18:30:16.385Z","latestUpdate":"2018-09-23T19:02:48.429Z"}},"archive":{}}

It's picked the asset up as "null".

Checking API logs for working tradebots next!

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

No, forget that, it looks like that's the asset amount (which brings me to another issue I will log next!). So here's the full API log, if that helps. Anything else I can provide?

{"live":{"2018-09-23-19-30-watcher-3613723833525757":{"mode":"realtime","config":{"silent":false,"debug":true,"tradingAdvisor":{},"candleWriter":{"enabled":true,"adapter":"sqlite"},"backtestResultExporter":{"enabled":false,"writeToDisk":false,"data":{"stratUpdates":false,"roundtrips":true,"stratCandles":true,"trades":true}},"childToParent":{"enabled":true},"adapter":"sqlite","sqlite":{"path":"plugins/sqlite","version":0.1,"dataDirectory":"history","journalMode":"PERSIST","dependencies":[{"module":"sqlite3","version":"3.1.4"}]},"postgresql":{"path":"plugins/postgresql","version":0.1,"connectionString":"postgres://user:pass@localhost:5432","database":null,"schema":"public","dependencies":[{"module":"pg","version":"7.4.3"}]},"mongodb":{"path":"plugins/mongodb","version":0.1,"connectionString":"mongodb://mongodb/gekko","dependencies":[{"module":"mongojs","version":"2.4.0"}]},"backtest":{"daterange":"scan","batchSize":50},"importer":{"daterange":{"from":"2016-06-01 12:00:00"}},"watch":{"exchange":"kraken","currency":"EUR","asset":"XLM"},"type":"market watcher","mode":"realtime"},"id":"2018-09-23-19-30-watcher-3613723833525757","type":"watcher","logType":"watcher","active":true,"stopped":false,"errored":false,"errorMessage":false,"events":{"initial":{"marketStart":"2018-09-23T14:31:38.000Z","candle":{"start":"2018-09-23T14:31:00.000Z","open":0.24507,"high":0.24507,"low":0.24507,"close":0.24507,"vwp":0.24507000000000004,"volume":0.00003418,"trades":2}},"latest":{"marketUpdate":"2018-09-23T19:02:18.000Z","candle":{"start":"2018-09-23T19:01:00.000Z","open":0.237456,"high":0.237456,"low":0.2374,"close":0.2374,"vwp":0.23741150167080807,"volume":501464.39509992,"trades":13}}},"start":"2018-09-23T18:30:14.620Z","latestUpdate":"2018-09-23T19:02:37.305Z"},"2018-09-23-19-30-tradebot-348619063978597":{"mode":"realtime","config":{"silent":false,"debug":true,"tradingAdvisor":{"enabled":true,"method":"CTB025_PPOS_PBBP_DEMA","candleSize":1,"historySize":90},"candleWriter":{"enabled":true,"adapter":"sqlite"},"backtestResultExporter":{"enabled":false,"writeToDisk":false,"data":{"stratUpdates":false,"roundtrips":true,"stratCandles":true,"trades":true}},"childToParent":{"enabled":true},"adapter":"sqlite","sqlite":{"path":"plugins/sqlite","version":0.1,"dataDirectory":"history","journalMode":"PERSIST","dependencies":[{"module":"sqlite3","version":"3.1.4"}]},"postgresql":{"path":"plugins/postgresql","version":0.1,"connectionString":"postgres://user:pass@localhost:5432","database":null,"schema":"public","dependencies":[{"module":"pg","version":"7.4.3"}]},"mongodb":{"path":"plugins/mongodb","version":0.1,"connectionString":"mongodb://mongodb/gekko","dependencies":[{"module":"mongojs","version":"2.4.0"}]},"backtest":{"daterange":"scan","batchSize":50},"importer":{"daterange":{"from":"2016-06-01 12:00:00"}},"market":{"type":"leech","from":"2018-09-23T17:00:00Z"},"mode":"realtime","watch":{"exchange":"kraken","currency":"EUR","asset":"XLM"},"CTB025_PPOS_PBBP_DEMA":{"weight":21,"thresholds":{"down":-0.025,"up":0.025}},"type":"tradebot","performanceAnalyzer":{"riskFreeReturn":2,"enabled":true},"trader":{"enabled":true,"key":"VQKoxOAGvEpWdZBrcm3pT6FCFdGYEpeo49iw6ayPrjm7ubrzMUkoxsW1","secret":"GYOOloGRWB8Sliw2wwoxFxPhIESshE7QKxD456A5SAyik1Myc3rnwF1WGT1130eM8rBkflIN4Y+sZsevBN+ugQ=="},"valid":true},"id":"2018-09-23-19-30-tradebot-348619063978597","type":"leech","logType":"tradebot","active":true,"stopped":false,"errored":false,"errorMessage":false,"events":{"initial":{"candle":{"id":150,"start":"2018-09-23T17:00:00.000Z","open":0.243041,"high":0.243042,"low":0.242,"close":0.242,"vwp":0.24208905842882703,"volume":5030,"trades":7},"stratCandle":{"start":"2018-09-23T17:00:00.000Z","open":0.243041,"high":0.243042,"low":0.242,"close":0.242,"vwp":0.24208905842882703,"volume":5030,"trades":7},"stratUpdate":{"date":"2018-09-23T17:00:00.000Z","indicators":{"dema":0.24199999999999997,"sma":0.242,"sma5":0.242}},"portfolioChange":{"asset":null,"currency":20.8438},"portfolioValueChange":{"balance":null},"stratWarmupCompleted":{"start":"2018-09-23T18:30:00.000Z"},"advice":{"id":"advice-1","recommendation":"long","date":"2018-09-23T18:49:00.000Z"},"tradeAborted":{"id":"trade-1","adviceId":"advice-1","action":"buy","portfolio":{"currency":20.8438,"asset":null},"balance":null,"reason":"Amount is too small"}},"latest":{"candle":{"id":392,"start":"2018-09-23T19:01:00.000Z","open":0.237456,"high":0.237456,"low":0.2374,"close":0.2374,"vwp":0.23741150167080807,"volume":501464.39509992,"trades":13},"stratCandle":{"start":"2018-09-23T19:01:00.000Z","open":0.237456,"high":0.237456,"low":0.2374,"close":0.2374,"vwp":0.23741150167080807,"volume":501464.39509992,"trades":13},"stratUpdate":{"date":"2018-09-23T19:01:00.000Z","indicators":{"dema":0.23756358671741892,"sma":0.23797214285714302,"sma5":0.2374079999999999}},"portfolioChange":{"asset":null,"currency":20.8438},"portfolioValueChange":{"balance":null},"advice":{"id":"advice-1","recommendation":"long","date":"2018-09-23T18:49:00.000Z"},"tradeAborted":{"id":"trade-1","adviceId":"advice-1","action":"buy","portfolio":{"currency":20.8438,"asset":null},"balance":null,"reason":"Amount is too small"}},"advice":[{"id":"advice-1","recommendation":"long","date":"2018-09-23T18:49:00.000Z"}]},"start":"2018-09-23T18:30:16.385Z","latestUpdate":"2018-09-23T19:02:48.429Z"}},"archive":{}}

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

The asset:null probably refers to this issue here -
#2559
...as I've modified the code so it doesn't try and set the asset value to zero when the kraken account has none of the asset, as trying to set the (const) variable throws an error!
Generally once the first buy completes the linked issue sorts itself out.

@askmike
Copy link
Owner

askmike commented Sep 23, 2018

Thanks for the report.

The asset:null probably refers to this issue here - #2559

Please run the develop branch!

The minimum order qty for XLM is 30

Gekko thought it was 300, I think this has changed recently? I updated this to 30 (in the develop branch).

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

I will download develop release and give it a test. Many thanks! :)

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

BTW not sure how long 30 has been minimum order size but thought this might be useful! :)
https://support.kraken.com/hc/en-us/articles/205893708-What-is-the-minimum-order-size-

@g1tt
Copy link
Contributor Author

g1tt commented Sep 23, 2018

This is working now - it just bought it's first XLM. Many thanks for the quick fix. Your forum avatar is well deserved! :)

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