package org.knowm.xchange.huobi.service;

import org.knowm.xchange.Exchange;
import org.knowm.xchange.huobi.BitVc;
import org.knowm.xchange.huobi.BitVcFutures;
import si.mazi.rescu.RestProxyFactory;

public class BitVcFuturesServiceRaw {

    protected final BitVcFutures bitvc;
    protected final String accessKey;
    protected HuobiDigest digest;

    public BitVcFuturesServiceRaw(Exchange exchange) {
        this.bitvc = RestProxyFactory.createProxy(BitVcFutures.class, "https://api.bitvc.com/futures");
        this.accessKey = exchange.getExchangeSpecification().getApiKey();

        /** BitVc Futures expect a different secret key digest name from BitVc spot and Huobi */
        this.digest = new HuobiDigest(exchange.getExchangeSpecification().getSecretKey(), "secretKey");
    }

    protected long requestTimestamp() {
        return System.currentTimeMillis() / 1000;
    }
}

@@ -153,16 +153,152 @@
 utures;%0A
+import org.knowm.xchange.huobi.dto.trade.BitVcFuturesPosition;%0Aimport org.knowm.xchange.huobi.dto.trade.BitVcFuturesPositionByContract;%0A
 import s
@@ -923,16 +923,232 @@
 %0A    %7D%0A%0A
+    public BitVcFuturesPositionByContract getFuturesPositions() %7B%0A        final BitVcFuturesPositionByContract positions = bitvc.positions(accessKey, 1, requestTimestamp(), digest);%0A%0A        return positions;%0A    %7D%0A%0A
     prot

Add getter for futures positions for BitVc