adshao / go-binance

A Go SDK for Binance API
MIT License
1.48k stars 662 forks source link

Please do a new release #547

Closed sloba-byte closed 3 months ago

sloba-byte commented 4 months ago

Hi,

I see some fixes have been integrated - however latest release is from Avg 4 2023, a long time ago.

@adshao is it possible you do a new tag for a release?

Thanks!

dlisovsky commented 3 months ago

Hey @adshao - yeah please release new version as there was an issue I got using the futures client

image

it's updated in the Github but the release 2.4.5 has an issue.

adshao commented 3 months ago

Hi, v3.0.0 has been released, let me know if there is any problem.

dlisovsky commented 3 months ago

Thank you, @adshao, for such a quick release!

dlisovsky commented 3 months ago

Hey @adshao - could you please let me know how to upgrade to new version? As it seems you did a tag 3.0.1 but GO says there is no release for version 3.

adshao commented 3 months ago

Hey @adshao - could you please let me know how to upgrade to new version? As it seems you did a tag 3.0.1 but GO says there is no release for version 3.

Hi, could you try to use v2.5.0 instead?

dlisovsky commented 3 months ago

Hey @adshao - v2.5.0 works for me, thank you!

BTW, do you have an example of how to handle the futures user data WSS? I can see the code, but not sure how to handle it? I tried to do myself but got the issues with connection retry and multiple instances of the connection after the retries. If you can share your best solution, I would be much appreciated.

Thanks in advance!

adshao commented 3 months ago

Hey @adshao - v2.5.0 works for me, thank you!

BTW, do you have an example of how to handle the futures user data WSS? I can see the code, but not sure how to handle it? I tried to do myself but got the issues with connection retry and multiple instances of the connection after the retries. If you can share your best solution, I would be much appreciated.

Thanks in advance!

Hi, you could refer to the example of spot and change the package to futures.

dlisovsky commented 3 months ago

Hi @adshao - thank you for your reply!

  1. Does it handle the WSS reconnection?

  2. How to keep alive the listen key? I can see there is a method, but it seems I need a separate goroutine to keep this triggering every 30 mins. Can you please confirm this?

adshao commented 3 months ago

Hi @adshao - thank you for your reply!

  1. Does it handle the WSS reconnection?
  2. How to keep alive the listen key? I can see there is a method, but it seems I need a separate goroutine to keep this triggering every 30 mins. Can you please confirm this?

Hi @dlisovsky ,

  1. Yes, I think you should put it in an infinite loop to reconnect automatically.
  2. Yes, this project is just a SDK for binance API, we don't handle the specific logic for each API. For your question, I think it's correct to add a goroutine to refresh the listen key. If you have any problem about binance API, it would be better to discuss it in the telegram group of binance developers.
dlisovsky commented 3 months ago

Hi @adshao - yeah I understand it's an SKD and you did a great job! I thought you may have an example with user data WSS that has all the code to keep the listen key alive and also manages the retries, just in case. That would be much appreciated.