Trying to use the Kraken API, I would like to know the difference between the fields txid
, refid
and userref
, and when to use one over an other.
So I sent an email to the Kraken support and with some more research, here is how I would describe these fields :
txid
: when placing an order, it is assigned an ID for tracking. It is a required field which exists regardless of the order’s executing or filling. To fill, an order, several trades might be needed. They are assigned their own ID’s as well, which will be different from the order’s one.userref
: This field is optional and not required. It is a 32-bit number generated by the user to track a specific order if he is not satisfied with the txid option.refid
: This field can reference another order’s txid to establish a sort of link between them. Some scenarios where this might happen is when using the close parameter in the Add standard order
endpoint. This will automatically create a new order when the previous one will be filled, with its txid as refid. It can also be the case when you have a margin position open and you close it out with a seperate order, and there would be a refid required from the original position.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With