Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project compatibly #22

Open
brenoperucchi opened this issue May 14, 2021 · 0 comments
Open

Project compatibly #22

brenoperucchi opened this issue May 14, 2021 · 0 comments

Comments

@brenoperucchi
Copy link

brenoperucchi commented May 14, 2021

I need to integrate the project using Socket.Io with Ruby. I did some tries with your project but not succeed. I ask you. Is possible to connect with the example below using socketcluster?

import ioClient from 'socket.io-client';

const socket = ioClient('https://mt-client-api-v1.agiliumtrade.agiliumtrade.ai', {
    path: '/ws',
    reconnection: false,
    query: {
        'auth-token': 'token'
    }
});

const request = {
  accountId: '865d3a4d-3803-486d-bdf3-a85679d9fad2',
  type: 'synchronize',
  requestId: '57bfbc9f-108d-4131-a300-5f7d9e69c11b',
  startingDealTime: '2019-01-13T10:29:26.000Z',
  startingHistoryOrderTime: '2019-01-13T10:29:26.000Z'
};

socket.on('connect', () => {
  socket.emit('request', request);
});

socket.on('synchronization', data => {
  console.log(data);
  if (data.type === 'authenticated') {
    request.requestId = uuid.v4();
    socket.emit('request', request);
  }
});

socket.on('processingError', err => {
  console.error(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant