Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Quickstart

This walks through one order end to end in Python. You need a wallet on the exchange's chain holding some USDC, and its private key.
pip install requests eth-account
  1. Read the configuration
    import requests, time GATEWAY = "https://…" # the gateway's address config = requests.get(f"{GATEWAY}/v1/config").json() DOMAIN = {"name": "Hypervolic", "version": "1", "chainId": config["chainId"], "verifyingContract": config["settlement"]}
  2. Deposit
    Approve USDC to config["settlement"] and call deposit(amount) on it, from your wallet or with any Ethereum library. See Funding. Your account opens when the deposit is credited, within a few blocks.
  3. Pick a contract
    instruments = requests.get(f"{GATEWAY}/v1/instruments").json() inst = next(i for i in instruments if i["right"] == 0 and i["strike"] == 500_000) book = requests.get(f"{GATEWAY}/v1/book/{inst['underlyingKey']}/{inst['specifier']}").json() print(book["asks"][:3])
    Python's integers are exact, so the large specifier survives as is.
  4. Sign and send an order
    from eth_account import Account acct = Account.from_key(PRIVATE_KEY) ORDER = {"Order": [ {"name": "maker", "type": "address"}, {"name": "underlyingKey", "type": "uint64"}, {"name": "optionSpecifier", "type": "uint64"}, {"name": "side", "type": "uint8"}, {"name": "size", "type": "uint64"}, {"name": "limitPrice", "type": "uint64"}, {"name": "nonce", "type": "uint64"}, {"name": "expiresAt", "type": "uint64"}, {"name": "maxFeeBps", "type": "uint8"}, ]} order = { "maker": acct.address, "underlyingKey": inst["underlyingKey"], "optionSpecifier": inst["specifier"], "side": 0, # buy "size": 1, "limitPrice": 200_000, # 0.20: $20.00 per contract "nonce": int(time.time() * 1000), # increasing, unique "expiresAt": inst["expiryMs"], # good until the contract expires "maxFeeBps": max(inst["makerFeeBps"], inst["takerFeeBps"]), } sig = Account.sign_typed_data(acct.key, DOMAIN, ORDER, order).signature r = requests.post(f"{GATEWAY}/v1/orders?wait=1000", json={"order": order, "signature": "0x" + bytes(sig).hex()}) print(r.status_code, r.json())
    With ?wait, the answer is the engine's: resting, filled, expired or refused with a code. See Orders.
  5. Cancel it
    CANCEL = {"Cancel": [{"name": "maker", "type": "address"}, {"name": "nonce", "type": "uint64"}, {"name": "orderNonce", "type": "uint64"}]} cancel = {"maker": acct.address, "nonce": order["nonce"] + 1, "orderNonce": order["nonce"]} sig = Account.sign_typed_data(acct.key, DOMAIN, CANCEL, cancel).signature print(requests.post(f"{GATEWAY}/v1/cancel", json={**cancel, "signature": "0x" + bytes(sig).hex()}).json())

Next

  • Signing: nonces, signing keys, and the same in TypeScript.
  • WebSocket: follow books and your account live instead of waiting on each order.
  • Security: what an order needs in free cash before it is admitted.