API Documentation

Comprehensive guide to our API endpoints

WebSocket Endpoint

Connect to the live data stream.

GET /live

Connection Examples

Java Logo
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.WebSocket;
import java.util.concurrent.CompletionStage;

public class WebSocketClient {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
        WebSocket ws = client.newWebSocketBuilder()
            .buildAsync(URI.create("wss://evo-hub.live/data?pool=pool_name_that_you_want"), new WebSocket.Listener() {
                @Override
                public CompletionStage onText(WebSocket webSocket, CharSequence data, boolean last) {
                    System.out.println("Received: " + data);
                    return WebSocket.Listener.super.onText(webSocket, data, last);
                }
            }).join();
        ws.sendText("Hello Server!", true);
    }
}
PHP Logo
PHP
<?php
$host = 'wss://evo-hub.live/data?pool=pool_name_that_you_want';
$socket = fsockopen('tcp://' . parse_url($host, PHP_URL_HOST), parse_url($host, PHP_URL_PORT) ?: 443);

if ($socket) {
    fwrite($socket, "Hello Server!");
    while (!feof($socket)) {
        echo fgets($socket, 1024);
    }
    fclose($socket);
}
?>
C# Logo
C#
using System;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

class Program {
    static async Task Main(string[] args) {
        using var ws = new ClientWebSocket();
        await ws.ConnectAsync(new Uri("wss://evo-hub.live/data?pool=pool_name_that_you_want"), CancellationToken.None);
        var bytes = Encoding.UTF8.GetBytes("Hello Server!");
        await ws.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Text, true, CancellationToken.None);
        var buffer = new byte[1024];
        var result = await ws.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
        Console.WriteLine("Received: " + Encoding.UTF8.GetString(buffer, 0, result.Count));
    }
}
JavaScript Logo
JavaScript
const socket = new WebSocket('wss://evo-hub.live/data?pool=pool_name_that_you_want');

socket.addEventListener('open', function (event) {
    socket.send('Hello Server!');
});

socket.addEventListener('message', function (event) {
    console.log('Received:', event.data);
});
Rust Logo
Rust
use tokio_tungstenite::connect_async;
use tokio::net::TcpStream;
use url::Url;

#[tokio::main]
async fn main() {
    let url = Url::parse("wss://evo-hub.live/data?pool=pool_name_that_you_want").unwrap();
    let (ws_stream, _) = connect_async(url).await.expect("Failed to connect");
    let (mut write, read) = ws_stream.split();

    write.send(tokio_tungstenite::tungstenite::Message::Text("Hello Server!".into())).await.unwrap();

    read.for_each(|message| async {
        match message {
            Ok(msg) => println!("Received: {}", msg),
            Err(e) => eprintln!("Error: {}", e),
        }
    }).await;
}

[NEW] Subcribe WebSocket Message

Here is an example of a message sent to the WebSocket:


                        {
                            "type": "sub",
                            "tables": ["p63cmvmwagteemoy"]
                        }
                    

[NEW] Subcribe All Tables

Here is an example of a message sent to the WebSocket:


                        {
                            "type": "sub",
                            "tables": []  //empty string
                        }
                    

Sample Data Response

The WebSocket will send an array of response objects as shown below:


                            {
                                "table_id": "o4kylkahpwqqy57w",
                                "game_id": "181c5e53dd2eed51c8c73b78",
                                "payload": "{\"id\":\"1737367297762-7164\",\"type\":\"baccarat.gameState\",\"args\":{\"gameId\":\"181c5e53dd2eed51c8c73b78\",\"gameNumber\":\"10:01:10\",\"betting\":\"BetsClosed\",\"dealing\":\"Finished\",\"isBurning\":false,\"gameData\":{\"playerHand\":{\"cards\":[\"3S\",\"AS\",\"AH\"],\"score\":5},\"bankerHand\":{\"cards\":[\"TC\",\"JD\",\"2D\"],\"score\":2},\"result\":{\"winner\":\"Player\",\"playerScore\":5,\"bankerScore\":2,\"playerPair\":false,\"bankerPair\":false,\"natural\":false},\"winningSpots\":[\"Player\",\"Big\"],\"redEnvelopePayouts\":{\"BankerPair\":18},\"redEnvelopePayouts_v2\":{}},\"cuttingCard\":false,\"version\":1013248168,\"tableId\":\"o4kylkahpwqqy57w\"},\"time\":1737367297762}"
                            }

[ DISABLED ] Get Data by Day

Retrieve data for a specific day.

GET /day?year=2023&month=10&day=1&tableId=your_table_id

Query Parameters:

  • year: integer - The year of the data.
  • month: integer - The month of the data.
  • day: integer - The day of the data.
  • tableId: string - (Optional) The ID of the table.

Sample Response

[
                            {
                                "id": {
                                    "tb": "Cards_Results",
                                    "id": {
                                        "String": "1737099958343-1757"
                                    }
                                },
                                "type": "baccarat.gameState",
                                "args": {
                                    "gameId": "181b6b2fcd6bc7ea3698863f",
                                    "gameNumber": "07:45:34",
                                    "betting": "BetsClosed",
                                    "dealing": "Finished",
                                    "isBurning": false,
                                    "gameData": {
                                        "playerHand": {
                                            "cards": [
                                                "TS",
                                                "8C"
                                            ],
                                            "score": 8
                                        },
                                        "bankerHand": {
                                            "cards": [
                                                "9H",
                                                "2D"
                                            ],
                                            "score": 1
                                        },
                                        "result": {
                                            "winner": "Player",
                                            "playerScore": 8,
                                            "bankerScore": 1,
                                            "playerPair": false,
                                            "bankerPair": false,
                                            "natural": true
                                        },
                                        "winningSpots": [
                                            "Player",
                                            "Small",
                                            "PlayerBonus"
                                        ],
                                        "redEnvelopePayouts": {},
                                        "redEnvelopePayouts_v2": {},
                                        "winningProbabilities": {
                                            "Banker": 0,
                                            "Player": 100
                                        }
                                    },
                                    "cuttingCard": false,
                                    "version": 393650613,
                                    "tableId": "rep45wbxnyjl7hr2"
                                },
                                "time": 1737099958343,
                                "table_name": "스피드 바카라 5"
                            }
                        ]

[ DISABLED ] Get Data by Month

Retrieve data for a specific month.

GET /month?year=2023&month=10&tableId=your_table_id

Query Parameters:

  • year: integer - The year of the data.
  • month: integer - The month of the data.
  • tableId: string - (Optional) The ID of the table.

Sample Response

[
                            {
                                "id": {
                                    "tb": "Cards_Results",
                                    "id": {
                                        "String": "1737099958343-1757"
                                    }
                                },
                                "type": "baccarat.gameState",
                                "args": {
                                    "gameId": "181b6b2fcd6bc7ea3698863f",
                                    "gameNumber": "07:45:34",
                                    "betting": "BetsClosed",
                                    "dealing": "Finished",
                                    "isBurning": false,
                                    "gameData": {
                                        "playerHand": {
                                            "cards": [
                                                "TS",
                                                "8C"
                                            ],
                                            "score": 8
                                        },
                                        "bankerHand": {
                                            "cards": [
                                                "9H",
                                                "2D"
                                            ],
                                            "score": 1
                                        },
                                        "result": {
                                            "winner": "Player",
                                            "playerScore": 8,
                                            "bankerScore": 1,
                                            "playerPair": false,
                                            "bankerPair": false,
                                            "natural": true
                                        },
                                        "winningSpots": [
                                            "Player",
                                            "Small",
                                            "PlayerBonus"
                                        ],
                                        "redEnvelopePayouts": {},
                                        "redEnvelopePayouts_v2": {},
                                        "winningProbabilities": {
                                            "Banker": 0,
                                            "Player": 100
                                        }
                                    },
                                    "cuttingCard": false,
                                    "version": 393650613,
                                    "tableId": "rep45wbxnyjl7hr2"
                                },
                                "time": 1737099958343,
                                "table_name": "스피드 바카라 5"
                            }
                        ]

Get Tables

Retrieve a list of tables.

GET /tables

Sample Response

{
    "tables": [
       "table_id",
       "table_id"
    ]
}