i am trying to get a proper websocket feed from an exchange , i can get 20 lvl deep data but it is not enough for me ,a doc shows method for bigger level guide but i couldnt figure it out. Plz help me to get a feed for 150 lvls
this is doc url:
--[login to view URL]
this is my code:
const WebSocket = require('ws')
const pako = require('pako');
let huobbidsorderBooks = []
let huobasksorderBooks = []
let koinA = ['ankrusdt']
ws = new WebSocket('wss://[login to view URL]');
[login to view URL] = () => {
[login to view URL]((coinz) => {
[login to view URL]([login to view URL]({
"sub": "market." + coinz + ".mbp.150",
"id": "id1"
}));
[login to view URL]([login to view URL]({
"req": "market." + coinz + ".mbp.150",
"id": "id2"
}));
});
}
[login to view URL]('message', function(data) {
data = [login to view URL](data, { to: 'string' });
let msg = [login to view URL](data);
try {
let Pair = [login to view URL]('.')[1]
let pairz = [login to view URL](0, -4)
huobbidsorderBooks[Pair] = [login to view URL]
huobasksorderBooks[Pair] = [login to view URL]
// [login to view URL](huobbidsorderBooks['ankrusdt'])
[login to view URL](msg)
} catch (error) {
[login to view URL](error)
}
});
all you need to do is make this msg to turn usable one array that have price and size info like this:
[
[ 0.193509, 1554.47 ], [ 0.193508, 8999.47 ],
[ 0.193277, 4001.49 ], [ 0.193273, 516.62 ],
[ 0.193272, 3099.58 ], [ 0.193271, 14589.41 ],
[ 0.193269, 753.84 ], [ 0.193265, 4540 ],
[ 0.193264, 5375.71 ], [ 0.193263, 2261.52 ],
[ 0.193226, 754.31 ], [ 0.193222, 754.3 ],
[ 0.193216, 1900 ], [ 0.193195, 615.83 ],
[ 0.193192, 5372.54 ], [ 0.193189, 5376.75 ],
[ 0.193181, 13000 ], [ 0.193173, 1508.66 ],
[ 0.193168, 754.31 ], [ 0.193157, 18814.71 ]
..... // total 150 levels (lines)
]
right now you can have this with sending
"sub": "market." + coinz + ".mbp.refresh.20",
this line change but it only give 20 lines and that s not enough for me 100 or 150 prorably fits for me
you can compare websocket data feed with restapi with this link:
[login to view URL]
your whole job is explained here budget is 150 usd
Hello dear. I hope you are fine.
I've read your job description and it's very interesting to me.
As an experienced JS expert I can surely help you with this job,
Let's discuss in more detail via chat.
Looking forward to hearing from you.
Thank you.
Hi,
I will help you to get 100 or 150 numbers of data at once using the api. I have a lot of experience in working with JavaScript and websocket. Let me know if I can get started.
Thanks.
Hi, I undertand your work.
You want to get data of 150 lvl from the web socket.
I also checked the document.
I am interested in your project.
I will help you to get these data.
Regards