Orderbooks fetcher
Last updated
Last updated
[sdks/ccxt/public/Orderbooks fetcher]
Lists the orderbooks of the specified symbols. More: https://docs.ccxt.com/en/latest/manual.html#order-book Example:
{"id": "upbit"}@0 received via exchange
Received via query
:
{<br>
"symbols": [<br>
"BTC/USDT",<br>
"ETH/USDT"<br>
]<br>
}@0 <br>
```<br>
3. Sent via `data`:<br>
```<br>
{<br>
"BTC/USDT": {<br>
"symbol": "BTC/USDT",<br>
"bids": [<br>
[<br>
23471.527,<br>
1.06512026<br>
],<br>
[<br>
23400.67481295,<br>
0.00000515<br>
],<br>
[<br>
23368.507,<br>
0.02927087<br>
],<br>
[<br>
23360.524,<br>
2.48460454<br>
],<br>
[<br>
23310.329,<br>
0.00026938<br>
],<br>
[<br>
23282.42793017,<br>
0.00006858<br>
],<br>
[<br>
22982.00175076,<br>
0.00047025<br>
],<br>
[<br>
22938.00000001,<br>
0.0001613<br>
],<br>
[<br>
22938,<br>
0.00779466<br>
],<br>
[<br>
22885.60885607,<br>
0.00129405<br>
],<br>
[<br>
22853,<br>
0.00890506<br>
],<br>
[<br>
22841.43012477,<br>
0.18<br>
],<br>
[<br>
22841.17647057,<br>
0.03876676<br>
],<br>
[<br>
22833.8235294,<br>
0.04668646<br>
],<br>
[<br>
22810.29411763,<br>
0.05044565<br>
]<br>
],<br>
"asks": [<br>
[<br>
23508.3849624,<br>
0.00029947<br>
],<br>
[<br>
23508.38496241,<br>
0.01486573<br>
],<br>
[<br>
23518.0972431,<br>
0.00000885<br>
],<br>
[<br>
23522.07017543,<br>
0.00002832<br>
],<br>
[<br>
23522.42907268,<br>
0.00001781<br>
],<br>
[<br>
23523.15338345,<br>
0.00004317<br>
],<br>
[<br>
23526.9047619,<br>
0.00426465<br>
],<br>
[<br>
23548.07516913,<br>
0.00002238<br>
],<br>
[<br>
23548.455,<br>
1.06164081<br>
],<br>
[<br>
23548.73732452,<br>
0.00001293<br>
],<br>
[<br>
23659.76991495,<br>
0.00012296<br>
],<br>
[<br>
23659.77011495,<br>
0.01021943<br>
],<br>
[<br>
23665.794,<br>
1.86038489<br>
],<br>
[<br>
23787.50158622,<br>
0.05370671<br>
],<br>
[<br>
23787.73946361,<br>
0.17656399<br>
]<br>
],<br>
"timestamp": 1659365699919,<br>
"datetime": "2022-08-01T14:54:59.919Z"<br>
},<br>
"ETH/USDT": {<br>
"symbol": "ETH/USDT",<br>
"bids": [<br>
[<br>
1679.93301333,<br>
0.09226558<br>
],<br>
[<br>
1679.9330133,<br>
0.59526183<br>
],<br>
[<br>
1678.02179157,<br>
0.00186547<br>
],<br>
[<br>
1676.84049497,<br>
0.00007187<br>
],<br>
[<br>
1669.0730005,<br>
0.00101451<br>
],<br>
[<br>
1641.25360959,<br>
0.5<br>
],<br>
[<br>
1641.17647057,<br>
0.10822942<br>
],<br>
[<br>
1635.16483515,<br>
0.16234413<br>
],<br>
[<br>
1633.69963368,<br>
0.006<br>
],<br>
[<br>
1632.96703295,<br>
0.16252903<br>
],<br>
[<br>
1630.0366301,<br>
2<br>
],<br>
[<br>
1630.03663002,<br>
0.27088173<br>
],<br>
[<br>
1629.19708028,<br>
0.43291768<br>
],<br>
[<br>
1628.00000002,<br>
0.09379925<br>
],<br>
[<br>
1615.94203029,<br>
25<br>
]<br>
],<br>
"asks": [<br>
[<br>
1687.68,<br>
0.00020337<br>
],<br>
[<br>
1688,<br>
0.00023304<br>
],<br>
[<br>
1688.06,<br>
0.00153831<br>
],<br>
[<br>
1688.17,<br>
0.00055555<br>
],<br>
[<br>
1688.18,<br>
0.00036287<br>
],<br>
[<br>
1688.37,<br>
0.08702584<br>
],<br>
[<br>
1694.0794164,<br>
0.5<br>
],<br>
[<br>
1696.0866195,<br>
0.5<br>
],<br>
[<br>
1702.1082288,<br>
0.76059123<br>
],<br>
[<br>
1707,<br>
3.55278886<br>
],<br>
[<br>
1711.11111112,<br>
0.07577626<br>
],<br>
[<br>
1723.19999971,<br>
0.0365599<br>
],<br>
[<br>
1724.32432433,<br>
0.04228253<br>
],<br>
[<br>
1758.25013386,<br>
0.58822605<br>
],<br>
[<br>
1758.26771654,<br>
0.32275867<br>
]<br>
],<br>
"timestamp": 1659365700606,<br>
"datetime": "2022-08-01T14:55:00.606Z"<br>
}<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__:
```
{
optional "symbols": string[],
optional "limit": number,
optional "params": {string: any}
}
```
Received the orderbooks parameters to be fetched.<br>
<br>
Example:<br>
```<br>
{<br>
"symbols": ["BTC/USDT", "ETH/USDT"]<br>
}<br>
```<br>
### Output ports
* __data__:
```
{string: {
"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>
"BTC/USDT": {<br>
"symbol": "BTC/USDT",<br>
"bids": [<br>
[<br>
23471.527,<br>
1.06512026<br>
],<br>
[<br>
23400.67481295,<br>
0.00000515<br>
],<br>
[<br>
23368.507,<br>
0.02927087<br>
],<br>
[<br>
23360.524,<br>
2.48460454<br>
],<br>
[<br>
23310.329,<br>
0.00026938<br>
],<br>
[<br>
23282.42793017,<br>
0.00006858<br>
],<br>
[<br>
22982.00175076,<br>
0.00047025<br>
],<br>
[<br>
22938.00000001,<br>
0.0001613<br>
],<br>
[<br>
22938,<br>
0.00779466<br>
],<br>
[<br>
22885.60885607,<br>
0.00129405<br>
],<br>
[<br>
22853,<br>
0.00890506<br>
],<br>
[<br>
22841.43012477,<br>
0.18<br>
],<br>
[<br>
22841.17647057,<br>
0.03876676<br>
],<br>
[<br>
22833.8235294,<br>
0.04668646<br>
],<br>
[<br>
22810.29411763,<br>
0.05044565<br>
]<br>
],<br>
"asks": [<br>
[<br>
23508.3849624,<br>
0.00029947<br>
],<br>
[<br>
23508.38496241,<br>
0.01486573<br>
],<br>
[<br>
23518.0972431,<br>
0.00000885<br>
],<br>
[<br>
23522.07017543,<br>
0.00002832<br>
],<br>
[<br>
23522.42907268,<br>
0.00001781<br>
],<br>
[<br>
23523.15338345,<br>
0.00004317<br>
],<br>
[<br>
23526.9047619,<br>
0.00426465<br>
],<br>
[<br>
23548.07516913,<br>
0.00002238<br>
],<br>
[<br>
23548.455,<br>
1.06164081<br>
],<br>
[<br>
23548.73732452,<br>
0.00001293<br>
],<br>
[<br>
23659.76991495,<br>
0.00012296<br>
],<br>
[<br>
23659.77011495,<br>
0.01021943<br>
],<br>
[<br>
23665.794,<br>
1.86038489<br>
],<br>
[<br>
23787.50158622,<br>
0.05370671<br>
],<br>
[<br>
23787.73946361,<br>
0.17656399<br>
]<br>
],<br>
"timestamp": 1659365699919,<br>
"datetime": "2022-08-01T14:54:59.919Z"<br>
},<br>
"ETH/USDT": {<br>
"symbol": "ETH/USDT",<br>
"bids": [<br>
[<br>
1679.93301333,<br>
0.09226558<br>
],<br>
[<br>
1679.9330133,<br>
0.59526183<br>
],<br>
[<br>
1678.02179157,<br>
0.00186547<br>
],<br>
[<br>
1676.84049497,<br>
0.00007187<br>
],<br>
[<br>
1669.0730005,<br>
0.00101451<br>
],<br>
[<br>
1641.25360959,<br>
0.5<br>
],<br>
[<br>
1641.17647057,<br>
0.10822942<br>
],<br>
[<br>
1635.16483515,<br>
0.16234413<br>
],<br>
[<br>
1633.69963368,<br>
0.006<br>
],<br>
[<br>
1632.96703295,<br>
0.16252903<br>
],<br>
[<br>
1630.0366301,<br>
2<br>
],<br>
[<br>
1630.03663002,<br>
0.27088173<br>
],<br>
[<br>
1629.19708028,<br>
0.43291768<br>
],<br>
[<br>
1628.00000002,<br>
0.09379925<br>
],<br>
[<br>
1615.94203029,<br>
25<br>
]<br>
],<br>
"asks": [<br>
[<br>
1687.68,<br>
0.00020337<br>
],<br>
[<br>
1688,<br>
0.00023304<br>
],<br>
[<br>
1688.06,<br>
0.00153831<br>
],<br>
[<br>
1688.17,<br>
0.00055555<br>
],<br>
[<br>
1688.18,<br>
0.00036287<br>
],<br>
[<br>
1688.37,<br>
0.08702584<br>
],<br>
[<br>
1694.0794164,<br>
0.5<br>
],<br>
[<br>
1696.0866195,<br>
0.5<br>
],<br>
[<br>
1702.1082288,<br>
0.76059123<br>
],<br>
[<br>
1707,<br>
3.55278886<br>
],<br>
[<br>
1711.11111112,<br>
0.07577626<br>
],<br>
[<br>
1723.19999971,<br>
0.0365599<br>
],<br>
[<br>
1724.32432433,<br>
0.04228253<br>
],<br>
[<br>
1758.25013386,<br>
0.58822605<br>
],<br>
[<br>
1758.26771654,<br>
0.32275867<br>
]<br>
],<br>
"timestamp": 1659365700606,<br>
"datetime": "2022-08-01T14:55:00.606Z"<br>
}<br>
}<br>
```<br>
<br>
More:<br>
https://docs.ccxt.com/en/latest/manual.html#order-book-structure<br>
* __error__: ` {"error": string, optional "details": any} `