Tokens: deployment values.
- Offer a new one only where
GET /v1/venuesshowschain.direct_deposit(orchain.direct_withdrawal) true; native USDC on Polygon also needschain.wallet_funding.conversion. owner, the payer, is the master or the account linked onvenue. A deposit’srecipientis an account linked onvenue, its receiving setup done: the venue’s owner address, never a deposit address or a Polymarket wallet. A withdrawal’s recipient isowner.min_outequalsamount, except for native USDC on Polygon: at least 0.01 USDC in, andmin_out, the least pUSD deposited, at leastceil(amount × 9,995 / 10,000). A deposit’smin_outreaches the venue’srelease_minimum.- Hyperliquid and Polymarket withdrawals and sends use margin transfers; cross-venue transfers use takes, with wallet funding and wallet delivery when needed.
With the SDK
- Persist
client_operation_idfirst. Resume with the same request and store:directTransferreconciles apendingoperation and never sends again after an unknown prompt or a lost answer. - It checks the operation against the request and the pinned deployment, reads the funds, approves exactly
amountonly when the allowance is short, then sends the transaction.beforeSigningruns before each prompt (stepapprove,depositorwithdrawal); one that throws sends nothing. signer.sendTransactioncalls its hash callback once broadcast and resolves once mined.inspectDirectTransaction(transaction, owner, now?, recipient?)checks, in an isolated signer, that a transaction is a direct call fromowner, a deposit creditingrecipient(ownerby default), and returns its terms. It reads the chain, contract and calldata only: refuse a transaction with a non-zero native value yourself.- The Rust SDK runs the same steps:
session.direct_transfer(&DirectRequest::deposit(..)?, &sender), its transactions sent through yourTransactionSender(Rust SDK).
Over HTTP
POST /v1/directwith the request: it returns the operation,prepared, with itsescrow,nonceanddeadline(30 minutes ahead). The sameclient_operation_idand terms return the same operation.GET /v1/direct/{id}/fundingreadsbalanceandallowancenow. For a deposit, approveamountoftokento the escrow when the allowance is short.- Before the wallet prompt, post an empty body: it moves
preparedtopendingonce, across tabs and devices. After a lost answer, never prompt again. - Send the transaction from
owner: a deposit isdirectDeposit(recipient, token, amount, min_out, nonce, deadline)on the escrow; a GMX withdrawal istransferOuton GMX’s MultichainTransferRouter (margin transfers). - Report each broadcast
tx_hash, replacements included, to the same route, at most eight distinct hashes. GET /v1/direct/{id}untilconfirmed,failedorexpired.
Outcomes
confirmed: final on chain,receivedthe amount moved. Hyperliquid credits HyperCore afterwards: read the venue before spending it.expired: a deposit not executed by itsdeadline, or a withdrawal never sent, once the chain is read past it.failed: the reported withdrawal reverted.- A deposit is found by its nonce, reported or not.
- A GMX withdrawal has no nonce: once
pending, it stays so until its hash is reported and found final. Never send another one because it is slow.