Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rapax00/bitcoin-ticker-ws-server
A simple WebSocket server to help esp32 projects.
https://github.com/rapax00/bitcoin-ticker-ws-server
arduino bitcoin esp32 websocket
Last synced: 17 days ago
JSON representation
A simple WebSocket server to help esp32 projects.
- Host: GitHub
- URL: https://github.com/rapax00/bitcoin-ticker-ws-server
- Owner: rapax00
- Created: 2024-03-21T04:42:42.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-22T23:49:24.000Z (5 months ago)
- Last Synced: 2024-10-11T02:49:27.025Z (about 1 month ago)
- Topics: arduino, bitcoin, esp32, websocket
- Language: JavaScript
- Homepage: https://bitcoin-ticker-ws-server.vercel.app
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple WebSocket Server
A simple WebSocket server that sends Bitcoin data to the client every 5 seconds.
## Features
Get from [coibase.com](https://docs.cdp.coinbase.com/prime/docs/websocket-feed/):
> API WebSocket connection.
- Bitcoin Price
Get from [mempool.space](https://mempool.space/docs/api/rest):
> API REST connection.
- Last block hegith
- Medium fee## Setup
1. Use the Node.js version specified in the `.nvmrc` file. (Install it if you don't have it installed yet.)
```bash
nvm use
```2. Install the dependencies.
```bash
pnpm install
```3. Run the server.
```bash
pnpm dev
```## Conection
From your client, connect to the WebSocket server and send a message to subscribe it.
Subscribing message:
```json
{ "action": "want" }
```Responses:
- Successfull message:
```
Subscribte to the WebSocket server!
```- Data every 5 seconds:
```json
{
"lastBlock": ,
"price": ,
"mediumFee":
}
```