@imwatsi shares an update on the development of the Hive DEX API.
I’m pleased to announce that the Hive DEX API (beta) is now live. It is based on HAF and provides endpoints with market data on the internal decentralized exchange for the HIVE/HBD market.
I designed this API according to Coingecko’s guidelines for possible inclusion on their platform.
With this API, we can leverage the datasets provided by HAF to bring extra data about the internal HBD-HIVE exchange such as:
Features like these will give traders and trading platforms a more detailed look into the decentralized exchange we have and give traders more data to inform their decisions.
The following endpoints are available.
This returns the list of available market pairs. (Currently, only HIVE-HBD is available)
Example response:
{
"timezone": "UTC",
"server_time": "2022-11-07T04:57:24",
"symbols": [
{
"ticker": "HIVE_HBD",
"base": "HIVE",
"quote": "HBD"
}
]
}
Returns bids and asks orders that are currently open. Supports custom depth of orderbook, default is 10.
Example response:
{
"timezone": "UTC",
"server_time": "2022-11-07T04:58:05",
"bids": [
[
"0.489209",
"9.035"
],
…
],
"asks": [
[
"0.490401",
"7802.516"
],
…
]
}
Returns ticker information for the ticker_id provided. Data returned includes 24 hour stats on trades and prices (high, low, volume, etc)
Example response:
{
"timezone": "UTC",
"server_time": "2022-11-07T14:51:29",
"ticker_id": "HIVE_HBD",
"base_currency": "HIVE",
"quote_currency": "HBD",
"data": {
"ask": 0.487734,
"bid": 0.486077,
"low": 0.475309,
"high": 0.512195,
"last_price": 0.486035,
"base_volume": 47592,
"quote_volume": 56073
}
}
The orderbook is showing a few discrepancies when compared to the one on the Hive nodes. I am investigating the issue.
by @imwatsi - Co-Founder | CEO | Blockchain Developer
Witness Name: @imwatsi
We're glad to be building on Hive.
Follow the @freebeings account for more updates.