๐Ÿ—๏ธPrivate web-socket connection

Get real-time info about your trades and orders.

Make use of this private web-socket connection to get real-time information about your personal trades and orders. Please note that this is a Private ๐Ÿ”’ route which means it needs to be authorised by the account initiating this request.

Note: You will need to include the JWT Auth token to request headers to access this endpoint. To get the JWT Auth Token, refer the login section of the documentation.

URL

wss://api.brine.fi/private?auth_header=<JWT Access Token>

Subscribe

{ "event": "subscribe", "streams": ["trade", "order"] }

Unsubscribe

{ "event": "unsubscribe", "streams": ["trade", "order"] }

Available Streams

1. Trade Streams [for trade updates]

Response

{
  "trade": {
    "amount": "0.001",
    "created_at": 1659024869,
    "id": 448640,
    "market": "btcusdc",
    "order_id": 8840859,
    "price": "23829.22",
    "side": "buy",
    "taker_type": "buy",
    "total": "23.82922"
  }
}

2. Order Streams [for order updates]

Response

{
  "order": {
    "at": 1659024868,
    "avg_price": "23829.22",
    "created_at": 1659024868,
    "executed_volume": "0.001",
    "id": 8840859,
    "kind": "bid",
    "market": "btcusdc",
    "ord_type": "limit",
    "origin_volume": "0.001",
    "price": "24000.0",
    "remaining_volume": "0.0",
    "side": "buy",
    "state": "done",
    "trades_count": 1,
    "updated_at": 1659024869
  }
}

Last updated