OmniLayer / omniexplorer

Block Explorer for Omni Protocol
Other
51 stars 50 forks source link

Error while trying to extract multiple address information #320

Closed ShilazTech closed 4 years ago

ShilazTech commented 4 years ago

I can successfully get single address information from omniexplorer using below code

from requests import Session s = Session() params = {"addr": address} r2 = s.post("https://api.omniexplorer.info/v1/address/addr/", data=params)

However, when I want to get multiple address information as per your api document - I can not get the information. I tried all possible combinations of making the parameter using multiple addresses but it fails and returns empty response my various parameter options are listed below params = {"addr": address}, where address is 1) comma separated addresses 2) or & separated addresses 3) or something like in your document as - 1FoWyxwPXuj4C6abqwhjDWdz6D4PZgYRjA&addr=1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw

after making params as per above options i use below command r2 = s.post("https://api.omniwallet.org/v2/address/addr/", data=params)

but returned r2 is empty

Pls suggest how can I solve the issue.

Thanks and Regards, Pramesh

ShilazTech commented 4 years ago

Aha - I solved the problem by giving list of multiple addresses as params as below params = {"addr": [address1,address2, address3...] } and it worked.

I am closing it.

thnx