Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/perp_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def main():
f"{DUMMY_DEX}:TEST0": "14.0",
}
],
{
f"{DUMMY_DEX}:TEST0": "12.1",
f"{DUMMY_DEX}:TEST1": "1.1",
},
)
print("set oracle result:", set_oracle_result)

Expand Down
4 changes: 2 additions & 2 deletions examples/spot_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def main():
print(register_spot_result)
# If registration is successful, a spot index will be returned. This spot index is required for
# registering hyperliquidity.
if register_token_result["status"] == "ok":
spot = register_token_result["response"]["data"]
if register_spot_result["status"] == "ok":
spot = register_spot_result["response"]["data"]
else:
return

Expand Down
3 changes: 3 additions & 0 deletions hyperliquid/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,16 +910,19 @@ def perp_deploy_set_oracle(
dex: str,
oracle_pxs: Dict[str, str],
all_mark_pxs: List[Dict[str, str]],
external_perp_pxs: Dict[str, str],
) -> Any:
timestamp = get_timestamp_ms()
oracle_pxs_wire = sorted(list(oracle_pxs.items()))
mark_pxs_wire = [sorted(list(mark_pxs.items())) for mark_pxs in all_mark_pxs]
external_perp_pxs_wire = sorted(list(external_perp_pxs.items()))
action = {
"type": "perpDeploy",
"setOracle": {
"dex": dex,
"oraclePxs": oracle_pxs_wire,
"markPxs": mark_pxs_wire,
"externalPerpPxs": external_perp_pxs_wire,
},
}
signature = sign_l1_action(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "hyperliquid-python-sdk"
version = "0.18.0"
version = "0.19.0"
description = "SDK for Hyperliquid API trading with Python."
readme = "README.md"
authors = ["Hyperliquid <hello@hyperliquid.xyz>"]
Expand Down