API Usage Instructions v2023.12.01
Request
API request path: https://kookeey.com/
All requests use HTTP GET method
Requests must include 3 parameters: accessid, signature, and
ts
Request frequency limit: 10 qps/s per account
https://kookeey.com/[method]?accessid=[developer_id]&signature=[signature_value]&ts=[request_timestamp]
EXAMPLE:
https://kookeey.com/stock?accessid=1&signature=ZDQyNmExY2FiOWZhNDdiMjAzNTYyYmFhZDZmMWIyNzM4N2FjM2JmMA==&g=433&ts=1609430400
Signature
Signing method: Concatenate all request parameters, calculate HMAC-SHA1 using developer token, then perform base64 encoding
accessid: Developer ID (obtained from account information)
Encryption key: Obtained from account center
Parameter string: See specific interface definitions. Note that parameter order must match
URL parameter order (e.g., encrypted string: g=1&ts=1609430400)
Note: All examples use encryption key 1234567ABCDEFG for demonstration.
Use real data in production requests
EXAMPLE:
JAVA:
Base64(HMAC-SHA1(encryption_key,UTF-8-Encoding-Of(parameter_string)))
PHP(>=5.1.2):
base64_encode(hash_hmac("sha1", parameter_string, encryption_key, false))
PYTHON(>=3.0):
base64.b64encode((hmac.new(bytes(encryption_key,encoding='utf-8'),bytes(parameter_string.strip('&'),encoding='utf-8'),hashlib.sha1).hexdigest()).encode("utf-8"))
Response
Responses use JSON format
Standard response includes 4 parameters:
success/data/msg/code
| Parameter | Type | Description |
|---|---|---|
| success | bool | Request status: true = success,
false = failure
|
| data | object | Response data payload |
| msg | string | Status message |
| code | int | Result code |
Result Codes
| 0 | Success |
| 10006 | Invalid parameters |
| 10015 | Signature timeout |
| 10059 | Invalid/expired signature |
| 10061 | Quantity must be 1-99 |
| 20001 | Invalid data status |
| 20002 | Data not found |
| 20003 | Data already exists |
| 20004 | Username already exists |
| 40001 | Authentication error |
| 40005 | Insufficient balance |
| 40008 | At least one security policy required |
| 40009 | Unauthorized operation |
| 40010 | Account password authentication disabled |
| 40011 | Existing line with dedicated credentials |
| 40012 | Insufficient dynamic IP balance |
| 40013 | Exceeded dedicated line limit |
| 40014 | Product not available for self-purchase |
| 40015 | Inactive user |
| 40016 | Target user not under proxy |
| 40017 | Exceeded batch operation limit |
| 60001 | Request frequency too high |
| 80003 | Insufficient inventory |
| 80004 | Invalid order |
| 80005 | Payment failed |
| 80006 | Port in configuration |
| 80007 | Duplicate order submission |
| 80008 | Static port cannot be manually released |