REST API DOCS

WebSocket API

Real-time data streaming via WebSocket — Depth of Book and Algorand Data Feed subscriptions.

Only authorized users can utilize WebSocket with <access_token>.

To obtain <access_token>, use the authentication endpoint from the Client API.

Connection

wss://dev.dorrs.io/ws/Headers:authorization: <access_token>

Depth of Book

Subscribe

{
  "type": "subscribedepth",
  "symbol": "ATLS"
}

Subscription Confirmation

{
  "type": "subscribedepth",
  "symbol": "ATLS",
  "message": "success"
}

Notification Message

{
  "type": "depth",
  "symbol": "ATLS",
  "data": [
    {
      "symbol_name": "ATLS",
      "fractional_lot_size": null,
      "bid_id": 28930,
      "bid_origin": "DORRS",
      "bid_mpid": "DORRS",
      "bid_quantity": "1269.0000000000000000",
      "bid_price": "0.0500000000000000",
      "bid_quote_condition": "b",
      "bid_updated_at": "2024-06-07 13:42:41",
      "offer_id": 28931,
      "offer_origin": "DORRS",
      "offer_mpid": "COMPANY1LLC",
      "offer_quantity": "1259.0000000000000000",
      "offer_price": "0.0400000000000000",
      "offer_quote_condition": "a",
      "offer_updated_at": "2024-06-07 13:42:41"
    }
  ]
}

Unsubscribe

{
  "type": "unsubscribedepth",
  "symbol": "ATLS"
}

Unsubscribe Confirmation

{
  "type": "unsubscribedepth",
  "symbol": "ATLS",
  "message": "success"
}

Heartbeat

{
  "type": "heartbeat"
}

Algorand Data Feed

Subscribe

{
  "type": "subscribe-algorand-data-feed",
  "symbol": "TEST"
}

Subscription Confirmation

{
  "type": "subscribe-algorand-data-feed",
  "symbol": "TEST",
  "message": "success"
}

Last Sale — Statistics

{
  "type": "algorand-last-sale-statistics",
  "symbol": "TEST",
  "data": [
    {
      "id": 2118,
      "firm_name": "DORRS Inc.",
      "origin": "WSAX",
      "symbol_name": "TEST",
      "symbol_suffix": "",
      "condition": "buy",
      "mpid": "DORRS",
      "tick_indication": "D",
      "quantity": "2750.0000000000000000",
      "price": "15.9900000000000000",
      "price_formatted": -15.99,
      "time": "13:49",
      "date": "2024-07-02",
      "uti": "070220241349-0000-A2118",
      "fractional_lot_size": 0.1,
      "algorand_tx_hash": "X7UYWHQO4LMCWPCDEVBVEEHBJD46FSK6ORZPHNMDMLOXISZHTKBA",
      "algorand_tx_hash_link": "https://testnet.explorer.perawallet.app/tx/X7UYWHQO4LMCWPCDEVBVEEHBJD46FSK6ORZPHNMDMLOXISZHTKBA",
      "total_volume": 16635.0,
      "vwap": 14.053543872801674,
      "price_changed": 2.34,
      "percentage_changed": 17.14
    }
  ]
}

Last Sale — Charts

{
  "type": "algorand-last-sale-charts",
  "symbol": "TEST",
  "data": [
    { "time": 1719234919, "volume": 1397.0, "price": 15.36 },
    { "time": 1719234977, "volume": 1396.0, "price": 14.54 },
    { "time": 1719234978, "volume": 1397.0, "price": 15.15 },
    { "time": 1719235035, "volume": 1399.0, "price": 14.3 },
    { "time": 1719918964, "volume": 2752.0, "price": 13.34 },
    { "time": 1719928140, "volume": 2750.0, "price": 15.99 }
  ]
}

Best Bid and Best Offer — Statistics

{
  "type": "algorand-best-bid-and-best-offer-statistics",
  "symbol": "TEST",
  "data": [
    {
      "id": 95,
      "firm_name": "DORRS Inc.",
      "origin": "WSAX",
      "symbol_name": "TEST",
      "quote_condition": "b",
      "bid_mpid": "DORRS",
      "bid_quantity": "75.0000000000000000",
      "bid_price": "100.0000000000000000",
      "bid_date": "2024-07-02",
      "bid_time": "14:32",
      "offer_mpid": "",
      "offer_quantity": null,
      "offer_price": null,
      "offer_date": "2024-07-02",
      "offer_time": "14:32",
      "uti": "070220241432-0000-A0095",
      "fractional_lot_size": 0.1,
      "algorand_tx_hash": null,
      "algorand_tx_hash_link": null
    }
  ]
}

Best Bid and Best Offer — Charts

{
  "type": "algorand-best-bid-and-best-offer-charts",
  "symbol": "TEST",
  "data": [
    [
      { "time": 1698837480, "volume": 21.0, "price": 88.0 },
      { "time": 1715851980, "volume": 14.0, "price": 12.0 },
      { "time": 1719930720, "volume": 75.0, "price": 100.0 }
    ],
    [
      { "time": 1698867720, "volume": 33.0, "price": 21.0 },
      { "time": 1716374340, "volume": 10.0, "price": 16.0 },
      { "time": 1719928980, "volume": 33.0, "price": 21.0 }
    ]
  ]
}

Unsubscribe

{
  "type": "unsubscribe-algorand-data-feed",
  "symbol": "TEST"
}

Unsubscribe Confirmation

{
  "type": "unsubscribe-algorand-data-feed",
  "symbol": "TEST",
  "message": "success"
}

On this page