-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docs to exchange API functions #58
base: master
Are you sure you want to change the base?
Conversation
|
||
Note: | ||
- The scheduled time must be at least 5 seconds after the current time. | ||
- Once the scheduled time arrives, all open orders will be canceled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found having a separate bullet is confusing. The trigger count is incremented when the scheduled time arrives, not when this action is sent.
- Once the scheduled time arrives, all open orders will be canceled. | |
- Once the scheduled time arrives, all open orders will be canceled and a trigger count is incremented. |
@@ -421,12 +519,12 @@ def usd_class_transfer(self, amount: float, to_perp: bool) -> Any: | |||
|
|||
# Deprecated in favor of usd_class_transfer | |||
def user_spot_transfer(self, usdc: float, to_perp: bool) -> Any: | |||
usdc = int(round(usdc, 2) * 1e6) | |||
usdc_rounded_micros = int(round(usdc, 2) * 1e6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer not making this rename. usdc has 6 decimals so this is the actual amount of usdc and is not rounded. Perhaps the input should have been usd instead of usdc, but renaming it now would be a breaking change
Args: | ||
amount (float): The amount of the token to transfer. | ||
destination (str): The destination address (EVM compatible) for the transfer. | ||
token (str): The identifier of the token to be transferred (e.g., "BTC", "ETH"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These example tokens are not spot tokens. Also the token identifier is a different format
token (str): The identifier of the token to be transferred (e.g., "BTC", "ETH"). | |
token (str): The identifier of the token to be transferred (e.g., "PURR:0xc1fb593aeffbeb02f85e0308e9956a90"). |
Initiate a withdrawal from the Hyperliquid bridge to a specified destination. | ||
|
||
Args: | ||
amount (float): The amount to withdraw. This should be in the base unit of the asset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this confusing. All withdrawals are in USDC
amount (float): The amount to withdraw. This should be in the base unit of the asset | |
amount (float): The amount of USD to withdraw. |
A few changes: