Hi guys, my BTC ticker stopped working the other day and I cannot see why. The code I'm using is very similar to what's posted here, but I've modified to for visual changes. It seems like the ticker is not working, so I copied the same code listed here and override the code I have, just to make sure I did mess anything up, and the code here doesn't work either.
Where do I start to try and track down why my code and the code listed in this thread are not working?
It is currently June 10th, 2023, 4:47 am
Simple Bitcoin Tracker
-
- Posts: 3
- Joined: August 15th, 2022, 5:12 pm
-
- Posts: 454
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Simple Bitcoin Tracker
Can you share your current code. Let's see what causes the problemaakrusen wrote: ↑August 15th, 2022, 5:17 pm Hi guys, my BTC ticker stopped working the other day and I cannot see why. The code I'm using is very similar to what's posted here, but I've modified to for visual changes. It seems like the ticker is not working, so I copied the same code listed here and override the code I have, just to make sure I did mess anything up, and the code here doesn't work either.
Where do I start to try and track down why my code and the code listed in this thread are not working?

I don't know where i going from here, but i promise it won't be boring... 

-
- Posts: 3
- Joined: August 15th, 2022, 5:12 pm
Re: Simple Bitcoin Tracker
Can do!
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
MiddleMouseUpAction=[!RefreshApp]
[Metadata]
Name=Simple Bitcoin Tracker
Author=Deofol
Version=1.0
License=GPLv3
Information=Shows ongoing rate for the USD/BTC pair, max and min 24 hour values.
[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
Seconds=10
; Set how many seconds should each update take
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------
[MeasureParent]
Measure=WebParser
UpdateRate=#Seconds#
URL=https://www.bitstamp.net/api/ticker/
RegExp=(?siU)"last":\s*"(.*)".*"bid":\s*"(.*)".*high":\s*"(.*)".*low":\s*"(.*)"
[MeasurePrice]
Measure=WebParser
URL=[MeasureParent]
StringIndex=2
[MeasureLast]
Measure=WebParser
URL=[MeasureParent]
StringIndex=1
[MeasureLow]
Measure=WebParser
URL=[MeasureParent]
StringIndex=4
[MeasureHigh]
Measure=WebParser
URL=[MeasureParent]
StringIndex=3
; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------
[styleTitle]
StringAlign=CENTER
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1
[styleLeftText]
StringAlign=LEFT
; Meters using styleLeftText will be left-aligned.
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleRightText]
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15
; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------
[GraphBG]
Meter=Shape
Shape=Rectangle 0,0,195,65,5 | Fill Color 0,0,0,100 | StrokeWidth 1 | Stroke Color 255,255,255,80
; The style, shape, color, and radius corners of the box surrounding the data.
[meterTitle]
Meter=STRING
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=95
Y=5
W=190
H=18
Text="Bitcoin"
[MeterPrice]
Meter=String
MeasureName=MeasurePrice
X=190
Y=20
FontSize=10
FontColor=255,102,0,255
; Blaze Orange color is 255,102,0,255.
; White color is 255,255,255,255.
InlineSetting=Face | Roboto-Bold
StringAlign=Right
StringStyle=Bold
AntiAlias=1
; This is the current price of BTC in US currency.
[CurrencyText]
Meter=String
Text=USD - BTC
StringAlign=Center
StringStyle=Bold
X=162
Y=40
FontSize=8
FontColor=255,255,255,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The text below the current price.
[CurrencySymbol]
Meter=String
Text=$
StringAlign=Center
StringStyle=Bold
X=110
Y=20
FontSize=10
FontColor=255,102,0,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The money symbol in front of the current price.
[24HrHighPrice]
Meter=String
Text=24 Hr High
StringAlign=Left
StringStyle=Bold
X=3
Y=20
FontSize=6
FontColor=255,255,255,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The highest price over last 24 hours.
[HighText]
Meter=String
MeasureName=MeasureHigh
StringAlign=Left
X=3
Y=28
FontSize=8
FontColor=0,255,0,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The highest price it has been for a the last 24hr (still figureing that out).
[24HrLowPrice]
Meter=String
Text=24 Hr Low
StringAlign=Left
StringStyle=Bold
X=3
Y=40
FontSize=6
FontColor=255,255,255,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The lowest price over last 24 hours.
[LowText]
Meter=String
MeasureName=MeasureLow
StringAlign=Left
X=3
Y=48
FontSize=8
FontColor=255,0,0,255
InlineSetting=Face | Roboto-Bold
AntiAlias=1
; The lowerest price it has been for the last 24hr (still figureing that out).
Last edited by Brian on August 16th, 2022, 5:08 am, edited 1 time in total.
Reason: Please use [code] tags. It's the </> button. Thanks.
Reason: Please use [code] tags. It's the </> button. Thanks.
-
- Posts: 454
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Simple Bitcoin Tracker
The problem was caused by changing the sorting places in the incoming data.
Can you change the RegExp code below and try again?
Code: Select all
[MeasureParent]
.
.
.
RegExp=(?siU).*"high".*"(.*)".*"last".*"(.*)".*"bid".*"(.*)".*"low".*"(.*)"

I don't know where i going from here, but i promise it won't be boring... 

-
- Posts: 3
- Joined: August 15th, 2022, 5:12 pm
Re: Simple Bitcoin Tracker
Thanks for finding the error. I haven't touch the code since I set it up a long time ago, I'm wondering if Bitstamp changed the RegExp order and that's why it wasn't working?
Also, thanks for the heads up on the Code-Display thing. I'm new enough to this stuff that I didn't know how to post it in that manner, but I should be able to do it correctly next time!
Also, thanks for the heads up on the Code-Display thing. I'm new enough to this stuff that I didn't know how to post it in that manner, but I should be able to do it correctly next time!

-
- Posts: 454
- Joined: May 4th, 2020, 3:01 pm
- Location: Ankara, TURKEY
Re: Simple Bitcoin Tracker
Yes, the data from Bitstamp has changed.
Sorting on old incoming data: "last,bid,high,low"
RegExp was giving an error because the sorting in the new data was:"high, last, bid, low".

You do not have the required permissions to view the files attached to this post.
I don't know where i going from here, but i promise it won't be boring... 

-
- Posts: 1
- Joined: December 20th, 2022, 1:08 pm
Re: Simple Bitcoin Tracker
I'm having some trouble with my Bitcoin Tracker too.I've tried a few things already, but I'm still having issues. I'm wondering if anyone has any suggestions or has encountered a similar problem. I'm considering checking for updates or changes to the API that I'm using to pull the data for my tracker.The Moon Bitcoin website (https://www.moonbitcoins.com/dashboard) is another resource that I'm considering using to see if I can find any useful information or tools for troubleshooting my tracker.I'm hoping someone might have some ideas or suggestions that can help me. Thanks!
Last edited by DeniroJason on January 3rd, 2023, 9:43 am, edited 1 time in total.
-
- Rainmeter Sage
- Posts: 5104
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Simple Bitcoin Tracker
"Some trouble" doesn't tell us much... Can you add a detailed description of what "troubles" you are having?DeniroJason wrote: ↑December 27th, 2022, 6:38 pm I'm having some trouble with my Bitcoin Tracker too.I've tried a few things already, but I'm still having issues. I'm wondering if anyone has any suggestions or has encountered a similar problem.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::