Hold the account in the provider’s asset
An account holds only contracts that settle in its own currency, and its risk policy converts no asset into another. Issue accounts in the provider’s own collateral asset:
List a Hyperliquid perpetual with
contractVersion: "native-perpetual-oracle-funding-v2", the
version the contract reference lookup proposes for it. Publish the risk policy
with currency set to the account currency and its posting term stating that currency’s
precision.
Margin a contract by the provider’s profile
Set the crypto derivative class’s margin to the provider’s profile:POST https://api.hyperliquid.xyz/info
with {"type": "meta"}) every minute and records each perpetual’s profile, its leverage tiers and
margin modes, when it changes and at least every hour. A contract trades under the newest profile
recorded no longer than maxAgeMs ago. With profileDigest set, it trades only under that one
profile: when Hyperliquid changes its terms, new exposure on the contract is refused until you
publish the new digest. Without a fresh profile, new exposure is refused; nothing falls back to a
flat rate.
The firm’s limits narrow the provider’s and never widen them. maxLeverage caps the leverage
and modes names the margin modes the account may use, each null for no limit of your own.
selection is either { "kind": "trader", "leverage": n }, where the trader chooses within the
limits and starts at n in the first mode the contract offers, cross before isolated, or
{ "kind": "fixed", "leverage": n, "marginMode": "cross" }, which holds every account to that one
setting. A contract no row names is not offered on the account.
Leverage and margin mode
The trader reads and sets them through the Trading API, as on any provider:GET /api/trading/symbol-config answers the leverage, the margin mode, the most leverage allowed,
the modes offered and whether a change is possible now; PUT /api/trading/symbol-config sets the
leverage and PUT /api/trading/margin-mode the margin mode. Hyperliquid sets both per
instrument, so a change reaches that instrument alone. It is refused while the instrument holds a
position, a working order or a charge still owed, and while the account is being liquidated.