Orderbook fetcher
Last updated
Last updated
[sdks/ccxt/public/Orderbook fetcher]
Lists the orderbook of the specified symbol. More: https://docs.ccxt.com/en/latest/manual.html#order-book Example:
Received via exchange
:
{"id": "upbit"}@0<br>
```<br>
2. Received via `query`:<br>
```<br>
{<br>
"symbol": "BTC/USDT"<br>
}@0<br>
```<br>
3. Sent via `data`:<br>
```<br>
{<br>
"symbol": "BTC/USDT",<br>
"bids": [<br>
[<br>
23340.881,<br>
1.07108207<br>
],<br>
[<br>
23320.59700001,<br>
0.00238276<br>
],<br>
[<br>
23320.597,<br>
0.00127999<br>
],<br>
[<br>
23315.3649803,<br>
0.00003501<br>
],<br>
[<br>
23302.07806294,<br>
0.00013228<br>
],<br>
[<br>
23298.08462788,<br>
0.00000951<br>
],<br>
[<br>
23281.21445401,<br>
0.00038168<br>
],<br>
[<br>
23281.11,<br>
0.00006959<br>
],<br>
[<br>
23250.503,<br>
0.0308213<br>
],<br>
[<br>
23246.0481615,<br>
0.10754516<br>
],<br>
[<br>
23241.06615375,<br>
0.21513642<br>
],<br>
[<br>
23224.176,<br>
2.49919148<br>
],<br>
[<br>
23087.5730675,<br>
0.00476805<br>
],<br>
[<br>
22982.00175076,<br>
0.00047025<br>
],<br>
[<br>
22938.00000001,<br>
0.0001613<br>
]<br>
],<br>
"asks": [<br>
[<br>
23411.01,<br>
1.06787363<br>
],<br>
[<br>
23429.07818475,<br>
0.1<br>
],<br>
[<br>
23508.38496241,<br>
0.00568306<br>
],<br>
[<br>
23528.0658,<br>
0.00004972<br>
],<br>
[<br>
23528.066,<br>
1.86310435<br>
],<br>
[<br>
23658.76724138,<br>
0.05370671<br>
],<br>
[<br>
23659.00383142,<br>
0.05047722<br>
],<br>
[<br>
23659.77011495,<br>
0.0194021<br>
],<br>
[<br>
23668.19923372,<br>
0.17716542<br>
],<br>
[<br>
23750.00000001,<br>
0.00388776<br>
],<br>
[<br>
23829,<br>
0.00767275<br>
],<br>
[<br>
23838.46153847,<br>
0.00809952<br>
],<br>
[<br>
23943.41085272,<br>
0.00351427<br>
],<br>
[<br>
24000,<br>
0.0327<br>
],<br>
[<br>
24180.902,<br>
0.00644413<br>
]<br>
],<br>
"timestamp": 1659364372388,<br>
"datetime": "2022-08-01T14:32:52.388Z"<br>
}@0<br>
```<br>
---
### Input ports
* __exchange__: ` {"id": string} `
Received the exchange to be used.<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/exchange-markets.html<br>
<br>
Example:<br>
```<br>
{"id": "upbit"}<br>
```<br>
* __query__:
```
{"symbol": string, optional "limit": number, optional "params": {string: any}}
```
Received the orderbook parameters to be fetched.<br>
<br>
Example:<br>
```<br>
{<br>
"symbol": "BTC/USDT"<br>
}<br>
```<br>
### Output ports
* __data__:
```
{
"bids": [number, number][],
"asks": [number, number][],
"symbol": string,
optional "timestamp": number,
optional "datetime": string,
optional "nonce": number
}
```
Sends information on open orders with bid (buy) and ask (sell) prices.<br>
<br>
Example:<br>
```<br>
{<br>
"symbol": "BTC/USDT",<br>
"bids": [<br>
[<br>
23340.881,<br>
1.07108207<br>
],<br>
[<br>
23320.59700001,<br>
0.00238276<br>
],<br>
[<br>
23320.597,<br>
0.00127999<br>
],<br>
[<br>
23315.3649803,<br>
0.00003501<br>
],<br>
[<br>
23302.07806294,<br>
0.00013228<br>
],<br>
[<br>
23298.08462788,<br>
0.00000951<br>
],<br>
[<br>
23281.21445401,<br>
0.00038168<br>
],<br>
[<br>
23281.11,<br>
0.00006959<br>
],<br>
[<br>
23250.503,<br>
0.0308213<br>
],<br>
[<br>
23246.0481615,<br>
0.10754516<br>
],<br>
[<br>
23241.06615375,<br>
0.21513642<br>
],<br>
[<br>
23224.176,<br>
2.49919148<br>
],<br>
[<br>
23087.5730675,<br>
0.00476805<br>
],<br>
[<br>
22982.00175076,<br>
0.00047025<br>
],<br>
[<br>
22938.00000001,<br>
0.0001613<br>
]<br>
],<br>
"asks": [<br>
[<br>
23411.01,<br>
1.06787363<br>
],<br>
[<br>
23429.07818475,<br>
0.1<br>
],<br>
[<br>
23508.38496241,<br>
0.00568306<br>
],<br>
[<br>
23528.0658,<br>
0.00004972<br>
],<br>
[<br>
23528.066,<br>
1.86310435<br>
],<br>
[<br>
23658.76724138,<br>
0.05370671<br>
],<br>
[<br>
23659.00383142,<br>
0.05047722<br>
],<br>
[<br>
23659.77011495,<br>
0.0194021<br>
],<br>
[<br>
23668.19923372,<br>
0.17716542<br>
],<br>
[<br>
23750.00000001,<br>
0.00388776<br>
],<br>
[<br>
23829,<br>
0.00767275<br>
],<br>
[<br>
23838.46153847,<br>
0.00809952<br>
],<br>
[<br>
23943.41085272,<br>
0.00351427<br>
],<br>
[<br>
24000,<br>
0.0327<br>
],<br>
[<br>
24180.902,<br>
0.00644413<br>
]<br>
],<br>
"timestamp": 1659364372388,<br>
"datetime": "2022-08-01T14:32:52.388Z"<br>
}<br>
```<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/manual.html#order-book-structure<br>
* __error__: ` {"error": string, optional "details": any} `