Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bitstamp] WithdrawalRequest object does not support txid field #4888

Closed
tross-nydig opened this issue Jun 4, 2024 · 4 comments
Closed

[Bitstamp] WithdrawalRequest object does not support txid field #4888

tross-nydig opened this issue Jun 4, 2024 · 4 comments

Comments

@tross-nydig
Copy link
Contributor

The Bitstamp V2 API has an endpoint that gets withdrawal requests.

The response object looks like this:

{
    "address": "aMDHooGmAkyrsaQiKhAORhSNTmoRzxqWIO",
    "amount": "0.00006000",
    "currency": "BTC",
    "datetime": "2022-01-31 16:07:32",
    "id": 1,
    "network": "bitcoin",
    "status": 2,
    "transaction_id": "NsOeFbQhRnpGzNIThWGBTkQwRJqTNOGPVhYavrVyMfkAyMUmIlUpFIwGTzSvpeOP",
    "txid": 1,
    "type": 0
}

The transaction_id field is the transaction hash but the response also contains a field called txid that represents Bitstamp's internal transaction ID. This field is very useful for anyone who might also call the endpoint that brings back all Bitstamp user transactions.

The xchange-bitstamp module doesn't support this field at present but it's a pretty easy thing to add by simply adding txid to xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/dto/account/WithdrawalRequest.java

@rizer1980
Copy link
Contributor

Hello, tross-nydig
check #4889

@tross-nydig
Copy link
Contributor Author

Awesome, quick work! I had my own pull request in the works but am just happy to have this field in the code now. I might create a small followup PR to add txId to the toString method if that's OK?

        + ", txid="
        + txid

@tross-nydig
Copy link
Contributor Author

Added a tiny PR here: #4896

@timmolter
Copy link
Member

merged #4896

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants