### API Request Example Source: https://www.kookeey.net/apidoc An example of a complete API request URL, demonstrating the inclusion of the 'accessid', 'signature', and 'ts' parameters, along with an additional 'g' parameter. ```http https://kookeey.com/stock?accessid=1&signature=ZDQyNmExY2FiOWZhNDdiMjAzNTYyYmFhZDZmMWIyNzM4N2FjM2JmMA==&g=433&ts=1609430400 ``` -------------------------------- ### GET /stock Source: https://www.kookeey.net/apidoc Example endpoint for retrieving stock information using the required authentication parameters. ```APIDOC ## GET /stock ### Description Retrieves stock data from the Kookeey platform. All requests must be authenticated using a HMAC-SHA1 signature. ### Method GET ### Endpoint https://kookeey.com/stock ### Parameters #### Query Parameters - **accessid** (string) - Required - Developer ID obtained from account information. - **signature** (string) - Required - HMAC-SHA1 signature generated from request parameters. - **ts** (int) - Required - Request timestamp. - **g** (string) - Optional - Specific parameter for the stock interface. ### Request Example https://kookeey.com/stock?accessid=1&signature=ZDQyNmExY2FiOWZhNDdiMjAzNTYyYmFhZDZmMWIyNzM4N2FjM2JmMA==&g=433&ts=1609430400 ### Response #### Success Response (200) - **success** (bool) - Request status (true/false). - **data** (object) - Response data payload. - **msg** (string) - Status message. - **code** (int) - Result code. #### Response Example { "success": true, "data": {}, "msg": "success", "code": 200 } ``` -------------------------------- ### Signature Generation Methods Source: https://www.kookeey.net/apidoc This section provides code examples for generating the API signature using HMAC-SHA1 and base64 encoding. It covers implementations in Java, PHP, and Python, detailing the necessary libraries and encoding steps. ```java Base64(HMAC-SHA1(encryption_key,UTF-8-Encoding-Of(parameter_string))) ``` ```php base64_encode(hash_hmac("sha1", parameter_string, encryption_key, false)) ``` ```python base64.b64encode((hmac.new(bytes(encryption_key,encoding='utf-8'),bytes(parameter_string.strip('&'),encoding='utf-8'),hashlib.sha1).hexdigest()).encode("utf-8")) ``` -------------------------------- ### API Request URL Structure Source: https://www.kookeey.net/apidoc The base URL for API requests is https://kookeey.com/. All requests must use the HTTP GET method and include the 'accessid', 'signature', and 'ts' parameters. The request frequency is limited to 10 queries per second per account. ```http https://kookeey.com/[method]?accessid=[developer_id]&signature=[signature_value]&ts=[request_timestamp] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.