Building on Dreamcash
Building on Dreamcash refers to any integration that interacts with the Hyperliquid API and includes the Dreamcash builder code. This covers custom trading interfaces, bots, and third-party applications.
You'll need this builder address before continuing:
0x4950994884602d1b6c6d96e4fe30f58205c393951. Prerequisites
Before starting, make sure:
- You have a Hyperliquid account
- You have already funded it with a small amount of USDC
- You have the Dreamcash app installed
2. Connect Dreamcash to Hyperliquid
- 1Create and fund your Hyperliquid account
- 2Go to https://dreamcash.xyz/connect
- 3Open the Dreamcash app
- 4Import the same wallet used for Hyperliquid
Once connected, Dreamcash will recognize and associate your Hyperliquid trading account.
3. API Endpoint
All trading requests are sent to:
POST https://api.hyperliquid.xyz/exchangeRequired header:
Content-Type: application/json4. Order Request Schema
A valid order request structure including the required Dreamcash builder block:
{
"action": {
"type": "order",
"grouping": "na",
"orders": [
{
"a": 0,
"b": true,
"p": "99140",
"s": "0.00021",
"r": false,
"t": {
"limit": {
"tif": "Gtc"
}
},
"c": "0x1234567890abcdef1234567890abcdef"
}
],
"builder": {
"b": "0x4950994884602d1b6c6d96e4fe30f58205c39395",
"f": 0
}
},
"nonce": 1764696986349,
"expiresAfter": 1764697000496,
"vaultAddress": null,
"signature": {
"r": "0xSIGNATURE_R",
"s": "0xSIGNATURE_S",
"v": 28
}
}Key Values
| Field | Purpose |
|---|---|
a | Asset ID (example: 0 = BTC) |
b | true = buy, false = sell |
p | Price |
s | Size |
t.limit.tif | Time in force (Gtc, Alo, Ioc) |
c | Optional client order ID |
builder.b | Dreamcash builder address |
builder.f | Builder fee — 0 recommended |
nonce | Millisecond timestamp |
signature | Valid signature generated by your signing logic |