create account

RE: Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain by javivisan

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @learncode/re-javivisan-rcmdvf

· @javivisan ·
I'm going to see the documentation to find a solution.
Your post helped me a lot, thanks!!!
properties (22)
authorjavivisan
permlinkre-learncode-rcnixf
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2022.05.8"}
created2022-05-29 15:56:03
last_update2022-05-29 15:56:03
depth3
children4
last_payout2022-06-05 15:56:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length91
author_reputation276,953,032,680,683
root_title"Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id113,614,190
net_rshares0
@learncode ·
Thank you for the feedback. 

Just following up on your question about getting the list of incoming delegations to an account. I found a simple way to request this data using the hiveengine API object.

Here's what it looks like:
> from hiveengine.api import Api
> api = Api()
> api.find("tokens", "delegations", query={"to": "learncode"})

In this case, the "tokens" string is the contract name, the "delegations" string is the table name, and the query is like a search filter for MongoDB. 

There are additional filters you can use, as documented at https://github.com/hive-engine/steemsmartcontracts-wiki/blob/master/Tokens-Contract.md#delegations

> fields:
from = account that initiated the delegation
to = account that received the delegation
symbol = symbol of the token delegated
quantity = quantity of tokens delegated

So you can request the list of delegations based on the account delegated to or from, the symbol for the token, and the quantity. I believe you can include logical statements in the query also, to do things like only return results where the quantity is greater than N.

Example:
> api.find("tokens", "delegations", query={"to": "learncode", "from": "javivisan", "symbol": "BEE"})
👍  
properties (23)
authorlearncode
permlinkre-javivisan-rct8lw
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2022.05.8"}
created2022-06-01 17:58:45
last_update2022-06-01 17:58:45
depth4
children3
last_payout2022-06-08 17:58:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,210
author_reputation682,726,195,093
root_title"Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id113,704,471
net_rshares9,288,244,991
author_curate_reward""
vote details (1)
@javivisan ·
The code works great!!!! Thank you so much, I had been looking for a solution to the problem for months.
!PGM !PIZZA
properties (22)
authorjavivisan
permlinkre-learncode-rcte9m
categoryprogramming
json_metadata{"tags":["programming"],"app":"peakd/2022.05.9"}
created2022-06-01 20:01:00
last_update2022-06-01 20:01:00
depth5
children1
last_payout2022-06-08 20:01:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length116
author_reputation276,953,032,680,683
root_title"Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id113,707,457
net_rshares0
@pgm-curator ·
<center>Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.01 MOTA - 0.05 DEC - 15 SBT tokens to @learncode</center>

<center><sub>remaining commands 1</sub></center>


**BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!**

The tokens that the command sends are: 0.1 PGM-0.1 LVL-2.5 BUDS-0.01 MOTA-0.05 DEC-15 SBT-1 STARBITS-0.00000001 BTC (SWWAP.BTC)


![image.png](https://files.peakd.com/file/peakd-hive/zottone444/23t7AyKqAfdxKEJPQrpePMW15BCPhbyrf5VoHWxhBFcEcPLjDUVVQAh9ZAopbmoJDekS6.png)
Discord [![image.png](https://files.peakd.com/file/peakd-hive/hive-135941/23wfr3mtLS9ddSpifBvh7mwLx1rN3eoaSvbwUxTngsNR1GQ8EiZTrC9P9RwZxHCCfK8e5.png)](https://discord.gg/KCvuNTEjWw)


Support the curation account @ pgm-curator with a delegation [10 HP](https://hivesigner.com/sign/op/WyJkZWxlZ2F0ZV92ZXN0aW5nX3NoYXJlcyIseyJkZWxlZ2F0b3IiOiJfX3NpZ25lciIsImRlbGVnYXRlZSI6InBnbS1jdXJhdG9yIiwidmVzdGluZ19zaGFyZXMiOiIxMCJ9XQ..) - [50 HP](https://hivesigner.com/sign/op/WyJkZWxlZ2F0ZV92ZXN0aW5nX3NoYXJlcyIseyJkZWxlZ2F0b3IiOiJfX3NpZ25lciIsImRlbGVnYXRlZSI6InBnbS1jdXJhdG9yIiwidmVzdGluZ19zaGFyZXMiOiI1MCJ9XQ..) - [100 HP](https://hivesigner.com/sign/op/WyJkZWxlZ2F0ZV92ZXN0aW5nX3NoYXJlcyIseyJkZWxlZ2F0b3IiOiJfX3NpZ25lciIsImRlbGVnYXRlZSI6InBnbS1jdXJhb3RyIiwidmVzdGluZ19zaGFyZXMiOiIxMDAifV0.) - [500 HP](https://hivesigner.com/sign/op/WyJkZWxlZ2F0ZV92ZXN0aW5nX3NoYXJlcyIseyJkZWxlZ2F0b3IiOiJfX3NpZ25lciIsImRlbGVnYXRlZSI6InBnbS1jdXJhdG9yIiwidmVzdGluZ19zaGFyZXMiOiI1MDAifV0.) - [1000 HP](https://hivesigner.com/sign/op/WyJ0cmFuc2Zlcl90b192ZXN0aW5nIix7ImZyb20iOiJfX3NpZ25lciIsInRvIjoicGdtLWN1cmF0b3IiLCJhbW91bnQiOiIxMDAwIn1d)

Get **potential** votes from @ pgm-curator by paying in PGM, here is a [guide](https://peakd.com/hive-146620/@zottone444/pay-1-pgm-and-get-4-votes-itaegn)



<sub>I'm a bot, if you want a hand ask @ zottone444</sub>

***
properties (22)
authorpgm-curator
permlinkpgm-curatorjavivisan1654113677300
categoryprogramming
json_metadata{"tags":[],"app":"pgm/0.1","format":"markdown+html"}
created2022-06-01 20:01:18
last_update2022-06-01 20:01:18
depth6
children0
last_payout2022-06-08 20:01:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,808
author_reputation3,409,490,822,394
root_title"Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id113,707,464
net_rshares0
@poshtoken ·
https://twitter.com/HiveTrending/status/1532068157258489856
<sub> The rewards earned on this comment will go directly to the people(@hivetrending) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.</sub>
properties (22)
authorposhtoken
permlinkre-learncode-re-javivisan-rct8lw14474
categoryprogramming
json_metadata"{"app":"Poshtoken 0.0.1","payoutToUser":["hivetrending"]}"
created2022-06-01 18:36:36
last_update2022-06-01 18:36:36
depth5
children0
last_payout2022-06-08 18:36:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length262
author_reputation5,378,745,551,921,936
root_title"Part 6: Coding on Hive with Python - Interacting with the Hive-Engine Side Chain"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id113,705,363
net_rshares0