On this page

Documentation

What every exchange charges, and how to talk to the engine directly over WebSocket.

Exchange fees

Maker and taker rates by 30-day trading volume. These are the numbers the engine subtracts before it calls an edge executable.

30-day volumeTakerMaker

The highlighted row is the rate the profit calculation assumes. If your 30-day volume puts you on a lower tier, your real edge is wider than what the engine reports.

WebSocket API

Open a secure WebSocket to the engine and stream live book data, cross-exchange comparisons and the platform's order-book feeds. Every frame is JSON.

Endpoint
wss://fluxgeko.com:8000/ws
Protocol
WSS only (TLS) · JSON frames. Plain ws:// is refused.
Auth
None — public, no account or cookie needed

Connect, stream, stop, close

Always connect with wss://. On connect the server sends a welcome frame with your client_id. To finish cleanly: send one Unsubscribe for each stream you started (one per task — AllTasks does not stop them), then close the socket with code 1000. Closing ends every stream on the server and clears the session, so a dropped connection never leaves anything running.

Steps

1
Open wss://fluxgeko.com:8000/ws and wait for "Connection successful".
2
Send one or more request frames (Subscribe, Compare, …).
3
Read frames; route on exchange, instrument and the key inside data.
4
Send Unsubscribe with the matching task for each stream.
5
Close with ws.close(1000).
example · JavaScript
const ws = new WebSocket("wss://fluxgeko.com:8000/ws");
const book = { channel: "Book", type: "Quote" };

ws.onopen = () => {
  ws.send(JSON.stringify({
    event: "Subscribe", exchange: "Binance",
    pairs: [{ instrument: "BTC/USDT" }, { instrument: "ETH/USDT" }],
    ...book,
  }));
};

ws.onmessage = (frame) => {
  const msg = JSON.parse(frame.data);
  if (msg.type === "error") console.error(msg.message);
  else if (msg.instrument) console.log(msg.exchange, msg.instrument, msg.data);
};

// Stop the stream, then close the connection cleanly.
function stop() {
  ws.send(JSON.stringify({ event: "Unsubscribe", ...book, task: "Subscribe" }));
  ws.close(1000, "done");
}
setTimeout(stop, 10000);

ws.onclose = (e) => console.log("closed", e.code);

Parameters

Every event frame is built from this vocabulary. Values outside these sets are rejected. Names and values are case-sensitive.

event
The action to perform. enumsee the six values opposite
pairs
Instruments to watch. Each entry carries an instrument field. arrayone or more pairs from the venue list below — one pair or many in the same request
exchange
Which venues to include. enumBinance, CoinBase, Kraken, BybitSpot, or All (Compare and the platform feeds; not Subscribe). Case-sensitive: CoinBase, not Coinbase.
channel
Data channel. enumBook
type
Data type. enumQuote
threshold
Required by MarketImbalance (spread_threshold for SpreadAlert, large_order_threshold for LargeOrderAlert). Accepted but not applied yet — see the platform-feed note. numberpositive or negative
side
Book side. enumbid, ask
action
Send Add to start the rule. To stop it, send Unsubscribe with the matching task. enumAdd
task
What Unsubscribe stops. enumSubscribe, Compare, MarketImbalanceVolume, SpreadAlert, LargeOrderAlert
enum · event
"Subscribe"
"Compare"
"MarketImbalance"
"SpreadAlert"
"LargeOrderAlert"
"Unsubscribe"
array · pairs
"BTC/USDT"  "ETH/USDT"  "SOL/USDT"
"XRP/USDT"  "ADA/USDT"  "ATOM/USDT"
… full list per venue below

Instruments by exchange

Use the exact symbol, with the slash. A pair a venue does not list returns no data and no error.

Exchange (exchange)Pairs (instrument)
BinanceBTC/USDT, ETH/USDT, SOL/USDT, XRP/USDT, ADA/USDT, AVAX/USDT, DOT/USDT, LINK/USDT, LTC/USDT, BCH/USDT, ATOM/USDT, ALGO/USDT, MANA/USDT, BCH/JPY, LINK/JPY, LTC/EUR
CoinBaseBTC/USDT, ETH/USDT, SOL/USDT, XRP/USDT, ADA/USDT, ATOM/USDT
KrakenBTC/USDT, ETH/USDT, SOL/USDT, XRP/USDT, ADA/USDT, AVAX/USDT, DOT/USDT, LINK/USDT, LTC/USDT, BCH/USDT, ATOM/USDT, ALGO/USDT, MANA/USDT, LTC/EUR
BybitSpotBTC/USDT, ETH/USDT, SOL/USDT, XRP/USDT, ADA/USDT, AVAX/USDT, DOT/USDT, LINK/USDT, LTC/USDT, BCH/USDT, ATOM/USDT, ALGO/USDT, MANA/USDT

Events

Subscribe

client → server

Streams live best bid and ask for one or more pairs on one exchange. Send one request per exchange; All is not accepted here — use Compare to see every venue at once. Stop with Unsubscribe, task: "Subscribe".

Parameters

event
"Subscribe"
exchange
One of Binance, CoinBase, Kraken, BybitSpot.
pairs
One pair, or several in the same request, each with an instrument field. See Instruments by exchange.
channel
Data channel to subscribe to.
type
Type of data to subscribe to.
request
{
  "event": "Subscribe",
  "exchange": "Binance",
  "pairs": [
    { "instrument": "BTC/USDT" }
  ],
  "channel": "Book",
  "type": "Quote"
}
request · several pairs
{
  "event": "Subscribe",
  "exchange": "Kraken",
  "pairs": [
    { "instrument": "BTC/USDT" },
    { "instrument": "ETH/USDT" },
    { "instrument": "SOL/USDT" }
  ],
  "channel": "Book",
  "type": "Quote"
}
response · one frame per update
{
  "exchange": "Binance",
  "product_type": "Quote",
  "instrument": "BTC/USDT",
  "data": { "AggregatedQuotes": {
    "aggregated_quotes_info": {
      "Bid": { "tick": [ { "price": 74612.58, "quantity": 2.41854, "side": "bid" } ] },
      "Ask": { "tick": [ { "price": 74612.59, "quantity": 0.81200, "side": "ask" } ] }
    } } }
}

Compare

client → server

Streams the best bid and best ask across all exchanges, so you can see where the edge sits before routing anything. The stream currently covers every instrument, not only the pair in the request — read the instrument field of each frame. Stop with task: "Compare".

Parameters

event
"Compare"
exchange
Exchanges to include in the comparison.
pairs
Trading pairs to compare, each with an instrument field.
channel
Data channel for the comparison.
type
Type of data to compare.
request
{
  "event": "Compare",
  "exchange": "All",
  "pairs": [
    {
      "instrument": "BTC/USDT"
    }
  ],
  "channel": "Book",
  "type": "Quote"
}

MarketImbalance

client → server

Bid/ask volume imbalance per exchange and pair.

Platform feed. Frames come from the platform's own order-book analysis for every exchange and pair, with the platform's thresholds. The exchange, pairs, side and threshold you send are required but not applied yet — read data.<Event>.exchange and instrument on each frame. Stop with Unsubscribe and the matching task.

Parameters

event
"MarketImbalance"
exchange
Exchanges to include.
pairs
Trading pairs to watch, each with an instrument field.
channel
Data channel.
type
Type of data.
threshold
Level from which imbalance is measured, e.g. 40 or -50.
side
Side of the imbalance.
action
"Add".
request
{
  "event": "MarketImbalance",
  "exchange": "All",
  "pairs": [
    {
      "instrument": "BTC/USDT"
    }
  ],
  "channel": "Book",
  "type": "Quote",
  "threshold": 20,
  "side": "bid",
  "action": "Add"
}

SpreadAlert

client → server

Best bid, best ask and spread per exchange and pair.

Platform feed. Frames come from the platform's own order-book analysis for every exchange and pair, with the platform's thresholds. The exchange, pairs, side and threshold you send are required but not applied yet — read data.<Event>.exchange and instrument on each frame. Stop with Unsubscribe and the matching task.

Parameters

event
"SpreadAlert"
exchange
Exchanges to include.
pairs
Trading pairs to watch, each with an instrument field.
channel
Data channel.
type
Type of data.
spread_threshold
Level from which the spread is measured, e.g. 40 or -50.
action
"Add".
request
{
  "event": "SpreadAlert",
  "exchange": "Kraken",
  "pairs": [
    {
      "instrument": "BTC/USDT"
    }
  ],
  "channel": "Book",
  "type": "Quote",
  "spread_threshold": 20,
  "action": "Add"
}

LargeOrderAlert

client → server

Unusually large resting orders per exchange and pair.

Platform feed. Frames come from the platform's own order-book analysis for every exchange and pair, with the platform's thresholds. The exchange, pairs, side and threshold you send are required but not applied yet — read data.<Event>.exchange and instrument on each frame. Stop with Unsubscribe and the matching task.

Parameters

event
"LargeOrderAlert"
exchange
Exchanges to include.
pairs
Trading pairs to watch, each with an instrument field.
channel
Data channel.
type
Type of data.
large_order_threshold
Order size from which pressure is measured.
side
Side of the pressure.
action
"Add".
request
{
  "event": "LargeOrderAlert",
  "exchange": "Kraken",
  "pairs": [
    {
      "instrument": "BTC/USDT"
    }
  ],
  "channel": "Book",
  "type": "Quote",
  "large_order_threshold": 100000,
  "side": "bid",
  "action": "Add"
}

Unsubscribe

client → server

Stops one running stream — a subscription, Compare, or one of the platform feeds. Send one per stream, then close the connection (Connect & close).

Parameters

event
"Unsubscribe"
channel
Data channel the task runs on.
type
Type of data the task runs on.
task
The stream to stop: Subscribe, Compare, MarketImbalanceVolume, SpreadAlert or LargeOrderAlert. Send one Unsubscribe per stream; to end everything, close the connection.
request
{
  "event": "Unsubscribe",
  "channel": "Book",
  "type": "Quote",
  "task": "MarketImbalanceVolume"
}

Everything above runs inside the app too — charts, alerts, and the execution journal.

Open the live application