### Place Sample Perpetual Order with Builder Code (JSON) Source: https://docs.hyena.trade/trading/api This snippet demonstrates the structure of a sample perpetual order request using JSON. It includes the necessary fields for placing an order, specifically highlighting the 'builder' object with the builder's address and fee, which is crucial for tracking trades on HyENA. ```json { "action": { "type": "order", "orders": [ { "a": 0, "b": true, "p": "111951", "s": "0.0012", "r": false, "t": { "limit": { "tif": "Gtc" } }, "c": "0xba5ed113124c5008ba5ed10000ba5ed1" } ], "grouping": "na", "builder": { "b": "0x1924b8561eef20e70ede628a296175d358be80e5", "f": 0 } }, "nonce": .., "signature": { ... } } ``` -------------------------------- ### Placing Orders Source: https://docs.hyena.trade/trading/api API traders can execute trades via Hyperliquid endpoints with a specified builder code for tracking purposes. The builder code '0x1924b8561eeF20e70Ede628A296175D358BE80e5' should be used with 0 builder fee for Ethena Points qualification. Applying the builder code does not incur additional fees. ```APIDOC ## POST /api/orders ### Description Place a new order on the Hyperliquid exchange through HyENA. Use the specified builder code for tracking and potential Ethena Points qualification. This endpoint requires the builder code in the request body. ### Method POST ### Endpoint /api/orders ### Parameters #### Request Body - **action** (object) - Required - The action object containing order details. - **type** (string) - Required - Must be 'order'. - **orders** (array) - Required - An array of order objects. - **a** (integer) - Required - Order type (e.g., 0 for limit order). - **b** (boolean) - Required - Buy/Sell flag. - **p** (string) - Required - Price of the order. - **s** (string) - Required - Size of the order. - **r** (boolean) - Required - Reduce only flag. - **t** (object) - Required - Time in force details. - **limit** (object) - Required - Limit order details. - **tif** (string) - Required - Time in force type (e.g., 'Gtc' for Good 'Til Canceled). - **c** (string) - Required - User-defined identifier for the order. - **grouping** (string) - Required - Grouping type (e.g., 'na'). - **builder** (object) - Required - Builder configuration for tracking. - **b** (string) - Required - The builder code (e.g., '0x1924b8561eef20e70ede628a296175d358be80e5'). - **f** (integer) - Required - Builder fee (must be 0). - **nonce** (integer) - Required - A unique nonce for the transaction. - **signature** (object) - Required - The signature for the transaction. ### Request Example ```json { "action": { "type": "order", "orders": [ { "a": 0, "b": true, "p": "111951", "s": "0.0012", "r": false, "t": { "limit": { "tif": "Gtc" } }, "c": "0xba5ed113124c5008ba5ed10000ba5ed1" } ], "grouping": "na", "builder": { "b": "0x1924b8561eef20e70ede628a296175d358be80e5", "f": 0 } }, "nonce": 12345, "signature": { "r": "0x...", "s": "0x...", "v": 27 } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the order placement. - **order_id** (string) - The unique identifier of the placed order. #### Response Example ```json { "status": "success", "order_id": "ord_123abc" } ``` ``` -------------------------------- ### Order Modification Rules Source: https://docs.hyena.trade/trading/api Modifications to existing orders do not support the 'builder' configuration directly within the modification call. However, any modifications applied to an order will inherit the builder code settings that were initially applied when the order was placed. ```APIDOC ## PUT /api/orders/{order_id} ### Description Modify an existing order. Note that the `builder` configuration cannot be directly included in the modification request body. The order will retain the builder settings from its initial placement. ### Method PUT ### Endpoint /api/orders/{order_id} ### Parameters #### Path Parameters - **order_id** (string) - Required - The unique identifier of the order to modify. #### Request Body - **updates** (object) - Required - An object containing the fields to update for the order. - **p** (string) - Optional - New price for the order. - **s** (string) - Optional - New size for the order. - **t** (object) - Optional - New time in force details. - **limit** (object) - Optional - Limit order details. - **tif** (string) - Optional - New time in force type. ### Request Example ```json { "updates": { "p": "112000", "s": "0.0015" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the order modification. - **order_id** (string) - The identifier of the modified order. #### Response Example ```json { "status": "success", "order_id": "ord_123abc" } ``` ``` -------------------------------- ### API Rate Limits Source: https://docs.hyena.trade/trading/api HyENA API limits are aligned with Hyperliquid's API rate limits. Refer to the Hyperliquid documentation for detailed information on rate limits and user limits. ```APIDOC ## GET /api/limits ### Description Retrieve information about the API rate limits and user limits applicable to the HyENA platform, which are based on Hyperliquid's limits. ### Method GET ### Endpoint /api/limits ### Parameters None ### Response #### Success Response (200) - **rate_limits** (object) - Details on API rate limits. - **user_limits** (object) - Details on user-specific limits. #### Response Example ```json { "rate_limits": { "requests_per_minute": 120, "concurrent_connections": 10 }, "user_limits": { "max_open_orders": 100 } } ``` ### Further Information For detailed information on Hyperliquid's API limits, please refer to: ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.