[POST] Create Spot exchange limit orders with advance filter
Allow user to place buy / sell orders with particular ticker Body
Table of Contents
Changelogs
Version | Date | Changes by | Description of change |
V1.0 | Jul 26, 2024 | Tam Tran |
|
V1.1 | Dec 24, 2024 | Tam Tran |
|
Order Resource
OrderId number 订单唯一标识符 Order unique Identifier 订单唯一标识符 |
TickerId text 绿证行情唯一标识符 Ticker unique id 绿证行情唯一标识符,可类比“股票代码”,组成格式: “国家代码.生效年.能源类型.注册处” |
{
"TickerId": "VN.24.SLR.i",
"OrderId": 14272
}
API Definition
POST /public/v2/exchange/spot/limit-orders/filter
Request
Headers
Content-Type |
|
Authorization |
|
Payload
Quantity (required) number 数量(必须) Order quantity. 订单数量 |
Price (required) number 价格 (必须) Order price. 订单价格 |
OrderSide (required) text - enum 订单方 (必须) 文本类型
|
TickerId (required) text 绿证行情唯一标识符 (必须) Ticker Unique Identifier 绿证行情唯一标识符,可类比“股票代码”,组成格式: “国家代码.生效年.能源类型.注册处” |
MarketId (required) int
|
AdvanceFilters (optional) object Advance Filter Request
|
curl --location --request POST 'https://uat-api.redex.eco/public/v2/exchange/spot/limit-orders/filter' \
--header 'Authorization: Bearer {{access_token}}'
--data '{
"TickerId": "VN.24.SLR.i",
"OrderSide": "Buy",
"Quantity": 1,
"Price": 31,
"MarketId": 1,
"AdvanceFilters": {
"VintageMonthFrom": 1,
"VintageMonthTo": 12,
"Province": "VN-01",
"DeviceType": "Normal",
"CommencedOperationDateCondition": {
"ComparisonType": "LessThanOrEqualTo",
"YearsAgo": 15
},
"FeedInTariff": false,
"ConnectedToGrid": false,
"OtherLabelingScheme": "D-REC",
"CapacityFrom": 15,
"CapacityTo": 500
}
}'
Response
Response Body |
Data:OrderId number Order Unique Identifier Data:TickerId text Ticker Unique Identifier |
Errors list of error objects Please see "Getting Started - #Error Object" for more details 请查看Getting Started - #Error Object以获得更多信息。 |
Meta pagination resource Return Pagination Resource 返回分页信息 |
StatusCode integer Http Status codes standard. Example http状态码,如200,201,400, 422 |
Message text Response message: Success or error message. 返回成功或错误的信息。 |
201 Success
{
"Data": {
"TickerId": "VN.24.SLR.i",
"OrderId": 14272
},
"Meta": null,
"Errors": null,
"StatusCode": 200,
"Message": "Success"
}
400 Bad Request
{
"Data": null
"StatusCode": 400,
"Errors": null,
"Meta": null,
"Message": "Bad Request"
}
422 Unprocessable Entity
{
"Data": null
"StatusCode": 402,
"Errors": null,
"Meta": null,
"Message": "Unprocessable Entity"
}
401 Unauthorized
{
"Data": null,
"StatusCode": 401,
"Errors": null,
"Meta": null,
"Message": "Unauthorized"
}
403 Forbidden
{
"Data": null,
"StatusCode": 403,
"Errors": null,
"Meta": null,
"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: 10 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 10 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
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
}