Skip to main content

Read Outputs

GET /outputs

Fetch outputs in multisigs and collectibles, and the api returns the merged result of GET /multisigs/outputs and GET /collectibles/outputs

Endpoint URL

 https://api.mixin.one/outputs?state=:state&offset=:offset&limit=:limit&members=:members&threshold=:threshold

Parameters

stateoptional, state of UTXO, such as unspent, signed and spent.
offsetoptional, state, RFC3339Nano format, for example `2020-12-12T12:12:12.999999999Z`.
limitoptions, number per page, default and maximum is both 500
membersused with threshold, hash of multi signature members
thresholdused with members, such threshold should be 2 in 2/3 multi signature

Golang example for generating hash of multi signature members:

func hashMembers(ids []string) string {
sort.Slice(ids, func(i, j int) bool { return ids[i] < ids[j] })
var in string
for _, id := range ids {
in = in + id
}
return crypto.NewHash([]byte(in)).String()
}