Merge Addresses

post/api/v2/admin/mergeaddresses

Tool for merging duplicate addresses from failed migrations and potential race conditions.

Request Body

coin string required
Only examine addresses of this coin type
Example: btc
addressRegex string
Only examine addresses that match this regex
Example: a.*
walletId string
Only examine addresses in this wallet
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
dryRun boolean
If true, or not specified, do not actually change the database.

200 Response

checked integer
number of addresses examined
fixed integer
number of address groups fixed
unfixableCount integer
number of address groups that cannot be safely fixed
unfixableDetails array[array]
list of address objects with the same address
object
groupDetails array[object]
addresses array[object]
union object
the combined version of all the addreseses
needsUpdate boolean
if true, the first address will be changed to match the union
removed array[string]
list of address id that will be removed
Example: 2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS
dryRun boolean
Whether or not this was a dry run, meaning no data was actually changed.

400 Response

error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code