The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

New Bitcoin Bot

Graybeard

Well-Known Member
I started a Bitcoin Bot
I wrote the first code last night to stealth scrape a website (unnamed) at random time intervals for the price.


Here's the 'right way' cron every 5 min then random timed
Code:
# m h  dom mon dow   command
*/5 * * * * sleep `numrandom /0..10/`m ; (cd /home/user/path/path/GBTC_BTC;./bitcoin_script.sh)  > /dev/null 2>&1

result (the date time is AM/PM) to match the GBTC stock file from my broker by the AM/PM time values.

btc-gbtc-bot-file.jpg


The last column is the 'theoretical or control' GBTC price 0.0008355

The objective is to trend the GBTC
and see if the dog is wagging the tail or the tail is wagging the dog :D
or --how is Bitcoin (or GBTC) being manipulated and possibly the why motivations?
1628945847820.png

Bash:
tail -n1  $FILE|awk 'BEGIN {FS=OFS=","} {print  $1*0.0008355}' >>$FILE

this the rough chart I got overnight in about 8 hrs~
looks like BTC leaped off a cliff (again) :D
btc-gbtc-chart-08-14-2021.jpg


Won't be able to compare the BTC/GBTC price ratios until the market is open next week ...
 
Banged my head against the desk all day :D o_O :rolleyes:

  • Now I have 2 files from different sources with the epoch timestamp being the match
  • to join the tables to develop the algorithm that may (or may not ) work
  • to predict the movement ratios between BTC and the GBTC stock trust.

The goal here is to pick the brains of the many traders of GBTC and their reaction to the movements of Bitcoin.

My hypothesis is the assumption that there are no underlying fundamentals and the gobly-goop of the digital currency sites is all smoke and mirrors.
But people are buying and selling for some reason and there is money to be made in their actions, irrational as they may be :D

This will take a few weeks to build out enough data. Unlike CPA --the data is free and the GBTC part is 100% accurate from the stock exchange. The Bitcoin part can be manipulated as f-k --it doesn't matter really
--it is the emotional trigger of the traders that their tactics are based on.

epoch-GBPT.jpg

^my scrape
epoch-to-GBPT.jpg

NASDAQ Pink Sheet SEC requlated data
epoch,timestamp,open,high,low,close,volume <by the minute by the trading day 9:30 AM (09:30) to 4:00 PM (16:00)
 
Well OK ...
chicken-dinner1.jpg


Last night's chart (flat area is a website error --scraping has its own issues you cannot resolve :p)
btc-gbtc-chart0006-2021-Aug-17-23:54.jpg


Stock market closed down:

btc-gbtc-bot-file_47000--stock-market-down-big-8-17-430.jpg

Note the down point at yesterday's stock market close --seems news driven --again nothing to do with fundementals (that are all smoke and mirrors IMO)
 
Last edited:
How today began and ended...


btc-gbtc-chart000-2021-Aug-18-07:54.jpg


and this evening R2 =1.000 is dead on. Nearest value to 1.000 wins (but not hardly absolute)

btc-gbtc-chart0008-2021-Aug-18-18:54.jpg


Real world; Stock markets down in US and Europe again . Delta COVID Variant rages. 1,000 dead in the US yesterday in the pandemic.

US markets are particularly bad:
1629330317939.png


I expect from these charts to see a price range between the polynomial and Log fit trend lines; up slightly tomorrow morning --but who knows --this is not exactly rocket science :p
 
What happens when you are developing any program --bad planning :D:D:D
Either that or you procrastinate for months or years to consider every possible path to glory ... :rolleyes:
I do and fix and ladder the stuff that works --because as you go --you see opportunities to fix or improve always.
To that end:

Bash:
#!/bin/bash 
#-vx
#/home/barry/path/path-path/GBTC_BTC/fix_format.sh
#  ./fix_format.sh
################################################################
FILE=btcpricetimeFix.csv
cat $FILE | while read line
do

TIMESTAMP=$(echo $line|cut -d, -f2)
FORMAT=$(echo `date -d  "$TIMESTAMP" "+%s"`)
MODLINE=$(echo $line |awk -v awkvar=$FORMAT 'BEGIN {FS=OFS=","} {print  $1,awkvar,$2,$3}' )

echo $MODLINE >>bitbotFix.csv
#sleep 1.5
done
The bash (sh) script makes this:
47549.332,2021-08-13 10:15:00 PM,39.7275
into this added (inserted with that awk code) column (in a new file)
47549.332,1628907300,2021-08-13 10:15:00 PM,39.7275

1628907300 the epoch (seconds from 1970-01-01 [the epoch of the first computer]) timestamp that is needed to normalize the 2 data files to be loaded into my database.GBTC and database.BTC --that number is the JOIN (or index) between the 2 tables to develop an aglorithm that MAY work :D -->> TBD later

How Bitcoin was moving --why IDK --guess :D
I forgot to save the new chart date --f-k it we are prototyping anyway :p
should read: BTC Price 08:25 Aug 19 2021
fixed :p
btc-gbtc-chart0003-2021-Aug-19-08:25.jpg
 
I fixed the bot file, and made the BTC (bot) table in the database
first JOIN ON t1.epoch=t2.epoch results:

The Algorithm is in the Ratio (somewhere) -- I only have too few matching dataponts to draw any conclusion

This may seem irrelevant to CPA but this, but at its core, it is statistics, and statistics is how things are properly optimized.

html-mysql-ratios-0001.jpg
 
Added more GBTC Stock Trust Data and grouped this week's ratios --counter intuitive somewhat
weeks-range-ratio-sort-pe-20210820.jpg

Need more data
nostalgia love GIF


The last column is the 'theoretical or control' GBTC price 0.0008355

Bash:
tail -n1  $FILE|awk 'BEGIN {FS=OFS=","} {print  $1*0.0008}' >>$FILE

Yesterday as a ''best guess'' I changed my price estimate formula --seems real close --good guess --but that is a static ''control price'' TBD in the algorithm.
 
Last edited:
First low ball order based on the data above ;)
1629476046338.png


WARNING WILL ROBERTSON! Pink sheet security trade (the shit may hit the fans) :D
btc-gbtc-bot-first-low-ball-order-8-20-2021.jpg


Well, so far heading the wrong way :( welcome to wall street

1629474604634.png


Bot says:

1629474770604.png


update 14:00
BTC didn't dip _>GBTC didn't dip -> limit order timed out
1629482675031.png


Have a nice weekend :)
 
Last edited:
What are weekends for during the hot summer during a pandemic --stay cool inside and recap your data :p

to that end;
woke up in the middle of the night and decided to look at the bot and have a snack...
BTC to the Moon! LMAO
lchart-4am20210820.jpg

Well, you can see the are within the trend lines (for now) until we are not :p

lchart-1:36pm20210820.jpg


The irrationality of the ratios between BTC and the GBTC Trust 'stonk' are perplexing. My working theory is that both the news flow and the stock market index are influencing this ratio's background noise? Time to fire up the sentometer bot and scrape the news for the positive/negatives and add a new database.table. Adding the ^RUT (Russel 2000) stock index (2000 share issuers current prices) an use that %± to adjust my bot's trade price ;)
irrational-btc|gbtc.jpg


You can see the irrational (or look like irrational prices) in the chart above ^^^


last20210820-medians.jpg


So, I had to figure out what I wanted to see ;)o_O


so after a few hours of head-banging (isn't programming fun) we have the actual results > the epoch time when I reset the estimated (AVGestLastsale_BTC) column
Yea! Clapping
Now I will watch a movie ... done with this 'till Monday
correctedAVGs.jpg

*correction **the 2 ratios col1 GBTC and col2 BTC :D close enough for rocket scientists :D
 
Last edited:
Now let's add XLM (Stellar)
Bash:
XLM/path/$ /snap/bin/curl -L  -A "(Mozilla/5.0)" "https://xxxxxxx/xxxxx/XLM-USD" >xlmpage% Total    % Received % Xferd  Average Speed   Time
    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100  748k    0  748k    0     0   615k      0 --:--:--  0:00:01 --:--:--  616k
XLM/path/$ sed -e 's/<[^>]*>//g' xlmpage| sed -e 's/Add to watchlist/\n**/g ' \
-e 's/As of/\n**\n\n/g' -e 's/USD\*\*/USD\n**/'|grep '^\*\*[0-9]' |sed -e 's/**//' >XLMtest

#>>returns> XLMtest = 0.367837-0.007510 (-2.00%)


XLM/path/$ cut -c1-8  XLMtest
#>>returns>
0.367837
XLM/path/$ cut -c9-17  XLMtest
#>>returns>
-0.007510
\ (line break) so you can read my spaghetti code :D

I like XLM because it is intended for internet payment wallets but has been volatile and is good for short term speculation maybe.
 
Last edited:

Bitcoin is so full of mindless propaganda :D

AMZN-log-chart.jpeg


My "chart of the day" > Time was about 14:00 1 PM didn't save right?

chart-12:54PM.jpg


LOL right, just an anomaly :rofl
Expand this to years of BTC --it would only look worse. Is Guru Raoul Pal really Guru Paid Shill :D

**added> see what I mean?

place-your-BTC-bets.jpg



Shorter term >
place-your-2231BTC-bets.jpg
 
Last edited:
Stock Market Moon GIF


BTC breaks 50,000 !!!:rolleyes:

Sad Black Friday GIF by Jon Frickey


======================================
Up and Up^ LOL until crash down time --this game is all about trading on volatility.

chart-7:30PM20210823.jpg


Rocket ship is back on it's trend course (for now) :D

chart-09:59AM20210823.jpg


The XLM bot-proto shows a nice 4.7% gain since late last night --better that BTC
the amount is a Lot of 1000 XLM coins
xlm-proto-up-2021-08-23.jpg


I may make a GBTC play again on the dip ...

TY for coming to my TED Talk /s :D
 
Game on!
taking another small stab and grab attempt at GBTC :D
Danger Will Robertson --Danger Will Robertson!!!
Walter White Danger GIF by Breaking Bad

order-2021-08-23_10:47am.jpg



chump change really ... but this is just a trial ...

order-conf-2021-08-23_10:47am.jpg


Not so sure --price is changing (@_@)
order-replace-2021-08-23_11:07am.jpg


scale=4
39.87/40.50
.9844


Well, I am still under the quote a bit

**UPDATE
I had to lower the bid twice now ---BTC is declining (new day same shit)

order-replace-2021-08-23_12:22pm.jpg

>>> price was falling too fast --look for the dip that doesn't become a total rout.
1629737489994.png

order closed (for now)
 
Last edited:
MI
Back