💲Price

Gets the 24 hour price history with one hour interval.

get

This route returns the price history of a project for the past 24 hours.The route first queries the database for all the prices within the 24 hour time frame.The route then returns the average of the prices found with one hour interval.

Path parameters
projectIdstringRequired
Responses
200
Successful
application/json
get
GET /api/v1/price/history/daily/{projectId} HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
  "ok": true,
  "result": {
    "history": [
      {
        "avgPrice": 786,
        "hour": "2022-06-09 14:58:48.172000 +00:00"
      }
    ]
  }
}

Gets one month price history with one day interval.

get

This route returns the price history of a project for the past month.The route first queries the database for all the prices within the one month time frame.The route then returns the average of the prices found with one day interval.

Path parameters
projectIdstringRequired
Responses
200
Successful
application/json
get
GET /api/v1/price/history/monthly/{projectId} HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
  "ok": true,
  "result": {
    "history": [
      {
        "avgPrice": 786,
        "day": "2022-06-09 14:58:48.172000 +00:00"
      }
    ]
  }
}

Gets one year price history with one month interval.

get

This route returns the price history of a project for the past year.The route first queries the database for all the prices within the one year time frame.The route then returns the average of the prices found with one month interval.

Path parameters
projectIdstringRequired
Responses
200
Successful
application/json
get
GET /api/v1/price/history/yearly/{projectId} HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
  "ok": true,
  "result": {
    "history": [
      {
        "avgPrice": 786,
        "month": "2022-06-09 14:58:48.172000 +00:00"
      }
    ]
  }
}

Last updated