Price Updates

Websocket API Documentation

AggregateOHLCV Event

The AggregateOHLCV event is emitted every 10 minutes, providing aggregated data for preconfigured currency pairs. The interval could be configured in the System Config

Example Payload:

{
    "data": {
        "rangeDateStart": "2023-12-11T14:27:45.901Z",
        "rangeDateEnd": "2023-12-11T14:37:45.901Z",
        "aggregatedPairs": {
            "BTC/EUR": {
                "open": null,
                "high": null,
                "low": null,
                "close": null,
                "volume": null,
                "aggregatedAveragePrice": null
            },
            "BTC/USDT": {
                "open": 41847.2,
                "high": 41958.97,
                "low": 41813.1,
                "close": 41923.435,
                "volume": 1389.9607819399996,
                "aggregatedAveragePrice": 41886.035
            }
        }
    }
}

Note: null values indicate no data available for the specified period.

${exchange}-${pair}-Trade Event

This event emits Trade data for a specified exchange and currency pair as soon as it is collected.

Example Payload for binance-BTC/USDT-Trade:

{
    "exchange": "binance",
    "symbol": "BTC/USDT",
    "payload": {
        "tradesInfo": [
            [1, 42000.03, 0.00058, 1702305540000],
            [1, 42000.03, 0.00054, 1702305540001],
            [1, 42000.03, 0.00113, 1702305540001],
            [1, 42000.03, 0.00232, 1702305540002],
            [1, 42000.03, 0.00227, 1702305540002]
        ],
        "intervalStart": 1702305540000,
        "intervalEnd": 1702305600000,
        "marketId": 69
    },
    "type": "Trade"
}

Note: \${exchange} value should be exchange id, not name. Refer to the ./config folder to find respective ids for names.

${exchange}-${pair}-Ticker Event

This event provides Ticker data for a specified exchange and currency pair as soon as it is collected.

Example Payload for binance-BTC/USDT-Ticker:

{
    "exchange": "binance",
    "symbol": "BTC/USDT",
    "payload": {
        "high": 44046,
        "low": 40400,
        "bid": 41977,
        "bidVolume": 0.53876,
        "ask": 41977.01,
        "askVolume": 4.80016,
        "vwap": 42501.30907775,
        "open": 43797.46,
        "close": 41977,
        "last": 41977,
        "previousClose": 43797.45,
        "change": -1820.46,
        "percentage": -4.157,
        "average": 42887.23,
        "baseVolume": 53508.02676,
        "quoteVolume": 2274161183.467364,
        "intervalStart": 1702305540000,
        "intervalEnd": 1702305600000,
        "marketId": 69
    },
    "type": "Ticker"
}

Note: \${exchange} value should be exchange id, not name. Refer to the ./config folder to find respective ids for names.

${exchange}-${pair}-OrderBook Event

This event provides OrderBook data for a specified exchange and currency pair as soon as it is collected.

Example Payload for binance-BTC/USDT-OrderBook:

{
    "exchange": "binance",
    "symbol": "BTC/USDT",
    "payload": {
        "bids": [
            [41977, 0.13294],
            [41976.89, 0.02795],
            [41976.74, 0.11951],
            [41976.73, 0.1],
            [41976.49, 0.00329]
        ],
        "asks": [
            [41977.01, 6.61858],
            [41977.02, 0.00018],
            [41977.08, 0.23832],
            [41977.3, 0.5]
        ],
        "intervalStart": 1702305540000,
        "intervalEnd": 1702305600000,
        "marketId": 69
    },
    "type": "OrderBook"
}

Note: \${exchange} value should be exchange id, not name. Refer to the ./config folder to find respective ids for names.

${exchange}-${pair}-CandleStick Event

This event provides CandleStick data for a specified exchange and currency pair as soon as it is collected.

Example Payload for binance-BTC/USDT-CandleStick:

{
    "exchange": "binance",
    "symbol": "BTC/USDT",
    "payload": {
        "charts": [
            [1702305540000, 42000.03, 42016.11, 41972.83, 41988.89, 107.70167]
        ],
        "intervalStart": 1702305540000,
        "intervalEnd": 1702305600000,
        "marketId": 69
    },
    "type": "CandleStick"
}

Note: \${exchange} value should be exchange id, not name. Refer to the ./config folder to find respective ids for names.

Last updated