The resource loading... loading...

The WS event driver policy, is it something that should be described in more detail in the API documentation?

Author: The bride too., Created: 2019-06-03 10:23:03, Updated: 2019-07-31 17:23:08

I looked at the FMZ's API documentation for half a day, and there was only one dial function that involved the ws type, and it felt like the description was not clear enough, not systematic enough.

I'm not very good at it, so I tried bitmex's ws type API to get the information needed to verify positions, accounts, etc. without understanding the dial function.

I sent a work order, the customer service asked me to look for the case myself, to look for the documentation of the exchange, the case of Strategic Square.

In the case of Strategy Square, the websocket protocol and the platform's latest HMAC method of obtaining signatures are used to push the position changes to WeChat.

This code is old, old error, please get a new code, thank you.


More

Inventors quantify - small dreamsWhat specific errors should be reported? Describe the problem you are having. The problem is that no one knows exactly what the problem is.

Inventors quantify - small dreamsWhat's up? function main (() { var APIKEY = "your Access Key ((Bitmex API ID)) " This is the API key for Bitmex. var expires = parseInt ((Date.now)) / 1000) + 10 var signature = exchange.HMAC (("sha256", "hex", "GET/realtime" + expires, "{{secretkey}}")//secretkey is replaced automatically at execution, without filling in var client = Dial (("wss://www.bitmex.com/realtime", 60) var auth = JSON.stringify (({args: [APIKEY, expires, signature], op: "authKeyExpires"}) This is a list of all the different ways AuthKey is credited in the database. var pos is equal to 0. client.write ((auth)) Client.write (('{"op": "subscribe", "args": "position"}') while (true) { bitmexData = client.read ()) if ((bitmexData.table == 'position' && pos!= parseInt ((bitmexData.data[0].currentQty)) { Log (('position change', pos, parseInt ((bitmexData.data[0].currentQty), '@') is used to specify the location of the data. Pos = parseInt ((bitmexData.data[0].currentQty) is the name of the file. I'm not sure. I'm not sure. I'm not sure. What's up? This example has been tested, no problems, data is returned. Did you not fill in your API ID in this example? What's up? var APIKEY = "your Access Key ((Bitmex API ID)) " This is the API key for Bitmex. What's up? The string your Access Key (Bitmex API ID) is replaced with your Bitmex account API ID.

The bride too.Dream sum, the data returned with this code, its timestamp, is a few minutes behind the current time, for example, I get bitmex's quote, the timestamp gets ISO time, discounted to Beijing time on August 7th at 6:09:18 seconds, the actual time is 2019-08-07 06:12:37, delayed by 3 minutes, I also get ticker compared to rest, yes, it's really wrong, what is the situation? This is a list of all the different ways XBTUSD is credited in the database.

The bride too.I got it, thank you.

Inventors quantify - small dreamsWhat's up? TypeError: cannot read property 'write' of null at main (FILE:8) 2019-06-03 12:09:30, wrong websocket: bad handshake What's up? The answer to your question is, trouble to see.

The grassShould the request be successful, the remaining is the number of remaining websocket connections, which cannot be too frequent.

The bride too.The answer is no.

Inventors quantify - small dreamsTypeError: cannot read property 'write' of null at main (FILE:8) Also, make sure that the server where your host is located has access to the OKEX interface. Currently, only overseas servers can access OKEX.

The bride too.I've replaced my API, and if the sleep in the loop is used, it shouldn't affect the program.

The bride too./upload/asset/1405cf4702c6364a8e6e.png I often get an error when I convert a positon to a wallet: error TypeError: cannot read property 'write' of null at main (__FILE__:8) 2019-06-03 12:09:30, wrong websocket: bad handshake

The bride too.2019-06-03 12:00:52 info {"info":"Welcome to the BitMEX Realtime API.","version":"2019-05-29T18:35:35.000Z","timestamp":"2019-06-03T04:00:51.178Z","docs":"https://www.bitmex.com/app/wsAPI","limit":{"remaining":37}} 2019-06-03 12:00:50 info {"info":"Welcome to the BitMEX Realtime API.","version":"2019-05-29T18:35:35.000Z","timestamp":"2019-06-03T04:00:49.503Z","docs":"https://www.bitmex.com/app/wsAPI","limit":{"remaining":38}} 2019-06-03 12:00:49 info { "success": true, "request":{"args":["Zp8Ub0Iom7SxwDXuB5oXetWV",1559534457,"1cf5ce9c114b6991bfde394cdfebab3b36db9ea0e7a365ed7c4328a6f3ce4efe"],"op":"authKeyExpires"]] 2019-06-03 12:00:48 information {"info":"Welcome to the BitMEX Realtime API.","version":"2019-05-29T18:35:35.000Z","timestamp":"2019-06-03T04:00:47.720Z","docs":"https://www.bitmex.com/app/wsAPI","limit":{"remaining":39}} Is this not a prompt to reconnect?