The Unit Docs
Search…
⌃K

The Unit API

The Unit API uses GraphQL
Playground Url: https://graph.theunit.one

Schemas

UnitData

Field
Type
Description
time
String
The timestamp when the unit value got recorded
value
Float
The value of The Unit
market_cap
Float
Daily/hourly total market cap of all the coins that in The Unit
volume
Float
Daily/hourly total volume of all the coins that in The Unit

CoinUnitData

Field
Type
Description
time
String
The timestamp when the coin unit price got recorded
price
Float
The unit price of the coin
market_cap
Float
Daily/hourly total market cap of the coin
volume
Float
Daily/hourly total volume of the coin
coin_id
String
the coin id
price_change_24h
Float
24h change of the coin's unit price
price_change_percentage_24h
Float
24h change in percentage of the coin's unit price

Queries

coinUnitPrice: String
Get the unit price of a coin
  • (Required Param) coin_id: String - the id of the coin
  • (Return value) if the coin passed as param is in our supported list, this query will return the corresponding unit price; if not in the list, it will return error message.
**supportedCoinList: [String] **
Get the list of coins supported to get the unit price
  • (Return Value) List of coin ids supported in coinUnitPrice query
**coinUnitPriceWithCurrency: Float **
If the coin is not in supported list, get the unit price with a stable-coin currency and amount
  • (Required Param) currency: String - The currency to be converted into the unit price. Currently four currencies are supported: "usdt", "usdc", "dai", "busd".
  • (Required Param) amount: Float - The amount of currencies that needs to be converted.

unitDailyData: [UnitData]

Get the daily data of The Unit
  • (Optional Param) limit: Int - How many records will be returned in the response

coinUnitDailyData: [CoinUnitData]

Get the daily unit data of a specific coin
  • (Required Param) coin_id: String - the id of the coin to be queried
  • (Optional Param) limit: Int - How many records will be returned in the response

unitHourlyData: [UnitData]

Get the hourly data of The Unit
  • (Optional Param) limit: Int - How many records will be returned in the response

coinUnitHourlyData: [CoinUnitData]

Get the hourly unit data of a specific coin
  • (Required Param) coin_id: String - the id of the coin to be queried
  • (Optional Param) limit: Int - How many records will be returned in the response
More queries coming soon