Log In

When reading data, you retrieve data that has already been written onto the blockchain and work with the data to display it in some way. This usually involves reading data from a JSON source. Liminal.market has already setup an index on TheGraph, to simplify the process for you.

You can play with the data in TheGraph playground. There you have ready-made templates.

Here is a simple example of Javascript code that pulls the data

let  url = 'https://api.thegraph.com/subgraphs/name/liminal-market/liminal-market-mumbai';

let  query = { query:  'query { liminalMarketInfos { txCount, walletCount, value }}'};
let  request = await  fetch(url, {
	method:  'POST',
	headers: { 'Content-Type':  'application/json' },
	body:  JSON.stringify(query)
});

let  result = await  request.json();
let  data = result.data.liminalMarketInfos[0];
  
//data from response
let  walletCount = data.walletCount;
let  txCount = data.txCount;
let  value = data.value;

Orders properties

  • id - hash of the transaction
  • dailyId - time in mililseconds represeting the day the order was executed
  • hourlyId - time in mililseconds represeting the hour of the day the order was executed
  • side - buy or sell order
  • symbol - symbol of the order
  • tslWei - total stock in the wallet in Wei
  • tsl - total stock in the wallet
  • filledQtyWei - total quantity filled by the order in Wei
  • filledQty - total quantity filled by the order
  • filledAvgPriceWei - avg price of each stock that filled the order in Wei
  • filledAvgPrice - avg price of each stock that filled the order
  • filledAt - time in mililseconds when it was executed
  • serviceFeeWei - serviceFee that liminal.market charge for the trade n Wei
  • serviceFee - serviceFee that liminal.market charge for the trade
  • aUsdBalanceWei - balance in aUSD of the wallet after the order was executed in Wei
  • aUsdBalance - balance in aUSD of the wallet after the order was executed
  • tradeId - unique id from broker
  • spender - smart contract that executed the trade