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

How to get the websocket data from the library? #3

Open
MachineTrader opened this issue Jun 19, 2021 · 3 comments
Open

How to get the websocket data from the library? #3

MachineTrader opened this issue Jun 19, 2021 · 3 comments

Comments

@MachineTrader
Copy link

MachineTrader commented Jun 19, 2021

Hi, this might be a beginner question, but I'm trying to figure out how to get the data stream into my console application.

I've looked in the test sample, but the last step is missing. I would really appreciate help, since I'm new to events and websockets, and would like to get the ticker price stream and the fill stream in my console app.

@sanchoflat
Copy link
Owner

Hi, @MachineTrader
You can find data from streams here: FtxWebSocketApi/WebsocketOnMessageReceive
I didn't create any json data parsers. You should create your own.

@MachineTrader
Copy link
Author

MachineTrader commented Jun 19, 2021

Thanks for clarifying!

Am I right, to assume that I should subscribe to the existing Action in the library called "OnWebSocketMessageReceive"
after it has connected?

In my console app:
wsApi.OnWebSocketMessageReceive += MyMsgParserFunc;

@sanchoflat
Copy link
Owner

In this simple example no.
You should create you parser inside FtxWebSocketApi or create public event WebsocketOnMessageReceive and handle data outside.

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

2 participants