Merge pull request #442 from tiagosiebler/fastexec
feat(v4.1.7): fast execution topics should use authenticated stream
This commit is contained in:
@@ -10,8 +10,8 @@ const logger = {
|
||||
// trace: (...params) => console.log('trace', ...params),
|
||||
};
|
||||
|
||||
const key = process.env.API_KEY;
|
||||
const secret = process.env.API_SECRET;
|
||||
const key = process.env.API_KEY_COM;
|
||||
const secret = process.env.API_SECRET_COM;
|
||||
|
||||
/**
|
||||
* Prepare an instance of the WebSocket client. This client handles all aspects of connectivity for you:
|
||||
@@ -62,9 +62,12 @@ wsClient.on('reconnected', (data) => {
|
||||
*/
|
||||
|
||||
wsClient.subscribeV5('position', 'linear');
|
||||
wsClient.subscribeV5('execution', 'linear');
|
||||
wsClient.subscribeV5(['order', 'wallet', 'greeks'], 'linear');
|
||||
|
||||
wsClient.subscribeV5('execution', 'linear');
|
||||
// wsClient.subscribeV5('execution.fast', 'linear');
|
||||
// wsClient.subscribeV5('execution.fast.linear', 'linear');
|
||||
|
||||
/**
|
||||
* The following has the same effect as above, since there's only one private endpoint for V5 account topics:
|
||||
*/
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.1.6",
|
||||
"version": "4.1.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bybit-api",
|
||||
"version": "4.1.6",
|
||||
"version": "4.1.7",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.1.6",
|
||||
"version": "4.1.7",
|
||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
||||
@@ -78,6 +78,11 @@ const PRIVATE_TOPICS = [
|
||||
'order',
|
||||
'wallet',
|
||||
'greeks',
|
||||
// v5 fast execution topics are private
|
||||
'execution.fast',
|
||||
'execution.fast.linear',
|
||||
'execution.fast.inverse',
|
||||
'execution.fast.spot',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user