hiveengine.nftmarket¶
-
class
hiveengine.nftmarket.NftMarket(api=None, blockchain_instance=None, steem_instance=None)¶ Bases:
listAccess the hive-engine NFT market
Parameters: blockchain_instance (Hive) – Hive instance -
buy(symbol, account, nft_ids, market_account)¶ Buy nfts for given price.
Parameters: - symbol (str) – symbol
- account (str) – account name
- nft_ids (list) – list if token ids
- market_account (str) – Account who receive the fee
- price (float) – price
Buy example:
from hiveengine.nftmarket import NftMarket from beem import Hive active_wif = "5xxxx" hive = Hive(keys=[active_wif]) market = NftMarket(blockchain_instance=hive) market.buy("STAR", "test", ["1"], "nftmarket")
-
cancel(symbol, account, nft_ids)¶ Cancel sell order.
Parameters: - symbol (str) – symbol
- account (str) – account name
- nft_ids (list) – list of tokens ids
Cancel example:
from hiveengine.nftmarket import NftMarket from beem import Hive active_wif = "5xxxx" hive = Hive(keys=[active_wif]) market = NftMarket(blockchain_instance=hive) market.cancel("STAR", "test", ["1"])
-
change_price(symbol, account, nft_ids, price)¶ Change a price for a listed nft id
Parameters: - symbol (str) – nft symbol
- account (str) – account name
- nft_ids (list) – List of nfts
- price (float) – new price
Sell example:
from hiveengine.nftmarket import NftMarket from beem import Hive active_wif = "5xxxx" hive = Hive(keys=[active_wif]) market = NftMarket(blockchain_instance=hive) market.change_price("STAR", "test", ["1"], 30)
-
get_open_interest(symbol, side='sell', grouping_name=None, grouping_value=None, priceSymbol=None, limit=None)¶ Returns the sell book for a given symbol. When account is set, the order book from the given account is shown.
-
get_sell_book(symbol, account=None, grouping_name=None, grouping_value=None, priceSymbol=None, nftId=None, limit=None)¶ Returns the sell book for a given symbol. When account is set, the order book from the given account is shown.
-
get_trades_history(symbol, account=None, priceSymbol=None, timestamp=None)¶ Returns the trade history for a given symbol. When account is set, the trade history from the given account is shown.
-
sell(symbol, account, nft_ids, price, price_symbol, fee)¶ Sell token for given price.
Parameters: - symbol (str) – symbol
- account (str) – account name
- nft_ids (list) – List of nft ids
- price (float) – price
- price_symbol (str) – price symbol
- fee (int) – fee percentage (500 -> 5%)
Sell example:
from hiveengine.nftmarket import NftMarket from beem import Hive active_wif = "5xxxx" hive = Hive(keys=[active_wif]) market = NftMarket(blockchain_instance=hive) market.sell("STAR", "test", ["1"], 100, "STARBITS", 500)
-
set_id(ssc_id)¶ Sets the ssc id (default is ssc-mainnet-hive)
-