INNER CODE UNIT · JavaScript

id

dearvn/tradovate-trading-bot · agents/market-data/index.js:55

    const id = ++this._requestCounter;
    const bodyStr = body !== null ? (typeof body === 'string' ? body : JSON.stringify(body)) : '';
    return { id, frame: `${endpoint}\n${id}\n${query}\n${bodyStr}` };
  }

  sendRequest(endpoint, query = '', body = null) {
    const { id, frame } = this._buildFrame(endpoint, query, body);
    this._sendRaw(frame);
    return id;
  }

  _sendRaw(data) {
    if (this.ws && this.ws.readyState === WebSocket.OPEN) {
      this.ws.send(data);
    }
  }

  connect() {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…