Request & Response Format
Last updated
Last updated
The Haiku Enterprise API follows a strict JSON-based format for all requests and responses.
All requests must include the following header:
All API requests must be sent in JSON format
Any request that does not include the above header will be rejected
All responses are returned in JSON format
Responses include standard HTTP status codes to indicate success or failure
The API provides detailed error messages to assist with debugging.
Example successful response:
Example error response:
Haiku uses a standardised token identifier (iid) format to specify assets:
Example:
arb:0xaf88d065e77c8cC2239327C5EDb3A432268e5831 --> USDC on Arbitrum (chain 42161)
Haiku uses a special elastic address to represent native tokens (e.g. ETH) - e.g. arb:0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee --> ETH on Arbitrum (chain 42161)
Elastic addresses are used to ensure consistency across chains without requiring unique token contracts for each network.
Haiku Enterprise API currently supports the following blockchains:
Haiku supports Uniswap's Permit2 architecture, allowing gas-efficient token approvals. Permit2 reduces transaction overhead, is more secure than traditional ERC-20 allowances, and simplifies user experience by eliminating unnecessary steps.
Users sign a Permit2 message approving token allowances
Haiku bundles the approval and trade transaction into one atomic execution
The transaction executes securely without multiple approve
calls.
Additional chains are coming soon and developers should check for updates.
For more details, see: