unisat-wallet / dev-support

14 stars 11 forks source link

whats the param limits in api get address utxo data #15

Open Meteriox opened 2 months ago

Meteriox commented 2 months ago

i want to get address utxos via https://open-api.unisat.io/v1/indexer/address/{address}/utxo-data, but i dont konw the exact param limit in query param cursor and size

abangZ commented 2 months ago

@huanniangstudio

cloud6605 commented 1 month ago

cursor+size < 10240 . Take the first 10,000 records at most.

Meteriox commented 1 month ago

cursor+size < 10240 . Take the first 10,000 records at most.

Why can't I retrieve the next 10,240 records by modifying the cursor?

cloud6605 commented 1 month ago

our interface has such a limit

Meteriox commented 1 month ago

our interface has such a limit

I believe this restriction is unreasonable. Since the number of UTXOs in the returned result can exceed 10,240, it indicates that the actual data can exceed this amount. If it's just to limit the number of returned results from the API, setting a limit would suffice. Users should be allowed to obtain all available UTXOs by modifying the cursor. Otherwise, this API has a bug.