OmniProtocol Trading and Smart Properties

ยท

Transaction Creation

The RPC for transaction creation is used to create and broadcast Omni Protocol transactions. The result returns the hash value of the broadcast transaction.

omni_send

Creates and broadcasts a simple send transaction.

Parameters:

NameTypeRequiredDescription
fromaddressStringYesThe address to send from
toaddressStringYesThe recipient's address
propertyidStringYesThe identifier of the token to send
amountStringYesThe amount to send
redeemaddressStringNoAn address that can process the transaction (default: sender)
referenceamountStringNoThe amount of Bitcoin to send to the recipient (default: minimum)

Example:

$ omnicore-cli "omni_send" "3M9qvHKtgARhqcMtM5cRT9VaiDJ5PSfQGY" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "100.0"

Result:

"hash" // Hexadecimal-encoded transaction hash

omni_senddexsell

Places, updates, or cancels a sell offer on the traditional distributed OMNI/BTC exchange.

Parameters:

NameTypeRequiredDescription
fromaddressStringYesThe address to send from
propertyidforsaleUintYesThe identifier of the token to list for sale (1 for OMNI, 2 for TOMNI)
amountforsaleStringYesThe amount of tokens to sell
amountdesiredStringYesThe amount of Bitcoin desired
paymentwindowStringYesThe time limit for the buyer to pay after accepting the offer
minacceptfeeStringYesThe minimum mining fee the buyer must pay
actionStringYesThe action to take (1: new offer, 2: update, 3: cancel)

Example:

$ omnicore-cli "omni_senddexsell" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "1.5" "0.75" 25 "0.0005" 1

Result:

"hash" // Hexadecimal-encoded transaction hash

omni_senddexaccept

Creates and broadcasts an acceptance offer for a specified token and amount.

Parameters:

NameTypeRequiredDescription
fromaddressStringYesThe address to send from
toaddressStringYesThe seller's address
propertyidStringYesThe identifier of the token to purchase
amountStringYesThe amount to accept
overrideStringYesOverride the minimum accept fee and payment window checks

Example:

$ omnicore-cli "omni_senddexaccept" "35URq1NN3xL6GeRKUP6vzaQVcxoJiiJKd8" "37FaKponF7zqoMLUjEiko25pDiuVH5YLEa" 1 "15.0"

Result:

"hash" // Hexadecimal-encoded transaction hash

omni_sendissuancecrowdsale

Creates a new token as a crowdsale.

Parameters:

NameTypeRequiredDescription
fromaddressStringYesThe address to send from
ecosystemUintYesThe ecosystem for the token (1: main, 2: test)
typeUintYesThe type of token (1: indivisible, 2: divisible)
previousidUintYesThe identifier of the predecessor token (0 for new crowdsale)
categoryStringYesThe category of the new token
subcategoryStringYesThe subcategory of the new token
nameStringYesThe name of the new token
urlStringYesThe URL for more information about the token
dataStringYesA description of the new token
propertyiddesiredUintYesThe identifier of the token eligible for the crowdsale
tokensperunitStringYesThe number of tokens invested per unit in the crowdsale
deadlineUintYesThe crowdsale deadline as a Unix timestamp
earlybonusUintYesThe early bonus percentage for participants
issuerpercentageUintYesThe percentage of tokens granted to the issuer

Example:

$ omnicore-cli "omni_sendissuancecrowdsale" "3JYd75REX3HXn1vAU83YuGfmiPXW7BpYXo" 2 1 0 "Companies" "Bitcoin Mining" "Quantum Miner" "" "" 2 "100" 1483228800 30 2

Result:

"hash" // Hexadecimal-encoded transaction hash

๐Ÿ‘‰ Explore OmniLayer Documentation


FAQ

What is OmniProtocol?

OmniProtocol is a platform for creating and trading custom tokens and smart properties on the Bitcoin blockchain.

How do I create a token?

You can create a token using the omni_sendissuancecrowdsale, omni_sendissuancefixed, or omni_sendissuancemanaged commands, depending on your token type.

What is a crowdsale?

A crowdsale is a method for issuing new tokens where participants can invest in the token during a specified period.

How do I trade tokens?

Tokens can be traded using commands like omni_senddexsell, omni_senddexaccept, and omni_sendtrade.

๐Ÿ‘‰ Learn More About OmniProtocol