3commas-io / 3commas-official-api-docs

Official Documentation for the 3commas APIs
https://3commas.io
251 stars 87 forks source link

retrieve shared bot details #56

Closed SteveL1 closed 3 years ago

SteveL1 commented 3 years ago

I'm trying to make an API call to retrieve shared bot details. The web url is in the format https://3commas.io/bots/xxxxx/shared_show?secret=xxxxxx.

When I try to retrieve this using the /bots/show call i get a not_found error

Is there a way to pull back the bot details in code?

EfremovEvgeniy commented 3 years ago

Hi, you can use GET /ver1/bots/{bot_id}/show if your bot has not been deleted.

cristiang777 commented 3 years ago

I'm trying to make an API call to retrieve shared bot details. The web url is in the format https://3commas.io/bots/xxxxx/shared_show?secret=xxxxxx.

When I try to retrieve this using the /bots/show call i get a not_found error

Is there a way to pull back the bot details in code?

I'm looking for a solution to this problem as well. The mentioned API won't work because a shared bot requires a secret. Have you found a solution?

psstefanov commented 3 years ago

Yes, this is the solution: curl https://3commas.io/bots/{bot_id}/get_bot_data?secret={secret}

In Python, you can get the element you need with"

r = requests.get('https://3commas.io/bots/{bot_id}/get_bot_data?secret={secret}')
shared_bot=r.json()
print(shared_bot['bot_info']['bot_pair_or_pairs'])