crypto-chassis / ccapi

A header-only C++ library for interacting with crypto exchanges. Bindings for Python, Java, C#, Go, and Javascript are provided.
https://discord.gg/b5EKcp9s8T
MIT License
580 stars 200 forks source link

Updated REST APIs for Bybit spot market services from v3 to v5 #468

Closed obergaba closed 4 months ago

obergaba commented 4 months ago

The 2 commented target links were not used.

Is it a good idea to 'hardcode' the parameter "category=spot" inside the convertRequestForRest function? I believe it's intrinsic that when the user specifies the exchange as 'bybit' in the request constructor in the main, rather than 'bybit-derivatives', their intention is to operate within the spot market. Previously, this wasn't an issue because we had different endpoints for spot and derivatives.

Now for every request the user needs to remember to add it like this in the main:

  Request request(Request::Operation::GET_RECENT_TRADES, "bybit", "BTCUSDT");
  request.appendParam({
      {"INSTRUMENT_TYPE", "spot"},  <---
      {"other param", "other param"},
      ...
  });
chassis-community commented 4 months ago

Is it a good idea to 'hardcode' the parameter "category=spot" inside the convertRequestForRest function? I think it is OK.

github-actions[bot] commented 4 months ago

:tada: This PR is included in version 6.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: