Blog post: Reading an HTTP Stream Using C++ Boost Beast

Posted By: AndrewAMD

Blog post: Reading an HTTP Stream Using C++ Boost Beast - 12/28/18 21:32

I made a blog post for you broker plugin programmers out there. (Are shameless plugs allowed?)

In many (most?) cases, a simple call-and-response model is fine for a REST API plugin.

But what if you have many assets to track and your broker has a nasty rate limit? Or what if you have highly leveraged positions and every last tick counts? What if there's a high likelihood of a flash crash for your assets?

If any of these are true, you should consider streaming the data. Just some food for thought.

https://www.vitaltrades.com/2018/12/28/reading-an-http-stream-using-c-boost-beast/

In this blog post, I stream from the Oanda API in demo mode. Enjoy! laugh
Posted By: Brax

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 12/29/18 18:03

Interesting content Andrew.

I suppouse you'd already thought about it, but i will say it: Put a subscription mechanism so we can follow your posts.

Looking forward for more content.

Bye.
Posted By: firecrest

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 12/30/18 12:33

Nice blog. I like it. If there are any new posts. Do let me know
Posted By: jcl

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 12/31/18 12:34

Good stuff!
Posted By: AndrewAMD

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/03/19 22:06

Originally Posted By: brax
Interesting content Andrew.

I suppouse you'd already thought about it, but i will say it: Put a subscription mechanism so we can follow your posts.

Looking forward for more content.

Bye.


Subscribe button is up! I also put up an RSS feed link.

Originally Posted By: firecrest
Nice blog. I like it. If there are any new posts. Do let me know

Originally Posted By: jcl
Good stuff!


Thank you! laugh
Posted By: AndrewAMD

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/05/19 04:53

I have a new blog post, it's a brief introduction to the DTC protocol.
https://www.vitaltrades.com/2019/01/04/an-introduction-to-the-dtc-protocol/

Let me know if there are any topics you’d like me to discuss. laugh
Posted By: MatPed

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/05/19 16:14

Hi AndrewAMD,
I am an average programmer. I can code my trading ideas, but I have never tried to work with api or interfaces.
I would like to interface Zorro with the rest API of Darwinex, now in beta Test.
Where do you think wshould I start? I mean learning path or any other ideas.

Thank you
Posted By: Brax

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/05/19 16:27

Originally Posted By: AndrewAMD

Subscribe button is up! I also put up an RSS feed link.


Cool!

---

In my case, i am quite interested in system design in general. That is, how to properly design and code a robust and reliable system.

Machine learning applied to trading is another must topic.
Posted By: Brax

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/05/19 16:29

Originally Posted By: MatPed
Hi AndrewAMD,
I am an average programmer. I can code my trading ideas, but I have never tried to work with api or interfaces.
I would like to interface Zorro with the rest API of Darwinex, now in beta Test.
Where do you think wshould I start? I mean learning pasth or any other idea.

Thank you


Very good point, i really would like to see a post about this topic. It would be very educational.
Posted By: AndrewAMD

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/07/19 19:15

Originally Posted By: MatPed
Hi AndrewAMD,
I am an average programmer. I can code my trading ideas, but I have never tried to work with api or interfaces.
I would like to interface Zorro with the rest API of Darwinex, now in beta Test.
Where do you think wshould I start? I mean learning path or any other ideas.

Thank you
I suppose I can write about making a darwinex plugin, and then I can share my code. But there is some fundamental knowledge that needs to be understood:

1) How to write a DLL for Windows.
2) How to get this DLL to work nicely with Zorro.
3) How to use Zorro's handy http functions with a REST API.
4) How to import these functions using the plugin interface.
5) And then how to write a plugin. Maybe cover Darwinex as an example.

Well, you can look up most of these things, but I suppose it doesn't hurt to write a mini-series and get some bonus traffic on my site. Does that sound good? laugh

Originally Posted By: brax
In my case, i am quite interested in system design in general. That is, how to properly design and code a robust and reliable system.

Machine learning applied to trading is another must topic.
I'll add these to my maybe list. I'll need to come up with some ideas.
Posted By: MatPed

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/08/19 10:04

Hi Andrew,
thank you for your interest in looking into the knowledge transfer process to develop the Darwinex API plugin.
I am aware that develop a broker plugin is not an easy task. The idea behind the need of the plugin is to generate a TS based on Markowitz/Dual Momentum Strategy using selected Darwins.unfortunately due to the specific nature of the Darwin assets this is plugin is, basically a must, because the EOD quota are not available anywhere else.

There are several Zorro traders active on Darwinex and I will be more than happy to share in the DW Community the link at your website in order to generate as much as traffic is possible.
This is the link to the API testing section https://community.darwinex.com/t/darwin-api-beta-testers-wanted/4566

Ciao
Posted By: AndrewAMD

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/08/19 12:49

I dug into the Darwinex API a little bit, and I can tell you off the bat that this REST API is a little trickier to implement because it currently only **streams** quotes, there are no snapshots. As you might imagine, streaming is not for beginners. Anyways, I know how to do it, but I cannot use Zorro's http library to stream.

Also, is there a particular reason why you want to use the REST API instead of the MT4/5 bridge? What advantages are you expecting?
Posted By: MatPed

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/08/19 15:40

Thank You Andrew, the task is the stream the history not the tick values. For Darwinex project I have in mind EOD data are enough.

ciao
Posted By: AndrewAMD

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/09/19 17:40

In that case, I'll do a write-up on how to download historical data from any REST API. You won't need a plugin for that, just a Zorro script. laugh
Posted By: MatPed

Re: Blog post: Reading an HTTP Stream Using C++ Boost Beast - 01/10/19 14:23

great. Respect, man!
© 2024 lite-C Forums