DeSo Tokens Transactions API
Description of endpoints used to construct DAO Transactions on the DeSo blockchain
Last updated
Description of endpoints used to construct DAO Transactions on the DeSo blockchain
Last updated
Note: "DAO Coins" are now referred to as "DeSo Tokens" in all public-facing documentation, but the code and API have not yet been updated to reflect this change.
POST
/api/v0/dao-coin
Create a DeSo Token transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
A mint
operation creates new DeSo Tokens
A burn
operation destroys DeSo Tokens
An update_transfer_restriction_status
operation updates the restrictions on transferring a DeSo Tokens
A disable_minting
operation prevents minting of any future DeSo Tokens
Endpoint implementation in backend.
Example usages in frontend: - Make request to DeSo Tokens - Use DeSo Tokens to mint DeSo Tokens - Use DeSo Tokens to burn DeSo Tokens - Use DeSo Tokens to update transfer restriction status - Use DeSo Tokens to disable minting
Name | Type | Description |
---|---|---|
POST
/api/v0/transfer-dao-coin
Create a transfer DeSo Token transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Transfer DeSo Token coin transactions sends DeSo Token owned by the sender to the receiver.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Transfer DeSo Token - Use TransferDAOCoin to construct, sign, and submit a DeSo Token transfer transaction.
POST
/api/v0/create-doa-coin-limit-order
Create a new limit order to trade DeSo Tokens. The transaction needs to be signed and submitted through api/v0/submit-transaction
before the order can be placed on the book or the coins are traded.
DeSo Tokens can be traded on an on-chain order book exchange. There are two types of markets where DeSo Tokens can be traded on the exchange: 1) markets where a DeSo Token is traded for $DESO, and 2) markets where a DeSo Token is traded for another DeSo Token.
This endpoint allows the creation of limit orders for either type of market.
Endpoint implementation in backend
POST
/api/v0/cancel-dao-coin-limit-order
Cancel an open limit order to trade DeSo Token. The transaction needs to be signed and submitted through api/v0/submit-transaction
before the order is cancelled.
This endpoint allows a transactor to cancel a limit order they had previously created. The request will only succeed if the order is still open, and has not been completely filled or previously cancelled.
Endpoint implementation in backend
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
See for how to retrieve all open orders created by a transactor.
Name | Type | Description |
---|---|---|
UpdaterPublicKeyBase58Check*
String
Public key performing the DeSo Token operation
ProfilePublicKeyBase58CheckOrUsername*
String
Public key or username of the creator of the Token on whose DeSo Token Updater is operating
OperationType*
String
Type of DeSo Token operation being perform. Must be mint
, burn
, update_transfer_restriction_status
, or disable_minting
CoinsToMintNanos
String
Hex string representing the number of DeSo Tokens in this operation.
Required if OperationType is mint
CoinsToBurnNanos
String
Hex string representing the number of DeSo Tokens burned in this operation.
Required if OperationType is burn
TransferRestrictionStatus
String
String representing the new transfer restriction status. Valid values are unrestricted
, profile_owner_only
, dao_members_only
, permanently_unrestricted
Required if OperationType is update_transfer_restriction_status
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFees[]
Array of
objects that define additional outputs that need to be added to this transaction
SenderPublicKeyBase58Check*
String
Public key of the user sending DeSo Token
ProfilePublicKeyBase58CheckOrUsername*
String
Public key of the creator whose DeSo Token will be sent in this transaction
ReceiverPublicKeyBase58CheckOrUsername*
String
Public key of the recipient
DAOCoinToTransferNanos*
String
Hex string representing the amount of DeSo Tokens to transfer in this transaction
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFees[]
Array of
objects that define additional outputs that need to be added to this transaction
TransactorPublicKeyBase58Check*
String
Public key of the user creating the limit order
BuyingDAOCoinCreatorPublicKeyBase58CheckOrUsername*
String
Public key or username of the creator of a profile, whose DeSo Token is being bought.
If the order is selling a DeSo Token for $DESO, then this parameter needs to be an empty string.
SellingDAOCoinCreatorPublicKeyBase58CheckOrUsername*
String
Public key or username of the creator of a profile whose DeSo Token is being sold.
If the order is buying a DeSo Token with $DESO, then this parameter needs to be an empty string.
ExchangeRateCoinsToSellPerCoinToBuy*
float64
The desired exchange rate for the coin being sold relative to the coin being bought. The real exchange rate used to fill this order will be equal to or better than the exchange rate provided here, always in the favor of the transactor.
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFees[]
Array of
objects that define additional outputs that need to be added to this transaction
QuantityToFill*
float64
The desired quantity of coins to buy or sell. This is denominated in number of coins (not nanos) and can have fractional values.
For example, if you wanted to fill an order of 1 DESO, you would specify 1 here, not 10^9.
OperationType*
string
Supports values "BID" or "ASK".
"BID" signifies that this order wants to buy QuantityToFill
total coins of the BuyingDAOCoinCreatorPublicKeyBase58CheckOrUsername
coin.
"ASK" signifies that this limit order wants to sell QuantityToFill
total coins of the BuyingDAOCoinCreatorPublicKeyBase58CheckOrUsername
coin.
TransactorPublicKeyBase58Check*
String
Public key of the user who created the the limit order being cancelled
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFees[]
Array of
objects that define additional outputs that need to be added to this transaction
CancelOrderID*
string
Unique order identifier for the original limit order to cancel. OrderID is also equivalent to the base64 transaction hash hex of the transaction that created the limit order.