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

Apply requestgen to the requests #335

Closed
c9s opened this issue Dec 25, 2021 · 12 comments
Closed

Apply requestgen to the requests #335

c9s opened this issue Dec 25, 2021 · 12 comments

Comments

@c9s
Copy link
Contributor

c9s commented Dec 25, 2021

Hello @adshao,

I found you're using the cascading pattern for the request call for the whole binance library, I think you might be interested in this.

https://github.com/c9s/requestgen

I also like your cascading pattern calls for the binance API, so I wrote a tool to generate the accessor methods from the struct, this way you can generate the requests very easy.

This tool is used in bbgo (https://github.com/c9s/bbgo), and we're also using your go-binance package.

@adshao
Copy link
Owner

adshao commented Dec 25, 2021

Hi @c9s , requestgen is so cool, actually the plan of go-binance v3 is also to use generation tool to automatically generate most of the SDK code. I think v3 can reuse your work.

@c9s
Copy link
Contributor Author

c9s commented Dec 25, 2021

That's great! Looking forward to hearing the feedback from you :)

@c9s
Copy link
Contributor Author

c9s commented Dec 29, 2021

FYI, Just added more features in requestgen https://github.com/c9s/requestgen

@c9s
Copy link
Contributor Author

c9s commented Jan 10, 2022

@adshao I can send a pull request for integrating this if you want.

@adshao
Copy link
Owner

adshao commented Jan 26, 2022

@adshao I can send a pull request for integrating this if you want.

It's great, we can discuss the pr, will you break the compatibility? If yes, we should move it to v3.

@adshao
Copy link
Owner

adshao commented Jan 26, 2022

@c9s could you describe the work you will do?

@c9s
Copy link
Contributor Author

c9s commented Jan 26, 2022

I would like to make it backward compatible

But I need to have a PoC first, and see if we can do it in v2, what do you think?

@adshao
Copy link
Owner

adshao commented Jan 28, 2022

We can do it in v2 as long as it's backward compatible

@c9s
Copy link
Contributor Author

c9s commented Apr 27, 2022

I implemented my own binance http api client with requestgen, you may take a look:
https://github.com/c9s/bbgo/pull/575/files

@c9s
Copy link
Contributor Author

c9s commented Apr 27, 2022

or maybe you can also simply use my code :D

@c9s
Copy link
Contributor Author

c9s commented Jun 7, 2022

@adshao I wrote a tutorial about the requestgen for the binance api.

https://github.com/c9s/requestgen-tutorial

@xyq-c-cpp
Copy link
Collaborator

No response for a long time, close this issue

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

3 participants