Skip to content
View Machariarobert's full-sized avatar

Block or report Machariarobert

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Machariarobert/README.md
Typing SVG

The problem I work on

A trading bot in a browser tab is a bot with a fatal flaw: it dies when the tab does. Close the laptop, drop the Wi-Fi, let the machine sleep — the strategy stops mid-position and nobody finds out until the loss shows up.

So I moved the engine to the server.

The browser hands off its OAuth material and the server opens its own authorized WebSocket to the broker, running the identical strategy loop. Closing the tab, sleeping the machine, losing the connection — none of it matters any more. Only pressing Stop stops it.


What that actually takes

A bot nobody watches has nobody to notice it went quiet.

Every way the loop can stall has to be self-detected, because the two worst stalls raise no error at all — from the outside they look identical to "the condition was met and nothing traded."

So the engine watchdogs itself every 15 seconds.

The failure modes that taught me this:

Dead tick stream — a subscription dies while the socket beneath it still answers pings

Half-open TCPws reports OPEN forever and fires no close event

Stalled settlement — one lost settlement silently blocks every future signal

How each one gets caught
Stall Why it's invisible Detection
Dead tick stream Keepalive can't catch it — the subscription is dead but the connection under it is healthy and answering No ticks for 45s rebuilds the connection
Half-open TCP readyState stays OPEN indefinitely, no close event ever fires Nothing back for 70s means dead, full stop
Stalled settlement The in-flight lock blocks every later signal, so trading ends without an error Re-query the contract directly; write it off past 10 min

Transient vs. genuine rejections. A RateLimit backs off and carries on. An InsufficientBalance stops, because it will repeat identically. Conflating the two once killed live sessions on their first network blip — a bot on 1-tick contracts signals twice a second and burns any fixed retry budget long before a rate limit clears.

Strategy definitions are shared, not copied. The server imports the same catalogue the browser does, so a bot cannot trade one rule on screen and a different one in production.


Selected work

Visual trading-bot platform

Drag-and-drop strategy building in Blockly, compiled to a live execution engine — no code required from the trader. Server-side execution mode, self-healing WebSocket transport, and a simulated ledger that mirrors the real path exactly, with the buy removed.

React 18 TypeScript MobX Blockly Express Prisma

Also building

Client management — Next.js, Prisma, copy-trading token flows

Signals tooling — real-time market signal components

Trading dashboards — chart adapters over live tick streams


Stack

Tech stack

TypeScript React MobX Blockly WebSockets Node Prisma PostgreSQL Jest


Currently

Popular repositories Loading

  1. Machariarobert Machariarobert Public

    Config files for my GitHub profile.

  2. Anslysistool Anslysistool Public

    1

  3. evenodd evenodd Public

    JavaScript 4

  4. Deriv Deriv Public

  5. Xml Xml Public

  6. Bubble-Plugin-disable-text-highlight Bubble-Plugin-disable-text-highlight Public

    This is a repository based on the Bubble plugin 'disable text highlight' (https://bubble.io).

    HTML