It is currently April 27th, 2024, 11:50 pm

Crypto Skins not working

Get help with creating, editing & fixing problems with skins
Slide_Lock
Posts: 8
Joined: July 23rd, 2023, 10:53 pm

Re: Crypto Skins not working

Post by Slide_Lock »

tass_co wrote: July 30th, 2023, 9:52 pm Your code works fine for me.

Your problem may be related to UTF encoding.
Move the attached file to the skin folder.
Then start Rainmeter again, load the skin file I sent and try again.

Crypto.ini
Thank you, I really appreciate the replies. Yes the code I copied works fine for me as well, I was just wondering how to edit your original code for the first meter you had in line, which was a ticker/symbol that I am not interested in monotoring in real time, so I wanted to try and substitute it for another crypto (XLMUSDT) but when I changed the code in the first meter, It displayed the symbol for XLMUSDT but would not grab the realtime data from binance.us, even tho it was grabbing BTC and ETH realtime data. In the end, I just scrubbed all of the entries for the first meter and turned the skin into a 2 meter variant which is fine. Nice, simple and elegant. It works brilliantly.
User avatar
tass_co
Posts: 517
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Crypto Skins not working

Post by tass_co »

Slide_Lock wrote: July 30th, 2023, 11:25 pm Thank you, I really appreciate the replies. Yes the code I copied works fine for me as well, I was just wondering how to edit your original code for the first meter you had in line, which was a ticker/symbol that I am not interested in monotoring in real time, so I wanted to try and substitute it for another crypto (XLMUSDT) but when I changed the code in the first meter, It displayed the symbol for XLMUSDT but would not grab the realtime data from binance.us, even tho it was grabbing BTC and ETH realtime data. In the end, I just scrubbed all of the entries for the first meter and turned the skin into a 2 meter variant which is fine. Nice, simple and elegant. It works brilliantly.
I am sorry. I misunderstood your question :oops:
I don't know where i going from here, but i promise it won't be boring... :great:
ElsieBlue
Posts: 1
Joined: September 18th, 2023, 11:00 am

Re: Crypto Skins not working

Post by ElsieBlue »

Hey Slide_Lock, changing the domain from "binance.com" to "binance.us" is a solid workaround. Regarding the ticker, you can usually customize the ticker symbols within the skin's config file. Just find the line that references "USDTTRY" and replace it with "XLM".

On a related note, if you're really into crypto, you might be interested in the new crypto listings from presales. This website has a pretty extensive list of new projects, and it's a good way to diversify your portfolio with up-and-coming tokens before they hit the major exchanges. This could give you even more options for your crypto skin tracking.
Zan
Posts: 4
Joined: January 14th, 2024, 8:49 pm

Re: Crypto Skins not working

Post by Zan »

Hi, in my settings in MiniCrypto_d.rmskin:

TradeSymbol1=BTCUSDT
NumOfDecimalsDisplayedTrade1=0
TradeSymbol2=ETHUSDT
NumOfDecimalsDisplayedTrade2=0
TradeSymbol3=SOLUSDT
NumOfDecimalsDisplayedTrade3=1

but it still displays three decimal places
Screenshot_1.jpg
How do I change THE NUMBER OF DECIMALS?
You do not have the required permissions to view the files attached to this post.
User avatar
tass_co
Posts: 517
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Crypto Skins not working

Post by tass_co »

Zan wrote: January 14th, 2024, 8:56 pm Hi, in my settings in MiniCrypto_d.rmskin:

TradeSymbol1=BTCUSDT
NumOfDecimalsDisplayedTrade1=0
TradeSymbol2=ETHUSDT
NumOfDecimalsDisplayedTrade2=0
TradeSymbol3=SOLUSDT
NumOfDecimalsDisplayedTrade3=1

but it still displays three decimal places

Screenshot_1.jpg

How do I change THE NUMBER OF DECIMALS?

(I don't remember the exact measurement names.)
You need to change the Substitute value in measure [MeasurecePrice1].(or 2,3,...)


The value 2in the example code indicates the decimal value to be received.

Code: Select all

Substitute="(.*\.\d{2})\d*":"\1"
I don't know where i going from here, but i promise it won't be boring... :great:
Zan
Posts: 4
Joined: January 14th, 2024, 8:49 pm

Re: Crypto Skins not working

Post by Zan »

Great!



Screenshot_3.jpg
1) How do I remove a dot?
2) The TextSize=24 parameter does not work. How do I change the text size?
You do not have the required permissions to view the files attached to this post.
User avatar
tass_co
Posts: 517
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Crypto Skins not working

Post by tass_co »

Zan wrote: January 15th, 2024, 6:38 am Great!




Screenshot_3.jpg

1) How do I remove a dot?
2) The TextSize=24 parameter does not work. How do I change the text size?

1. The code below will work for you. It works smoothly with 5-digit values.

Code: Select all

Substitute="^(\d{1,5}).*":"\1"
2. If you share your code, I can help you better.
I don't know where i going from here, but i promise it won't be boring... :great:
Zan
Posts: 4
Joined: January 14th, 2024, 8:49 pm

Re: Crypto Skins not working

Post by Zan »

tass_co wrote: January 15th, 2024, 7:52 am 1. The code below will work for you. It works smoothly with 5-digit values.

Code: Select all

Substitute="^(\d{1,5}).*":"\1"
2. If you share your code, I can help you better.
Thank you!

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1


[Variables]
;---------- TRADE SYMBOL ---------- 
TradeSymbol2=USDTTRY
TradeSymbol1=BTCUSDT 

;---------- TEXT ----------
TextFace=Product Sans
TextCol=255,255,255
TextSize=24
TextSpacing=15

;---------- PRICE ----------
;COLOUR USED IF PRICE IS UP FROM LAST PRICE
UpCol=0,255,0           
;COLOUR USED IF PRICE IS DOWN FROM LAST PRICE
DownCol=255,0,0

;---------- PERCENTAGE CHANGE ----------
;0=VISIBLE, 1=HIDDEN
PercentageEnabled=0
;THE SIZE OF THE PERCENTAGE TEXT, BY DEFAULT HALF OF TEXT SIZE
PercentageTextSize=(#TextSize# * 0.5)

;---------- BINANCE API TRADESYMBOL 1 ----------
[MeasureBinancePriceData1]
Measure=WebParser
URL=https://api.binance.me/api/v3/ticker/24hr?symbol=#TradeSymbol1#
UpdateRate=62
RegExp=(?siU)"priceChangePercent":"(.*)","weightedAvgPrice":".*","prevClosePrice":".*","lastPrice":"(.*)"
OnConnectErrorAction=[!SetOption MeterPrice1 Text "Error obtaining data from binance!"]


[MeasurePrice1]
Measure=WebParser
URL=[MeasureBinancePriceData1]
StringIndex=2
IfAboveValue=#LastPriceTradeSymbol1#
IfAboveAction=[!SetOption MeterPrice1 FontColor #UpCol#][!SetOption MeterArrow1 ImageTint #UpCol#][!SetOption MeterPrice1 Text ""][!SetOption MeterArrow1 ImageRotate 180][!SetVariable LastPriceTradeSymbol1 [MeasurePrice1]]
IfBelowValue=#LastPriceTradeSymbol1#
IfBelowAction=[!SetOption MeterPrice1 FontColor #DownCol#][!SetOption MeterArrow1 ImageTint #DownCol#][!SetOption MeterPrice1 Text ""][!SetOption MeterArrow1 ImageRotate 0][!SetVariable LastPriceTradeSymbol1 [MeasurePrice1]]
DynamicVariables=1
OnConnectErrorAction=[!SetOption MeterPrice1 Text "Error obtaining data from binance!"]
;Truncation
RegExpSubstitute=1
Substitute="(.*\.\d{3})\d*":"\1"

;---------- BINANCE API TRADESYMBOL 2 ----------
[MeasureBinancePriceData2]
Measure=WebParser
URL=https://api.binance.com/api/v3/ticker/24hr?symbol=#TradeSymbol2#
UpdateRate=62
RegExp=(?siU)"priceChangePercent":"(.*)","weightedAvgPrice":".*","prevClosePrice":".*","lastPrice":"(.*)"
OnConnectErrorAction=[!SetOption MeterPrice2 Text "Error obtaining data from binance!"]


[MeasurePrice2]
Measure=WebParser
URL=[MeasureBinancePriceData2]
StringIndex=2
IfAboveValue=#LastPriceTradeSymbol2#
IfAboveAction=[!SetOption MeterPrice2 FontColor #UpCol#][!SetOption MeterArrow2 ImageTint #UpCol#][!SetOption MeterPrice2 Text ""][!SetOption MeterArrow2 ImageRotate 180][!SetVariable LastPriceTradeSymbol2 [MeasurePrice2]]
IfBelowValue=#LastPriceTradeSymbol2#
IfBelowAction=[!SetOption MeterPrice2 FontColor #DownCol#][!SetOption MeterArrow2 ImageTint #DownCol#][!SetOption MeterPrice2 Text ""][!SetOption MeterArrow2 ImageRotate 0][!SetVariable LastPriceTradeSymbol2 [MeasurePrice2]]
DynamicVariables=1
OnConnectErrorAction=[!SetOption MeterPrice2 Text "Error obtaining data from binance!"]
RegExpSubstitute=1
Substitute="(.*\.\d{3})\d*":"\1"


;---------- METER 1 ----------


[MeterSymbolLabel1]
Meter=String
Text=BTC
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=10
X=280
Y=2

[MeterPrice1]
Meter=String
Text=Getting Price...
MeasureName=MeasurePrice1
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=10
FontWeight=700
DynamicVariables=1
X=324
Y=2

;---------- METER 2 ----------

[MeterSymbolLabel2]
DynamicVariables=1
Meter=String
Text=#TradeSymbol2#
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=10
X=280
Y=19

[MeterPrice2]
Meter=String
Text=Getting Price...
MeasureName=MeasurePrice2
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=10
FontWeight=700
NumOfDecimals=2
DynamicVariables=1
X=346
Y=19
How do I change the text size?
User avatar
tass_co
Posts: 517
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: Crypto Skins not working

Post by tass_co »

Zan wrote: January 15th, 2024, 9:53 am Thank you!

How do I change the text size?
I edited your code. I think the problem was because DynamicVariables=1 was not added.
If you want to change the text size, do so by changing the TextSize2 value in Variables. To change the parity font size, change the TextSize1 value.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1


[Variables]
;---------- TRADE SYMBOL ---------- 
TradeSymbol2=USDTTRY
TradeSymbol1=BTCUSDT 

;---------- TEXT ----------
TextFace=Product Sans
TextCol=255,255,255
TextSize1=10
TextSize2=10
TextSpacing=15

;---------- PRICE ----------
;COLOUR USED IF PRICE IS UP FROM LAST PRICE
UpCol=0,255,0           
;COLOUR USED IF PRICE IS DOWN FROM LAST PRICE
DownCol=255,0,0

;---------- PERCENTAGE CHANGE ----------
;0=VISIBLE, 1=HIDDEN
PercentageEnabled=0
;THE SIZE OF THE PERCENTAGE TEXT, BY DEFAULT HALF OF TEXT SIZE
PercentageTextSize=(#TextSize# * 0.5)

;---------- BINANCE API TRADESYMBOL 1 ----------
[MeasureBinancePriceData1]
Measure=WebParser
URL=https://api.binance.me/api/v3/ticker/24hr?symbol=#TradeSymbol1#
UpdateRate=62
RegExp=(?siU)"priceChangePercent":"(.*)","weightedAvgPrice":".*","prevClosePrice":".*","lastPrice":"(.*)"
OnConnectErrorAction=[!SetOption MeterPrice1 Text "Error obtaining data from binance!"]


[MeasurePrice1]
Measure=WebParser
URL=[MeasureBinancePriceData1]
StringIndex=2
IfAboveValue=#LastPriceTradeSymbol1#
IfAboveAction=[!SetOption MeterPrice1 FontColor #UpCol#][!SetOption MeterArrow1 ImageTint #UpCol#][!SetOption MeterPrice1 Text ""][!SetOption MeterArrow1 ImageRotate 180][!SetVariable LastPriceTradeSymbol1 [MeasurePrice1]]
IfBelowValue=#LastPriceTradeSymbol1#
IfBelowAction=[!SetOption MeterPrice1 FontColor #DownCol#][!SetOption MeterArrow1 ImageTint #DownCol#][!SetOption MeterPrice1 Text ""][!SetOption MeterArrow1 ImageRotate 0][!SetVariable LastPriceTradeSymbol1 [MeasurePrice1]]
DynamicVariables=1
OnConnectErrorAction=[!SetOption MeterPrice1 Text "Error obtaining data from binance!"]
;Truncation
RegExpSubstitute=1
Substitute="(.*\.\d{3})\d*":"\1"

;---------- BINANCE API TRADESYMBOL 2 ----------
[MeasureBinancePriceData2]
Measure=WebParser
URL=https://api.binance.com/api/v3/ticker/24hr?symbol=#TradeSymbol2#
UpdateRate=62
RegExp=(?siU)"priceChangePercent":"(.*)","weightedAvgPrice":".*","prevClosePrice":".*","lastPrice":"(.*)"
OnConnectErrorAction=[!SetOption MeterPrice2 Text "Error obtaining data from binance!"]


[MeasurePrice2]
Measure=WebParser
URL=[MeasureBinancePriceData2]
StringIndex=2
IfAboveValue=#LastPriceTradeSymbol2#
IfAboveAction=[!SetOption MeterPrice2 FontColor #UpCol#][!SetOption MeterArrow2 ImageTint #UpCol#][!SetOption MeterPrice2 Text ""][!SetOption MeterArrow2 ImageRotate 180][!SetVariable LastPriceTradeSymbol2 [MeasurePrice2]]
IfBelowValue=#LastPriceTradeSymbol2#
IfBelowAction=[!SetOption MeterPrice2 FontColor #DownCol#][!SetOption MeterArrow2 ImageTint #DownCol#][!SetOption MeterPrice2 Text ""][!SetOption MeterArrow2 ImageRotate 0][!SetVariable LastPriceTradeSymbol2 [MeasurePrice2]]
DynamicVariables=1
OnConnectErrorAction=[!SetOption MeterPrice2 Text "Error obtaining data from binance!"]
RegExpSubstitute=1
Substitute="(.*\.\d{3})\d*":"\1"


;---------- METER 1 ----------


[MeterSymbolLabel1]
Meter=String
Text=BTC
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=#TextSize1#
DynamicVariables=1
X=280
Y=2

[MeterPrice1]
Meter=String
Text=Getting Price...
MeasureName=MeasurePrice1
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=#TextSize2#
DynamicVariables=1
X=324
Y=2

;---------- METER 2 ----------

[MeterSymbolLabel2]
Meter=String
Text=#TradeSymbol2#
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
FontSize=#TextSize1#
DynamicVariables=1
X=280
Y=19

[MeterPrice2]
Meter=String
Text=Getting Price...
MeasureName=MeasurePrice2
AntiAlias=1
FontFace=Arial
FontColor=#TextCol#
NumOfDecimals=2
FontSize=#TextSize2#
DynamicVariables=1
X=346
Y=19
PS:By the way, I'm asking out of curiosity. Are you Turk?
I don't know where i going from here, but i promise it won't be boring... :great:
Zan
Posts: 4
Joined: January 14th, 2024, 8:49 pm

Re: Crypto Skins not working

Post by Zan »

tass_co wrote: January 15th, 2024, 10:54 am I edited your code. I think the problem was because DynamicVariables=1 was not added.
If you want to change the text size, do so by changing the TextSize2 value in Variables. To change the parity font size, change the TextSize1 value.


PS:By the way, I'm asking out of curiosity. Are you Turk?


Thank you so much for your help!
No, I'm not a Turk