Tables
TABLE global
{name} fee_contract: the name of the account that hold the fees, by default it sets to fee.metal{uint16_t} last_market_id: indicates last market id(id of the pair) that was created{uint64_t} last_order_id: indicates last order id that was created(used to keep track order count and assign unique ids){uint64_t} last_trade_id: indicates last trade id that was created(used to keep track trades and assign unique ids){uint8_t} contract_status: to keep track of the contract status
example
{
"fee_contract": "fee.metal",
"last_market_id": "1",
"last_order_id": "5",
"last_trade_id": "2",
"contract_status": "0"
}TABLE markets
markets{uint16_t} market_id: id of the market pair.{uint64_t} order_min: min quantity to be placed for trade{status_code} status_code: represents status of the market id(can be ACTIVE, INACTIVE, NOTINUSE, DISABLE_ORDERS_FILLS, DISABLE_ORDERS and DISABLE_FILLS){uint64_t} ask_oracle_index: index of the oracles to get current price of the token{extended_symbol} bid_token: represents the bid value{extended_asset} ask_token: represents ask token in the form of extended asset{extended_asset} total_reserves: total reserves
TABLE balances
balances{name} account: user account for the funds/tokens{vector<extended_asset>}balances: balance of each token that holds by user/trader
example
TABLE orderq
orderqThis table stores all placed orders
{int64_t} order_id:id of the order that was placed.{uint16_t} market_id: id of the market pair.{uint64_t} quantity: represents how much quantity to buy/sell{uint64_t} price: price of the trade{name} account_name: represents account name of the trader{uint8_t} order_side: buy or sell{uint8_t} order_type: type of order, can be LIMIT, STOPLOSS and TAKEPROFIT{uint64_t} trigger_price: price at which order triggered to new state, applicable for both stop loss and take profit{uint8_t} fill_type: order fill types like GTC(Good Till expiry), IOC(Immediate or Cnacel) and Post_Only(used to provide liquidity)
TABLE order
orderThis table represents current order book
{int64_t} order_id:id of the order that was placed.{uint16_t} market_id: id of the market pair.{uint64_t} quantity: represents how much quantity to buy/sell{uint64_t} price: price of the trade{name} account_name: represents account name of the trader{uint8_t} order_side: buy or sell
TABLE fees
fees{name} account_name: user account to store fee related information{name} referrer_name: name of the account who referred{time_point} referrer_ends: referral's end time{double} volume_avg_30d: users's 30 day's average traded volume{time_point} volume_avg_last_update: time at which 30d avg volume updated{uint8_t} tier: tier of the user, can be set through Action also
example
TABLE currency_stats
currency_stats{asset} supply: supply{asset} max_supply: max supply of the token{name} issuer: issuer account name
example
TABLE voters_xpr
{name} owner: user account holding xpr{uint64_t} staked: staked amount{bool} isqualified: qualified flag{uint64_t} claimamount: total amount claim{uint64_t} lastclaim: last claim amountoptional{uint64_t} startstake: the last stake amount
example
TABLE assets_s
{uint64_t} asset_id: unique id of the nft asset{name} collection_name: name of the collection{name} schema_name: name of the schema to store details{uint32_t} template_id: template used to mint this nft asset{name} ram_payer: account to pay for the transactionvector<{asset}> backed_tokens: list of tokens backed this assetvector<{uint8_t}> immutable_serilized_data: immutable data to be serializedvector<{uint8_t}> mutable_serilized_data: mutable data to be serialized
example
Last updated

