You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Getting account balances of assets via rest api is important: it allows syncing of information between the exchange and the customer's trading server; it allows algorithms to determine the right action to take knowing the balances.
Describe the solution you'd like
Add an operation type of GET_ACCOUNT_BALANCES to class Request. Add a type of GET_ACCOUNT_BALANCES to class Message. Take bitmex as an example.
Modify member function void convertReq(http::request<http::string_body>& req, const Request& request, const Request::Operation operation, const TimePoint& now, const std::string& symbolId, const std::map<std::string, std::string>& credential) in include/ccapi_cpp/service/ccapi_execution_management_service_bitmex.h so that its switch statement can handle Request::Operation::GET_ACCOUNT_BALANCES. Use member function appendParam to handle optional parameter of ACCOUNT_ID and ASSET (the name of the asset such as "USD") for operation GET_ACCOUNT_BALANCES.
Modify member function std::vector<Message> convertTextMessageToMessage(const Request& request, const std::string& textMessage, const TimePoint& timeReceived) in include/ccapi_cpp/service/ccapi_execution_management_service.h so that its switch statement can handle Request::Operation::GET_ACCOUNT_BALANCES and adds a Message to its return. This Message will contain one or more Elements with each Element having a nameValueMap with keys: ACCOUNT_ID (optional), ASSET (optional), QUANTITY_AVAILABLE_FOR_TRADING (required, the amount of the asset available for trading).
Add appropriate unit tests on request conversions and response conversions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Getting account balances of assets via rest api is important: it allows syncing of information between the exchange and the customer's trading server; it allows algorithms to determine the right action to take knowing the balances.
Describe the solution you'd like
Add an operation type of
GET_ACCOUNT_BALANCES
to classRequest
. Add a type ofGET_ACCOUNT_BALANCES
to classMessage
. Take bitmex as an example.Modify member function
void convertReq(http::request<http::string_body>& req, const Request& request, const Request::Operation operation, const TimePoint& now, const std::string& symbolId, const std::map<std::string, std::string>& credential)
ininclude/ccapi_cpp/service/ccapi_execution_management_service_bitmex.h
so that itsswitch
statement can handleRequest::Operation::GET_ACCOUNT_BALANCES
. Use member functionappendParam
to handle optional parameter ofACCOUNT_ID
andASSET
(the name of the asset such as "USD") for operationGET_ACCOUNT_BALANCES
.Modify member function
std::vector<Message> convertTextMessageToMessage(const Request& request, const std::string& textMessage, const TimePoint& timeReceived)
ininclude/ccapi_cpp/service/ccapi_execution_management_service.h
so that itsswitch
statement can handleRequest::Operation::GET_ACCOUNT_BALANCES
and adds aMessage
to its return. ThisMessage
will contain one or moreElement
s with eachElement
having anameValueMap
with keys:ACCOUNT_ID
(optional),ASSET
(optional),QUANTITY_AVAILABLE_FOR_TRADING
(required, the amount of the asset available for trading).Add appropriate unit tests on request conversions and response conversions.
The text was updated successfully, but these errors were encountered: