When using the Bitcoin Core RPC API to list the transactions, there is a "category" property, which can apparently be either "send" or "receive". Then there's the "amount" field, which is like 0.05 or -0.05.

Don't we know whether it's a "send" or "receive" merely based on the amount? If it's positive, it must be a "receive", and if negative, it must be a "send"... no?

Is there any reason I should be storing whether it was a "receive" or "send", since I can (apparently) just look at the amount to see if the number is negative or positive?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.