Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Kraken Plugin (crypto trading) #467944
09/09/17 07:58
09/09/17 07:58
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi,
I just shared the code for a Kraken plugin.

https://github.com/vinsom68/Zorro-Kraken-Plugin

There is also a compiled dll and instructions.
There are a few issues, expecially for pairs who have many decimals described in the readme.
This is the first plugin of this kind for Zorro, and it might need some updates to be fully compatible with crypto.

Use at your own risk.
This is the first version, and there might be bugs.
Mostly tested with Bitcoin as base currency, but other currencies might be experimented.

I will work next on a plugin for Bittrex, as I'm mostly trading on this exchange now.

Enjoy
Vincenzo

Re: Kraken Plugin (crypto trading) [Re: vinsom] #467975
09/11/17 22:56
09/11/17 22:56
Joined: Feb 2017
Posts: 24
sodiumchloride Offline
Newbie
sodiumchloride  Offline
Newbie

Joined: Feb 2017
Posts: 24
sounds great. id love to trade cryptocurrenices with zorro laugh gonna try it some time !

Re: Kraken Plugin (crypto trading) [Re: sodiumchloride] #468014
09/13/17 10:42
09/13/17 10:42
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Jcl,
To work properly with crypto, Zorro would need to display more than 5 decimals, up to 10.

- The Account balance doesn't display any decimals, so if you have your account in bitcoin, and a balance of less than 1 bitcoin you will see only 0.
- for some pairs that have many decimals , like DOGE/BTC, trading small amounts you will see only 0s in the Zorro log and Report.

Would be nice to have a configurable number of displayed decimals.

Thanks
Vincenzo

Re: Kraken Plugin (crypto trading) [Re: vinsom] #468019
09/13/17 12:16
09/13/17 12:16
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Thanks for the plugin! And yes, we'll have to make decimals configurable for cryptos.

Re: Kraken Plugin (crypto trading) [Re: jcl] #468040
09/14/17 15:01
09/14/17 15:01
Joined: Sep 2017
Posts: 1
G
Giovany Offline
Guest
Giovany  Offline
Guest
G

Joined: Sep 2017
Posts: 1
Congratulations on your development, how are you going with the bittrex plugin? your job is great.

Giovany

Re: Kraken Plugin (crypto trading) [Re: Giovany] #468054
09/14/17 21:23
09/14/17 21:23
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Bittrex plugin should be finished in a couple of weeks.
This one much easier to do than the kraken one.

Cheers

Re: Kraken Plugin (crypto trading) [Re: vinsom] #468777
10/18/17 17:01
10/18/17 17:01
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
Hey Vincenzo and thank you for the plugins!

I managed to run the Bittrex one successfully but with Kraken the authenticated part doesn't work for me. I get this every time:

Code:
2017-10-18 18:50:31,163 INFO [default] BrokerLogin IN
2017-10-18 18:50:31,163 INFO [default] GetAccBaseCurrExchRate IN Symbol: XBTUSD
2017-10-18 18:50:31,726 INFO [default] {"error":[],"result":{"XXBTZUSD":{"a":["5420.30000","2","2.000"],"b":["5417.10000","2","2.000"],"c":["5414.70000","0.21278133"],"v":["4623.17488130","5317.76831179"],"p":["5358.99670","5391.13164"],"t":[13710,16864],"l":["5132.30000","5132.30000"],"h":["5606.50000","5648.60000"],"o":"5606.50000"}}}
2017-10-18 18:50:31,726 INFO [default] GetAccBaseCurrExchRate OUT
2017-10-18 18:50:31,726 INFO [default] BrokerAccount IN
2017-10-18 18:50:31,726 INFO [default] {Content-Type: application/x-www-form-urlencoded
API-Key: ...
API-Sign: ...
}
2017-10-18 18:50:33,070 INFO [default] {"error":["EGeneral:Internal error"]}
2017-10-18 18:50:33,070 ERROR [default] EGeneral:Internal error
2017-10-18 18:50:33,070 ERROR [default] /0/private/TradeBalance
2017-10-18 18:50:33,070 ERROR [default] aclass=currency&asset=USD
2017-10-18 18:50:33,070 ERROR [default] /0/private/TradeBalance - Error Parsing JSon
2017-10-18 18:50:33,070 ERROR [default] Error calling API BrokerAccount
2017-10-18 18:50:33,085 INFO [default] BrokerAccount OUT
2017-10-18 18:50:33,085 ERROR [default] Can't Login - Retry
2017-10-18 18:50:33,101 INFO [default] BrokerLogin OUT
2017-10-18 18:50:33,101 INFO [default] BrokerLogin OUT



Any idea what could be the cause? I'm using Zorro S 1.66 and I followed the instructions from README on Github, DemoTrading is set to "0".

Re: Kraken Plugin (crypto trading) [Re: pcz] #468783
10/19/17 09:04
10/19/17 09:04
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi pcz, are you using the Assetlist.csv specific for Kraken that I posted with the code readme ?
Also can you post the Kraken zorro.ini keys below that you set ?

DisplayCurrency="USD"
BaseTradeCurrency="XBT"

Cheers

Re: Kraken Plugin (crypto trading) [Re: vinsom] #468784
10/19/17 09:07
10/19/17 09:07
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Also if you enable the log with EnableLog="1" you should be able to find the json response from Kraken in the KrakenPluginLog file inthe log folder.

Re: Kraken Plugin (crypto trading) [Re: vinsom] #468785
10/19/17 10:03
10/19/17 10:03
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
Quote:
are you using the Assetlist.csv specific for Kraken that I posted with the code readme ?


Yes, I had it in AssetsFix.csv file together with Bittrex symbols but now I tried moving it to a separate file (and loading using assetList function) with no difference.

Quote:
Also if you enable the log with EnableLog="1" you should be able to find the json response from Kraken in the KrakenPluginLog file inthe log folder.


I have enabled logging, what I posted above are the only lines that appear in the log. The currencies are fine too - I just copy/pasted everything from the Github page.

Do I need a funded account in order to be able to use the API or is zero balance OK? If you want I can PM you the keys and you can try / debug.

Re: Kraken Plugin (crypto trading) [Re: pcz] #468786
10/19/17 10:21
10/19/17 10:21
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Yes you are right, the Kraken account must be funded. I had the same issue the first time calling the API.
Here there is the response from Kraken Support when I had the issue:

Andy (Kraken Support)
Jul 28, 04:51 PDT

Hi Vincenzo,

I'm Andy from Kraken Client Engagement team. Sorry for the late response, our support team has been under heavy load lately.

Balance is not returned for the assets that were never used. Please deposit or buy a small amount of each asset that you want to get via API

Please, let us know if there's anything else we can assist you with. And have a good day!

Regards,

Andy
Kraken Client Engagement

Re: Kraken Plugin (crypto trading) [Re: vinsom] #468788
10/19/17 11:17
10/19/17 11:17
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
OK, thank you for your help!

Re: Kraken Plugin (crypto trading) [Re: vinsom] #469648
11/27/17 16:10
11/27/17 16:10
Joined: Nov 2017
Posts: 1
H
hyperinho Offline
Guest
hyperinho  Offline
Guest
H

Joined: Nov 2017
Posts: 1
@vinsom, thanks for sharing this plugin. Now, trading in cryptos would be much more fun

I'm having a few issues trying to connect to Kraken. My first attempt was to download the BCH/EUR historic data, but got this error:

Quote:
Login Kraken..
!syntax error at line 1 near: <!DOCTYPE html>
!/0/private/TradeBalance - Error Parsing JSon
!Error calling API BrokerAccount
!Can't Login - Retry
Can't connect!


As an initial test, I created the Kraken API allowing export data only. Plugged "API Key" as PublicKey and "Private Key" as it is on the Zorro.ini file. Additionally, these are my other setups:

Quote:
DisplayCurrency="EUR"
BaseTradeCurrency="BCH"
EnableLog="1";
UseCryptoCompareHistory="1"


On the Zorro 1.66 UI, filled the parameters as:
User: nothing
Account: Real / Kraken
Script: Download BCH/EUR

Placed Kraken.dll within /Plugins folder and remaining files inside a subfolder named /Plugins/kraken.

Your comments are much appreciated.

UPDATE: it's worth to mention I tried including assets in AssetsFix.csv and in a separate file as well, in which case I modify Account.csv file accordingly. Additionally, besides public and private API credentials, I plugged my user/password I use to log into Kraken's site in the Zorro's UI user parameter. None worked as expected

Last edited by hyperinho; 12/01/17 16:14.
Re: Kraken Plugin (crypto trading) [Re: hyperinho] #470553
01/20/18 14:50
01/20/18 14:50
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
I bought and sold BCH, ETH and ETC via Kraken, so these currencies are 'used' already in my account. But I succeed only in trading BCH/EUR via Zorro, trying ETH/EUR or ETC/EUR results in:

Quote:
Login 0 Kraken.. at UTC 01-20 14:03
!Error MinOrderSize missing. "type mismatch! call is<type>() before get<type>()" && is<double>()
Error 055: No ETH/EUR prices
Logout.. ok

Login 0 Kraken.. at UTC 01-20 14:03
!Error MinOrderSize missing. "type mismatch! call is<type>() before get<type>()" && is<double>()
Error 055: No ETC/EUR prices
Logout.. ok

These pairs are identically set in my Assets.csv

Quote:
BCH/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,BCH/EUR
ETC/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,ETC/EUR
ETH/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,ETH/EUR

Any ideas?

Another question: is it sure to do currency trading via API although no leverage is set? From their docs setting a leverage distinguishes between buying a currency and currency pair trading.

Re: Kraken Plugin (crypto trading) [Re: Sphin] #470558
01/20/18 21:09
01/20/18 21:09
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Sphin,
Sorry I made this plugin and tested it only for trading between Crypto.
Never tried with fiat currency.
So as usual do it at your own risk.

For the error you mention you can play with the MinOrderSize in the Zorro ini (see readme on github).
Not sure can fix this issue.


Leverage is always set to 1 (hardcoded) with this plugin.

Re: Kraken Plugin (crypto trading) [Re: vinsom] #470565
01/21/18 19:46
01/21/18 19:46
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Setting leverage to none should be okay first of all but access to other currency pairs would be helpful.
I only can take the minimum sizes Kraken has set but these are original your settings in the Zorro.ini section, I can't see any error there.
Do you think there is a difference if a fiat currency is used? I guess they are treated the same way as cryptos.
Maybe any other user has an idea, I fear my possibilities to debug are very limited at this point.

Re: Kraken Plugin (crypto trading) [Re: Sphin] #470705
01/31/18 20:01
01/31/18 20:01
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Sphin,
Give me a bit of time.
Will try to debug it as soon as I have a couple of hours.

Cheers

Re: Kraken Plugin (crypto trading) [Re: vinsom] #470706
01/31/18 20:21
01/31/18 20:21
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
No problem at all! Glad that someone does this great work anyway, take you time!

Re: Kraken Plugin (crypto trading) [Re: Sphin] #470708
01/31/18 22:52
01/31/18 22:52
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Sphin,
Try this, add as I did below in the zorro ini at the end "EUR":10 and let me know if it works.
In this care I set 10 Euro as minimum order size.
Cheers

MinOrderSize={"error":[],"result":{"REP":0.3,"XBT":0.002,"DASH":0.03,"XDG":3000,"EOS":3,"ETH":0.02,"ETC":0.3,"GNO":0.03,"ICN":2,"LTC":0.1,"MLN":0.1,"XMR":0.1,"XRP":30,"XLM":300,"ZEC":0.03,"BCH":0.002,"EUR":10}}

Re: Kraken Plugin (crypto trading) [Re: vinsom] #470722
02/01/18 16:58
02/01/18 16:58
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
It didn't change anything but I don't know if the problem is really related to EUR because as I stated already above: BCH/EUR works!
I get the type mismatch error only choosing any other pair like ETH/EUR or ETC/EUR.

Re: Kraken Plugin (crypto trading) [Re: Sphin] #470732
02/03/18 20:37
02/03/18 20:37
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
Hi Sphin,
So finally found some time to do some debugging.
Issues are due do the Kraken naming conventions for pairs.
So to let it work with fiat please do:

in Zorro.ini (note the ZEUR and XETH changes):
DisplayCurrency="ZEUR"
BaseTradeCurrency="ZEUR"
IntervalSec = "30"
DemoTrading="1"
EnableLog="1"
UseCryptoCompareHistory="1"
MinOrderSize={"error":[],"result":{"REP":0.3,"XBT":0.002,"DASH":0.03,"XDG":3000,"EOS":3,"ETH":0.02,"ETC":0.3,"GNO":0.03,"ICN":2,"LTC":0.1,"MLN":0.1,"XMR":0.1,"XRP":30,"XLM":300,"ZEC":0.03,"BCH":0.002,"XETH":0.02}}

and in your asset list(notice the last column):
BCH/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,BCH/ZEUR
ETC/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,XETC/ZEUR
ETH/EUR,50,0,0,0,0.00000001,0.01,0,1,1,0,XETH/ZEUR

Not sure how your BCHEUR has been working with your current setting as is't not working for me with my settings.

To know the naming conventions for their pairs please cann this API from the browser:
https://api.kraken.com/0/public/AssetPairs

Cheers

Re: Kraken Plugin (crypto trading) [Re: vinsom] #470733
02/03/18 23:31
02/03/18 23:31
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
This is much better but I had to change in the last line of Zorro.ini:
XBT -> XXBT
ETC -> XETC
LTC -> XLTC

BCH is now the only asset I can't get but this doesn't matter anyway. Thanks for your help!

Re: Kraken Plugin (crypto trading) [Re: Sphin] #471056
02/17/18 18:31
02/17/18 18:31
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
You wrote @GitHub:
Quote:
Zorro works with market orders that have a higher fee 0.26% than limit orders 0.16%

Does this mean an entry limit is useless or controled by Zorro only and OrderLimit is not possible with the Kraken API?

Re: Kraken Plugin (crypto trading) [Re: Sphin] #471111
02/20/18 00:27
02/20/18 00:27
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW
hi Sphin,
When I developed the plugin Zorro was only able to do market orders.
So the plugin now only support market orders.

I think this changed with recent Zorro version.

Kraken API yes support Limit orders.

Cheers

Re: Kraken Plugin (crypto trading) [Re: vinsom] #471178
02/21/18 19:54
02/21/18 19:54
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
That's really fine! But as far as I understood Kraken's trading fees are hardly to calculate because one can't know in advance if his order matches an order already in their order book though the chances to be a maker are surely higher with a limit order. Together with the discount concerning to ones cummulative turnover I guess it's more useful to take any averaged value. laugh

Re: Kraken Plugin (crypto trading) [Re: vinsom] #473403
07/03/18 12:06
07/03/18 12:06
Joined: Dec 2016
Posts: 12
K
kreko Offline
Newbie
kreko  Offline
Newbie
K

Joined: Dec 2016
Posts: 12
Hi vinsom. Maybe you you could look at this post? I'm having trouble understanding how to use your CryptoCompareAPI.
I'm having an error. ( I attached it in the post) I think it's simply I don't understand what is the process flow or step by step actions I need to take to make it work.
Thanks.

Original post
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=473396#Post473396

Re: Kraken Plugin (crypto trading) [Re: kreko] #473693
08/05/18 11:05
08/05/18 11:05
Joined: Nov 2016
Posts: 103
NSW
V
vinsom Offline OP
Member
vinsom  Offline OP
Member
V

Joined: Nov 2016
Posts: 103
NSW

Hi Krko,
Please use this snippet in this other post:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=468152&page=3

Cheers

Page 1 of 3 1 2 3

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1