VictorFrWu / bybit-java-api

MIT License
7 stars 19 forks source link

{retCode=10003, retMsg=API key is invalid., result={}, retExtInfo={}, time=1714065629010} #57

Closed ken4ward closed 4 months ago

ken4ward commented 6 months ago

I tried using this maven dependency and it continued to log error of {retCode=10003, retMsg=API key is invalid., result={}, retExtInfo={}, time=1714065629010} I am very sure the api-key and secret are correct because I have used the one I created from Bybit

BybitApiAsyncTradeRestClient client = BybitApiClientFactory.newInstance(apiKey, secret, BybitApiConfig.TESTNET_DOMAIN, true).newAsyncTradeRestClient();
        TradeOrderRequest newOrderRequest = TradeOrderRequest.builder().category(CategoryType.LINEAR).symbol("BTCUSDT")
                .side(Side.BUY).orderType(TradeOrderType.LIMIT).qty("10").timeInForce(TimeInForce.GOOD_TILL_CANCEL)
                .positionIdx(PositionIdx.ONE_WAY_MODE).build();
        client.createOrder(newOrderRequest, System.out::println);
VictorFrWu commented 4 months ago

check your api key not expired and you used in testnet