{"id":47157510,"url":"https://github.com/quiknode-labs/hyperliquid-api-examples","last_synced_at":"2026-03-13T02:30:52.559Z","repository":{"id":340670986,"uuid":"1167011402","full_name":"quiknode-labs/hyperliquid-api-examples","owner":"quiknode-labs","description":"Clone-and-run examples for the Hyperliquid API — Python, TypeScript, and Rust","archived":false,"fork":false,"pushed_at":"2026-03-04T22:52:57.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T04:58:07.383Z","etag":null,"topics":["blockchain","crypto","cryptocurrency","hyperliquid","hyperliquid-api","hyperliquid-dex","hyperliquid-trading-bot","python","rust","trading","trading-api","typescript","web3"],"latest_commit_sha":null,"homepage":"https://hyperliquidapi.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quiknode-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T21:13:57.000Z","updated_at":"2026-03-04T22:52:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quiknode-labs/hyperliquid-api-examples","commit_stats":null,"previous_names":["quiknode-labs/hypercore-trade-examples","quiknode-labs/hyperliquid-api-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/quiknode-labs/hyperliquid-api-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiknode-labs%2Fhyperliquid-api-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiknode-labs%2Fhyperliquid-api-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiknode-labs%2Fhyperliquid-api-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiknode-labs%2Fhyperliquid-api-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quiknode-labs","download_url":"https://codeload.github.com/quiknode-labs/hyperliquid-api-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiknode-labs%2Fhyperliquid-api-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30455766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T02:22:12.178Z","status":"ssl_error","status_checked_at":"2026-03-13T02:06:49.475Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","crypto","cryptocurrency","hyperliquid","hyperliquid-api","hyperliquid-dex","hyperliquid-trading-bot","python","rust","trading","trading-api","typescript","web3"],"created_at":"2026-03-13T02:30:51.996Z","updated_at":"2026-03-13T02:30:52.550Z","avatar_url":"https://github.com/quiknode-labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyperliquid API — Examples\n\nClone-and-run examples for the [Hyperliquid API](https://hyperliquidapi.com) builder API.\nTrade perps, spot, and HIP-3 markets on Hyperliquid via a single REST API endpoint.\nYour private key never leaves your machine — you sign locally, the service forwards to Hyperliquid.\n\n## Prerequisites\n\nExport your private key (hex, with or without `0x` prefix):\n\n```bash\nexport PRIVATE_KEY=\"0xYOUR_HEX_PRIVATE_KEY\"\n```\n\n---\n\n## Python\n\n```bash\ncd python\npip install -r requirements.txt\n```\n\nRun any example:\n\n```bash\npython3 approve.py          # one-time builder fee approval (run first)\npython3 check_status.py     # check approval status\npython3 list_markets.py     # list all perps, spot, and HIP-3 markets\npython3 open_orders.py      # view open orders with cancel actions\npython3 order_status.py 123 # check what happened to order by OID\npython3 place_order.py      # place BTC perp IOC buy (~$11)\npython3 cancel_order.py     # place resting order, then cancel it\npython3 modify_order.py     # place resting order, then modify its price\npython3 roundtrip.py        # IOC buy then sell (full trade cycle)\npython3 hip3_order.py       # HIP-3 market order (xyz:SILVER)\npython3 revoke.py           # revoke builder fee approval\n```\n\n---\n\n## TypeScript\n\n```bash\ncd typescript\nnpm install\n```\n\nRun any example:\n\n```bash\nnpx ts-node src/approve.ts       # one-time builder fee approval (run first)\nnpx ts-node src/checkStatus.ts   # check approval status\nnpx ts-node src/listMarkets.ts   # list all markets\nnpx ts-node src/openOrders.ts    # view open orders with cancel actions\nnpx ts-node src/orderStatus.ts 123  # check what happened to order by OID\nnpx ts-node src/placeOrder.ts    # place BTC perp IOC buy (~$11)\nnpx ts-node src/cancelOrder.ts   # place resting order, then cancel\nnpx ts-node src/modifyOrder.ts   # place resting order, then modify\nnpx ts-node src/roundtrip.ts     # IOC buy then sell (full trade cycle)\nnpx ts-node src/hip3Order.ts     # HIP-3 market order (xyz:SILVER)\nnpx ts-node src/revoke.ts        # revoke builder fee approval\n```\n\n---\n\n## Rust\n\n```bash\ncd rust\n```\n\nRun any example:\n\n```bash\ncargo run --example approve         # one-time builder fee approval (run first)\ncargo run --example check_status    # check approval status\ncargo run --example list_markets    # list all markets\ncargo run --example open_orders     # view open orders with cancel actions\ncargo run --example order_status -- 123  # check what happened to order by OID\ncargo run --example place_order     # place BTC perp IOC buy (~$11)\ncargo run --example cancel_order    # place resting order, then cancel\ncargo run --example roundtrip       # IOC buy then sell (full trade cycle)\ncargo run --example revoke          # revoke builder fee approval\n```\n\n---\n\n## How It Works\n\nEvery example follows the same pattern:\n\n1. **Build** — call `hl_build*` to get a hash (the service computes the EIP-712 hash, injects builder fee)\n2. **Sign** — sign the 32-byte hash locally with your private key\n3. **Send** — call `hl_send*` with the signature (the service forwards to Hyperliquid)\n\nAll coin references use names (`\"BTC\"`, `\"ETH\"`, `\"xyz:SILVER\"`) — the service resolves them to numeric indices.\n\n## API Docs\n\nFull API reference, error codes, and fees: **https://hyperliquidapi.com**\n\nWallet-based approval (no code needed): **https://hyperliquidapi.com/approve**\n\nllms.txt: **https://hyperliquidapi.com/llms.txt**\n\n## Disclaimer\n\nHyperliquid API \u0026 hyperliquidapi.com are not affiliated with Hyperliquid Corp or Hyper Foundation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiknode-labs%2Fhyperliquid-api-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquiknode-labs%2Fhyperliquid-api-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiknode-labs%2Fhyperliquid-api-examples/lists"}