Author Topic: how to get the supply of bitCNY from the cli command? which api?  (Read 1451 times)

0 Members and 1 Guest are viewing this topic.

Offline johnson

  • Full Member
  • ***
  • Posts: 146
    • View Profile
Thanks very much. It is really helpful.
It seems I should learn about the ""object" system. the document about the "object " is too less.





When you get an asset (e.g. get_objects ["1.3.121"]) you get something like this:
Code: [Select]
+-----------------------+----------------------------------------------+
| Key                   | Value                                        |
+-----------------------+----------------------------------------------+
| bitasset_data_id      | 2.4.21                                       |
| description           | 1 United States dollar                       |
| dynamic_asset_data_id | 2.3.121                                      |
| flags                 | {                                            |
|                       |     "charge_market_fee": false,              |
|                       |     "white_list": false,                     |
|                       |     "override_authority": false,             |
|                       |     "transfer_restricted": false,            |
|                       |     "disable_force_settle": false,           |
|                       |     "global_settle": false,                  |
|                       |     "disable_confidential": false,           |
|                       |     "witness_fed_asset": true,               |
|                       |     "committee_fed_asset": false             |
|                       | }                                            |
| id                    | 1.3.121                                      |
| issuer                | 1.2.0                                        |
| options               | {                                            |
|                       |     "max_supply": "1000000000000000",        |
|                       |     "market_fee_percent": 0,                 |
|                       |     "max_market_fee": "1000000000000000",    |
|                       |     "issuer_permissions": 511,               |
|                       |     "flags": 128,                            |
|                       |     "core_exchange_rate": {                  |
|                       |         "base": {                            |
|                       |             "amount": 851,                   |
|                       |             "asset_id": "1.3.121"            |
|                       |         },                                   |
|                       |         "quote": {                           |
|                       |             "amount": 91192,                 |
|                       |             "asset_id": "1.3.0"              |
|                       |         }                                    |
|                       |     },                                       |
|                       |     "whitelist_authorities": [],             |
|                       |     "blacklist_authorities": [],             |
|                       |     "whitelist_markets": [],                 |
|                       |     "blacklist_markets": [],                 |
|                       |     "description": "1 United States dollar", |
|                       |     "extensions": []                         |
|                       | }                                            |
| permissions           | {                                            |
|                       |     "charge_market_fee": true,               |
|                       |     "white_list": true,                      |
|                       |     "override_authority": true,              |
|                       |     "transfer_restricted": true,             |
|                       |     "disable_force_settle": true,            |
|                       |     "global_settle": true,                   |
|                       |     "disable_confidential": true,            |
|                       |     "witness_fed_asset": true,               |
|                       |     "committee_fed_asset": true              |
|                       | }                                            |
| precision             | 4                                            |
| symbol                | USD                                          |
+-----------------------+----------------------------------------------+


There is a number (object id) that says "dynamic_asset_data_id" .. that's where the supply stuff is in:
Code: [Select]
+---------------------+-------------+
| Key                 | Value       |
+---------------------+-------------+
| accumulated_fees    | 4185381     |
| confidential_supply | 3459        |
| current_supply      | 38124336214 |
| fee_pool            | 13176265874 |
| id                  | 2.3.121     |
+---------------------+-------------+


The above outputs have been created with
Code: [Select]
uptick info USD
uptick info 2.3.121
http://uptick.rocks

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
When you get an asset (e.g. get_objects ["1.3.121"]) you get something like this:
Code: [Select]
+-----------------------+----------------------------------------------+
| Key                   | Value                                        |
+-----------------------+----------------------------------------------+
| bitasset_data_id      | 2.4.21                                       |
| description           | 1 United States dollar                       |
| dynamic_asset_data_id | 2.3.121                                      |
| flags                 | {                                            |
|                       |     "charge_market_fee": false,              |
|                       |     "white_list": false,                     |
|                       |     "override_authority": false,             |
|                       |     "transfer_restricted": false,            |
|                       |     "disable_force_settle": false,           |
|                       |     "global_settle": false,                  |
|                       |     "disable_confidential": false,           |
|                       |     "witness_fed_asset": true,               |
|                       |     "committee_fed_asset": false             |
|                       | }                                            |
| id                    | 1.3.121                                      |
| issuer                | 1.2.0                                        |
| options               | {                                            |
|                       |     "max_supply": "1000000000000000",        |
|                       |     "market_fee_percent": 0,                 |
|                       |     "max_market_fee": "1000000000000000",    |
|                       |     "issuer_permissions": 511,               |
|                       |     "flags": 128,                            |
|                       |     "core_exchange_rate": {                  |
|                       |         "base": {                            |
|                       |             "amount": 851,                   |
|                       |             "asset_id": "1.3.121"            |
|                       |         },                                   |
|                       |         "quote": {                           |
|                       |             "amount": 91192,                 |
|                       |             "asset_id": "1.3.0"              |
|                       |         }                                    |
|                       |     },                                       |
|                       |     "whitelist_authorities": [],             |
|                       |     "blacklist_authorities": [],             |
|                       |     "whitelist_markets": [],                 |
|                       |     "blacklist_markets": [],                 |
|                       |     "description": "1 United States dollar", |
|                       |     "extensions": []                         |
|                       | }                                            |
| permissions           | {                                            |
|                       |     "charge_market_fee": true,               |
|                       |     "white_list": true,                      |
|                       |     "override_authority": true,              |
|                       |     "transfer_restricted": true,             |
|                       |     "disable_force_settle": true,            |
|                       |     "global_settle": true,                   |
|                       |     "disable_confidential": true,            |
|                       |     "witness_fed_asset": true,               |
|                       |     "committee_fed_asset": true              |
|                       | }                                            |
| precision             | 4                                            |
| symbol                | USD                                          |
+-----------------------+----------------------------------------------+


There is a number (object id) that says "dynamic_asset_data_id" .. that's where the supply stuff is in:
Code: [Select]
+---------------------+-------------+
| Key                 | Value       |
+---------------------+-------------+
| accumulated_fees    | 4185381     |
| confidential_supply | 3459        |
| current_supply      | 38124336214 |
| fee_pool            | 13176265874 |
| id                  | 2.3.121     |
+---------------------+-------------+


The above outputs have been created with
Code: [Select]
uptick info USD
uptick info 2.3.121
http://uptick.rocks

Offline johnson

  • Full Member
  • ***
  • Posts: 146
    • View Profile
I want to get the supply number from the cli command , but I don't know which API is used for it . I
have found a "get_bitasset_data" and "get_asset". but both of them seems not the supply of asset.
Could anyone help me ?