Market
See definitions:
Tables:
Table: buyBooklist of all the pending buy orders
txId | transactionId |
timestamp | timestamp |
account | account owning the order |
symbol | symbol of the token to exchange |
quantity | quantity of tokens to buy |
price | price (base/token) |
priceDec | descending price (base/token) |
tokensLocked | number of remaining base tokens that are locked into the smart contract |
expiration | expiration |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "buyBook",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "buyBook",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "buyBook",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "buyBook",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: sellBook
list of all the pending sell orders
txId | transactionId |
timestamp | timestamp |
account | account owning the order |
symbol | symbol of the token to exchange |
quantity | quantity of tokens to buy |
price | price (base/token) |
priceDec | descending price (base/token) |
expiration | expiration |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "sellBook",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "sellBook",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "sellBook",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "sellBook",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: tradesHistory
type | type |
buyer | buyer |
seller | seller |
symbol | symbol of the token |
quantity | quantity |
price | price |
timestamp | timestamp |
volume | volume |
buyTxId | buy transaction id |
sellTxId | sell transaction id |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "tradesHistory",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "tradesHistory",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "tradesHistory",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "tradesHistory",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: metrics
symbol | symbol of the token |
volume | volume |
volumeExpiration | volume expiration |
lastPrice | last price |
lowestAsk | lowest ask |
highestBid | highest bid |
lastDayPrice | last day price |
lastDayPriceExpiration | last day price expiration |
priceChangeHive | price change hive |
priceChangePercent | price change percent |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "metrics",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "metrics",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "market",
"table": "metrics",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "market",
"table": "metrics",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Nfts
Note: all tables below have an implicit _id field that provides a unique numeric identifier for each particular object in the database. Most of the time the _id field is not important, so we have omitted it from table descriptions. The one exception is the NFT instance table, as the _id serves as the token ID used to refer to that particular token in data queries and various smart contract actions.
See definitions:
Tables:
Table: paramscontains contract parameters such as the current fees
nftCreationFee | the fee in ENG for creating a new NFT through the create action |
nftIssuanceFee | a mapping of Steem Engine tokens that can be used to pay for new NFT issuance through the issue action. The issuer can choose which of these tokens to pay the fee in. |
dataPropertyCreationFee | the fee in ENG for adding new data properties to an NFT's definition through the addProperty action. Note that the first 3 properties are free; this fee must be paid for each additional property added beyond the first three. |
enableDelegationFee | the fee in ENG for enabling delegation support through the enableDelegation action |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "nft",
"table": "params",
"query": {}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "nft",
"table": "params",
"query": {}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: nfts
Contains definitions of each NFT.
The properties field is a dictionary mapping property names to schema that have their own structure as follows:
type
indicates the type of the data property. Can be string, number, or boolean.isReadOnly
if true, this data property can be set exactly once and then never changed again.authorizedEditingAccounts
list of Steem accounts that are authorized to edit this data propertyauthorizedEditingContracts
list of smart contracts that are authorized to edit this data property
Example of a typical NFT definition:
{
_id: 1,
issuer: 'cryptomancer',
symbol: 'TSTNFT',
name: 'test NFT',
metadata: '{\"url\":\"https://my-test-nft.com\",\"icon\":\"https://my-test-nft.com/image.jpg\",\"desc\":\"My cool token will rule the world!\"}',
maxSupply: 1000,
supply: 456,
circulatingSupply: 450,
delegationEnabled: true,
undelegationCooldown: 7,
authorizedIssuingAccounts: [ 'cryptomancer' ],
authorizedIssuingContracts: [],
properties: {
color: {
type: 'string',
isReadOnly: false,
authorizedEditingAccounts: [ 'cryptomancer' ],
authorizedEditingContracts: []
},
level: {
type: 'number',
isReadOnly: false,
authorizedEditingAccounts: [ 'cryptomancer' ],
authorizedEditingContracts: []
},
frozen: {
type: 'boolean',
isReadOnly: true,
authorizedEditingAccounts: [ 'cryptomancer' ],
authorizedEditingContracts: []
},
isFood: {
type: 'boolean',
isReadOnly: false,
authorizedEditingAccounts: [ 'cryptomancer' ],
authorizedEditingContracts: []
}
},
groupBy: [ 'level', 'isFood' ]
}
issuer | the Steem account that owns the NFT (i.e. called the create action) |
symbol | the token symbol |
name | the human friendly name of the token |
metadata | token metadata such as the URL and long text description |
maxSupply | max supply of the token, or 0 if supply is unlimited |
supply | the number of tokens which have been issued to date |
circulatingSupply | the number of tokens in circulation (i.e. tokens that have not been burned) |
delegationEnabled | is delegation enabled for this NFT? (true / false) |
undelegationCooldown | if delegation is enabled, this will be the number of days of cooldown needed when a token is undelegated |
authorizedIssuingAccounts | list of Steem accounts authorized to issue tokens on behalf of the NFT owner |
authorizedIssuingContracts | list of smart contracts authorized to issue tokens on behalf of the NFT owner |
properties | schema definition of any data properties belonging to this NFT |
groupBy | list of data property names by which market orders for NFT instances should be grouped |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "nft",
"table": "nfts",
"query": {
"symbol": "CITY"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "nft",
"table": "nfts",
"query": {
"symbol": "CELL"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: pendingUndelegations
contains records of all undelegations which are waiting for cooldown to complete
symbol | the token symbol |
ids | array of token IDs which are batched together in this undelegation |
completeTimestamp | timestamp when the undelegation will be completed (in milliseconds) |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "nft",
"table": "pendingUndelegations",
"query": {
"symbol": "CITY"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "nft",
"table": "pendingUndelegations",
"query": {
"symbol": "CELL"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: SYMBOLinstances
Every NFT symbol has its own separate table to store NFT instances (issued tokens). The instance table name for a particular symbol is formed by taking the symbol and adding “instances” to the end of it. Thus, if you have an NFT called MYNFT, the MYNFTinstances table will store all the issued MYNFT tokens.
The delegatedTo
field has its own structure as follows:
account
the Steem account or smart contract that the token is delegated toownedBy
indicates if the token is delegated to a Steem account or smart contract. For a Steem account, the value will be “u”. For a smart contract, the value will be “c”.- (optional)
undelegateAt
if this token is pending undelegation, this will be the timestamp when the undelegation will be completed (in milliseconds). If there is no pending undelegation, this field will not exist (will be undefined)
_id | the token ID number |
account | the Steem account or smart contract that holds this particular token |
ownedBy | indicates if this token is held in a Steem account or smart contract. For a Steem account, the value will be "u". For a smart contract, the value will be "c". |
lockedTokens | describes all regular Steem Engine tokens which are locked in this particular NFT instance. If there are no locked tokens, the value will be {} |
properties | values of all the data properties for this particular NFT instance. If there are no data properties set, the value will be {} |
lockedNfts | (optional) describes all NFT instances which are locked in this particular NFT instance. If there are no locked NFT instances, this field will not exist (will be undefined). For burned tokens on the null account, this field may exist but with the value set to an empty array [] |
delegatedTo | (optional) if this token is delegated, will contain information about which account or contract the token is delegated to. If there is no delegation, this field will not exist (will be undefined). |
previousAccount | (optional) the Steem account or smart contract that previously held this particular token. Will only be set if the token has been burned or transferred at least once. If a token was bought on the market, previousAccount will be the NFT market contract itself. |
previousOwnedBy | (optional) same meaning as ownedBy, but for the Steem account or smart contract that previously held this particular token. Will only be set if previousAccount is set. |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "nft",
"table": "CITYinstances",
"query": {
"ownedBy": "u",
"account": "r0nd0n"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "nft",
"table": "CELLinstances",
"query": {
"ownedBy": "u",
"account": "beggars"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Tokens
See definitions:
Tables:
Table: balancesbalances of the users
account | account owning the balance |
symbol | symbol of the token |
balance | quantity of tokens |
stake | quantity of tokens staked |
pendingUnstake | quantity of tokens being unstaked |
delegationsIn | quantity of tokens being delegated to that account |
delegationsOut | quantity of tokens being delegated to other accounts |
pendingUndelegations | quantity of tokens being undelegated |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "balances",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "balances",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "balances",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "balances",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: delegations
opened delegations
from | account that initiated the delegation |
to | account that received the delegation |
symbol | symbol of the token delegated |
quantity | quantity of tokens delegated |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "delegations",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "delegations",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "delegations",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "delegations",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: pendingUnstakes
pending unstakes
account | account that initiated the unstake |
symbol | symbol of the token being unstaked |
quantity | quantity of tokens being unstaked |
quantityLeft | quantity of tokens still to unstake |
nextTransactionTimestamp | timestamp when the next unstake transaction will happen (in milliseconds) |
numberTransactionsLeft | number of transactions left for this unstake |
txID | transaction ID used to initiate the unstake |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "pendingUnstakes",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "pendingUnstakes",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "pendingUnstakes",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "pendingUnstakes",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: pendingUndelegations
pending undelegations
account | account that initiated the undelegation |
symbol | symbol of the token being undelegated |
quantity | quantity of tokens being undelegated |
completeTimestamp | timestamp when the undelegation will be completed (in milliseconds) |
txID | transaction ID used to initiate the undelegation |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "pendingUndelegations",
"query": {
"symbol": "BEE",
"account": "alice"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "pendingUndelegations",
"query": {
"symbol": "BEE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "pendingUndelegations",
"query": {
"symbol": "ENG",
"account": "alice"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "pendingUndelegations",
"query": {
"symbol": "ENG"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: contractsBalances
contracts balances
account | account that has contract balance |
symbol | symbol of the token |
balance | quantity of tokens |
stake | quantity of tokens staked |
pendingUnstake | quantity of tokens being unstaked |
delegationsIn | quantity of tokens being delegated to that account |
delegationsOut | quantity of tokens being delegated to other accounts |
pendingUndelegations | quantity of tokens being undelegated |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "contractsBalances",
"query": {
"symbol": "SWAP.HIVE",
"account": "market"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "contractsBalances",
"query": {
"symbol": "SWAP.HIVE"
}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "contractsBalances",
"query": {
"symbol": "STEEMP",
"account": "market"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "find",
"params": {
"contract": "tokens",
"table": "contractsBalances",
"query": {
"symbol": "STEEMP"
}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts
Table: params
contract params
tokenCreationFee | token creation fee amount |
enableDelegationFee | enable delegation fee amount |
enableStakingFee | enable staking fee amount |
Hive Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "params",
"query": {}
},
"id": 1
}' https://api.hive-engine.com/rpc/contracts
Steem Engine Example curl
curl -s -H "Content-type: application/json" -d '{
"jsonrpc": "2.0",
"method": "findOne",
"params": {
"contract": "tokens",
"table": "params",
"query": {}
},
"id": 1
}' https://api.steem-engine.com/rpc/contracts