Get Market Book
Retrieve the market book
This query has been deprecated. Read about how to stream our orderbook instead.
The market book is a list of orders on the BuyCoins P2P platform. You can view the market book using the getMarketBook query.
1
query {
2
getMarketBook {
3
dynamicPriceExpiry
4
orders {
5
edges {
6
node {
7
id
8
cryptocurrency
9
coinAmount
10
side
11
status
12
createdAt
13
pricePerCoin
14
priceType
15
staticPrice
16
dynamicExchangeRate
17
}
18
}
19
}
20
}
21
}
22
Copied!
getMarketBook returns two root fields: dynamicPriceExpiry and orders.
Dynamic prices are updated periodically in line with the fluctuations in the general prices of cryptocurrencies. dynamicPriceExpiry gives the timestamp when all dynamic prices will next be updated to the reflect the latest cryptocurrency prices.
For more details about dynamic price and how they are fetched and calculated, please refer to the Static and dynamic prices section on the Post Limit Order page.
The orders field is a graphql connection that returns the orders on the market book, including fields like cryptocurrency, side, and pricePerCoin for each order.
Parameters
  • status: The status of orders to fetch, either open or completed.
Response
  • dynamicPriceExpiry: The timestamp of the dynamic price update
  • orders: A graphql connection returning a list of orders
Order response fields:
  • id: Unique identifier of the order
  • cryptocurrency: Type of cryptocurrency
  • coinAmount: Amount of coins to trade
  • pricePerCoin: The price per coin in Naira
  • side: The order side (buy or sell)
  • status: The status of the order
  • createdAt: The timestamp when the order was created
  • staticPrice: The static price in Naira
  • priceType: The price type either static or dynamic
  • dynamicExchangeRate: The dynamic exchange rate in Naira
Last modified 7mo ago
Copy link