XChange icon indicating copy to clipboard operation
XChange copied to clipboard

[BITSTAMP] Invalid signature 403

Open EVRUSIN opened this issue 6 years ago • 3 comments

Hi! Does XChange-bitstamp work correctly?

I'm trying to get transactions

    ExchangeSpecification exSpec = new BitstampExchange().getDefaultExchangeSpecification();
    exSpec.setUserName("Bitstamp");
    exSpec.setApiKey("apiKey");
    exSpec.setSecretKey("secretKey");
    Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(exSpec);
    AccountService accountService = bitstamp.getAccountService();
    List<FundingRecord> fundingRecords = accountService
                                      .getFundingHistory(new BitstampTradeHistoryParams(new CurrencyPair("BTC", "USD"), 1));

But I get 403 error (Invalid signature)

I tried this apiKey+secretKey pair with Bitstamp's native java example (https://www.bitstamp.net/api/) and they work fine.

Am I somewhere wrong? Regards

EVRUSIN avatar Mar 06 '20 16:03 EVRUSIN

I am able to get regular holdings, but i have not tried funding history, maybe check the URL matches the docs

mdvx avatar Mar 06 '20 16:03 mdvx

Double checked it( POST for https://www.bitstamp.net/api/v2/user_transactions/ endpoint in bitstamp docs. And funding history uses getUserTransactions method, which uses the same https://www.bitstamp.net/api/v2/user_transactions/ endpoint

EVRUSIN avatar Mar 06 '20 18:03 EVRUSIN

Closing as stale. This 2020 report can't be reproduced and has no follow-up; Bitstamp authentication has since moved to the v2 X-Auth header signing scheme (BitstampAuthenticatedV2.java), so the old signing path it describes no longer applies. If you still see this on a current build, please reopen with a reproduction, or send a PR.

timmolter avatar Oct 01 '26 07:10 timmolter