Commit Graph

19 Commits

Author SHA1 Message Date
King_DuckZ 5aef83f4e8 Send heartbeat to bitcoinity to keep the connection alive
Thanks to blueagain for figuring this out.
This allows for long queries to bitcoinity to not fail
when the requested exchange/currency pair is not received
quickly enough
2022-05-15 01:44:21 +02:00
King_DuckZ 5fd772b302 Improve BitcoinityReader.
It sends a pong message back, but I'm not sure it's
having an effect
2022-05-15 00:50:39 +02:00
King_DuckZ b3b77d5cad Add timestamp to TickerPrice
It's almost always 0, it's only filled when bitcoinity
replies with a "trade" data, other jsons don't give any
time stamps
2022-05-14 22:49:01 +02:00
King_DuckZ 1aed72ded4 Version bump to 0.1.1 2022-05-14 20:03:34 +02:00
King_DuckZ 27a5f00ea4 More tweaks to the install target
When you code, you should probably configure with
-Dscript_path=$HOME/your/code/dir, and doing this
now prevents the script files from being copied over
to the install dir. This is correct because in this
case source dir == dest dir.
If you want to really install the program, you
should set script_path to a relative path or a
different directory than the source. For example
-Dscript_path=duckticker/script. ninja install will
copy the script files to the install directory in
this case.

Note that the path to the script directory that
gets compiled into the binary is an absolute path
in either case. This means that "roaming app" mode
is not currently supported. The reason for this is
that I need code to detect the binary directory so
that relative script paths can work, but I don't have
that code right now.
2022-05-14 20:02:34 +02:00
King_DuckZ 8ce0e362bb Messing around with --datadir, cleaning meson.build a bit
To run the binary while debugging you should now configure
with -Dscript_path=$HOME/your/source/dir
2022-05-14 19:33:22 +02:00
King_DuckZ 1090ea8295 Add meson options for user agent and script path 2022-05-14 19:13:10 +02:00
King_DuckZ 18e5317baf Move code out of main.cpp 2022-05-14 18:23:58 +02:00
King_DuckZ 418d0af70f Use new ClassManager 2022-05-14 17:09:56 +02:00
King_DuckZ ccd15301af More info in the comment 2022-05-14 08:06:38 +02:00
King_DuckZ a0cfc10fa2 Add thank-you note for blueagain from libera.chat 2022-05-14 08:00:13 +02:00
King_DuckZ 6cbe6ae47f New wren methods ticker_currency() and ticker_exchange() 2022-05-14 07:54:13 +02:00
King_DuckZ 6bd0dbb07e Split out wren code, add a ticker_quick() method 2022-05-14 07:42:34 +02:00
King_DuckZ 4121bb3c74 Small refactoring - pulling things out of main.cpp 2022-05-14 07:07:34 +02:00
King_DuckZ d80908da4e Better comunication with Bitcoinity's websocket
I think I have to send 3 messages to the websocket
to initialise it. In response, it seems to send the last
ticker price reasonably quickly, compared to earlier
when it was just waiting for the next available transaction
before notifying me.
2022-05-14 06:58:49 +02:00
King_DuckZ 2016f19c3d Refactor WebsocketReader into a separate file 2022-05-13 23:46:34 +02:00
King_DuckZ 10fc605078 Meson wrap file for beast, remove git submodule 2022-05-13 23:31:04 +02:00
King_DuckZ 8f2a819ebe Query the websocket to get the correct value for the ticker 2022-05-13 23:11:01 +02:00
King_DuckZ 1d61cc7f2f First implementation
It seems to work but I think the ticker value returned
by the remote call is wrong. Maybe I'm calling the wrong
endpoint ¯\_(ツ)_/¯ I don't know trying to work it out
2022-05-12 23:40:27 +02:00