Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (rki), 426 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Pulling Data through the Kraken Plugin #485396
03/06/22 08:17
03/06/22 08:17
Joined: Feb 2022
Posts: 9
London
L
loopiezlol Offline OP
Newbie
loopiezlol  Offline OP
Newbie
L

Joined: Feb 2022
Posts: 9
London
Hey,

I previously used both the Binance and Coinbase plugins to fetch both M1 and EOD data directly through Zorro.

However, I'm having issues doing the same through the Kraken one which I plan to use due to its support for SET_LEVERAGE.

I'm wondering what I'm doing wrong with this script:

Code
function main() 
{
	
	
	StartDate = 2021;
	EndDate = 2022;
	Verbose = 7|DIAG;

	assetHistory("ETH/USD",1);
	
}


getting the following output

Code

DownloadKraken compiling........... ok
!Kraken Plugin, version: 1.0.1.3
!Logging in...
!Loading Kraken asset info...
!Loading Kraken tradable pair info...
!REST server status: online
!Getting currency balances...
!Getting websocket token...
!Websocket connected to wss://ws.kraken.com/
!Websocket connected to wss://ws-auth.kraken.com/
!Kraken server version: 1.8.8, status: online
!Kraken server version: 1.8.8, status: online at UTC 03-06 08:13
!ETH/USD 03-06 08:11:00 to 03-06 08:13:38 failed
!ETH/USD 03-06 08:11:00 to 03-06 08:12:38 failed.
!ETH/USD 01-01 00:00:00 to 12-31 23:59:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:58:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:57:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:56:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:55:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:54:59 failed
!ETH/USD 01-01 00:00:00 to 12-31 23:53:59 failed - ETH/USD history unavailable!
Error 056: Can't download ETH/USD 2021 history
Logout..
!Logging out... ok



using the assets given in the manual:

Code
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
BCH/ETH,0.53794,0.0001,0,0,0.0001,0.0001,0,1,0.00001,-0.25,
ETH/USD,450.2,0.01,0,0,0.01,0.01,0,1,0.00001,-0.25,
ETH/XBT,0.0292241,0.00001,0,0,0.00001,0.00001,0,1,0.00001,-0.25,
LTC/ETH,0.13093,0.00001,0,0,0.00001,0.00001,0,1,0.00001,-0.25,
LTC/USD,179,0.01,0,0,0.01,0.01,0,1,0.00001,-0.25,
LTC/XBT,0.003834,0.000001,0,0,0.000001,0.000001,0,1,0.00001,-0.25,
XBT/USD,44785.8,3.3,0,0,0.01,0.01,0,1,0.00001,-0.25,



Any thoughts on what went wrong?

Re: Pulling Data through the Kraken Plugin [Re: loopiezlol] #485398
03/06/22 23:34
03/06/22 23:34
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
You left all symbols blank in your asset list.

Re: Pulling Data through the Kraken Plugin [Re: loopiezlol] #485399
03/07/22 07:52
03/07/22 07:52
Joined: Feb 2022
Posts: 9
London
L
loopiezlol Offline OP
Newbie
loopiezlol  Offline OP
Newbie
L

Joined: Feb 2022
Posts: 9
London
Hey Grant, thanks for the heads up, but I don't think that's it.

I believe the symbol defaults to the name when it's missing. Either way, I explicitely set the symbol too, but still getting errors.

[Linked Image]

To me it seems that the internal pagination logic of the plugin may be broken, as seen in the log.

Re: Pulling Data through the Kraken Plugin [Re: loopiezlol] #485400
03/07/22 12:30
03/07/22 12:30
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
I don't use Kraken myself, so that was just a wild guess of mine.

I think this "too many requests" message is the bottleneck. There's prob a limit on the number of data queries, which is pretty common for most sources.

Last edited by Grant; 03/07/22 12:41.
Re: Pulling Data through the Kraken Plugin [Re: loopiezlol] #485628
04/03/22 12:03
04/03/22 12:03
Joined: Feb 2022
Posts: 9
London
L
loopiezlol Offline OP
Newbie
loopiezlol  Offline OP
Newbie
L

Joined: Feb 2022
Posts: 9
London
makes sense. this is also specified in the manual

> Rate upper limit. Kraken has a strange and complex rate limiting policy. To avoid bans, SET_DELAY was preconfigured to sufficiently slow responses. SET_DELAY affects all REST requests, but no open websocket streams.

was wondering if anyone knows a reliable way to circumvent this - maybe a value to use with SET_DELAY

Re: Pulling Data through the Kraken Plugin [Re: loopiezlol] #485629
04/03/22 12:16
04/03/22 12:16
Joined: Feb 2022
Posts: 9
London
L
loopiezlol Offline OP
Newbie
loopiezlol  Offline OP
Newbie
L

Joined: Feb 2022
Posts: 9
London
In their docs, Kraken mentions that a 1s delay may be too much, so I tried increasing that using the SET_DELAY broker command. yet, that doesn't seem to help much as "too many requests" is still hit

> Calling the public endpoints at a frequency of 1 per second (or less) would remain within the rate limits, but exceeding this frequency could cause the calls to be rate limited. If the rate limits are reached, additional calls would be restricted for a few seconds (or possibly longer if calls continue to be made while the rate limits are active).

Code

function run() 
{
	set(PLOTNOW,LOGFILE);
	BarPeriod = 1;
	
	StartDate = 20220101;
	
	brokerCommand(SET_DELAY, 10000);
	
	asset("ETH/USD");
	
	if (is(INITRUN)) {
		assetHistory("ETH/USD", 1+OVERRIDE);
	}


}



Last edited by loopiezlol; 04/03/22 12:49.

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