UNPKG
notbank
Version:
latest (2.4.0-alpha)
2.4.0-alpha
2.3.0-alpha
2.2.0-alpha
2.1.0
2.0.2
2.0.1
2.0.1-alpha
2.0.0-alpha
1.1.0-alpha
1.0.0
1.0.0-alpha
The Notbank for Node.js
notbank.exchange
notbank-exchange/notbank-node
notbank
/
dist
/
models
/
response
/
orderBook.js
8 lines
(7 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
export
function
orderbookFromRaw
(
raw
)
{
return
{ timestamp: raw.timestamp, bids: raw.bids.
map
(level => {
return
{
quantity
: level[
0
],
price
: level[
1
] }; }), asks: raw.asks.
map
(level => {
return
{
quantity
: level[
0
],
price
: level[
1
] }; }) }; }