Get order book for a send pair
Authentication
Using the same authentication to the API Authenticate Method
Params
| Param | Description |
|---|---|
| token | User JSON Web Token | User API Key |
| api_key_auth | Api key delivered by Depasify |
example
URL_WEBSOCKET = wss://{host}?token=token
const ws = new WebSocket(URL_WEBSOCKET, [api_key_auth]) ;
Message structure subscribe
| Param | Mandatory | Example | Type | Description |
|---|---|---|---|---|
| subscribe | Y | order | string | order |
| pair | Y | BTC/EUR | string | The symbol of the currency pair. |
| provider | Y | keyrock | string | the order book provider [keyrock, binance] |
Message structure unsubscribe
| Param | Mandatory | Example | Type | Description |
|---|---|---|---|---|
| unsubscribe | Y | order | string | order |
| pair | Y | BTC/EUR | string | The symbol of the currency pair. |
| provider | Y | keyrock | string | the order book provider [keyrock, binance] |
Message Response Structure
| Attribute | Type | Object | Example |
|---|---|---|---|
| pair | string | BTC | |
| offers | array | { price, amount, total } | [ { "price": string, "amount": string, "total": string } ] |
| bids | array | { price, amount, total } | [ { "price": string, "amount": string, "total": string } ] |
