This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { credentials, Metadata, loadPackageDefinition } from "@grpc/grpc-js"; | |
import { loadSync } from '@grpc/proto-loader'; | |
import { v4 as uuidv4 } from 'uuid'; | |
const options = { | |
keepCase: false, | |
longs: String, | |
enums: String, | |
defaults: true, | |
oneofs: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EventEmitter } from 'events'; | |
class Client extends EventEmitter { | |
interval | |
constructor() { | |
super(); | |
this.interval = setInterval(() => { console.log("emit 1"); this.emit("onOrder", "1") }, 3000); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base { | |
isConnected = false; | |
constructor(options) { | |
this.options = options; | |
} | |
connect() { | |
isConnected = true; | |
} | |
disconnect() { | |
isConnected = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uWS from "uWebSockets.js"; | |
import { QuikClient } from './QuikClient.mjs' | |
const connection = new QuikClient({ | |
host: "10.211.55.3", | |
port: 34130 | |
}); | |
connection.connect(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net from 'net'; | |
import { EventEmitter } from 'events'; | |
import iconv from 'iconv-lite'; | |
import { inspect } from 'util'; | |
export class OrderTradeFlags { | |
static Active = 0x1; | |
static Canceled = 0x2; | |
static IsSell = 0x4; | |
static IsLimit = 0x8; |