adshao / go-binance

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

Update and improve the synchronization of "exchange_info_service" and correct some issues #519

Closed xyq-c-cpp closed 7 months ago

xyq-c-cpp commented 8 months ago

… "exchange_info_service_test" with the latest interface "exchange_info" status of Binance, and correct some issues

exchange_info_service:

spot:

  1. Revised the type of MultiplierDecimal to string.
  2. Add Filter MAX_NUM_ORDERS and TRAILING_DELTA.
  3. remove type PercentPriceFilter, add type PercentPriceBySideFilter. Actually, PercentPriceBySideFilter has replaced PercentPriceFilter.
  4. remove type MinNotionalFilter.In fact, it should be removed when adding type NotionalFilter. NotionalFilter has replaced MinNotionalFilter.

futures:

  1. Revised the type of MultiplierDecimal to string.

delivery:

  1. Revised the type of MultiplierDecimal to string
  2. Add Filter MAX_NUM_ALGO_ORDERS, its type is MaxNumAlgoOrdersFilter.

option:

  1. remove type PercentPriceFilter/MarketLotSizeFilter/MaxNumOrdersFilter/MaxNumAlgoOrdersFilter/MinNotionalFilter.

    Because options currently only have two filters(PRICE_FILTER/LOT_SIZE).I don't think it's necessary to implement these non-existent things. What needs to be done is to maintain consistency with the official interface. It is also possible that the implementer of this module simply copied and modified a copy of the code from other modules before, without considering the actual situation.

exchange_info_service_test: Based on the above modifications, the complete testing of the filter has been improved. Of course, combined with my thoughts on existing code, after reviewing these test codes, I found that some of the previous submissions did not complete the testing of the filter. I speculate that there may be some potential unresolved issues and skip this section. At present, it has been repaired and in my opinion, it is relatively complete.

The following files are the latest interface return data information: option_exchange_info.json delivery_exchange_info.json future_exchange_info.json spot_exchange_info.json

adshao commented 7 months ago

thank you @xyq-c-cpp , your work significantly contributes to the robustness of the project!