Bazaar
Queries
bazaarOrder
bazaarOrderReturns a single Bazaar Order according to its orderId.
bazaarOrder(orderId: ID!): BazaarOrderbazaarOrders
bazaarOrdersReturns multiple Bazaar Orders according to the arguments passed.
bazaarOrders(
skip: Int
first: Int
orderBy: BazaarOrderOrderBy
orderDirection: OrderDirection
where: BazaarOrderFilter
): [BazaarOrder]!bazaarTransactions
bazaarTransactionsReturns multiple Bazaar Transactions according to the arguments passed.
bazaarTransactions(
skip: Int
first: Int
orderBy: BazaarTransactionOrderBy
orderDirection: OrderDirection
where: BazaarTransactionFilter
): [BazaarTransaction]!Object Types
BazaarOrder
BazaarOrderThe BazaarOrder object type contains the following fields:
orderId:ID- the order ID - Crystalvale IDs are padded by1000000000000(one trillion), and Serendale (Klaytn) IDs are padded by2000000000000(two trillion).network:String- the network of the order, eitherdfkorklaopen:Boolean- whether the order is currently open (true) or closed (false)cancelledStamp:Int- if the order was cancelled, the Unix timestamp of the cancellationcreatedStamp:Int- the Unix timestamp at which the order was createdtokenAddress:String- the contract address of the order tokentokenId:Int- for ERC-1155 tokens, thetokenId; for ERC-20 tokens,0isErc20:Boolean- whether the order token is an ERC-20 token (true) or an ERC-1155 token (false)side:Int- whether the order is submitted to the buy (0) or sell (1) side of the order bookprice:String- thepricePerUnit (in wei) * 10^12
initialQuantity:String- the quantity of tokens initially submitted with the orderremainingQuantity:String- the remaining quantity of items that are unfulfilled in the orderbaseTokenAddress:String- the contract address of the base token (always JEWEL)owner:Profile- theProfileof the owner/creator of the order
Bazaar Transaction
Bazaar TransactionThe BazaarTransaction object type contains the following fields:
orderId:ID- the order ID that is being transacted upon - Crystalvale IDs are padded by1000000000000(one trillion), and Serendale (Klaytn) IDs are padded by2000000000000(two trillion).network:String- the network of the order/transaction, eitherdfkorklatxHash:String- the blockchain transaction hash of the transactionexecutedStamp:Int- the Unix timestamp at which the transaction was executedquantity:String- the quantity of tokens executed in the transactionprice:String- thepricePerUnit (in wei) * 10^12
side:Int- whether the order being transacted upon is on the buy (0) or sell (1) side of the order booktokenAddress:String- the contract address of the transacted tokentokenId:Int- for ERC-1155 tokens, thetokenId; for ERC-20 tokens,0initiator:Profile- theProfileof the initiator of the transactionowner:Profile- theProfileof the owner/creator of the order that is being transacted upon
Examples
Example 1
The first 100 open Bazaar Orders sorted by most recently created:
{
bazaarOrders(
first: 100,
orderBy: createdStamp,
orderDirection: desc,
where: {
open: true
}
) {
orderId
tokenAddress
price
side
}
}Example 2
All Bazaar Transactions for Bloaters executed against buy orders on DFK Chain
{
bazaarTransactions(
where: {
network: "dfk",
side: 0,
tokenAddress: "0x268CC8248FFB72Cd5F3e73A9a20Fa2FF40EfbA61"
}
) {
orderId
price
executedStamp
quantity
}
}Last updated
