Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
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
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 604 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Help with pulling Index: Coin name price from deribit plugin #485221
02/05/22 08:30
02/05/22 08:30
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
Code
function run() 
{
	set(LOGFILE);
	BarPeriod = 15;
	asset("BTC");
	vars Prices = series(price());
}


Code
price 
Login 0 BinanceFutures..
!Connecting to wss://www.deribit.com/ws/api/v2/...
!Authorizing...
!8 BTC futures detected
!430 BTC options detected
!8 ETH futures detected
!484 ETH options detected
!Deribit BTC/USD index: 41467.21
!Deribit ETH/USD index: 3005.82
!Using kh762 main: kh762
!BTC balance: 0.0000000000 (0.00 USD)
!BTC equity: 0.0000000000 (0.00 USD)
!ETH balance: 0.0000000000 (0.00 USD)
!ETH equity: 0.0000000000 (0.00 USD) at UTC 02-05 08:25
Subscribe BTC
Error 053: BTC unavailable at this time
V 2.444 on Sat 22-02-05 09:25:09 (Zorro S Subscription)
Error 047: No bars generated
Logout.. ok


Code
Deribit has 4 types of symbols: Index, Perpetual Futures, Futures, and Options.

Index: Coin name, either "BTC" or "ETH".
Perpetual Futures: [Coin]-PERPETUAL, e.g. "ETH-PERPETUAL".
Futures: [Coin]-DDMMMYY, where MMM is a 3-letter capitalized string, e.g. "BTC-26MAR21".
Options: [Coin]-DDMMMYY-[Strike]-[P/C], e.g. "ETH-25JUN21-340-C".
For options and futures, the contract functions can be used with "BTC" or "ETH" as the underlying.


Could someone please bump me in the right direction?

Re: Help with pulling Index: Coin name price from deribit plugin [Re: degenerate_762] #485223
02/05/22 09:22
02/05/22 09:22
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
I'm trying to pull the spot please

Re: Help with pulling Index: Coin name price from deribit plugin [Re: degenerate_762] #485225
02/05/22 13:30
02/05/22 13:30
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Please share your asset list.

Re: Help with pulling Index: Coin name price from deribit plugin [Re: degenerate_762] #485227
02/05/22 14:45
02/05/22 14:45
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
Code
Name	Price	Spread	RollLong	RollShort	PIP	PIPCost	MarginCost	Leverage	LotAmount	Commission	Symbol
BTC	57125	3.5	0	0	0.0001	0.0001	0	0	0.0001	0	BTC
BTC-PERPETUAL	57125	3.5	0	0	0.05	1.12E-05	2.23E-06	0	10	-0.25	BTC-PERPETUAL
BTC-26MAR21	57125	3.5	0	0	0.05	1.12E-05	2.23E-06	0	10	-0.25	BTC-26MAR21
ETH	1991	0.05	0	0	0.0001	0.0001	0	0	0.0001	0	ETH
ETH-PERPETUAL	1991	0.05	0	0	0.05	1.12E-06	4.47E-07	0	1	-0.25	ETH-PERPETUAL
ETH-26MAR21	1991	0.05	0	0	0.05	1.12E-06	4.47E-07	0	1	-0.25	ETH-26MAR21


Re: Help with pulling Index: Coin name price from deribit plugin [Re: AndrewAMD] #485228
02/05/22 15:11
02/05/22 15:11
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
@AndrewAMD. My AssetList is thesame as the one provided in the manual except that i have made additiion on the symbols in the last column. After making that adjustment, i'm now getting this error when trying to pull the spot/index price.

Code
Deribit 
Login 0 Deribit..
!Connecting to wss://www.deribit.com/ws/api/v2/...
!Authorizing...
!8 BTC futures detected
!430 BTC options detected
!8 ETH futures detected
!484 ETH options detected
!Deribit BTC/USD index: 41514.34
!Deribit ETH/USD index: 3019.97
!Using kh762 main: kh762
!BTC balance: 0.0000000000 (0.00 USD)
!BTC equity: 0.0000000000 (0.00 USD)
!ETH balance: 0.0000000000 (0.00 USD)
!ETH equity: 0.0000000000 (0.00 USD) at UTC 02-05 15:06 - BTC history unavailable!
V 2.444 on Sat 22-02-05 16:06:36 (Zorro S Subscription)
Error 047: No bars generated
Logout..

Re: Help with pulling Index: Coin name price from deribit plugin [Re: degenerate_762] #485229
02/05/22 15:12
02/05/22 15:12
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Do you know for a fact that you're using this asset list?

After your asset("BTC"); call, add these lines:
Code
printf("\nSymbolTrade: %s",SymbolTrade);
printf("\nSymbolLive: %s",SymbolLive);
printf("\nSymbolHist: %s",SymbolHist);

Re: Help with pulling Index: Coin name price from deribit plugin [Re: AndrewAMD] #485230
02/05/22 15:23
02/05/22 15:23
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51

Code
Deribit 
Login 0 Deribit..
!Connecting to wss://www.deribit.com/ws/api/v2/...
!Authorizing...
!8 BTC futures detected
!430 BTC options detected
!8 ETH futures detected
!484 ETH options detected
!Deribit BTC/USD index: 41712.35
!Deribit ETH/USD index: 3045.89
!Using kh762 main: kh762
!BTC balance: 0.0000000000 (0.00 USD)
!BTC equity: 0.0000000000 (0.00 USD)
!ETH balance: 0.0000000000 (0.00 USD)
!ETH equity: 0.0000000000 (0.00 USD) at UTC 02-05 15:19 - BTC history unavailable!
SymbolTrade: BTC
SymbolLive: BTC
SymbolHist: BTC
V 2.444 on Sat 22-02-05 16:19:56 (Zorro S Subscription)
!readloop_handler: The WebSocket stream was gracefully closed at both endpoints
!BrokerAccount: stopped
Error 047: No bars generated
Logout.. ok

Re: Help with pulling Index: Coin name price from deribit plugin [Re: AndrewAMD] #485231
02/05/22 15:31
02/05/22 15:31
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
@AndrewAMD.

Last edited by degenerate_762; 02/11/22 09:01.
Re: Help with pulling Index: Coin name price from deribit plugin [Re: degenerate_762] #485232
02/05/22 15:32
02/05/22 15:32
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
OK, so you fixed the plugin issue. My work here is done. cool

You can figure out the other stuff by setting Verbose to 7|DIAG and reading the log.

Re: Help with pulling Index: Coin name price from deribit plugin [Re: AndrewAMD] #485233
02/05/22 15:34
02/05/22 15:34
Joined: Jul 2021
Posts: 51
D
degenerate_762 Offline OP
Junior Member
degenerate_762  Offline OP
Junior Member
D

Joined: Jul 2021
Posts: 51
Thanks @AndrewAMD.

Page 1 of 2 1 2

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