sandbox rest and websocket urls
Macfly opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
Can't test an app with the sandbox environment easily, need to modify the ccapi_macro.h file and input the sandbox Urls
Describe the solution you'd like
Would be nice to have a compile definition like CCAPI_ENABLE_SANSBOX_SERVICE that uses the sandbox urls instead of the production ones (could be separated for market data and execution)
Describe alternatives you've considered
modify the file manually each time.
Additional context
Everyone needs to test an app with the sandbox API before using the real produciton url.
https://github.com/crypto-chassis/ccapi#override-exchange-urls
For example, if you'd want to connect to Kucoin sandbox, the following compile definition can be used (the example here uses cmake, but any build tool would work):
add_compile_definitions(CCAPI_KUCOIN_URL_REST_BASE="https://openapi-sandbox.kucoin.com")