Hive Engine Platform Developer Documentation. logo

Market

See definitions:

Tables:
Table: buyBook

list of all the pending buy orders

txIdtransactionId
timestamptimestamp
accountaccount owning the order
symbolsymbol of the token to exchange
quantityquantity of tokens to buy
priceprice (base/token)
priceDecdescending price (base/token)
tokensLockednumber of remaining base tokens that are locked into the smart contract
expirationexpiration
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

txIdtransactionId
timestamptimestamp
accountaccount owning the order
symbolsymbol of the token to exchange
quantityquantity of tokens to buy
priceprice (base/token)
priceDecdescending price (base/token)
expirationexpiration
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
typetype
buyerbuyer
sellerseller
symbolsymbol of the token
quantityquantity
priceprice
timestamptimestamp
volumevolume
buyTxIdbuy transaction id
sellTxIdsell 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
symbolsymbol of the token
volumevolume
volumeExpirationvolume expiration
lastPricelast price
lowestAsklowest ask
highestBidhighest bid
lastDayPricelast day price
lastDayPriceExpirationlast day price expiration
priceChangeHiveprice change hive
priceChangePercentprice 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: params

contains contract parameters such as the current fees

nftCreationFeethe fee in ENG for creating a new NFT through the create action
nftIssuanceFeea 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.
dataPropertyCreationFeethe 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.
enableDelegationFeethe 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:

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' ]
}
issuerthe Steem account that owns the NFT (i.e. called the create action)
symbolthe token symbol
namethe human friendly name of the token
metadatatoken metadata such as the URL and long text description
maxSupplymax supply of the token, or 0 if supply is unlimited
supplythe number of tokens which have been issued to date
circulatingSupplythe number of tokens in circulation (i.e. tokens that have not been burned)
delegationEnabledis delegation enabled for this NFT? (true / false)
undelegationCooldownif delegation is enabled, this will be the number of days of cooldown needed when a token is undelegated
authorizedIssuingAccountslist of Steem accounts authorized to issue tokens on behalf of the NFT owner
authorizedIssuingContractslist of smart contracts authorized to issue tokens on behalf of the NFT owner
propertiesschema definition of any data properties belonging to this NFT
groupBylist 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

symbolthe token symbol
idsarray of token IDs which are batched together in this undelegation
completeTimestamptimestamp 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:

_idthe token ID number
accountthe Steem account or smart contract that holds this particular token
ownedByindicates 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".
lockedTokensdescribes all regular Steem Engine tokens which are locked in this particular NFT instance. If there are no locked tokens, the value will be {}
propertiesvalues 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: balances

balances of the users

accountaccount owning the balance
symbolsymbol of the token
balancequantity of tokens
stakequantity of tokens staked
pendingUnstakequantity of tokens being unstaked
delegationsInquantity of tokens being delegated to that account
delegationsOutquantity of tokens being delegated to other accounts
pendingUndelegationsquantity 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

fromaccount that initiated the delegation
toaccount that received the delegation
symbolsymbol of the token delegated
quantityquantity 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

accountaccount that initiated the unstake
symbolsymbol of the token being unstaked
quantityquantity of tokens being unstaked
quantityLeftquantity of tokens still to unstake
nextTransactionTimestamptimestamp when the next unstake transaction will happen (in milliseconds)
numberTransactionsLeftnumber of transactions left for this unstake
txIDtransaction 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

accountaccount that initiated the undelegation
symbolsymbol of the token being undelegated
quantityquantity of tokens being undelegated
completeTimestamptimestamp when the undelegation will be completed (in milliseconds)
txIDtransaction 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

accountaccount that has contract balance
symbolsymbol of the token
balancequantity of tokens
stakequantity of tokens staked
pendingUnstakequantity of tokens being unstaked
delegationsInquantity of tokens being delegated to that account
delegationsOutquantity of tokens being delegated to other accounts
pendingUndelegationsquantity 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

tokenCreationFeetoken creation fee amount
enableDelegationFeeenable delegation fee amount
enableStakingFeeenable 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