Table of Contents
Table of Contents | ||
---|---|---|
|
Changelogs
Version | Date | Changes by | Description of change |
V1.0.0 | Que Nguyen |
|
REC Transaction History Resource
绿证交易历史资源
TransactionId text 交易唯一标识符 Transaction unique identifier 交易唯一标识符 |
TransactionTime datetime Transaction time 交易时间 |
Type object Transaction Type object includes Value Description 交易类型对象,包括交易值描述 |
Type.Value text Transaction Type’s Value 交易类型值 |
Type.Description text Transaction Type’s Description 交易类型描述 |
Registry - object Registry object with Value and Description 注册中心对象,包括值和描述 |
Registry.Value - text Registry Value 注册中心值 |
Registry.Description - text Registry Description name 注册中心描述 |
Notes text Transaction’s note.
|
Details array[object] - array object of REC Transaction Detail Resource 详情 [对象类型数据] - 绿证交易详细资源对象数组 A collections of REC details include RECs information transacted in this transaction 一个包括在此次交易中的绿证信息的详细集合 |
Code Block | ||
---|---|---|
| ||
{ "TransactionId": "TRANS-IREC-RETI-20240522-50N5-00004", "TransactionTime": "2024-05-22T06:54:51.863", "Type": { "Value": "Retirement", "Description": "Retirement" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "Notes": "", "Details": [ { "AssetName": "Khanh Hoa K1234 Looming", "SerialNumber": "IREC-KHANES20001-VN-2020-0101-0530-1.066602 to 1.069015", "CountryCode": "VN", "Energy": "Wind", "Vintage": "2020", "Total": 0.002414, "RecPrefix": "IREC-KHANES20001-VN-2020-0101-0530", "VintageFrom": "2020-01-01T17:00:00", "VintageTo": "2020-05-30T17:00:00" } ] } |
REC Transaction Detail Resource
绿证交易详细资源
AssetName text 资产名称 Device or Grouped Device name put into asset that is transacted 包括在交易资产中的设备或者分组设备名称 |
SerialNumber text 序列号 REC Serial number 绿证序列号 |
CountryCode text 国家代码 Country alpha code, ISO3166 (VN, CN, …) 国家字符代码,ISO3166(VN, CN, …) |
Vintage number 有效期 Vintage year of REC 绿证有效年份 |
Total number 总数 Total REC transacted 绿证交易总数 |
RecPrefix text REC prefix number 绿证前缀数字 |
VintageFrom datetime 有效起始时间 Vintage start date. |
VintageTo datetime 有效结束时间 Vintage end date. |
Code Block | ||
---|---|---|
| ||
{ "AssetName": "Khanh Hoa K1234 Looming", "SerialNumber": "IREC-KHANES20001-VN-2020-0101-0530-1.066602 to 1.069015", "CountryCode": "VN", "Energy": "Wind", "Vintage": "2020", "Total": 0.002414, "RecPrefix": "IREC-KHANES20001-VN-2020-0101-0530", "VintageFrom": "2020-01-01T17:00:00", "VintageTo": "2020-05-30T17:00:00" } |
Meta Pagination Resource
CurrentPage - integer Current page returned |
TotalPage - integer Total pages by items per page |
TotalItems - integer Total items number |
ItemsPerPage - integer Total items per page 每页数量 |
Code Block |
---|
{ "CurrentPage": 1, "TotalPage": 6, "TotalItems": 576, "ItemsPerPage": 100 |
API Definitions
Status | ||||
---|---|---|---|---|
|
/public/v2/inventories/recs/transaction-histories
Request
Headers
Content-Type |
|
Authorization |
|
Query Parameters
Types (optional) array[text] - enum 类型(可选) 数组[文本] - 枚举 Transaction 交易枚举值类型
|
DeviceId (optional) uuid 设别唯一标识符(可选) Device unique identifier for approved Device or Grouped Device 认证后的设备或者分组设备的唯一标识符 |
Registry (optional) text 注册中心(可选) Registry value (IREC, TIGR) 注册中心值(IREC,TIGR) |
CountryCodes (optional) array[text] 国家代码 Country alpha codes, ISO3166 (VN, CN, …) 国家字符代码,ISO3166(VN,CN,…) |
CurrentPage (optional) integer 当前页(可选) The page number to retrieve the next set of inverters. The number has to be greater than 1, and will default to 1. |
ItemsPerPage (optional) integer The maximum number of inverter brands to return per page. This number can range from 10 to 100 and defaults to 100. |
Code Block |
---|
curl --location 'https://uat-api.redex.eco/public/v2/inventories/recs/transaction-histories?CurrentPage=1&ItemsPerPage=100&Types=Retirement&Registry=IREC&DeviceId=7ea1e5a2-f4d8-4e4f-8cc8-b2eeaca5cad7&CountryCodes=VN' \ --header 'Authorization: Bearer {{access_token}}' |
Response
Response Body |
Errors list of error objects Please see "Getting Started - #Error Object" for more details |
Meta pagination resource Return Pagination Resource |
StatusCode integer Http Status codes standard. Example |
Message text Response message: Success or error message. |
Data array[object] - array object of REC Transaction Resource A collection of REC Transaction History Resource |
Info |
---|
200 OK |
Code Block | ||
---|---|---|
| ||
{ "Data": [ { "TransactionId": "TRANS-IREC-RETI-20240522-50N5-00004", "TransactionTime": "2024-05-22T06:54:51.863", "Type": { "Value": "Retirement", "Description": "Retirement" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "Notes": "", "Details": [ { "AssetName": "Khanh Hoa K1234 Looming", "SerialNumber": "IREC-KHANES20001-VN-2020-0101-0530-1.066602 to 1.069015", "CountryCode": "VN", "Energy": "Wind", "Vintage": "2020", "Total": 0.002414, "RecPrefix": "IREC-KHANES20001-VN-2020-0101-0530", "VintageFrom": "2020-01-01T17:00:00", "VintageTo": "2020-05-30T17:00:00" } ] } ], "Meta": { "CurrentPage": 1, "TotalPage": 46, "TotalItems": 46, "ItemsPerPage": 1 }, "Errors": null, "StatusCode": 200, "Message": "Success" } |
Warning |
---|
401 Unauthorized |
Code Block | ||
---|---|---|
| ||
{ "Data": null, "StatusCode": 401, "Meta": null, "Errors": [], "Message": "Unauthorized" } |
Warning |
---|
403 Forbidden |
Code Block |
---|
{ "Data": null, "StatusCode": 403, "Meta": null, "Errors": [], "Message": "Forbidden" } |
Rate limit
Rate Limit Algorithm: Fixed Window
In fixed window rate limiting, a fixed time window (e.g., one minute, one hour) is used to track the number of requests or actions allowed within that window. Requests exceeding the limit are either rejected or throttled until the window resets.
Rate Limiting Overview
Our API employs rate limiting to ensure fair usage and protect the performance and availability of the service. Combination of Global Policy and Operation Policy
Global Policy
Rate Limit: 3000 requests per 5 minute(s)
Renewal Period: 300 second(s)
Key: IP Address
Increment Condition: Any Request
Operation Policy
Rate Limit: 60 requests per 1 minute(s)
Renewal Period: 60 second(s)
Key:
accound-id
business account Id.Increment Condition: Any Request.
Rate Limit Details
Rate Limit by Key:
Key: This ensures that rate limits are applied uniquely for each business account id.
Request Limit: Each key is allowed to make up to 60 requests per minute.
Reset Interval: The limit resets every 60 seconds.
Response Headers:
Retry-After: Sent when the rate limit is exceeded, indicating how long to wait before making another request.
Exceeding the Rate Limit
When the rate limit is exceeded, the API will return a 429 Too Many Requests
status code. The response will include a Retry-After
header specifying the number of seconds to wait before making a new request.
Example Response When Rate Limit is Exceeded
Code Block | ||
---|---|---|
| ||
HTTP/1.1 429 Too Many Requests Retry-After: 60 Content-Type: application/json { "Data": null, "Errors": null, "StatusCode": 429, "Message": "Rate limit exceeded", "Meta": null } |