Warning
This documentation is a template and shall be updated with your own APDUs.
This documentation describes the APDU messages interface to communicate with the Hyperliquid application.
The application interface can be accessed over HID or BLE
This command returns the derived address for the given BIP-32 path.
| CLA |
INS |
P1 |
P2 |
Lc |
Le |
| E0 |
01 |
00 |
00 |
variable |
variable |
| Description |
Length |
| Number of BIP 32 derivations to perform (max 10 levels) |
1 |
| First derivation index (big endian) |
4 |
| ... |
4 |
| Last derivation index (big endian) |
4 |
| Description |
Length |
| Derived address |
20 |
This command provides metadata about a hyperliquid action (which by itself does not contain enough information
for proper clear-signing). The metadata includes a signature, which is cryptographically verified by the app.
| CLA |
INS |
P1 |
P2 |
Lc |
Le |
| E0 |
02 |
01: first chunk |
00 |
variable |
variable |
|
|
00: following chunk |
|
|
|
| Description |
Length |
| Struct length (big endian) |
2 |
| ACTION_METADATA struct |
variable |
⚠️ Multi-chunk payloads are currently not supported by the app, but for future-proofing it was specified this way.
None
This command gives a hyperliquid action.
| CLA |
INS |
P1 |
P2 |
Lc |
Le |
| E0 |
03 |
01: first chunk |
00 |
variable |
variable |
|
|
00: following chunk |
|
|
|
| Description |
Length |
| Struct length (big endian) |
2 |
| ACTION struct |
variable |
⚠️ Multi-chunk payloads are currently not supported by the app, but for future-proofing it was specified this way.
| Description |
Length |
| ACTION struct |
variable |
None
This command signs a previously given hyperliquid action (in the same order).
| CLA |
INS |
P1 |
P2 |
Lc |
Le |
| E0 |
04 |
00 |
00 |
variable |
variable |
| Description |
Length |
| Number of BIP 32 derivations to perform (max 10 levels) |
1 |
| First derivation index (big endian) |
4 |
| ... |
4 |
| Last derivation index (big endian) |
4 |
| Description |
Length |
| Remaining actions to sign |
1 |
| signature v |
1 |
| signature r |
32 |
| signature s |
32 |
| Name |
Tag |
Type |
Optional |
| STRUCT_TYPE |
0x01 |
uint8 |
|
| STRUCT_VERSION |
0x02 |
uint8 |
|
| OPERATION_TYPE |
0xd0 |
OperationType |
|
| ASSET_ID |
0xd1 |
uint32 |
|
| ASSET_TICKER |
0x24 |
char[] |
|
| NETWORK |
0xd2 |
Network |
|
| BUILDER_ADDR |
0xd3 |
uint8[20] |
x |
| MARGIN |
0xd4 |
uint64 |
x |
| LEVERAGE |
0xd5 |
uint32 |
x |
| SIGNATURE |
0x15 |
uint8[] |
|
| Name |
Value |
| ORDER |
0x00 |
| MODIFY |
0x01 |
| CANCEL |
0x02 |
| UPDATE_LEVERAGE |
0x03 |
| CLOSE |
0x04 |
| UPDATE_MARGIN |
0x05 |
| CANCEL_SL |
0x06 |
| CANCEL_TP |
0x07 |
| CANCEL_TP_SL |
0x08 |
| Name |
Value |
| MAINNET |
0x00 |
| TESTNET |
0x01 |
| Name |
Value |
| BULK_ORDER |
0x00 |
| BULK_MODIFY |
0x01 |
| BULK_CANCEL |
0x02 |
| UPDATE_LEVERAGE |
0x03 |
| APPROVE_BUILDER_FEE |
0x04 |
| UPDATE_ISOLATED_MARGIN |
0x05 |
ℹ️ Multiple ORDER tags may be present; up to 5 ORDER tags are supported per BULK_ORDER.
| Name |
Tag |
Type |
Optional |
| ADDRESS |
0xd3 |
uint8[20] |
|
| FEE |
0xec |
uint64 |
|
| Name |
Value |
| NA |
0x00 |
| NORMAL_TPSL |
0x01 |
| POSITION_TPSL |
0x02 |
ℹ️ Multiple MODIFY tags may be present; up to 5 MODIFY tags are supported per BULK_MODIFY.
ℹ️ Multiple CANCEL tags may be present; up to 5 CANCEL tags are supported per BULK_CANCEL.
| Name |
Tag |
Type |
Optional |
| ASSET |
0xd1 |
uint32 |
|
| OID |
0xdc |
uint64 |
|
| Name |
Tag |
Type |
Optional |
| ASSET |
0xd1 |
uint32 |
|
| IS_CROSS |
0xde |
bool |
|
| LEVERAGE |
0xed |
uint32 |
|
| Name |
Tag |
Type |
Optional |
| ORDER_TYPE |
0xe0 |
OrderType |
|
| ASSET |
0xd1 |
uint32 |
|
| IS_BUY |
0xe2 |
bool |
|
| LIMIT_PX |
0xe3 |
char[] |
|
| SZ |
0xe4 |
char[] |
|
| REDUCE_ONLY |
0xe5 |
bool |
|
| ORDER |
0xd7 |
LIMIT_ORDER | TRIGGER_ORDER |
|
| Name |
Value |
| LIMIT |
0x00 |
| TRIGGER |
0x01 |
| Name |
Tag |
Type |
Optional |
| TIF |
0xe6 |
Tif |
|
| Name |
Value |
| ALO |
0x00 |
| IOC |
0x01 |
| GTC |
0x02 |
| Name |
Tag |
Type |
Optional |
| IS_MARKET |
0xe7 |
bool |
|
| TRIGGER_PX |
0xe8 |
char[] |
|
| TPSL |
0xe9 |
TriggerType |
|
| Name |
Value |
| TP |
0x00 |
| SL |
0x01 |
| Name |
Tag |
Type |
Optional |
| SIGNATURE_CHAIN_ID |
0x23 |
uint64 |
|
| MAX_FEE_RATE |
0xb0 |
char[] |
|
| BUILDER |
0xd3 |
uint8[20] |
|
| Name |
Tag |
Type |
Optional |
| ASSET |
0xd1 |
uint32 |
|
| IS_BUY |
0xe2 |
bool |
|
| NTLI |
0xd6 |
int64 |
|