Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ cmake --build .

## Constants
[`include/ccapi_cpp/ccapi_macro.h`](include/ccapi_cpp/ccapi_macro.h)
* For most cryptocurrencies, the default value of `CCAPI_DECIMAL_SCALE` is sufficient. You can override it if you need more.

## Examples
[C++](example)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ExecutionManagementServiceGateioBase : public ExecutionManagementService {
this->substituteParam(target, param,
{
{"settle", "{settle}"},
{CCAPI_MARGIN_ASSET, "{settle}"},
{CCAPI_SETTLE_ASSET, "{settle}"},
});
std::string settle;
if (UtilString::endsWith(symbolId, "_USD")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class MarketDataServiceBitmex : public MarketDataService {
}

void extractInstrumentInfo(Element& element, const rj::Value& x) {
element.insert(CCAPI_MARGIN_ASSET, x["settlCurrency"].GetString());
element.insert(CCAPI_SETTLE_ASSET, x["settlCurrency"].GetString());
element.insert(CCAPI_UNDERLYING_SYMBOL, x["referenceSymbol"].GetString());
element.insert(CCAPI_ORDER_PRICE_INCREMENT, x["tickSize"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_INCREMENT, x["lotSize"].GetString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class MarketDataServiceBybit : public MarketDataService {
element.insert(CCAPI_QUOTE_ASSET, x["quoteCoin"].GetString());
auto it = x.FindMember("settleCoin");
if (it != x.MemberEnd()) {
element.insert(CCAPI_MARGIN_ASSET, it->value.GetString());
element.insert(CCAPI_SETTLE_ASSET, it->value.GetString());
}
element.insert(CCAPI_ORDER_PRICE_INCREMENT, x["priceFilter"]["tickSize"].GetString());
if (category == "spot") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class MarketDataServiceDeribit : public MarketDataService {

void extractInstrumentInfo(Element& element, const rj::Value& x) {
element.insert(CCAPI_INSTRUMENT, x["instrument_name"].GetString());
element.insert(CCAPI_MARGIN_ASSET, x["base_currency"].GetString());
element.insert(CCAPI_SETTLE_ASSET, x["base_currency"].GetString());
element.insert(CCAPI_UNDERLYING_SYMBOL, x["base_currency"].GetString());
element.insert(CCAPI_ORDER_PRICE_INCREMENT, x["tick_size"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_INCREMENT, x["contract_size"].GetString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class MarketDataServiceGateioPerpetualFutures : public MarketDataServiceGateioBa
this->substituteParam(target, param,
{
{"settle", "{settle}"},
{CCAPI_MARGIN_ASSET, "{settle}"},
{CCAPI_SETTLE_ASSET, "{settle}"},
});
std::string settle;
if (UtilString::endsWith(symbolId, "_USD")) {
Expand Down Expand Up @@ -99,7 +99,7 @@ class MarketDataServiceGateioPerpetualFutures : public MarketDataServiceGateioBa
this->substituteParam(target, param,
{
{"settle", "{settle}"},
{CCAPI_MARGIN_ASSET, "{settle}"},
{CCAPI_SETTLE_ASSET, "{settle}"},
});
req.target(target);
} break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class MarketDataServiceMexcFutures : public MarketDataService {

void extractInstrumentInfo(Element& element, const rj::Value& x) {
element.insert(CCAPI_INSTRUMENT, x["symbol"].GetString());
element.insert(CCAPI_MARGIN_ASSET, x["settleCoin"].GetString());
element.insert(CCAPI_SETTLE_ASSET, x["settleCoin"].GetString());
element.insert(CCAPI_ORDER_PRICE_INCREMENT, x["priceUnit"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_INCREMENT, x["volUnit"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_MIN, x["minVol"].GetString());
Expand Down
2 changes: 1 addition & 1 deletion include/ccapi_cpp/service/ccapi_market_data_service_okx.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class MarketDataServiceOkx : public MarketDataService {
element.insert(CCAPI_ORDER_PRICE_INCREMENT, x["tickSz"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_INCREMENT, x["lotSz"].GetString());
element.insert(CCAPI_ORDER_QUANTITY_MIN, x["minSz"].GetString());
element.insert(CCAPI_MARGIN_ASSET, x["settleCcy"].GetString());
element.insert(CCAPI_SETTLE_ASSET, x["settleCcy"].GetString());
element.insert(CCAPI_UNDERLYING_SYMBOL, x["uly"].GetString());
element.insert(CCAPI_CONTRACT_SIZE, x["ctVal"].GetString());
element.insert(CCAPI_CONTRACT_MULTIPLIER, x["ctMult"].GetString());
Expand Down
Loading