LogoLogo
PAO DocsCommunity DocsInfrastructure DocsPeerplays.com
  • Developer Documentation
  • API Reference
    • Peerplays Core API
      • Popular API Calls
      • Account History
      • Asset API
      • Block API
      • Crypto API
      • Database API
      • Network Broadcast API
      • Network Nodes API
      • Orders API
    • Wallet API
      • Account Calls
      • Asset Calls
      • Blockchain Inspection
      • General Calls
      • Governance
      • Privacy Mode
      • Trading Calls
      • Transaction Builder
      • Wallet Calls
    • Bookie API
      • General Calls
      • Listeners
      • Tournaments
  • Peerplays API Libraries
    • Python Peerplays
      • Installation
      • Creating an Account
      • Creating a Peerplays Wallet
      • NFT API
      • Marketplace API
      • Role Based Permissions API
  • Development Guides
    • Creating User Issued Assets
    • Introduction to Permissions
    • NFT Minting
    • Calculating Costs
  • The Cookbook
    • NFTs for Staking Creator Tokens
  • Tools and Integrations
    • PeerID
      • 1.0.0
        • Infrastructure
          • Deployment on a Linux Serve
          • Deployment to AWS ECS
            • Building the Docker Images
            • Storing Secrets in Amazon Parameter Store to use in ECS
            • Creating the Task Definition
            • Creating the Cluster
            • Creating the Service
        • Development
          • How does PeerID work without storing the keys ?
          • Authentication with PeerID
          • Brain Storming
          • Software Requirements
      • Authentication with PeerID
      • Requirements Specification
    • Random Number Generator
      • RNG Technical Summary
      • RNG API
  • Supporting & Reference Docs
    • Peerplays Development FAQs
    • Sidechain Operator Node (SON) Development
      • Generic Sidechain Docs
        • Quick joining GLADIATOR
        • Changes to Peerplaysjs-lib
        • Requirements Specification
        • Low Level Designs
          • bitcoin-deposit-handling-lld
          • bitcoin-operations-draft
          • bitcoin-sidechain-handler-lld
          • bitcoin-sidechain-multisig-bitcoin-wallet-and-bitcoin-addresses-pw
          • bitcoin-withdrawal-handling-lld
          • btc-address-scripting-mechanism
          • comparison-between-scenarios-for-handling-deposits-and-withdrawals
          • exchange-rate-list
          • generic-sidechain-deposit-hld
          • generic-sidechain-high-level-design
          • generic-sidechain-listener-hld
          • generic-sidechain-withdrawal-hld
          • refund-btc-mechanism
          • son-configuration
          • son-consensus-communication-and-transaction-signing-on-chain-lld
          • son-de-register-proposals-lld
          • son-objects-and-operators
          • son-rewards-lld
          • son-voting-lld
          • son-wallet-list_sons-lld
          • creation of a multi-sig bitcoin address lld
          • claiming initial son vesting lld
          • changeover and SON maintenance scenarios lld
          • user-sidechain-addresses-mapping
          • wallet-commands-for-son
        • Functional Specs
          • SON Configuration
          • SON rewards
          • SON Voting and Consensus
          • SONs switchover scenarios
          • SON Status Operations & Monitoring
          • Proposals
          • SON Smart Contracts
      • Bitcoin Sidechain Docs
        • Functional Specs
          • btc-refunds
          • voting-and-consensus
          • son-switchover
          • son-rewards
          • son-proposals
          • son-configuration
          • heartbeat-monitoring
          • BTC Transaction Processing & Signing
          • Bitcoin Withdrawal Handling
          • Bitcoin Deposit Handling
          • SON Multisig Bitcoin Wallet
      • Hive Sidechain Docs
        • Functional Specs
          • HIVE Deposit Handling
          • HIVE Withdrawal Handling
    • Peerplays DEX Development
      • Peerplays NEX
        • Functional Specifications
          • NEX-FS01 Dashboard Page
            • NEX-FS12 ETH-SONs Deposit/Withdraw Functionality
          • NEX-FS02 Login and Account Creation
          • NEX-FS03 Menus and Nav
          • NEX-FS04 Notifications
          • NEX-FS05a Market Page (alpha)
          • NEX-FS05 Market Page
          • NEX-FS06 Profile Page
          • NEX-FS07 Wallet Functions
          • NEX-FS08 App Settings
          • NEX-FS09 Blockchain Page
          • NEX-FS10 GPOS Page
          • NEX-FS11 WhaleVault Integration
      • Requirements Specification
      • Functional Specs
        • Asset Info Page and Asset Lists
        • Dashboard
        • Exchange Page
        • Login and Account Creation
        • User Account Page
        • Voting Page
    • SPK Network
      • Functional Specs
        • Claimdrop Snapshot Functional Specification
        • Initial Claimdrop Functional Specification
    • NFT Development
      • NFT Store
        • NFT Store User Stories
        • NFT Store UI HLD
        • NFT Store Requirements Specification
        • Functional Specifications
          • APP-FS01 App Header
          • APP-FS02 App Body
          • APP-FS03 App Footer
          • APP-FS04 App Navigation
          • APP-FS05 Wallet Functions
          • APP-FS06 App Home Page
          • APP-FS07 Account Page
          • APP-FS08 Browse View
        • App Page List
        • Requirement Traceability Matrix
    • Operation IDs List
    • Sidechain Flow Diagram (HIVE coin)
    • Sidechain Flow Diagram (Bitcoin)
    • Sidechain Flow Diagram (Ethereum coin)
    • TradeHands Explorer
      • User Personas
      • User stories
      • APP-FS01 Detailed View
      • Draft: APP-FS02 Front Page
      • APP-FS03 Collection Details Page
    • Grafana
      • Grafana Installation
      • Install Grafana Behind reverse proxy
      • Loki Installation
      • Promtail agent Installation
      • Grafana Explorer
    • NEX Deployment & Configuration
      • NEX Deployment
      • NEX - Blockchain API configuration
      • Deploying NEX in a HA scenario
    • API Node
      • MarketCap API
    • TOTO Application
      • FS-Subscription Plan
      • FS-Achievements
  • Development Workflow Docs
    • Development Workflow
  • Other Documentation
    • Peerplays Home
    • Community Docs
    • Infrastructure Docs
    • Site Reliability Engineering
Powered by GitBook
On this page
  • Asset Calls
  • list_assets
  • create_asset
  • update_asset
  • update_bitasset
  • update_asset_feed_producers
  • publish_asset_feed
  • issue_asset
  • get_asset
  • get_bitasset_data
  • fund_asset_fee_pool
  • reserve_asset
  • global_settle_asset

Was this helpful?

Export as PDF
  1. API Reference
  2. Wallet API

Asset Calls

PreviousAccount CallsNextBlockchain Inspection

Last updated 2 years ago

Was this helpful?

Asset Calls

list_assets

Lists all assets registered on the blockchain.

To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary.

vector<extended_asset_object> graphene::wallet::wallet_api::list_assets(
    const string &lowerbound, 
    uint32_t limit)const
  • lowerbound: the symbol of the first asset to include in the list.

  • limit: the maximum number of assets to return (max: 100)

The list of asset objects, ordered by symbol.

create_asset

Creates a new user-issued or market-issued asset.

Many options can be changed later using .

Note: Right now this function is difficult to use because you must provide raw JSON data structures for the options objects, and those include prices and asset ids.

signed_transaction graphene::wallet::wallet_api::create_asset(
    string issuer, 
    string symbol, 
    uint8_t precision, 
    asset_options common, 
    fc::optional<bitasset_options> bitasset_opts, 
    bool broadcast = false)
  • issuer: the name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later

  • symbol: the ticker symbol of the new asset

  • precision: the number of digits of precision to the right of the decimal point, must be less than or equal to 12

  • common: asset options required for all new assets. Note that core_exchange_rate technically needs to store the asset ID of this new asset. Since this ID is not known at the time this operation is created, create this price as though the new asset has instance ID 1, and the chain will overwrite it with the new asset’s ID.

  • bitasset_opts: options specific to BitAssets. This may be null unless the market_issued flag is set in common.flags

  • broadcast: true to broadcast the transaction on the network

The signed transaction creating a new asset.

update_asset

Update the core options on an asset. There are a number of options which all assets in the network use. These options are enumerated in the asset_object::asset_options struct.

This command is used to update these options for an existing asset.

signed_transaction graphene::wallet::wallet_api::update_asset(
    string symbol, 
    optional<string> new_issuer, 
    asset_options new_options, 
    bool broadcast = false)
  • symbol: the name or id of the asset to update

  • new_issuer: if changing the asset’s issuer, the name or id of the new issuer. null if you wish to remain the issuer of the asset

  • new_options: the new asset_options object, which will entirely replace the existing options.

  • broadcast: true to broadcast the transaction on the network

The signed transaction updating the asset

update_bitasset

Update the options specific to a BitAsset.

BitAssets have some options which are not relevant to other asset types. This operation is used to update those options as an existing BitAsset.

signed_transaction graphene::wallet::wallet_api::update_bitasset(
    string symbol, 
    bitasset_options new_options, 
    bool broadcast = false)
  • symbol: the name or id of the asset to update, which must be a market-issued asset

  • new_options: the new bitasset_options object, which will entirely replace the existing options.

  • broadcast: true to broadcast the transaction on the network

The signed transaction updating the Bitasset

update_asset_feed_producers

Update the set of feed-producing accounts for a BitAsset.

BitAssets have price feeds selected by taking the median values of recommendations from a set of feed producers. This command is used to specify which accounts may produce feeds for a given BitAsset.

signed_transaction graphene::wallet::wallet_api::update_asset_feed_producers(
    string symbol, 
    flat_set<string> new_feed_producers, 
    bool broadcast = false)
  • symbol: the name or id of the asset to update

  • new_feed_producers: a list of account names or ids which are authorized to produce feeds for the asset. this list will completely replace the existing list

  • broadcast: true to broadcast the transaction on the network

The signed transaction updating the BitAsset’s feed producers

publish_asset_feed

Publishes a price feed for the named asset.

Price feed providers use this command to publish their price feeds for market-issued assets. A price feed is used to tune the market for a particular market-issued asset. For each value in the feed, the median across all committee_member feeds for that asset is calculated and the market for the asset is configured with the median of that value.

The feed object in this command contains three prices:

  • A call price limit

  • A short price limit,

  • A settlement price

The call limit price is structured as (collateral asset) / (debt asset) and the short limit price is structured as (asset for sale) / (collateral asset).

Note: The asset IDs are opposite to each other, so if we’re publishing a feed for BTC, the call limit price will be PPY/BTC and the short limit price will be BTC/PPY.

The settlement price may be flipped either direction, as long as it is a ratio between the market-issued asset and its collateral.

signed_transaction graphene::wallet::wallet_api::publish_asset_feed(
    string publishing_account, 
    string symbol, 
    price_feed feed, 
    bool broadcast = false)
  • publishing_account: the account publishing the price feed

  • symbol: the name or id of the asset whose feed we’re publishing

  • feed: the price_feed object containing the three prices making up the feed

  • broadcast: true to broadcast the transaction on the network

The signed transaction updating the price feed for the given asset.

issue_asset

Issue new shares of an asset.

signed_transaction graphene::wallet::wallet_api::issue_asset(
    string to_account, 
    string amount, 
    string symbol, 
    string memo, 
    bool broadcast = false)
  • to_account: the name or id of the account to receive the new shares

  • amount: the amount to issue, in nominal units

  • symbol: the ticker symbol of the asset to issue

  • memo: a memo to include in the transaction, readable by the recipient

  • broadcast: true to broadcast the transaction on the network

The signed transaction issuing the new shares

get_asset

Returns information about the given asset.

extended_asset_object graphene::wallet::wallet_api::get_asset(
    string asset_name_or_id)const
  • asset_name_or_id: the symbol or id of the asset in question

The information about the asset stored in the block chain.

get_bitasset_data

asset_bitasset_data_object graphene::wallet::wallet_api::get_bitasset_data(
    string asset_name_or_id)const
  • asset_name_or_id: the symbol or id of the BitAsset in question

The BitAsset-specific data for this asset

fund_asset_fee_pool

Pay into the fee pool for the given asset.

User-issued assets can optionally have a pool of the core asset which is automatically used to pay transaction fees for any transaction using that asset (using the asset’s core exchange rate).

This command allows anyone to deposit the core asset into this fee pool.

signed_transaction graphene::wallet::wallet_api::fund_asset_fee_pool(
    string from, 
    string symbol, 
    string amount, 
    bool broadcast = false)
  • from: the name or id of the account sending the core asset

  • symbol: the name or id of the asset whose fee pool you wish to fund

  • amount: the amount of the core asset to deposit

  • broadcast: true to broadcast the transaction on the network

The signed transaction funding the fee pool.

reserve_asset

Burns an amount of given asset.

This command burns an amount of given asset to reduce the amount in circulation.

Note: You can't burn market-issued assets.

signed_transaction graphene::wallet::wallet_api::reserve_asset(
    string from, 
    string amount, 
    string symbol, 
    bool broadcast = false)
  • from: the account containing the asset you wish to burn

  • amount: the amount to burn, in nominal units

  • symbol: the name or id of the asset to burn

  • broadcast: true to broadcast the transaction on the network

The signed transaction burning the asset

global_settle_asset

Forces a global settling of the given asset (black swan or prediction markets).

In order to use this operation, asset_to_settle must have the global_settle flag set

If this asset is used as backing for other BitAssets, those BitAssets will not be affected.

Note: This operation is used only by the asset issuer.

signed_transaction graphene::wallet::wallet_api::global_settle_asset(
    string symbol, 
    price settle_price, 
    bool broadcast = false)
  • symbol: the name or id of the asset to globally settle

  • settle_price: the price at which to settle

  • broadcast: true to broadcast the transaction on the network

The signed transaction settling the named asset

See

Returns the BitAsset-specific data for a given asset. Market-issued asset’s behavior are determined both by their “BitAsset Data” and their basic asset data, as returned by .

When this operation is executed all open margin positions are called at the settle price. A pool will be formed containing the collateral got from the margin positions. Users owning an amount of the asset may use to claim collateral instantly at the settle price from the pool.

update_asset()
update_asset()
get_asset()
settle_asset()